Skip to main content
Neuroscience Bulletin logoLink to Neuroscience Bulletin
letter
. 2024 Sep 4;40(12):1950–1954. doi: 10.1007/s12264-024-01291-2

A Machine Learning Approach for Behavioral Recognition of Stress Levels in Mice

Hao Song 1,2, Shirley Shimin Qiu 3,4, Binghao Zhao 3,4, Xiuling Liu 1,2,, Yu-Ting Tseng 3,4,, Liping Wang 3,4,
PMCID: PMC11625035  PMID: 39227540

Dear Editor,

Stress contributes significantly to many diseases in modern society. Numerous studies have revealed that exposure to stress leads to increased vulnerability to anxiety, depression, and other mood disorders, which are often accompanied by conditions such as cardiovascular disease and cognitive impairments [1, 2]. Although laboratory animals play an important role in stress research, quantifying the intensity of stress responses based on behavioural changes remains a significant challenge. Current behavioral indices of stress in mice employ only a reductionist perspective of complex and dynamic patterns of exploratory behavior (e.g., time spent in the center of an open field) [3]. The drawbacks of such indices include the fact that behavioral responses lie on a continuum that cannot be easily sectionalized [4]. In recent years, with the increasing availability of affordable computing power and the success of artificial intelligence technology in biological data analysis, the use of machine learning (ML) has become crucial in the analysis of complex ethological behaviors and drug discovery [57]. This raises the question of whether automatic stress level recognition systems and ML-supported classification can be developed and used to score stress-related behavioral pattern changes in laboratory animals.

Given the assumption that measurable behavioral readouts can reflect internal states in mammals [8], we examined whether exposure to a panel of stress-inducing tests to produce various stress levels can be reflected in spontaneous behaviors in mice. The tail suspension test (TST) is commonly used to investigate stress-coping behaviors in mice. During the TST, mice are typically suspended by their tail for 6 min, and the resulting escape-oriented behaviors in response to this inescapable stress are quantified [9]. Therefore, we assessed whether there is a cumulative impact of inescapable stress on spontaneous behaviors and whether behavioral variations can be captured by a hierarchical 3D-motion learning framework, known as the Behavior Atlas (BeA) [6].

We exposed mice to TST of different durations (1, 2, 3, 4, 5, and 6 min for each group), named TST 1, TST 2, TST 3, TST 4, TST 5, and TST 6 (Fig. 1A, B). Following the exposure, mice were immediately recorded in a multi-camera open-field arena and their behaviors were analyzed using the BeA multilayered framework (Fig. 1C–E). Forty behavioral motifs were obtained by applying BeA clustering of the behavioral modules identified in the 84 animals. We assessed the intra-cluster and inter-cluster correlation coefficients (CCs) to evaluate the power of BeA in recognizing behavioral motifs. The results show that almost all behavioral motifs had higher intra-cluster CCs and relatively lower inter-cluster CCs (Fig. 1F). On the other hand, we found that the average distribution of 40 behavioral motifs (Table S1) in the control (Ctrl) group was relatively uniform, and TST disrupted this uniform state by adjusting the fractions of specific behavioral motifs (Fig. 1G). Averaging all instances of mouse behavior in the different groups allowed us to use Kullback-Leibler Divergence (KLD) to quantify the similarity of behavioral motif distributions in pairwise comparisons across different stress levels. We found that the Ctrl group and each of the TST subgroups exhibited a characteristic pattern of behavior (Fig. 1H). Interestingly, decoding analysis revealed that, in the original data space, the different stress groups could not be distinguished by patterns of 40 behavioral motifs that were identified by the BeA (Fig. 1M).

Fig. 1.

Fig. 1

