Summary
Second-order conditioning (SOC) enables animals to form associations between stimuli without direct reinforcement. In this study, we present a behavioral analysis pipeline that combines a light-tone SOC paradigm in mice with tools such as DeepLabCut, Keypoint-MoSeq, and DeepOF to evaluate responses across sex and age. Our results show that responses to the second-order stimulus (CS2) specifically stem from its association with the first-order stimulus (CS1). While CS1 triggers behavioral syllables related to immobility, CS2 elicits distinct behavioral responses, including immobility- and escape-related actions, suggesting SOC reorganizes, rather than replicates, first-order responses. These data-driven insights surpass the resolution of simple traditional measures (e.g., immobility). Lastly, we identified age-related deficits: older mice maintained responses to CS1 but exhibited impaired responses to CS2, regardless of sex. These findings uncover the complexity of SOC, its susceptibility to aging, and the value of data-driven tools in behavioral neuroscience.
Keywords: associative learning, second-order conditioning, SOC, behavioral profiling, unsupervised behavior analysis, supervised behavior analysis, age-dependent learning deficits, sex differences in behavior
Graphical abstract

Highlights
-
•
Data-driven pipeline dissects second-order conditioning behavior in mice
-
•
Second-order conditioning elicits unique stimulus-specific behavioral signatures
-
•
Age impairs second-order conditioning responses in mice
Motivation
We created a behavioral analysis pipeline that leverages open-source tools to examine second-order conditioning (SOC) in mice with exceptional detail. This addresses key limitations in the field that traditional methods fail to resolve: whether second-order conditioned responses replicate or differ from first-order ones and how age and sex modulate SOC. By integrating DeepLabCut, Keypoint-MoSeq, and DeepOF, we captured behaviors often overlooked by manual or single-metric approaches. Therefore, this work shows the power of combining advanced behavioral tools to reveal subtle, biologically meaningful behaviors.
Canela et al. introduce a data-driven pipeline to dissect second-order conditioning (SOC) behavioral responses in mice. Their work reveals that SOC elicits unique behavioral signatures depending on the stimulus, highlights age-related deficits in SOC, and demonstrates the power of advanced unsupervised behavioral analysis for uncovering subtle behavioral responses.
Introduction
An animal’s survival relies on its ability to recognize salient environmental stimuli through learning, enabling it to seek out potential rewards and avoid future threats. To study associative learning, researchers have favored classical Pavlovian first-order conditioning (which associates a conditioned stimulus [CS] with an unconditioned stimulus [US]) because it enables fast learning, generates strong and reproducible responses, and remains consistent across species.1,2,3 However, human and animal daily choices often rely on stimuli that are indirectly associated with a strong reinforcer.4,5,6,7,8 This process, known as higher-order conditioning, allows for forming intricate incidental associations between non-reinforced stimuli from different sensory modalities. Researchers study higher-order conditioning in animals using sensory preconditioning (SPC)9,10 and second-order conditioning (SOC). Specifically, SOC consists of two phases: a first phase in which we associate a neutral stimulus (first-order stimulus [CS1]) with a US, such as an electric foot shock, and a second phase in which we associate the previously conditioned CS1 with a novel second-order stimulus (CS2).5,7,11 As a result, CS2 becomes associated with a reinforced CS1 and elicits a conditioned response.5,7,8,10,12
SOC is especially relevant to neuroscience because it offers a simple mechanism to study cue inferences and the transference of emotional valence across stimulus hierarchies. Indeed, this indirect transference of value is one of the key elements guiding behavior in animals and humans.13 For instance, advertising companies widely leverage SOC by associating products (CS2) with stimuli that elicit positive emotions (CS1). A typical example is an advertisement that pairs a bottle of a soft drink (CS2) with uplifting scenes, such as festive gatherings or joyful moments (CS1). Through this association, the product becomes linked to feelings of happiness.14
The study of behavioral changes remains one of the most powerful tools for investigating associative learning.15 In the context of SOC, a central but unresolved question is whether the behavioral response to the CS2 merely replicates that of the CS1 or if new and distinct behaviors emerge. Characterizing these behavioral differences is crucial not only because they are largely unknown but also because they provide insight into the cognitive and neural circuits underlying learning. First-order conditioning and SOC may engage partially distinct brain pathways, and identifying how behavior differs between them is a critical first step toward uncovering their respective neural substrates.7,12 Furthermore, although research has identified behavioral differences in first-order conditioning across biological variables such as age16 and sex,17 it remains unclear whether similar differences exist in second-order conditioned responses.
Addressing these questions requires a detailed analysis of the behavioral repertoires elicited by CS1 and CS2. Nevertheless, most well-known methods for assessing behavioral responses in SOC and other fear learning paradigms present several drawbacks. Researchers often rely on the manual quantification of simple measurements, which involves human observers documenting animal behaviors. This manual labeling tends to be inconsistent and biased and usually focuses on specific traits, obviating the full array of behavioral responses. Thus, despite the complexity of behavior, many studies rely on oversimplified analyses because tracking multiple behaviors is challenging due to the limited sensitivity of traditional systems, like infrared beams or pressure plates.18
Luckily, automatic behavior annotation is evolving with advancements in machine learning. These innovations in computer vision enhance behavioral assessments and improve research efficiency. Although state-of-the-art software may require significant initial setup, training, and validation to ensure accuracy, it offers high-throughput capabilities, enabling an objective, consistent, and reproducible behavioral analysis. Indeed, new tools now facilitate standardized behavioral scoring, such as DeepLabCut, which extracts animal poses and enables precise behavioral tracking.19
DeepLabCut integrates with various computational tools, using pose estimation to support unsupervised and supervised behavioral analyses.20 Unsupervised strategies can uncover previously unrecognized behaviors, providing new insights into behavioral repertoires, while the supervised approach allows researchers to accurately classify and consistently label well-defined behaviors.
For example, Keypoint-MoSeq provides an unsupervised approach that detects behavioral sequences with second or millisecond precision in mammals and insects.21 Moreover, researchers have identified distinct social and behavioral profiles in mice subjected to chronic stress by employing the pre-trained classifiers from DeepOF.22 Although these unsupervised and supervised computational tools are transforming behavioral neuroscience, the next major challenge lies in making them accessible to a broader audience by developing user-friendly pipelines that fully harness their potential.
In this study, we introduce a behavioral analysis pipeline that, although built upon established open-source tools, enables a comprehensive investigation of SOC in mice. We successfully designed and validated a mouse light-tone SOC protocol based on the simultaneous presentation of CS1 and CS2 during the learning phase, a departure from the traditional serial presentation methods11 and, to our knowledge, the first of its kind in the SOC mouse literature. Our behavioral SOC protocol reliably elicits second-order conditioned responses and reveals previously unreported differences between behavioral responses to CS1 and CS2. Moreover, our findings highlight a deficit in second-order conditioned responses in aged mice, suggesting age-related impairments that selectively affect behavioral responses to CS2 but not CS1. Crucially, our results underscore the importance of approaching behavior as a complex, integrated phenomenon rather than reducing it to a limited set of predefined traits.
Although our pipeline uses existing software rather than introducing entirely new tools, it combines them into a unified framework that, as far as we are aware, has not been previously applied in this context. Beyond the biologically meaningful insights gained through its application to SOC, we believe that this pipeline offers a powerful resource for researchers seeking a multidimensional perspective on behavior, providing insights that would fail to emerge from isolated methodologies alone.
Results
Data-driven decomposition of behavior validates our SOC protocol
We established a light-tone SOC protocol in mice, which consists of four behavioral phases conducted over 4 consecutive days: habituation, first-order conditioning (pairing a light, CS1, with an electric foot shock, US), SOC (pairing the light, CS1, with a tone, CS2), and a final test phase that assesses conditioned behavioral responses to CS1 and CS2.
We used three experimental groups to validate this protocol: paired, no shock, and unpaired. The paired group underwent the complete SOC sequence. Following habituation (phase 1), we associated the light (CS1) with an electric foot shock (phase 2). In the next phase, we associated the same light (CS1) with a tone (CS2) using simultaneous pairings (phase 3), forming a second-order association (Figure 1A). Conversely, the no-shock group followed an identical protocol without the electric foot shock (Figure 1B). This group ruled out any inherent aversive valence of CS1 or CS2. Finally, the unpaired group experienced all stimuli, but we dissociated the light (CS1) and tone (CS2) during the second-order phase (Figure 1C). This unpaired group allowed us to test whether responses to CS2 reflected a true second-order association or were merely the result of fear generalization.
Figure 1.
Overview of the experimental groups, behavioral analysis pipeline, and statistical results used to assess SOC in mice
(A) Experimental design for the paired SOC group, where a light (CS1) was initially paired with an electric foot shock (US) and then associated with a neutral tone (CS2). We expect behavioral changes in response to CS1 and CS2.
(B) Experimental design for the no-shock SOC group, in which mice experienced CS1 and CS2 without foot shock. We expect a lack of behavioral changes.
(C) Experimental design for the unpaired SOC group, in which unpaired presentations of CS1 and CS2 occur. We expect a behavioral change to CS1 but not to CS2.
(D) Schematic representation of the pipeline to analyze behavioral differences. We tracked the key points of animals using DeepLabCut and extracted behavioral motifs using Keypoint-MoSeq. Then, we analyzed the behavioral syllables, considering the abundance before and during the stimulus presentation (CS1 and CS2) and the transition patterns between syllables during both times.
(E) Results from Hotelling’s T2 test of the Δ values, represented as the negative logarithm of the p value for each experimental condition: CS1 paired (p < 0.0001, n = 18), CS1 unpaired (p < 0.0001, n = 18), CS2 paired (p = 0.017, n = 18), CS1 no shock (p = 0.072, n = 18), CS2 no shock (p = 0.128, n = 18), and CS2 unpaired (p = 0.054, n = 18).
(F) Manhattan distance (MD) for CS1 in the paired group (p < 0.0001, n = 18), no shock (p = 0.344, n = 18), and unpaired (p < 0.0001, n = 18).
(G) MD for CS2 in the paired group (p = 0.00398, n = 18), no shock (p = 0.157, n = 18), and unpaired (p = 0.382, n = 18).
p values are denoted as ∗p < 0.05, ∗∗p < 0.01, and ∗∗∗p < 0.001. See also Table S1.
This experimental design consists of two completely crossed factors, the stimulus (light-CS1 or tone-CS2) and the group (paired, no shock, or unpaired), leading to six experimental conditions. In each group, we analyzed the conditioned behavioral response to the light (CS1) and tone (CS2) in two time periods: before and during the display of the cue.
To analyze the behavioral responses to CS1 and CS2, we begin with an assumption of minima: that we expect a cue-induced behavioral change. Therefore, rather than targeting specific predefined behaviors, which could bias the analysis or overlook subtle patterns, we refrain from imposing any a priori assumptions about the nature or direction of this change and instead adopt an unsupervised approach. Specifically, we performed markerless pose estimation using DeepLabCut19 and decomposed the tracking data into small, recurring behavioral motifs named syllables using Keypoint-MoSeq.21 This allows us to characterize the behavioral change in a data-driven and unbiased manner. Furthermore, we analyzed Keypoint-MoSeq’s syllables from two distinct perspectives: considering the abundance of each syllable before and during the display of the stimuli (CS1 and CS2) and evaluating the transition patterns among syllables between both periods (Figure 1D).
In our initial approach, we quantified the number of frames in which each animal spent performing each syllable before and during cue presentation. For each individual, we then computed a delta (Δ) vector, representing the change in syllable abundance between the stimulus and pre-stimulus periods. Positive Δ values indicate increased use of a given syllable during stimulus presentation (upregulation), while negative values reflect a decrease (downregulation). To determine whether the stimulus significantly altered syllable usage, we applied a Hotelling’s T2 test with the null hypothesis that the Δ values for a given condition were zero (i.e., syllable usage remains constant across time points). The only conditions with Δ values significantly different from zero were CS1 paired (p < 0.0001) and unpaired (p < 0.0001) and CS2 paired (p = 0.017). Conversely, we observed a lack of significance in CS1 no shock (p = 0.072), CS2 no shock (p = 0.128), and CS2 unpaired (p = 0.054) (Figure 1E), which suggests that syllable usage remains relatively stable between the pre-stimulus and stimulus periods for these conditions.
To assess changes in the dynamic sequence of movements in response to CS1 and CS2, we constructed transition matrices that capture this dynamic by encoding how likely one behavior is to follow another, thereby forming a Markov chain representation of behavioral sequences. We quantified the shift in these transition matrices by calculating the Manhattan distance (MD) between time points and evaluated its significance using a permutation test. While syllable abundance indicates which behaviors predominate at each time point, transition matrices reveal how these behaviors connect. This dynamic analysis confirmed the findings from the syllable abundance approach. For CS1, both the paired (MD = 80, p < 0.0001) and unpaired (MD = 77, p < 0.0001) groups exhibited significant changes in their transition patterns, whereas the no-shock group failed to (MD = 38, p = 0.345) (Figure 1F). In the case of CS2, only the paired group showed a significant shift in transition dynamics (MD = 52, p = 0.00398). Neither the no-shock (MD = 39, p = 0.157) nor the unpaired (MD = 37, p = 0.382) groups displayed significant differences across their transition matrices (Figure 1G). These results suggest that associative learning through stimulus pairing leads to a specific and lasting reorganization of behavioral sequences.
Overall, these findings confirm that our SOC protocol is robust and effectively generates conditioned responses to both first- and second-order stimuli. Notably, our data highlight and confirm two key features of SOC. First, the conditioned behavioral response to CS1 is more significant than to CS2, suggesting a lower strength of responses to second-order conditioned cues. Second, the results from the unpaired group demonstrate that second-order conditioned responses are stimulus specific rather than reflecting a generalized fear response to all stimuli.7,12
SOC elicits unique behavioral signatures dissociable from first-order conditioning
Having established an effective SOC protocol, we observed behavioral changes in response to the light (CS1) in both the paired and unpaired groups and to the tone (CS2) only in the paired group. To better understand the nature of these changes, we further examined the unsupervised syllable decomposition. We summarized the previously computed Δ vectors in a heatmap for visualization. Since Keypoint-MoSeq orders syllables by frequency of occurrence, a simple glance at the plot reveals that syllables 13–23 exhibit Δ values near zero, implying a minimal contribution to the behavioral change. Moreover, the experimental conditions that showed significant behavioral changes (CS1 paired, CS1 unpaired, and CS2 paired) present larger absolute Δ values. Notably, certain syllables seem highly upregulated (e.g., syllable 2), while others appear consistently downregulated (e.g., syllables 0, 1, 3, and 4) (Figure 2A).
Figure 2.
Analysis of syllable-specific behavioral modulation and transition dynamics across experimental groups in response to conditioned stimuli
(A) Heatmap of Δ vectors indicating up- and downregulation in syllable usage across experimental conditions. The dotted line separates the groups with significant changes (top) from the rest (bottom).
(B) Differences of Δ values between significant groups in syllable 0 (p = 0.925, p < 0.0001, p = 0.925, n = 18).
(C) Differences of Δ values between significant groups in syllable 2 (p = 0.888, p < 0.0001, p < 0.0001, n = 18).
(D) Differences of Δ values between significant groups in syllable 3 (p = 0.666, p < 0.0001, p < 0.0001, n = 18).
(E) Differences of Δ values between significant groups in syllable 6 (p = 0.955, p = 0.012, p = 0.033, n = 18).
(F) Differences in transition Shannon entropy for CS1 between periods in the paired group (p < 0.0001, n = 18), no-shock group (p = 0.534, n = 18), and unpaired group (p < 0.0001, n = 18).
(G) Differences in transition Shannon entropy for CS2 between periods in the paired group (p = 0.00457, n = 18), no-shock group (p = 0.078, n = 18), and unpaired group (p = 0.244, n = 18).
(H) Pearson correlation coefficients of each syllable, comparing the Δ values of CS1 and CS2. The mean is 0.57, significantly different from 1 (p < 0.0001, n = 18).
(I) Representation of angle (α) calculation between the vectors from the baseline centroid and pointing toward the CS1 and CS2 centroids, respectively.
(J) Value of the angle (α) corresponding to an MDS with a given number of dimensions. As the dimensionality grows, the angle between the vectors increases from about 30° to more than 70°.
p values are denoted as ∗p < 0.05, ∗∗p < 0.01, and ∗∗∗p < 0.001. The boxplot data are presented as mean ± SD. See also Figure S1 and Table S1.
The information provided by the heatmap raises another question: are there specific differences at the syllable level between the CS1-paired, CS1-unpaired, and CS2-paired conditions? In other words, do certain syllables change preferentially in some conditions over others? To address this, we assessed statistical differences in individual Δ values across syllables. The analysis revealed that only a subset of syllables showed significant differences across all three conditions, specifically syllables 0 (p < 0.0001), 2 (p < 0.0001), 3 (p < 0.0001), and 6 (p = 0.043) (Figure S1A).
While syllables 0 and 2 describe low-speed movements, potentially capturing evaluation or scanning behaviors, syllables 3 and 6 correspond to higher-speed behaviors, reflecting escape-like or exploratory responses (Figure S1B). Specifically, syllable 0 indicates low mobility with slight head movements, and syllable 2 represents complete immobility. In contrast, syllable 3 associates with forward acceleration, while syllable 6 captures reverse acceleration.
Focusing on syllable 0, we found that the CS1-paired and CS1-unpaired groups were statistically indistinguishable (p = 0.925), with a mean Δ value of −125, indicating a consistent downregulation in response to the light cue. In contrast, the CS2-paired condition exhibited a significantly higher mean Δ value of +60 compared to both CS1 paired (p < 0.0001) and CS1 unpaired (p = 0.0002). Notably, this positive Δ reflects an upregulation of syllable 0 during the presentation of the tone (Figure 2B). This opposing pattern (downregulation in response to CS1 and upregulation in response to CS2) implies that syllable 0 follows an inverse trajectory depending on the nature of the CS.
Syllable 2 showed a markedly different pattern across conditions. The CS1-paired and CS1-unpaired conditions exhibited strong upregulation, with mean Δ values above 750 and statistically equal between them (p = 0.888). In contrast, the CS2-paired group displayed a substantially lower mean Δ value, around 190, significantly different from both CS1 conditions (p < 0.0001) (Figure 2C). This suggests that syllable 2 is robustly associated with fear-conditioned responses, regardless of reinforcement, as it goes in the same direction irrespective of the stimulus.
Syllable 3 displayed an opposite trend compared to syllable 2. The CS1-paired and CS1-unpaired conditions showed similar downregulation (p = 0.666), with mean Δ values around −100. However, the CS2-paired condition exhibited a significant upregulation, with a mean Δ near −25, which differed significantly from both CS1 conditions (p < 0.0001) (Figure 2D). This pattern mirrors that of syllable 2 but with downregulation instead of upregulation. Additionally, it resembles the pattern of syllable 0 in that almost half of the individuals in the CS2-paired condition show positive Δ values.
Finally, syllable 6 revealed a more subtle yet informative difference. While the CS1-paired and CS1-unpaired conditions failed to show a significant difference (p = 0.955), their mean Δ values hovered around zero or were slightly negative. In contrast, CS2 paired displayed a modest but statistically significant upregulation compared to CS1 paired (p = 0.012) and CS1 unpaired (p = 0.033) (Figure 2E).
Together, these results suggest that first- and second-order conditioned responses depart from basal random behavior and tend to shift toward more stereotyped behavioral sequences, characterized by up- and downregulation of various syllables. To further prove this hypothesis, we computed normalized transition matrices (i.e., using conditional transition probabilities rather than raw counts) and extracted the mean transition Shannon entropy for each animal at each time point. Since changes in syllable abundance can influence transition probabilities, this approach also allowed us to disentangle sequence from abundance. We then applied an approach similar to the one used for abundance Δ values: we subtracted the entropy values between the two periods for each animal and tested the differences against the null hypothesis that the mean change is zero.
For conditioned responses to CS1, we observed a significant entropy decrease of 0.5 points in both the paired (p < 0.0001) and unpaired (p < 0.0001) groups but not in the no-shock group (p = 0.534) (Figure 2F). Conversely, in the conditioned responses to CS2, the paired group showed a significant entropy reduction of 0.25 points (p = 0.0047). In contrast, entropy remained unchanged in the no-shock (p = 0.078) and unpaired (p = 0.244) groups (Figure 2G). Overall, higher Shannon entropy reflects more unpredictable transitions between syllables, whereas lower Shannon entropy indicates more stereotyped and repetitive behavior. Therefore, our results point to the behavioral repertoire in response to CS1 and CS2 becoming more constrained. Stimulus presentation consistently elicits specific, predefined, and stereotyped behavioral patterns, distinct from baseline movement.
However, whether the second-order conditioned response is merely a scaled-down version of the first-order response or exhibits distinct behavioral characteristics remains unclear. To address this question, we employed two complementary approaches: (1) assessing the correlation between conditioned responses to CS1 and CS2 and (2) examining their respective positions within the behavioral landscape.
In the first approach, we calculated subject-wise correlations across syllable delta profiles. If most syllables exhibited correlation scores close to 1, it would support the hypothesis that CS2 responses are attenuated versions of CS1. However, the average correlation was moderate (r = 0.57), and a t test strongly rejected the null hypothesis that the mean correlation equals 1 (p < 0.0001) (Figure 2H). Furthermore, the 95% confidence interval ranged from negative infinity to 0.6, well below 1, providing no overlap with the hypothesis that CS2 responses are perfectly scaled versions of CS1 responses.
In the second approach, we applied multidimensional scaling (MDS) to syllable usage data using the Mahalanobis distance, systematically increasing the dimensionality of the reduced space. For each MDS-reduced representation, we computed the centroids of three key behavioral states: baseline (before cue presentation), during CS2 presentation, and during CS1 presentation. We then calculated the angle (α) between the vectors originating from the baseline centroid and pointing toward the CS1 and CS2 centroids, respectively. If the CS2 response were merely a weaker version of the CS1 response, we would expect the two vectors to lie along a similar trajectory, resulting in a small α value near zero. In contrast, α approaching orthogonality (90°) would suggest that second-order conditioned responses follow a distinct trajectory in the behavioral space (Figure 2I). By plotting α as a function of the number of MDS dimensions, we assessed how the relationship between CS1 and CS2 evolves as we recover more structure from the original distance matrix.
The results reinforce our previous findings that CS1 and CS2 responses are fundamentally distinct. As dimensionality increases, the angle between the vectors rises from approximately 30° to over 70° (Figure 2J). This trend indicates that the trajectory from baseline behavior to CS2 responses increasingly diverges from the trajectory toward CS1 responses. While CS2 may appear as a scaled-down version of CS1 in oversimplified representations, the higher-dimensional representations reveal that the two responses follow different paths in behavioral space.
Taking the MDS results together with our robust statistical analyses of syllable usage (Hotelling’s T2 test and ANOVAs with corrected p values), as well as the previously discussed correlation analysis, we conclude that CS2 responses are qualitatively distinct from CS1 responses rather than simply weaker versions. Specifically, upon cue presentation, behavior shifts toward specific defensive patterns that differ depending on the stimulus. CS1 responses are characterized by pronounced immobility (syllable 2) and a downregulation of active syllables (0, 3, and 6). In contrast, CS2 responses involve not only increased immobility (syllable 2) but also an upregulation of low-speed movement (syllable 0) and some degree of acceleration (syllables 3 and 6), suggesting a mixed response that combines behaviors such as immobility with active behaviors such as escape-like or exploration responses.
Supervised trait analysis captures core defensive responses but misses behavioral complexity
In our previous analysis, unsupervised behavioral decomposition revealed that responses to CS1 consist of immobility, while those to CS2 displayed greater diversity, including increased immobility and episodes of heightened exploration or escape-like responses. To provide a complementary perspective supporting this interpretation, we examined the abundance of predefined behavioral traits between time points.
We developed a framework to visualize global behavior patterns and simultaneously assess statistical differences. Specifically, we computed the average percentage of time each animal spent performing each predefined trait before and after CS1 or CS2 presentation. Using these data, we generated radar plots where we arranged similar behaviors adjacent along the circular outer axis. Specifically, we positioned active traits on one side and passive traits on the opposite side. This spatial organization facilitated intuitive visual comparison and enabled the intersection over union (IoU) calculation between the pre- and post-stimulus behavioral profiles. To statistically evaluate differences, we used permutation tests to assess the significance of the IoU values. To avoid training classifiers and to focus on the analysis, we used the DeepOF Python package to analyze DeepLabCut outputs and extract predefined traits. Nonetheless, our pipeline remains flexible and can accommodate custom classifiers or manually annotated behaviors (Figure S2A).
For the first-order conditioned response, exposure to the light cue significantly altered the behavioral profiles of the paired and unpaired groups, shifting the radar plots toward low-speed movements, such as huddling and looking around, while reducing active traits like climbing and speed. The paired group exhibited an IoU of 0.233 (p < 0.0001), and the unpaired group had an IoU of 0.231 (p < 0.0001). In contrast, CS1 failed to significantly affect the behavioral profile of the no-shock group (IoU = 0.758, p = 0.464) (Figure 3A).
Figure 3.
Radar plot comparison of behavioral syllable distributions before and during stimulus presentation across experimental groups
(A) Radar plots for CS1 between periods in the paired group (IoU = 0.233, p < 0.0001, n = 18), no-shock group (IoU = 0.758, p = 0.464, n = 18), and unpaired group (IoU = 0.231, p < 0.0001, n = 18).
(B) Radar plots for CS2 between periods in the paired group (IoU = 0.461, p = 0.0018, n = 18), no-shock group (IoU = 0.807, p = 0.484, n = 18), and unpaired group (IoU = 0.782, p = 0.480, n = 18).
p values are denoted as ∗p < 0.05, ∗∗p < 0.01, and ∗∗∗p < 0.001. See also Figure S2 and Table S1.
In the case of CS2, only the paired group exhibited a significant behavioral shift (IoU = 0.461, p = 0.0018), consistent with the previously described first-order conditioned response. Neither the no-shock (IoU = 0.807, p = 0.484) nor the unpaired (IoU = 0.782, p = 0.480) groups showed significant changes in their behavioral profiles (Figure 3B).
Taken together, these results confirm that the first-order conditioned response predominantly consists of immobility. In contrast, this supervised approach suggests that the second-order conditioned response also involves immobility, but not active traits, contrary to the patterns revealed by the syllable-based analysis. This discrepancy underscores the limitations of supervised approaches: the active behaviors identified through syllable enrichment may align only partially with those captured by DeepOF, as the syllables may reflect traits not explicitly analyzed in this framework, such as escape, dodging, hiding, or head bobbing.23,24
This analysis of specific behavioral traits aligns with previous research in the fear-conditioning field, which consistently identifies immobility as a core defensive response to both first- and higher-order conditioned cues.12,25,26 For instance, we could take a passive behavior from the radar plot, like huddling (characterized by low head movement, low spine stretch, low body area, and low locomotion speed), which strongly correlates with traditional fear-conditioning metrics like freezing27,28 (Figure S2B), and show significant variation across time points and experimental conditions (Figure S2C). However, in our opinion, these conventional fear-conditioning analyses offer a naive view of behavioral responses and fail to capture their entire complexity, as observed through the syllable-based analysis.
Our data-driven pipeline, but not classical approaches, uncovers age-dependent deficits in mouse SOC
After characterizing the behavioral responses to first- and second-order conditioned cues, we examined whether biological factors, such as sex or age, influence these behavioral profiles. To address this question, we applied our SOC protocol to male and female mice across two age groups: adolescent and aged. We then measured the behavioral response to CS1 and CS2 and analyzed it using the decomposition of behavior in syllables and the radar plots of supervised traits.
In our syllable analysis, Hotelling’s T2 test on Δ values revealed that, regardless of sex or age, mice significantly altered their syllable usage in response to the light (CS1) (p < 0.0001 for all four groups: adolescent males, aged males, adolescent females, and aged females). In contrast, syllable usage in response to the tone (CS2) changed only in adolescent animals, males (p = 0.033) and females (p = 0.007), but not in aged animals (p = 0.069 for both sexes) (Figure 4A). These findings were consistent with results from the syllable transition analysis using the MD between transition matrices. For the behavioral responses to CS1, all animals significantly shifted their transition matrices regardless of sex and age (p < 0.0001 for all conditions) (Figure 4B). Conversely, CS2 only caused significant changes in adolescent animals (p = 0.0004 for males and p = 0.0239 for females) but not in aged mice (p = 0.259 for males and p = 0.320 for females) (Figure 4C).
Figure 4.
Sex- and age-specific analyses of behavioral responses to conditioned stimuli in syllable usage, transitions, and distribution patterns
(A) Results from Hotelling’s T2 test of the Δ values, represented as the negative logarithm of the p value for each experimental condition: CS1 young males (p < 0.0001, n = 12), CS1 old males (p < 0.0001, n = 12), CS1 young females (p < 0.0001, n = 12), CS1 old females (p < 0.0001, n = 12), CS2 young males (p = 0.033, n = 12), CS2 old males (p = 0.069, n = 12), CS2 young females (p = 0.007, n = 12), and CS2 old females (p = 0.069, n = 12).
(B) Manhattan distance (MD) for CS1 in young males (p < 0.0001, n = 12), old males (p < 0.0001, n = 12), young females (p < 0.0001, n = 12), and old females (p < 0.0001, n = 12).
(C) MD for CS2 in young males (p = 0.0004, n = 12), old males (p = 0.259, n = 12), young females (p = 0.0239, n = 12), and old females (p = 0.320, n = 12).
(D) Radar plots for CS1 between periods in the young males (IoU = 0.220, p < 0.0001, n = 12), old males (IoU = 0.137, p < 0.0001, n = 12), young females (IoU = 0.160, p < 0.0001, n = 12), and old females (IoU = 0.1896, p = 0.0012, n = 12).
(E) Radar plots for CS2 between periods in the young males (IoU = 0.539, p = 0.0898, n = 12), old males (IoU = 0.599, p = 0.206, n = 12), young females (IoU = 0.629, p = 0.019, n = 12), and old females (IoU = 0.457, p = 0.211, n = 12).
p values are denoted as ∗p < 0.05, ∗∗p < 0.01, and ∗∗∗p < 0.001. The boxplot data are presented as mean ± SD. See also Figure S3 and Table S1.
The analysis of predefined traits using radar plots further supported our previous findings, indicating that aged mice exhibit impaired behavioral responses to CS2. In response to CS1, all groups showed statistically significant IoU values, suggesting that both sex and age preserve first-order conditioned responses: adolescent males (IoU = 0.220, p < 0.0001), aged males (IoU = 0.137, p < 0.0001), adolescent females (IoU = 0.160, p < 0.0001), and aged females (IoU = 0.190, p = 0.0012) (Figure 4D). In contrast, responses to CS2 varied across age. Old males (IoU = 0.599, p = 0.206) and old females (IoU = 0.457, p = 0.211) failed to show statistically significant changes in their behavioral profiles. Meanwhile, adolescent animals approached or reached significance: males (IoU = 0.539, p = 0.0898) and females (IoU = 0.629, p = 0.019) (Figure 4E).
These findings further support the notion that the capacity for SOC declines with age. However, to better understand the nature of the behavioral changes observed in the conditions that exhibited significant differences, we analyzed statistical differences in individual Δ values across syllables. We identified 12 syllables with statistically significant changes across conditions (Figure S3A). Visually comparing the Δ values for these syllables across groups confirms our earlier findings, indicating that conditioned responses to CS1 mainly consist of an upregulation of immobility (syllable 2) and a suppression of active syllables (e.g., syllables 0, 1, 3, and 4). Some syllables demonstrated stronger downregulation in specific conditions, for instance, syllable 5 (curling up) in old females and syllable 12 (high acceleration) in young females. In contrast, as seen in previous experiments, responses to CS2 comprise immobility and bursts of active behaviors, which are most likely escape-like responses.
Taken together, our results demonstrate that while sex has little effect on conditioned responses in our SOC protocol, age significantly impacts behavior, particularly impairing second-order conditioned responses in older animals. This conclusion emerged from unsupervised analyses (syllable usage and transitions) and supervised analyses (predefined traits via radar plots). Interestingly, this age-related deficit is absent when using traditional measures such as huddling, a proxy of immobility or freezing-like behavior, where all groups (including aged mice) perform similarly well (Figure S3B). Once again, these findings highlight the limitations of relying on a single behavioral trait to assess conditioned responses, which overlooks the rich array of behaviors that define the full spectrum of an animal’s response to threat, potentially masking meaningful differences between experimental groups.
Discussion
Our study combines an adapted behavioral paradigm for investigating light-tone SOC in mice with pre-existing advanced computational tools to analyze behavioral responses across sex and age groups. By employing a data-driven approach to behavioral analysis,19,21,22 we validated the effectiveness of our SOC protocol. Our findings demonstrate that behavioral responses to CS2 arise from its specific association with CS1 rather than from a generalization of fear to any novel stimulus. Importantly, we uncovered 20 distinct behavioral syllables that reflect postural and movement dynamics beyond immobility. We identified key syllables differently regulated in responses to CS1 and CS2, indicating that SOC goes beyond simply replicating first-order responses and uniquely reshapes the behavioral repertoire. While first-order conditioning predominantly elicited immobility, SOC responses comprised a dynamic mix of passive (i.e., immobility) and active (i.e., escape-like) behaviors. This distinction highlights the added value of unsupervised behavioral analysis, which enabled a more precise and dynamic characterization of thread-induced responses compared to traditional approaches focused on manually annotating freezing responses. Finally, applying this approach across sex and age revealed age-dependent deficits: old mice, regardless of sex, showed preserved responses to CS1 but impaired responses to CS2, a pattern not seen in younger animals.
Although researchers have demonstrated SOC in various species, including Drosophila, rats, and humans,29,30,31 studies on SOC in mice remain limited.11 Moreover, no previous mouse study has successfully elicited a second-order conditioned response to CS2 using a simultaneous presentation of CS2 and CS1 during the conditioning phase. Existing paradigms typically rely on serial presentations of CS1 and CS2, which alter the associative structure and change the nature of what is learned,7,32 and often incorporate pre-exposure to both stimuli during habituation,11 potentially leading to latent inhibition.33 By contrast, our mouse light-tone protocol simultaneously presents CS2 and CS1 during the conditioning phase, without prior exposure to either stimulus. This design avoids potential confusions associated with latent inhibition and ensures that associative learning with the CS2 occurs de novo.
Behavioral neuroscience is advancing rapidly due to the emergence of computational tools,34,35 which have significantly improved mouse behavior analysis. The automation and refinement of behavioral assessments are now possible through supervised22,36 and unsupervised21 machine learning techniques. These methods significantly reduce the need for time-consuming manual scoring, improving accuracy, efficiency, and reproducibility. Nevertheless, machine learning tools also pose challenges, including the exponential growth of behavioral data, difficulties in extracting biologically meaningful insights, and obstacles to effectively communicating findings to the scientific community. Although our study does not introduce new software, it tackles the previous issues by introducing original pipelines that generate precise and representative statistical tests and graphical representations for unsupervised and supervised behavioral assessments. Besides, while advanced tools have automated first-order conditioning paradigms in mice37,38 and rats,39 no prior study has fully leveraged them to characterize behavioral responses in higher-order conditioning procedures.
Using these data-driven tools, we have proved two key features of higher-order conditioning: specificity in stimulus associations and different response strengths between CS1 and CS2. Our unpaired group confirms that second-order conditioned responses depend on the temporal association between specific stimuli, consistent with prior research.7,12 Moreover, the nature of the conditioned responses differs between CS1 and CS2. While CS1 elicits a robust fear response characterized predominantly by immobility, the conditioned response to CS2 combines immobility and active behaviors and tends to be more labile.11,40 This qualitative distinction, revealed through data-driven behavioral analysis, highlights the probable differing neural substrates of first-order conditioning and SOC.
Freezing behavior has long been a standard and informative measure of fear in rodents, playing a central role in aversive conditioning paradigms involving mild electric foot shocks. Indeed, neuroscientists have widely used it to identify the neural substrates underlying fear memory.41,42,43,44 Our findings show that light-tone SOC elicits similar immobility patterns to those reported in other mouse SOC paradigms11 and SPC experiments using comparable sensory modalities.28 However, focusing solely on immobility overlooks other conditioned responses, including the increase in active behaviors observed in response to CS2 in our study. Indeed, fear-related behavior encompasses a spectrum of passive and active responses,45,46 underscoring the need for more comprehensive and complete behavioral assessments.
To address this, advanced tracking tools have become instrumental in quantifying a wider range of fear-related behaviors, many based on DeepLabCut pose estimation.19 In our study, we employed Keypoint-MoSeq21 and DeepOF,22 both of which provide robust frameworks for automated, high-resolution behavioral analysis. In the literature, other tools offer analytical tools for DeepLabCut outputs. For example, SimBA (simple behavioral analysis)36 enables the quantification of diverse defensive behaviors beyond freezing, while BehaviorDEPOT37 automates the identification of multiple fear-related actions. Collectively, these tools enhance the objectivity, resolution, and reproducibility of fear behavior research.
Our data revealed age-dependent differences in SOC expression, while sex-dependent effects remained absent. Although few studies have directly examined sex differences in SOC, research on associative learning highlights the importance of considering sex as a key factor.17,47,48 On the other hand, age-related differences in CS2-induced behavioral responses suggest that older mice exhibit a reduced behavioral repertoire compared to adolescent or adult mice, a pattern observed in other species.49 The diminished response to CS2 exposure may also indicate that aging weakens the ability to perform higher-order associations, which are weaker and more labile than first-order ones. This interpretation aligns with findings that aged mice show deficits in memory and cognitive flexibility.50,51 However, previous studies have yet to explore how aging influences the expression of higher-order conditioning. Given SOC’s sensitivity to cognitive function, it could be a behavioral biomarker for detecting early cognitive decline in physiological and pathological aging.
In conclusion, our analytical approach holds potential for future studies comparing behavioral responses across different experimental groups. By applying these methods, researchers can enhance the analysis of complex behavior, disease states, drug effects, and other shifts in internal states, providing deeper insights into behavioral dynamics. Furthermore, our SOC protocol offers valuable insights for investigating brain targets to treat fear and anxiety-related disorders. Future studies will integrate these tools to explore the brain circuits responsible for the age-dependent deficits in SOC identified in our findings, further advancing cognitive and emotional regulation knowledge.
Limitations of the study
Our approach requires a proper setup and integration of several behavioral analysis tools, including DeepLabCut, Keypoint-MoSeq, and DeepOF, which may limit accessibility for labs lacking computational resources or expertise in machine learning-based analysis. It is essential to ensure proper video recordings to guarantee the quality of pose estimation and behavioral syllable identification. This also includes carefully selecting hyperparameter choices (e.g., kappa values for Keypoint-MoSeq, the number of tracked body parts, and dimensionality reduction thresholds) and tailoring them to each experimental dataset. Inappropriate parameterization can compromise the detection and classification of behavioral motifs.
The unsupervised analysis enables the detection of subtle or rare behavioral changes. However, many motifs may lack intuitive correspondence to classical behaviors, making biological interpretation less straightforward. Moreover, the analysis assumes that behavioral motifs are sufficiently repeated over time to be caught through automated detection. Therefore, highly variable or spontaneous behaviors might be underestimated or missed.
Finally, careful animal handling protocols are necessary to minimize variability, including habituation sessions for both the facility and the personnel conducting the experiments. It is critical to maintain consistent environmental setups (chamber, lighting, and background cues), as context changes can profoundly alter behavior and output.
Resource availability
Lead contact
Requests for further information and resources should be directed to and will be fulfilled by the lead contact, Arnau Busquets-García, PhD (abusquets@researchmar.net).
Materials availability
This study did not generate new materials.
Data and code availability
-
•
All data generated by this study are available in a Zenodo repository under the following: https://doi.org/10.5281/zenodo.16419208.
-
•
All original code has been deposited at the following GitHub repository and is publicly available as of the publication date (github.com/marccanela/BehavioralProfiles) under the following: https://doi.org/10.5281/zenodo.16419362.
-
•
Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.
Acknowledgments
We want to thank the personnel of the Animal Facility of the Parc de Recerca Biomedica de Barcelona (PRBB) for mouse care. We thank all the members of our lab for valuable discussions during the development of the project. We would especially like to thank Dr. Irene Ayuso’s critical reading of the manuscript. This work was supported by the Generalitat de Catalunya (SGR-00022) from the Departament d’Economia i Coneixement de la Generalitat de Catalunya (Spain) and from the European Research Council under the European Union’s Horizon 2020 research and innovation program (grant agreement no. 948217). The project that gave rise to these results received the support of a fellowship from the “la Caixa” Foundation (ID 100010434). The fellowship code is LCF/BQ/DR22/11950014.
Author contributions
A.B.-G., M.C.-G., and J.P. contributed to the project’s conception, and M.C.-G. performed and analyzed all experiments. A.B.-G. and M.C.-G. wrote and revised the manuscript.
Declaration of interests
The authors declare no competing interests.
STAR★Methods
Key resources table
| REAGENT or RESOURCE | SOURCE | IDENTIFIER |
|---|---|---|
| Chemicals, peptides, and recombinant proteins | ||
| CR36 cleaning reagent | Jose Collado | Ref. 12–20/40-02020 |
| 70% ethanol | VWR Chemicals | Ref. 20821.33 |
| Deposited data | ||
| Raw and processed behavioral data | This paper | https://doi.org/10.5281/zenodo.16419208 |
| Experimental models: Organisms/strains | ||
| Mouse strain: C57BL/6J | Charles River Laboratories (Spain) | N/A |
| Software and algorithms | ||
| DeepLabCut | Mathis et al.19 | https://github.com/DeepLabCut/ |
| Keypoint-MoSeq | Weinreb et al.21 | https://github.com/dattalab/keypoint-moseq |
| DeepOF | Bordes et al.22 | https://github.com/mlfpm/deepof |
| Behavioral analysis pipeline | This paper | https://github.com/marccanela/BehavioralProfiles |
Experimental model and study participant details
Animal models
We used male and female C57BL/6J wild-type mice of three different ages: adolescent (4–5 weeks), young adult (8–9 weeks), and old (45–55 weeks), sourced from Charles River Laboratories (Spain). Mice were drug- and test-naive and had not undergone any previous procedures. They were maintained under an inverted 12-h light/dark cycle (lights off at 7 a.m.) with red lighting used during the dark phase. Animals were housed in same-sex and same-age groups (four males or five females per cage) in cages under controlled temperature (22 ± 1°C) and humidity (50 ± 5%). Food and water were provided ad libitum. Mice were specific pathogen-free. All procedures were approved by the Animal Care and Use Committee of the Parc de Recerca Biome`dica de Barcelona (PRBB) and the Generalitat de Catalunya, and were conducted in accordance with relevant institutional and national guidelines and regulations.
Method details
Conditioning chambers
Behavioral experiments were conducted using Imetronic conditioning chambers (France) equipped with auditory (speakers), visual (LEDs), and tactile (metallic grid floors) stimulus delivery systems. Colored white noise (CWN, 57.1 dB) served as a constant background cue, while a 3000 Hz tone (59.3 dB) and a white LED light were used as neutral conditioned stimuli (CS2 and CS1, respectively). The unconditioned stimulus (US) was a 2-s, 0.6 mA electric foot shock delivered through the grid. To manipulate contextual cues across sessions, we alternated wall patterns (blank, striped, spotted), floor textures (grid, plastic, or sawdust bedding), and olfactory cues via different cleaning agents: 70% ethanol (VWR Chemicals, ref. 20821.33) or CR36 (Jose Collado, ref. 12–20/40-02020).
Second-order conditioning protocol
Mice were allowed to acclimate to the housing environment for at least two weeks before behavioral testing. Ear tags were applied for identification, and animals were handled for 5–10 min daily over two days to reduce anxiety.
The second-order conditioning protocol comprised four stages conducted over four days: habituation (stage 1), pairing a neutral stimulus (CS1) with an electric shock (US) (stage 2), pairing the previously conditioned CS1 with a novel neutral stimulus (CS2) (stage 3), and an independent probe test involving exposure to CS1 or CS2 (stage 4).
The habituation consisted of a 20-min session during which the animals freely explored the conditioning chamber. The following day, the mice underwent a morning and afternoon light (CS1) pairing session with the electric foot shock (US). We conducted five pairings per session, starting with a 3-min habituation followed by a 1-min inter-trial interval (ITI). Each pairing consisted of a 10-s display of the light co-terminated with a 2-s electric foot shock (US). During the habituation and light-shock pairing phases, we used the default environmental setup: floor grids and white walls, background CWN, and ethanol (70%) for cleaning.
The following day, we paired the previously conditioned light (CS1) with a novel tone (CS2). This phase consisted of only one session with four trials, beginning with a 3-min habituation period and using three different ITIs: 60, 120, and 90 s, in that order. The pairing consisted of concurring 30-s displays of the light and the tone. To avoid the effects of context pairing with aversive stimuli, we eliminated background noise and used a plastic floor, striped walls, and CR36 cleaning reagent.
Finally, on the last day, we assessed the conditioning with two probe test sessions: one for the tone (CS2) and one for the light (CS1). We began with the tone test to prevent the potential extinction of direct learning on second-order learning. We separated both probe tests by three hours, returning the animals to their home cage until the next probe. Each session started with a 3-min habituation period and two 1-min cue displays separated by a 1-min ITI.
Mice were randomly assigned to experimental or control groups (see below). The scoring process was automatic without human intervention to avoid bias. Sample sizes were determined based on prior studies in the field of SOC and aimed to ensure adequate statistical power. All animals completed the experiment without exclusion.
Behavioral controls
For the second-order conditioning protocol, we used two behavioral controls. We used a “no-shock” group that was exempt from the electric foot shock to assess whether the light (CS1) and tone (CS2) possess an inherent fearful value. Therefore, during the conditioning session (stage 2), we presented the light (CS1) for 10 s without pairing it with the electric foot shock.
On the other hand, we aimed to test whether the second-order conditioned response to the tone (CS2) is triggered by its specific association with the light (CS1) rather than by a generalization of fear from the electric foot shock (US). To achieve this, we employed an “unpaired” group, and on stage 3, rather than showing the light and tone concurrently, we separated them into two different sessions spaced 5 h apart. To maintain the original protocol, we preserved the total number of trials and the total time exposed to the stimuli by conducting two 1-min cue presentations in each session, with a 90-s ITI in between.
All behavioral procedures were video-recorded. The code used for behavioral scoring and stimulus control is available at github.com/marccanela/BehavioralProfiles. The complete details on the open-source software used are cited in the references section.
Quantification and statistical analysis
We used DeepLabCut 3.019 (PyTorch backend) to estimate mouse poses across 14 body points. Labeling was performed on 20 frames per video, and tracking models were trained using a ResNet-50 backbone with default parameters. We excluded tail keypoints from post-processing due to low tracking reliability.
Behavioral syllables were identified with Keypoint-MoSeq,21 using nine latent dimensions (90% variance explained) and kappa hyperparameters set to 1e10 and 1e4. For behavioral quantification, we divided the sequence of syllables into 1-min bins immediately before and after cue onset (CS1 or CS2), then computed frame counts per syllable and unidirectional transition matrices (Figure 1D).
To assess syllable abundance change over time, we calculated Δ vectors (within-subject differences) and applied principal component analysis (PCA) for dimensionality reduction. We tested for multivariate normality using the Henze–Zirkler test, and evaluated the null hypothesis (no behavioral change) using Hotelling’s T2 (Figures 1E and 4A). For experiments showing overall significance, syllable-specific effects were tested using one-way ANOVA or the Kruskal–Wallis test, depending on the results of the Shapiro–Wilk normality checks, with post hoc Tukey or Wilcoxon signed-rank tests (Figures S1A, 2B–2E, and S4A).
Transition matrices were computed per mouse, with self-transitions removed. We averaged matrices across animals per condition and compared cue-induced changes using Manhattan distance (MD), following von Ziegler et al. (2024).52 Significance was determined using permutation tests (Figures 1F, 1G, 4B, and 4C).
We computed Shannon entropy of normalized transition matrices to assess behavioral unpredictability, using row-wise conditional probabilities. Differences in entropy across time points were tested using paired t-tests or Wilcoxon signed-rank tests, depending on the normality of the data (Shapiro–Wilk) (Figures 2F and 2G).
Behavioral similarity between CS1 and CS2 was quantified using within-subject Pearson correlations on syllable Δ vectors. These were tested against a null of perfect similarity (correlation = 1) using one-sample t-tests. We also computed 95% confidence intervals to assess precision (Figure 2H).
To investigate qualitative behavioral divergence, we applied multidimensional scaling (MDS) with Mahalanobis distances and computed the angle (α) between vectors from the baseline to the centroids of CS1 and CS2. We evaluated α across embedding dimensions (2–10) to examine resolution-dependent divergence (Figures 2I and 2J).
DeepOF22 was used to extract supervised behavioral traits (sniffing, wall climbing, huddling, speed, looking around). Trait values were averaged within time bins and normalized to a 0–1 range for visualization in radar plots. Changes in behavioral profiles were quantified using Intersection over Union (IoU) and tested via permutation tests. Individual trait differences were tested using paired t-tests or the Wilcoxon signed-rank test, depending on the normality of the data (Shapiro–Wilk) (Figures 3A, 3B, 4D, 4E, S2C, and S4B).
Unless otherwise stated, statistical tests were two-sided. Normality was assessed using the Shapiro–Wilk test. Values are reported as mean ± SD unless noted. Sample sizes (n) represent the number of animals and are specified in each figure legend. Animals were randomly assigned to experimental groups, and the scoring process was automatic without human intervention to avoid bias. No animals were excluded from the analysis. Sample sizes were determined based on prior studies using comparable behavioral pipelines.
All statistical details (including exact sample sizes, test names, p-values, and measures of central tendency and dispersion) are reported in the figure legends and results section. Asterisks denote significance as p < 0.05 (∗), p < 0.01 (∗∗), and p < 0.001 (∗∗∗).
Published: August 28, 2025
Footnotes
Supplemental information can be found online at https://doi.org/10.1016/j.crmeth.2025.101144.
Supplemental information
References
- 1.Rogan M.T., Stäubli U.V., LeDoux J.E. Fear conditioning induces associative long-term potentiation in the amygdala. Nature. 1997;390:604–607. doi: 10.1038/37601. [DOI] [PubMed] [Google Scholar]
- 2.Kim J.J., Jung M.W. Neural circuits and mechanisms involved in Pavlovian fear conditioning: A critical review. Neurosci. Biobehav. Rev. 2006;30:188–202. doi: 10.1016/j.neubiorev.2005.06.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Delgado M.R., Nearing K.I., LeDoux J.E., Phelps E.A. Neural circuitry underlying the regulation of conditioned fear and its relation to extinction. Neuron. 2008;59:829–838. doi: 10.1016/j.neuron.2008.06.029. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Wimmer G.E., Shohamy D. Preference by association: How memory mechanisms in the hippocampus bias decisions. Science. 2012;338:270–273. doi: 10.1126/science.1223252. [DOI] [PubMed] [Google Scholar]
- 5.Gewirtz J.C., Davis M. Using pavlovian higher-order conditioning paradigms to investigate the neural substrates of emotional learning and memory. Learn. Mem. 2000;7:257–266. doi: 10.1101/lm.35200. [DOI] [PubMed] [Google Scholar]
- 6.Parkes S.L., Westbrook R.F. Role of the basolateral amygdala and NMDA receptors in higher-order conditioned fear. revneuro. 2011;22:317–333. doi: 10.1515/RNS.2011.025. [DOI] [PubMed] [Google Scholar]
- 7.Holmes N.M., Fam J.P., Clemens K.J., Laurent V., Westbrook R.F. The neural substrates of higher-order conditioning: A review. Neurosci. Biobehav. Rev. 2022;138 doi: 10.1016/j.neubiorev.2022.104687. [DOI] [PubMed] [Google Scholar]
- 8.Ioannidou C., Busquets-Garcia A., Ferreira G., Marsicano G. Neural substrates of incidental associations and mediated learning: The role of cannabinoid receptors. Front. Behav. Neurosci. 2021;15 doi: 10.3389/fnbeh.2021.722796. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Robinson S., Todd T.P., Pasternak A.R., Luikart B.W., Skelton P.D., Urban D.J., Bucci D.J. Chemogenetic silencing of neurons in retrosplenial cortex disrupts sensory preconditioning. J. Neurosci. 2014;34:10982–10988. doi: 10.1523/JNEUROSCI.1349-14.2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Busquets-Garcia A., Oliveira da Cruz J.F., Terral G., Pagano Zottola A.C., Soria-Gómez E., Contini A., Martin H., Redon B., Varilh M., Ioannidou C., et al. Hippocampal CB1 receptors control incidental associations. Neuron. 2018;99:1247–1259.e7. doi: 10.1016/j.neuron.2018.08.014. [DOI] [PubMed] [Google Scholar]
- 11.Park S., Zhu A., Cao F., Palmiter R.D. Parabrachial Calca neurons mediate second-order conditioning. Nat. Commun. 2024;15 doi: 10.1038/s41467-024-53977-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Gostolupce D., Lay B.P.P., Maes E.J.P., Iordanova M.D. Understanding associative learning through higher-order conditioning. Front. Behav. Neurosci. 2022;16 doi: 10.3389/fnbeh.2022.845616. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Seitz B.M., Blaisdell A.P., Sharpe M.J. Higher-order conditioning and dopamine: Charting a path forward. Front. Behav. Neurosci. 2021;15 doi: 10.3389/fnbeh.2021.745388. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Schachtman T.R., Walker J., Fowler S. Associative Learning and Conditioning Theory. Oxford University Press; 2011. Effects of conditioning in advertising; pp. 481–506. [Google Scholar]
- 15.Domjan M.P. 7th ed. Cengage Learning; 2014. The Principles of Learning and Behavior. [Google Scholar]
- 16.Freund A.M., Keil A. Adult age-related differences in appetitive and aversive associative learning. Emotion. 2021;21:1239–1251. doi: 10.1037/emo0000860. [DOI] [PubMed] [Google Scholar]
- 17.Dalla C., Shors T.J. Sex differences in learning processes of classical and operant conditioning. Physiol. Behav. 2009;97:229–238. doi: 10.1016/j.physbeh.2009.02.035. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Sturman O., von Ziegler L., Schläppi C., Akyol F., Privitera M., Slominski D., Grimm C., Thieren L., Zerbi V., Grewe B., Bohacek J. Deep learning-based behavioral analysis reaches human accuracy and is capable of outperforming commercial solutions. Neuropsychopharmacology. 2020;45:1942–1952. doi: 10.1038/s41386-020-0776-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Mathis A., Mamidanna P., Cury K.M., Abe T., Murthy V.N., Mathis M.W., Bethge M. Deeplabcut: Markerless pose estimation of user-defined body parts with deep learning. Nat. Neurosci. 2018;21:1281–1289. doi: 10.1038/s41593-018-0209-y. [DOI] [PubMed] [Google Scholar]
- 20.Kuo J.Y., Denman A.J., Beacher N.J., Glanzberg J.T., Zhang Y., Li Y., Lin D.T. Using deep learning to study emotional behavior in rodent models. Front. Behav. Neurosci. 2022;16 doi: 10.3389/fnbeh.2022.1044492. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Weinreb C., Pearl J.E., Lin S., Osman M.A.M., Zhang L., Annapragada S., Conlin E., Hoffmann R., Makowska S., Gillis W.F., et al. Keypoint-MoSeq: Parsing behavior by linking point tracking to pose dynamics. Nat. Methods. 2024;21:1329–1339. doi: 10.1038/s41592-024-02318-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Bordes J., Miranda L., Reinhardt M., Narayan S., Hartmann J., Newman E.L., Brix L.M., van Doeselaar L., Engelhardt C., Dillmann L., et al. Automatically annotated motion tracking identifies a distinct social behavioral profile following chronic social defeat stress. Nat. Commun. 2023;14 doi: 10.1038/s41467-023-40040-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Calanni J.S., Aranda M.L., Dieguez H.H., Dorfman D., Schmidt T.M., Rosenstein R.E. An ethologically relevant paradigm to assess defensive response to looming visual contrast stimuli. Sci. Rep. 2024;14 doi: 10.1038/s41598-024-63458-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.d’Isa R., Parsons M.H., Chrzanowski M., Bebas P., Stryjek R. Catch me if you can: free-living mice show a highly flexible dodging behaviour suggestive of intentional tactical deception. R. Soc. Open Sci. 2024;11 doi: 10.1098/rsos.231692. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Parkes S.L., Westbrook R.F. The basolateral amygdala is critical for the acquisition and extinction of associations between a neutral stimulus and a learned danger signal but not between two neutral stimuli. J. Neurosci. 2010;30:12608–12618. doi: 10.1523/JNEUROSCI.2949-10.2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Leake J., Leidl D.M., Lay B.P.P., Fam J.P., Giles M.C., Qureshi O.A., Westbrook R.F., Holmes N.M. What is learned determines how pavlovian conditioned fear is consolidated in the brain. J. Neurosci. 2024;44 doi: 10.1523/JNEUROSCI.0513-23.2023. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Shumake J., Monfils M.H. Assessing fear following retrieval + extinction through suppression of baseline reward seeking vs. freezing. Front. Behav. Neurosci. 2015;9 doi: 10.3389/fnbeh.2015.00355. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Pinho J.S., Ramon-Duaso C., Manzanares-Sierra I., Busquets-Garćıa A. Dorsal hippocampus mediates light-tone sensory preconditioning task in mice. bioRXiv. 2025 doi: 10.1101/2025.01.07.631667. Preprint at. [DOI] [Google Scholar]
- 29.Tabone C.J., de Belle J.S. Second-order conditioning in Drosophila. Learning amp. Memory. 2011;18:250–253. doi: 10.1101/lm.2035411. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Holmes N.M., Parkes S.L., Killcross A.S., Westbrook R.F. The basolateral amygdala is critical for learning about neutral stimuli in the presence of danger, and the perirhinal cortex is critical in the absence of danger. J. Neurosci. 2013;33:13112–13125. doi: 10.1523/JNEUROSCI.1998-13.2013. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Lee J.C. Second-Order conditioning in humans. Front. Behav. Neurosci. 2021;15 doi: 10.3389/fnbeh.2021.672628. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Gostolupce D., Iordanova M.D., Lay B.P.P. Mechanisms of higher-order learning in the amygdala. Behav. Brain Res. 2021;414 doi: 10.1016/j.bbr.2021.113435. [DOI] [PubMed] [Google Scholar]
- 33.Miller D.B., Rassaby M.M., Collins K.A., Milad M.R. Behavioral and neural mechanisms of latent inhibition. Learning amp. Memory. 2022;29:38–47. doi: 10.1101/lm.053439.121. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Isik S., Unal G. Open-source software for automated rodent behavioral analysis. Front. Neurosci. 2023;17 doi: 10.3389/fnins.2023.1149027. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.White S.R., Amarante L.M., Kravitz A.V., Laubach M. The future is open: Open-source tools for behavioral neuroscience research. Eneuro. 2019;6 doi: 10.1523/ENEURO.0223-19.2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Goodwin N.L., Choong J.J., Hwang S., Pitts K., Bloom L., Islam A., Zhang Y.Y., Szelenyi E.R., Tong X., Newman E.L., et al. Simple behavioral analysis (simba) as a platform for explainable machine learning in behavioral neuroscience. Nat. Neurosci. 2024;27:1411–1424. doi: 10.1038/s41593-024-01649-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Gabriel C.J., Zeidler Z., Jin B., Guo C., Goodpaster C.M., Kashay A.Q., Wu A., Delaney M., Cheung J., DiFazio L.E., et al. Behaviordepot is a simple, flexible tool for automated behavioral detection based on markerless pose tracking. eLife. 2022;11 doi: 10.7554/eLife.74314. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Pham J., Cabrera S.M., Sanchis-Segura C., Wood M.A. Automated scoring of fear-related behavior using ethovision software. J. Neurosci. Methods. 2009;178:323–326. doi: 10.1016/j.jneumeth.2008.12.021. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Chanthongdee K., Fuentealba Y., Wahlestedt T., Foulhac L., Kardash T., Coppola A., Heilig M., Barbier E. Comprehensive ethological analysis of fear expression in rats using deeplabcut and simba machine learning model. Front. Behav. Neurosci. 2024;18 doi: 10.3389/fnbeh.2024.1440601. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Li Y., Zhi W., Qi B., Wang L., Hu X. Update on neurobiological mechanisms of fear: Illuminating the direction of mechanism exploration and treatment development of trauma and fear-related disorders. Front. Behav. Neurosci. 2023;17 doi: 10.3389/fnbeh.2023.1216524. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Roy D.S., Kitamura T., Okuyama T., Ogawa S.K., Sun C., Obata Y., Yoshiki A., Tonegawa S. Distinct neural circuits for the formation and retrieval of episodic memories. Cell. 2017;170:1000–1012.e19. doi: 10.1016/j.cell.2017.07.013. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Do-Monte F.H., Quiñones-Laracuente K., Quirk G.J. A temporal shift in the circuits mediating retrieval of fear memory. Nature. 2015;519:460–463. doi: 10.1038/nature14030. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Dejean C., Courtin J., Karalis N., Chaudun F., Wurtz H., Bienvenu T.C.M., Herry C. Prefrontal neuronal assemblies temporally control fear behaviour. Nature. 2016;535:420–424. doi: 10.1038/nature18630. [DOI] [PubMed] [Google Scholar]
- 44.Courtin J., Dejean C., Herry C. Comportement de peur: role des interneurones exprimant la parvalbumine du cortex préfrontal médian. Med. Sci. 2014;30:943–945. doi: 10.1051/medsci/20143011004. [DOI] [PubMed] [Google Scholar]
- 45.Metna-Laurent M., Soria-Gómez E., Verrier D., Conforzi M., Jégo P., Lafenêtre P., Marsicano G. Bimodal control of fear-coping strategies by cb1cannabinoid receptors. J. Neurosci. 2012;32:7109–7118. doi: 10.1523/JNEUROSCI.1054-12.2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Chu A., Gordon N.T., DuBois A.M., Michel C.B., Hanrahan K.E., Williams D.C., Anzellotti S., McDannald M.A. A fear conditioned cue orchestrates a suite of behaviors in rats. eLife. 2024;13 doi: 10.7554/eLife.82497. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47.Day H.L.L., Stevenson C.W. The neurobiological basis of sex differences in learned fear and its inhibition. Eur. J. Neurosci. 2020;52:2466–2486. doi: 10.1111/ejn.14602. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48.Bauer E.P. Sex differences in fear responses: Neural circuits. Neuropharmacology. 2023;222 doi: 10.1016/j.neuropharm.2022.109298. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.Overman K.E., Choi D.M., Leung K., Shaevitz J.W., Berman G.J. Measuring the repertoire of age-related behavioral changes in drosophila melanogaster. PLoS Comput. Biol. 2022;18 doi: 10.1371/journal.pcbi.1009867. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Amelchenko E.M., Bezriadnov D.V., Chekhov O.A., Anokhin K.V., Lazutkin A.A., Enikolopov G. Age-related decline in cognitive flexibility is associated with the levels of hippocampal neurogenesis. Front. Neurosci. 2023;17 doi: 10.3389/fnins.2023.1232670. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 51.Chong H.R., Ranjbar-Slamloo Y., Ho M.Z.H., Ouyang X., Kamigaki T. Functional alterations of the prefrontal circuit underlying cognitive aging in mice. Nat. Commun. 2023;14 doi: 10.1038/s41467-023-43142-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 52.von Ziegler L.M., Roessler F.K., Sturman O., Waag R., Privitera M., Duss S.N., O’Connor E.C., Bohacek J. Analysis of behavioral flow resolves latent phenotypes. Nat. Methods. 2024;21:2376–2387. doi: 10.1038/s41592-024-02500-6. [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
Data Availability Statement
-
•
All data generated by this study are available in a Zenodo repository under the following: https://doi.org/10.5281/zenodo.16419208.
-
•
All original code has been deposited at the following GitHub repository and is publicly available as of the publication date (github.com/marccanela/BehavioralProfiles) under the following: https://doi.org/10.5281/zenodo.16419362.
-
•
Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.




