# S_TransNeXtM: a pig behavior recognition model based on the TransNeXtM and the sLSTM

**Authors:** Wangli Hao, Xinyuan Hu, Yakui Xue, Hao Shu, Meng Han

PMC · DOI: 10.3389/fvets.2025.1674842 · Frontiers in Veterinary Science · 2025-10-02

## TL;DR

The paper introduces S_TransNeXtM, a new model for pig behavior recognition that improves accuracy by combining spatial and temporal information.

## Contribution

The novel S_TransNeXtM model integrates a bio-inspired attention mechanism and sLSTM for better pig behavior recognition.

## Key findings

- S_TransNeXtM achieves 94.53% accuracy in pig behavior recognition.
- The model outperforms previous benchmarks by up to 11.32%.
- The sLSTM improves temporal sequence dependencies compared to GRU and LSTM.

## Abstract

Pig behavior recognition serves as a crucial indicator for monitoring health and environmental conditions. However, conventional pig behavior recognition methods are limited in their ability to effectively extract image features and analyze long sequence dependencies, ultimately reducing pig behavior recognition performance. To address these challenges, we proposes a pig behavior recognition model S_TransNeXtM which leverages both spatial and temporal information underlying the video. Specifically, an innovative backbone, named TransNeXtM, has been developed for the spatial domain. It incorporates a bio-inspired Aggregated Attention Mechanism, a Convolutional GLU, and a Mamba unit, which allows the model to capture more discriminative global and local features. For the temporal domain, the sLSTM is proposed to process sequence data by utilizing an exponential gating mechanism and a stabilizer state. This design allows the model to establish longer temporal sequence dependencies, outperforming conventional GRU and LSTM. Based on the above insights, the S_TransNeXtM enhances the performance of pig behavior recognition. Experimental results demonstrate that the proposed S_TransNeXtM model achieves the state-of-the-art performance in pig behavior recognition task. Consequently, the S_TransNeXtM attains an accuracy of 94.53%, marking an improvement of up to 11.32% over previous benchmarks.

## Linked entities

- **Species:** Sus scrofa (taxon 9823)

## Full-text entities

- **Species:** Sus scrofa (pig, species) [taxon 9823]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12529822/full.md

## Figures

8 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12529822/full.md

## References

28 references — full list in the complete paper: https://tomesphere.com/paper/PMC12529822/full.md

---
Source: https://tomesphere.com/paper/PMC12529822