Linear Discriminant Analysis is more suitable for stress level recognition tasks than UMAP and t-SNE. A Schematic of the trial structure used for the capture of mouse behavior. B Schematic of the control (Ctrl) and tail suspension test behavioral paradigms. Mice created with BioRender.com. C Multi-view motion capture system. Center, behavior recorded in freely moving mice by four RGB cameras in the open-field arena; left/right, frames captured by the cameras overlaid with DeepLabCut labels for 16 key mouse body points. D Three-dimensional reconstruction of mouse skeletons. Lines of different colors represent the motion trajectories of 16 key body points for a duration of 100 frames (30 fps). E Spatiotemporal feature space of behavioral components based on unsupervised clustering. The 3D scatter plot shows the feature space of 40 movement types, with distinct regions or colors representing different types; each dot represents one movement bout. F Intra-cluster CCs (red) and inter-cluster CCs (blue) of each behavioral motif. The dots on each box plot represent either the intra-cluster CCs or inter-cluster CCs. The number of dots in a pair of box plots in each group is the same (Intra-cluster CCs: 0.96 ± 0.04; Inter-cluster CCs: 0.29 ± 0.01, mean ± SD). G The fractions of 40 behavioral motifs across the 7 stress groups. H Heatmap showing the KLD values of pairwise comparisons between 7 stress-related behavioral motif distributions. We computed a stress-dependent motif distribution by pooling mice corresponding to specific stress levels. We calculated the pairwise KLD between all stress groups corresponding to the same or different stress levels and then plotted the normalized value of those pairwise comparisons in each cell. These values quantify the similarity of module distributions across different stress levels, with lower values indicating greater similarity. I–K Left, Two-dimensional representation of the 7 stress-level groups. Each dot on the 2D scatter plot represents one mouse; right: pairwise similarity matrix in the embedded space, rearranged as Ctrl, TST 1, TST 2, TST 3, TST 4, TST 5, TST 6. Each pixel in the panel represents the normalized similarity value between a pair of mice from the ith row and the jth column. L Normalized confusion matrix from the trained multi-class SVM for distinguishing stress levels based on dimensionality reduction of module distributions. The dimensionality reduction method corresponds to Fig. I–K. M The average precision-recall curve and F1 score for all stress levels. In the panel, “Fraction” represents behavioral fractions directly fed into the SVM, “LDA Dim” represents LDA dimension reduction, “t-SNE Dim” represents t-SNE dimension reduction, and “UMAP Dim” represents UMAP dimension reduction. Furthermore, in order to mitigate the possibility of chance results, we conducted 500 random validation experiments and computed the precision, recall, and F1 scores at different data splits.

This may be because the original high dimensional data contained redundant features or noise, which can lead to disturbances in the ML process that exploits these data [10]. Therefore, we applied low-dimensional embedding of the 40 behavioral motif fractions utilizing different widely-used ML algorithms. Here, we attempted three different methods to reduce data dimensions that have garnered significant attention: t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), and linear discriminant analysis (LDA) [6, 7, 11]. It has been shown that UMAP can differentiate spontaneous behaviors of mice with different genotypes (wildtype and shank3B knockout) and t-SNE distinguishes those behaviors while exposed to different stressors [6, 7]. However, we found that TST duration-induced patterns of behavior were not clustered in a low-dimensional embedding of behavioral motif fractions using t-SNE and UMAP algorithms (Fig. 1I, J left). By contrast, these behavioral patterns were well clustered following LDA embedding (Fig. 1K left). A similarity matrix was computed in the embedded space (Fig. 1I–K right), and it was found that the within-group similarity after LDA dimensionality reduction was significantly better than that achieved by the t-SNE and UMAP. Compared to the other two non-linear methods, the linear LDA method appears to have made our data more discriminatory.

A multi-classification support vector machine (SVM) trained on the low-dimensional embedding of behavioral motif fractions revealed that LDA embedding was effective in distinguishing different TST durations based on mouse behavioral patterns (Fig. 1L). In contrast, t-SNE and UMAP embeddings did not yield satisfactory results in the recognition of stress levels (Fig. 1L). The precision-recall curve revealed that the LDA embedding exhibited superior classification performance compared to t-SNE and UMAP embeddings in our data (Fig. 1M). Next, we examined the F1 score, which is defined as a harmonic mean of precision and recall. The F1 score summarizes the ability of a given method to capture true positives while effectively rejecting both false positives and negatives. Specifically, LDA embedding achieved an F1 score of 0.91 ± 0.02 (mean ± SD), while t-SNE and UMAP embeddings obtained F1 scores of 0.27 ± 0.08 and 0.23 ± 0.08, respectively (Fig. 1M). Our results suggest that application of the LDA algorithm to ML-measured spontaneous behaviors is suitable for distinguishing the cumulative effects of the same stress. A possible explanation is that the LDA algorithm provides optimal data representation by maximizing between-class scatter and minimizing within-class scatter, thereby increasing class separation [12].

It has been reported that LDA provides a viable approach to effectively reduce the dimensionality of data [13]. Specifically, LDA estimates separate covariance matrices for each class and applies the general multivariate normal assumption following the transformation [13]. Therefore, statistical analyses that are challenging due to high-dimensional data may be more manageable in the LDA-embedded lower-dimensional space [5, 13]. This will provide opportunities for further predictions of mouse behavioral patterns from spontaneous behaviors.

To examine differences in specific behavioral motifs between groups, which may contribute to various behavioral patterns resulting from the cumulative effects of stress, we statistically analyzed the 40 behavioral motifs obtained through the BeA framework (Fig. S1A–C). We identified three distinct types of behavioral motifs that may account for the cumulative effects of stress. Type 1 motifs are defined by a trend towards an increased behavioral fraction as TST duration increases (Fig. S1A). Type 2 motifs, in contrast to type 1, exhibit a trend toward a decline in fraction as TST increases (Fig. S1B). In contrast, type 3 motifs display a statistically significant difference in the fraction of behavioral motifs within a particular group (Fig. S1C).

To quantify the relative contribution of the three types of behavior to stress levels, we trained multiple models using either a single type of behavior or a combination of several types in the embedded space (Table 1). Three interesting points were discovered. Firstly, we found that the model’s accuracy in identifying stress levels increased with the number of behavioral motifs used. Secondly, the F1 score for the group, including a total of 21 behavioral motifs of the three types, yielded the optimal result of 0.63 ± 0.06, compared to the groups using the other 21 behaviors. It is reasonable to suppose that these three types of behaviors play a dominant role in the cumulative effects of stress. Thirdly, we examined the impact of the number of same-type behavioral motifs on stress level assessment. The results indicated that using the behavioral motif within the same type produced a slight increase in the model's accuracy as the numbers increased. Meanwhile, type 3 behaviors contributed more significantly to the overall accuracy of the model’s recognition compared to type 1 and type 2 behaviors. These findings suggest the importance of type 3 behavioral motifs for achieving success. In summary, it can be inferred that changes in behavioral patterns resulting from cumulative stress effects are a collective characteristic and unevenly distributed across all behavioral motifs. An approach that incorporates global features is required to identify such differences.

Table 1.

Model evaluation for different combinations of behavioral motifs.

Combination Number of motifs Fraction LDA t-SNE UMAP
Part of Type 1 2 0.15±0.02 0.15±0.02 0.11±0.02 0.08±0.01
Part of Type 1 4 0.19±0.03 0.2±0.03 0.19±0.05 0.15±0.02
Type 1 5 0.16±0.05 0.19±0.05 0.13±0.03 0.17±0.04
Part of Type 2 2 0.12±0.02 0.12±0.02 0.19±0.03 0.14±0.03
Part of Type 2 4 0.12±0.02 0.13±0.02 0.15±0.03 0.15±0.03
Part of Type 2 6 0.11±0.02 0.12±0.02 0.1±0.02 0.14±0.03
Type 2 7 0.13±0.02 0.12±0.03 0.1±0.01 0.16±0.03
Part of Type 3 2 0.17±0.04 0.18±0.04 0.09±0.03 0.16±0.03
Part of Type 3 4 0.22±0.07 0.22±0.08 0.2±0.03 0.21±0.07
Part of Type 3 6 0.23±0.08 0.23±0.08 0.11±0.03 0.21±0.07
Part of Type 3 8 0.24±0.08 0.24±0.08 0.18±0.03 0.23±0.06
Type 3 9 0.24±0.07 0.26±0.06 0.15±0.03 0.19±0.06
Type 1 + Type 2 12 0.2±0.04 0.29±0.03 0.14±0.04 0.13±0.02
Type 1 + Type 3 14 0.26±0.07 0.39±0.09 0.1±0.03 0.23±0.07
Type 2 + Type 3 16 0.28±0.08 0.4±0.09 0.12±0.03 0.24±0.07
Type 1 + Type 2 + Type 3 21 0.29±0.07 0.63±0.06 0.17±0.05 0.24±0.07
Type 1 + Type 2 + Others 21 0.18±0.04 0.43±0.04 0.15±0.03 0.15±0.03
Type 1 + Type 3 + Others 21 0.25±0.07 0.49±0.08 0.14±0.03 0.21±0.08
Type 2 + Type 3 + Others 21 0.25±0.08 0.55±0.07 0.19±0.05 0.27±0.08
Type 1 + Type 2 + Type 3 + Others 40 0.29±0.07 0.91±0.02 0.27±0.08 0.23±0.08

Therefore, we propose an ML-based method to capture the cumulative effects of stress in mice. It did not consider the statistical significance of individual behavioral motifs. Instead, it took into account the global features of behavioral motifs and searched for the most discriminative projection space in high-dimensional data space. A multi-classification SVM was trained on this projection space to recognize the cumulative effects of stress.

Converging lines of research have demonstrated that stress plays a significant role in the onset of mood disorders, including anxiety and depression [1]. For example, excessive physiological stress is associated with adverse effects such as neuroimmune dysregulation and impaired synaptic function, which are believed to play a role in the behavioral and cognitive symptoms associated with depression [14]. Unfortunately, the diagnosis of stress-related mood disorders has mainly relied on subjective clinical observation [15]. The identification of behavioral abnormalities occurring before diagnosis is still largely unexplored, which may hinder the implementation of strategies for prevention and early intervention [16]. Therefore, accurate identification of behavioral patterns associated with stress levels is crucial for the development of strategies for early prognosis [15]. Our study has successfully achieved this identification using a behavioral pattern automatic discrimination technique, in which we leveraged the recently developed BeA with a data dimensionality reduction method and a multi-classification SVM. It also expands the application range of our recently developed BeA. Meanwhile, our results showed that LDA dimensionality reduction enhanced the recognition of cumulative stress effects compared with t-SNE and UMAP. Furthermore, most clinical datasets (e.g., multi-omics data) suffer from the classical ‘curse of dimensionality’ problem due to their high dimensionality and relatively few observation samples [5]. The redundant features contained in high-dimensional space often mislead algorithm training [10]. Therefore, feature reduction to reduce dimensionality is necessary in clinical datasets by applying dimensionality reduction techniques such as feature extraction or feature selection. Our study may offer guidance for selecting appropriate dimensionality reduction methods. This study primarily employed ML methods, and we also noted the recent prominence of artificial neural networks and other deep learning approaches. They have demonstrated enormous potential in areas such as animal tracking and spontaneous behavior recognition [6, 17]. Future study should be directed towards applying deep learning methods for behavioral analysis.

Supplementary Information

Below is the link to the electronic supplementary material.

Acknowledgements

This work was supported by grants from the National Natural Science Foundation of China (32200826, 32230042, and U20A20224), the Shenzhen Medical Research Fund (B2302004), the Shenzhen Science and Technology Program (JCYJ20220530154412028), the Financial Support for Outstanding Talents Training Fund in Shenzhen, and the Natural Science Foundation of Hebei Province (F2022201037).

Conflict of interest

All authors claim that there are no conflicts of interest.

Contributor Information

Xiuling Liu, Email: liuxiuling121@hotmail.com.

Yu-Ting Tseng, Email: yt.zeng@siat.ac.cn.

Liping Wang, Email: lp.wang@siat.ac.cn.

References

  • 1.Seo JS, Wei J, Qin L, Kim Y, Yan Z, Greengard P. Cellular and molecular basis for stress-induced depression. Mol Psychiatry 2017, 22: 1440–1447. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Kivimäki M, Steptoe A. Effects of stress on the development and progression of cardiovascular disease. Nat Rev Cardiol 2018, 15: 215–229. [DOI] [PubMed] [Google Scholar]
  • 3.Kinlein SA, Phillips DJ, Keller CR, Karatsoreos IN. Role of corticosterone in altered neurobehavioral responses to acute stress in a model of compromised hypothalamic–pituitary–adrenal axis function. Psychoneuroendocrinology 2019, 102: 248–255. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Gururajan A, Reif A, Cryan JF, Slattery DA. The future of rodent models in depression research. Nat Rev Neurosci 2019, 20: 686–701. [DOI] [PubMed] [Google Scholar]
  • 5.Reel PS, Reel S, Pearson E, Trucco E, Jefferson E. Using machine learning approaches for multi-omics data analysis: A review. Biotechnol Adv 2021, 49: 107739. [DOI] [PubMed] [Google Scholar]
  • 6.Huang K, Han Y, Chen K, Pan H, Zhao G, Yi W. A hierarchical 3D-motion learning framework for animal spontaneous behavior mapping. Nat Commun 2021, 12: 2784. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Tseng YT, Zhao B, Ding H, Liang L, Schaefke B, Wang L. Systematic evaluation of a predator stress model of depression in mice using a hierarchical 3D-motion learning framework. Transl Psychiatry 2023, 13: 178. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Shemesh Y, Chen A. A paradigm shift in translational psychiatry through rodent neuroethology. Mol Psychiatry 2023, 28: 993–1003. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Can A, Dao DT, Terrillion CE, Piantadosi SC, Bhat S (2012) Gould TD. J Vis Exp, The tail suspension test10.3791/3769-v . [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Dornaika F, Khoder A. Linear embedding by joint Robust Discriminant Analysis and Inter-class Sparsity. Neural Netw 2020, 127: 141–159. [DOI] [PubMed] [Google Scholar]
  • 11.Xu L, Raitoharju J, Iosifidis A, Gabbouj M. Saliency-based multilabel linear discriminant analysis. IEEE Trans Cybern 2022, 52: 10200–10213. [DOI] [PubMed] [Google Scholar]
  • 12.Phukpattaranont P, Thongpanja S, Anam K, Al-Jumaily A, Limsakul C. Evaluation of feature extraction techniques and classifiers for finger movement recognition using surface electromyography signal. Med Biol Eng Comput 2018, 56: 2259–2271. [DOI] [PubMed] [Google Scholar]
  • 13.Hart PE, Stork DG, Duda RO. Pattern classification. Wiley Hoboken, 2000.
  • 14.Horchar MJ, Wohleb ES. Glucocorticoid receptor antagonism prevents microglia-mediated neuronal remodeling and behavioral despair following chronic unpredictable stress. Brain Behav Immun 2019, 81: 329–340. [DOI] [PubMed] [Google Scholar]
  • 15.Lin CH, Lane HY. Early identification and intervention of schizophrenia: Insight from hypotheses of glutamate dysfunction and oxidative stress. Front Psychiatry 2019, 10: 93. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Colizzi M, Lasalvia A, Ruggeri M. Prevention and early intervention in youth mental health: Is it time for a multidisciplinary and trans-diagnostic model for care? Int J Ment Health Syst 2020, 14: 23. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Han Y, Huang K, Chen K, Pan H, Ju F, Long Y, et al. MouseVenue3D: A markerless three-dimension behavioral tracking system for matching two-photon brain imaging in free-moving mice. Neurosci Bull 2022, 38: 303–317. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials


Articles from Neuroscience Bulletin are provided here courtesy of Springer

RESOURCES