Skip to main content
Nature Portfolio logoLink to Nature Portfolio
. 2026 Jun 3;29(7):1654–1666. doi: 10.1038/s41593-026-02315-y

The representational geometry of emotional states in basolateral amygdala

Pia-Kelsey O’Neill 1,2,8,✉,#, Lorenzo Posani 1,2,3,9,#, Jozsef Meszaros 4, Phebe Warren 1, Carl E Schoonover 1,2,5,10, Andrew J P Fink 1,2,5,11, Stefano Fusi 1,2,3,6, C Daniel Salzman 1,2,4,6,7,✉
PMCID: PMC13337481  PMID: 42237032

Abstract

Neurons in basolateral amygdala (BLA) encode positive and negative valence. However, many additional variables must be represented to describe all aspects of emotional states. To investigate how BLA encodes these states, we presented mice with conditioned stimuli that elicited two behavioral responses: tremble and ingress into a burrow, reflecting fear and flight to safety, respectively. BLA inactivation eliminated several aspects of differential responses to aversive versus neutral stimuli without eliminating tremble and ingress themselves, consistent with BLA’s encoding valence not motor commands. However, individual neurons rarely represented only valence, exhibiting, instead, mixed selectivity for stimulus identity, stimulus valence, tremble and/or ingress. Despite prevalent mixed selectivity, population activity sometimes realized a representational geometry that conferred two computational properties defining specialized readouts: generalization across conditions and no interference between readouts of different variables. These specialized readouts enable output responses to depend on one specific variable and to remain unaffected by the others.

Subject terms: Amygdala, Neural decoding


O’Neill, Posani and colleagues show that while single amygdala neurons encode multiple emotional state-related variables (for example, valence, fear and safety), population-level geometry can enable one variable to be read out cleanly without interference.

Main

In everyday life, we commonly ascribe emotional states to individuals by observing behavioral and physiological responses, such as approach, avoidance and autonomic reactivity. These responses often evolve. For example, a threatening stimulus can cause freezing followed by flight to safety1,2. Classic studies using lesions or silencing of neural activity implicate the amygdala in mediating many aspects of emotion3–5. More recent work in mice has characterized the response selectivity, projection targets and/or molecular transcriptomics of individual amygdala neurons6–11. These studies have suggested that the BLA possesses different neural ensembles directed at distinct anatomical targets, with each ensemble specialized to encode appetitive and aversive valence6,8,10,12–18. In this view, BLA ensembles compute valence across a range of different inputs, and the ensemble’s projection pathway determines the specific valence-related response to be generated. Experiments employing projection-specific, activity-dependent and/or genetic strategies to perturb activity in targeted amygdala populations have been shown to drive valence-specific behavior, lending support to this thesis7,8,10,11,19,20.

Emotional states, however, are far richer, complex and nuanced than simply possessing valence21. The neural coding of this complexity is relatively unexplored. Recent electrophysiological studies describe BLA neurons whose activity is modulated by more than one variable, a property called ‘mixed selectivity’22–31. When a neuron has mixed selectivity, manipulations of two or more variables can elicit the same firing rate, complicating the readout of individual variables. By contrast, neurons with selectivity for only one variable lack that ambiguity and confer two advantageous computational properties. First, the values of other variables do not interfere with readouts of the encoded variable. Second, readouts can generalize across conditions, enabling one to generate the same output for many different inputs. Previous work proposed that this capability for generalization is central to the cognitive process of abstraction, but it also can account for emotional generalization during which neutral and/or novel stimuli elicit emotional responses26. Together, a lack of readout interference from other variables and an ability to generalize across conditions constitute two computational properties that define what we refer to as a specialized readout. A specialized readout enables a neural circuit to perform an operation based only on the value of the encoded variable. Whether and how specialized readouts can be realized if neurons possess mixed selectivity remains unclear.

To examine the evolving neural coding of emotional states that follows the presentation of a threatening stimulus, we used a virtual burrow assay. This assay enables precise measurement of multiple behaviors in head-fixed mice with simultaneous observation of neural activity. In experiments, we presented aversive and neutral conditioned stimuli to mice in the burrow. Aversive stimuli elicited two responses more frequently than neutral ones: tremble (a freezing-like response) and ingress into the burrow (a flight to safety). BLA inactivation eliminated some differential responses to aversive and neutral stimuli but not the responses themselves, consistent with BLA’s signaling valence. However, individual neurons in BLA predominantly exhibited mixed selectivity, with individual neurons representing combinations of variables describing valence, stimulus identity and/or the behavioral state of the mouse.

Interpreting the responses of mixed selectivity neurons can be ambiguous. As a result, we analyzed the activity of the population of recorded BLA neurons as a function of condition and time. This approach entails quantifying aspects of BLA representational geometry—a description of BLA ensemble activity in the firing rate space—to determine the ensemble’s computational properties26,32. Despite diverse response properties across individual neurons, the collective activity of neurons sometimes formed representational geometries that enabled specialized readouts. Neurons with selectivity for only one variable were not required. These results illustrate how emotional state complexity may be represented in the absence of neurons selective for only one variable without sacrificing the advantageous computational properties of a specialized readout.

Results

Aversively conditioned stimuli cause mice to tremble and ingress

Mice underwent Pavlovian aversive conditioning using four olfactory conditioned stimuli: two predicting footshock (CS+A and CS+B) and two non-reinforced (CS−C and CS−D) (Fig. 1a,b). After conditioning, CS+ and CS− odors were presented randomly to head-fixed mice in a virtual burrow assay33. Linear displacement of the burrow—its forward and backward movement—was measured with a laser sensor. During most of the testing session, mice displace the burrow negligibly (less than 0.5 mm). We refer to such epochs as ‘stationary’. However, interspersed with stationary epochs, there are epochs in which mice induce small amplitude displacements that fluctuate with regular periodicity. We refer to these epochs as ‘tremble’. In other epochs, mice induce a large amplitude forward displacement that draws the burrow over them, which we refer to as ‘ingress’ (Fig. 1c). Whereas tremble mirrors a freezing-like state (see below), ingress is a flight-like behavior into the protected environment of the burrow33. To label each frame across experiments as tremble, ingress or stationary, we used a continuous wavelet transform (CWT) to decompose the data into frequency components over time, and a neural network was trained to classify timepoints (Fig. 1d,e). Tremble periods are enriched in spectral power within the 4–8-Hz range, whereas ingress contains spectral power across all frequencies.

Fig. 1. Aversive conditioned stimuli elicit tremble and ingress into a virtual burrow.

Fig. 1

a, Mice undergo Pavlovian aversive conditioning: CS+A and CS+B odors paired with footshock; CS−C and CS−D odors unpaired. b, Experimental timecourse. Pre-test: four neutral odors are delivered to mice in the burrow. Conditioning: 24 hours later, CS+ odors co-terminate with footshock, CS− odors are unpaired. Testing: 24 hours later, the 4 odors are delivered to mice in the burrow. c, Mice display three behaviors during testing. Top left: ‘ingress’: a large forward displacement. Top right: burrow displacement as a function of time relative to CS+ onset from one trial in one mouse. Rectangle: time window of the same trial depicted in the graphs below. Middle left: ‘tremble’: a low-amplitude oscillation of the burrow. Middle right: displacement with tremble period labeled. Bottom left: ‘stationary’: an epoch where burrow displacement is negligible. Bottom right: displacement with stationary period labeled. d, Example CWT scalogram (frequency versus time) showing 4–8-Hz tremble, stationary and ingress periods in 1 CS+ trial. e, Diagram of neural network trained to predict behavioral measures from a subset of labeled trials. f, Normalized ingress magnitude for each trial in response to CS+ (left) and CS− (middle) odors. Box plots (right) show normalized ingress magnitude for each mouse (n = 24 mice). g, Same as f for tremble duration (n = 24 mice). h, Thermocouple implant in nasal cavity to measure respiration. i, Example scalograms and line graphs of displacement (orange, left) and respiration (black, right) from one trial in one mouse. j, Example displacement and respiration during a transition from stationary to tremble (r = 0.82 during ‘tremble’). k, Probability density distributions of the maximum correlation between displacement and respiration during tremble (magenta) and stationary (light gray) periods (n = 5 mice; vertical lines are medians; tremble versus respiration: 0.59, stationary versus respiration: 0.18). Box plots: center line, median; box limits, upper/lower quartiles; whiskers, minimum/maximum. Statistical tests: two-sided, paired t-test (f,g) and two-sided Kolmogorov–Smirnov test (k). ***P < 0.001. Max, maximum; Stat., stationary.

CS+ odor delivery increased the magnitude and probability of ingress (magnitude, CS+: 0.61, CS−: 0.35, n = 24 mice, P < 0.001 (Fig. 1f); average number of ingresses, CS+: 12/20 trials, CS−: 6/20 trials, n = 24 mice, P < 0.001 (Extended Data Fig. 1a)). In addition, tremble duration, maximum frequency and number of tremble epochs were all increased after CS+ delivery compared to CS− delivery (average time per trial, CS+: 1.48 seconds, CS−: 0.75 seconds; maximum frequency, CS+: 5.4 Hz, CS−: 5.0 Hz; average number of trembles, CS+: 0.93, CS−: 0.61; n = 24 mice, P < 0.001) (Fig. 1g and Extended Data Fig. 1d,e).

Extended Data Fig. 1. Quantification of CS +/- behavior in virtual burrow assay.

Extended Data Fig. 1

a, Number of trials with ingress for CS+ and CS- trials across mice (CS + , 12/20 trials; CS-, 6/20 trials). b, Ingress goodness of fit across mice (CS+ r2: 0.85, CS- r2: 0.74). c, Latency to ingress across mice (CS + : 3.5 s CS-: 3.1 s). d, Maximum frequency of a tremble bout across mice (CS + : 5.4 Hz, CS-: 5.0 Hz). e, Average number of trembles per trial across mice (CS + : 0.93, CS-: 0.61). f, Latency to first tremble across mice (CS + : 2.3 s CS-: 2.4 s). g, Spectral power of tremble across mice (CS + : 3.3, CS-: 2.7). n = 24 mice for all box plots. Box plots: center line, median; box limits, upper/lower quartiles; whiskers, minimum/maximum. Statistical tests: two-sided, paired t-test. *p < 0.05, ***p < 0.001, n.s. not significant.

Tremble epochs were related to breathing, as measured by a thermocouple implanted in the nasal cavity (Fig. 1h–k). The mean power of respiration within the 4–8-Hz range was higher during tremble versus stationary epochs. Furthermore, spectrograms of breathing and tremble oscillations were remarkably phase coupled and highly correlated, unlike during stationary epochs (tremble: Pearson’s r = 0.59, P < 001; stationary: r = 0.18 (Extended Data Fig. 2c)). The tight correlation between breathing and tremble suggests that tremble may reflect inhalation/exhalation cycles of sufficient strength to shift the animal’s center of mass. Notably, in paradigms when freely moving mice freeze, autonomic responses such as respiration and heart rate are also modulated34–38. Furthermore, optogenetic activation of BLA neurons responsive to footshock modulates breathing and causes freezing7. Thus, tremble bears similarity to freezing, which is commonly used to ascribe fear to mice.

Extended Data Fig. 2. Tremble is correlated with respiration.

Extended Data Fig. 2

Spectral power of both respiration and burrow displacement within 4-8 Hz is increased during tremble. a, Spectral power of burrow displacement as a function of frequency in tremble (magenta) and stationary (gray) time epochs. Line depicts mean across mice; shaded area is ±sem. b, Same as (a), but for respiration. c, Difference in average power within 4-8 Hz frequencies between tremble and stationary epochs (n = 5 mice). Statistical test: two-sided, one-sample t-test. **p < 0.01.

Predator imminence theory posits that an animal’s defensive strategy shifts from freezing to flight as the perception of threat escalates39–41. Analogously, trembles typically precede ingress on CS+ compared to CS− trials (Fig. 2a,b). Note that odors are presented consistently for 8 seconds, so mice transition between tremble and ingress responses without changes in external cues. After mice ingress, tremble is significantly reduced, suggesting that mice feel safer once ingressed (n = 13, P < 0.001; Fig. 2c). Indeed, features of the quality and timing of trembles, but not trial number, predict transition to ingress, raising the possibility that tremble features and timing describe fear intensity, impacting ingress probability (logistic regression accuracy using tremble features/timing: 58%/64% accuracy, P < 0.001 for both, n = 24 mice; Fig. 2d).

Fig. 2. BLA activity is required for differential expression of tremble and ingress.

Fig. 2

a, Alluvial diagram showing relationship between tremble and ingress for CS+/− (860 total trials, 430 trials per CS type, n = 24 mice). b, Tremble bout(s) on ingress and no-ingress trials for CS+ (orange) and CS− (blue) odors. Trials with ingress are ordered based on ingress onset time (black dots) after CS onset (vertical line). c, Fraction of time mice spent trembling pre-ingress and post-ingress (n = 13 mice). d, Logistic regression models trained to classify trembles that transition to ingress within 1 second of tremble offset versus other trembles not immediately followed by ingress. Models include tremble features (maximum frequency and spectral power), tremble timing variables (duration, number of trembles on trial and tremble latency) or trial number. Box plots depict median accuracies across mice (tremble features: 58%, tremble timing: 64%, n = 24 mice; dashed vertical line indicates 50% chance accuracy). e, Bilateral injections in BLA of AAV–hsyn–hM4Di–tdTomato. Example injection site in one mouse; white dashed line outlines BLA. f, Prior to testing, mice were given an intraperitoneal injection of the DREADD agonist C21 or saline. g, Box plots showing median normalized ingress magnitude (CS+/saline: 0.51, CS−/saline: 0.28; CS+/C21: 0.2, CS−/C21: 0.23) to CS+ and CS− in saline and C21 groups (n = 8 mice C21, n = 7 mice saline). h, Box plots showing median tremble maximum frequency (CS+/saline: 5.32 Hz, CS−/saline: 4.73 Hz; CS+/C21: 5.12 Hz, CS−/C21: 4.80 Hz) to CS+ and CS− in saline and C21 groups (n = 6 mice C21, n = 7 mice saline). Variability across C21 mice for both ingress and tremble was unrelated to variability in the amount of DREADD expression in BLA (r = 0.18, P > 0.05). Box plots: center line, median; box limits, upper/lower quartiles; whiskers, minimum/maximum. Statistical tests: two-sided, paired t-test (c,g,h) and two-sided, one-sample t-test (d). ***P < 0.001. max freq, maximum frequency; Sal, saline.

BLA inactivation eliminates differential tremble and ingress responses to aversive and neutral stimuli

We hypothesized that BLA activity, long linked to valence-specific behavior6,7,9,10,12, is required for differential tremble and ingress responses to aversive versus neutral conditioned stimuli. To test this, we inhibited BLA activity using pharmacogenetics during odor presentation in the burrow. An adeno-associated virus (AAV) harboring the inhibitory designer receptor exclusively activated by designer drug (DREADD) receptor hM4Di and tdTomato was bilaterally and specifically expressed in BLA (Fig. 2e and Extended Data Fig. 3a). Prior to testing, two groups of mice were administered either the DREADD agonist Compound 21 (C21) or saline through intraperitoneal injection (Fig. 2f). In C21 mice, ingress magnitude and the maximum tremble frequency were diminished in response to the CS+ (ingress magnitude, CS+/saline: 0.51, CS−/saline: 0.28, n = 7, P < 0.001; ingress magnitude, CS+/C21: 0.20, CS−/C21: 0.21, n = 8, P > 0.05; maximum frequency, CS+/saline: 5.3 Hz, CS−/saline: 4.7 Hz, n = 7, P < 0.001; maximum frequency, CS+/C21: 4.9 Hz, CS−/C21: 4.8 Hz, n = 6, P > 0.05 (Fig. 2g,h)). Despite these results, it is unlikely that BLA provides a motor signal that generates tremble and ingress responses. Tremble and ingress still occur after BLA inactivation, and previous work showed that amygdala neurons do not exhibit activity time-locked to motor responses elicited by conditioned stimuli12. Furthermore, BLA inactivation did not eliminate all measures of differential tremble and ingress on CS+ versus CS− trials (Extended Data Fig. 3b–h). This suggests that multiple valence-related circuits may exist to support different aspects of valence-related responses, with BLA activity required for only some responses. Redundant representations in other brain areas may be sufficient to support some valence-related behaviors. Studies that do not measure multiple valence-related behaviors simultaneously might not detect this possibility.

Extended Data Fig. 3. Quantification of CS +/- behavior in DREADD mice.

Extended Data Fig. 3

a, DREADD expression is greater in BLA than nearby tail of striatum (TS) (n = 4 mice). b, Number of trials with ingress for CS+ and CS- trials across mice (CS + /saline: 10/20, CS-/saline: 3/20; CS + /C21: 10/20, CS-/C21: 3/20). c, Ingress goodness of fit across mice (CS + /saline r2:0.69, CS-/saline r2: 0.71; CS + /C21 r2: 0.24, CS-/C21 r2: 0.33). d, Latency to ingress across mice (CS + /saline: 3 s, CS-/saline: 1.3 s; CS + /C21: 2.7 s, CS-/C21: 0.9 s). e, Tremble duration (CS + /saline:1.2 s, CS-/saline: 0.97 s; CS + /C21: 1.3 s, CS-/C21: 1.0 s). f, Average number of trembles per trial across mice (CS + /saline: 0.46, CS-/saline: 0.29; CS + /C21: 0.59, CS-/C21: 0.38). g, Average latency to first tremble across mice (CS + /saline: 2.3 s, CS-/saline: 2.96 s; CS + /C21: 2.13 s, CS-/C21: 2.06 s). h, Spectral power of tremble across mice (CS + /saline: 3.15, CS-/saline: 4.31; CS + /C21: 2.74, CS-/C21: 2.68). n = 6 mice C21, n = 7 mice saline (b-h). All box plots: center line, median; box limits, upper/lower quartiles; whiskers, minimum/maximum.; Statistical tests: two-sided, paired t-test. *p < 0.05, ***p < 0.001, n.s. not significant.

BLA ensemble activity encodes mental state variables

Mental states can be defined in terms of the set of variables describing external and internal conditions. The emotional aspects of one’s mental state comprise a subset of these variables42. In our experiments, variables describing conditions include stimulus identity and valence as well as the tremble versus stationary and ingress versus stationary states of mice. To determine if BLA represents these variables, we used two-photon calcium imaging to measure cellular activity in BLA while presenting odors to mice (Fig. 3a and Extended Data Fig. 4a–c). Our analyses focused on the 2 seconds after odor onset as well as 500+-ms time epochs defined by tremble, ingress and stationary states in the burrow. On average, many neurons were either excited or inhibited during these time periods (Extended Data Fig. 4d–g). However, individual cells often exhibited trial-to-trial variability, responding to subsets of odor, ingress or tremble trials (Extended Data Fig. 4h–k).

Fig. 3. Decoding emotional state variables in BLA.

Fig. 3

a, Schematic of two-photon imaging setup during testing in the virtual burrow assay (left). Schematic depicting location of viral injection site and GRIN lens in BLA (top right) and imaging field of view in one mouse (bottom right). b, The four conditions (+A, +B, −C and −D, corresponding to CS+A, CS+B, CS−C and CS−D) were divided into two equally sized groups in three ways (three dichotomies). The CS valence variable describes one dichotomy (valence decoding); the other two dichotomies relate to the encoding of CS identity (identity decoding). A linear classifier is trained to distinguish between the conditions on each side of a dichotomy using randomly selected trials from all conditions. The classifier is then tested on heldout trials. c, Neural activity during tremble, stationary and ingress epochs was selected for decoding analyses. Tremble and ingress epochs were chosen from different trials. A linear decoder is trained to decode the tremble (top) or ingress (bottom) states compared with the stationary state, with stimulus valence balanced across conditions (+t or +i or +s, tremble, ingress or stationary epochs from CS+ trials; −t or −i or −s, tremble, ingress or stationary epochs from CS− trials). d, Decoding accuracy for stimulus valence, CS identity, tremble and ingress (valence: 100%, identity dichotomies: 99% and 96%, tremble versus stationary: 90%, ingress versus stationary: 100%; gray error bars, 95% confidence interval of null model, n = 20 null model iterations). Statistical test: two-sided, one-sample t-test. ***P < 0.001.

Extended Data Fig. 4. Two-photon calcium imaging reveals diverse response properties of individual BLA neurons.

Extended Data Fig. 4

a, GRIN lens locations for mice in the two photon imaging cohort. Each horizontal line depicts location of the GRIN lens implant within BLA of mice from subsequent histological examination (n = 9 mice). b,c Representative field of view in one mouse (b) with ROIs after processing depicted (c). This was repeated with similar results in n = 9 mice. d,e, Neural responses aligned on CS+ (d) and CS- (e) presentation across the population of cells (each row is one cell). Color map, computed spike probability. f,g, Same as d,e, except with activity aligned on Ingress (f) and Tremble (g). h-k, Single cell rasters and peri-stimulus time histograms for 4 example cells. In each raster plot, computed spike probability is plotted as a function of time, with activity aligned on CS+ onset (h), CS- onset (i), Ingress (j), and Tremble (k).

We used a linear classifier to determine if BLA ensemble activity can be used to decode CS identity and valence as well as the tremble and ingress states as compared to the stationary state. In all cases, we decode binary variables that describe different equally sized dichotomies of conditions. For example, the variable describing valence corresponds to a dichotomy that divides the four tested odors into two equally sized groups (CS+A/CS+B versus CS−C/CS−D; Fig. 3b, top). The four odor CSs can also be divided into two other equally sized dichotomies (CS+A/CS−C versus CS+B/CS−D and CS+A/CS−D versus CS+B/CS−C; Fig. 3b, bottom). When all of these dichotomies can be decoded, it indicates that BLA ensemble activity differs for all four CS conditions, encoding CS identity. Finally, for decoding of tremble and ingress as compared to stationary response states, we subsampled the data so that the conditions used for decoding were balanced, containing a 50/50 split of CS+ and CS− trials for each of the three response state conditions (Fig. 3c). This eliminated the potential contribution that a correlation between valence and behavioral responses could have on decoding performance.

Decoding performance for CS valence, ingress and tremble, as well as the dichotomies indicative of CS identity coding, were all significantly above chance (decoding accuracy: valence, 100%; CS identity dichotomies, 99% and 96%; tremble, 90%; ingress, 100%; P < 0.001 in all cases; Fig. 3d). Average decoding accuracy across individual mice was also above chance for each of these variables (P < 0.05 in all cases; Extended Data Fig. 5a,c). Finally, decoding performance became asymptotic after including approximately 25–50% of the neurons (depending upon the variable; Extended Data Fig. 5b,d), indicative of a relatively sparse code.

Extended Data Fig. 5. Individual animal decoding and number of neurons needed for decoding.

Extended Data Fig. 5

a, Decoding accuracy for CS valence and identity for each mouse (dots). Decoding accuracy for one of the two dichotomies related to CS identity (mean valence: 74% accuracy, mean identity: mean: 65% accuracy, n = 9 mice, error bars are mean ± std) b, Decoding accuracy of valence and one of the two identity-related dichotomies (CSA + /CS-_C vs CS + _B/CS-_D) as a function of the percentage of neurons included in decoding analyses (resulting from analysis that down-samples neurons from the population, error bars are mean ± std). c, Decoding accuracy for tremble v. stationary and ingress v. stationary for each mouse (mean tremble: 75% accuracy, mean ingress: 71% accuracy, n = 9 mice, error bars are mean ± std). d, Decoding accuracy of tremble and ingress as a function of the percentage of neurons included in decoding analyses (resulting from analysis that down-samples neurons from the population, error bars are mean ± std). e, Subsets of tremble and ingress trials of at least 500 ms with peak-to-peak displacement range less than 0.5 mm, similar to the displacement range of stationary epochs. Thick lines are mean across behavior category, shaded region depict ±sem. f, Decoding accuracy for tremble v. stationary and ingress v. stationary using only the subset of tremble or ingress trials with peak-to-peak displacement less than 0.5 mm (tremble accuracy: 90%, ingress accuracy: 94%). g, Decoding accuracy for tremble v. stationary using only tremble bouts selected from trials with ingress (accuracy: 100%). Grey error bars, mean and 95% confidence interval of null model, n = 20 iterations (f,g). Statistical tests: two-sided, one-sample t-test. *p < 0.05, ***p < 0.001.

The ability to decode the tremble and ingress response states was not due to differential movements of the burrow in those states compared to when mice were stationary. When we selected tremble and ingress bouts where the displacement range of the burrow was minimal (<0.5 mm; Extended Data Fig. 5e), both states remained highly decodable (tremble: 90%, P < 0.001; ingress: 94%, P < 0.001; Extended Data Fig. 5f). The ability to decode tremble also was not due to increased frequency of trembles prior to ingress. On trials where mice later ingressed, decoding accuracy for tremble versus stationary was 100% (P < 0.001; Extended Data Fig. 5g). Moreover, decoding performance for tremble was statistically significant even on no-ingress trials (tremble decoding: 74% accuracy, P < 0.001). These results suggest that the neural representations of the tremble and ingress response states are distinct. Indeed, we could decode the tremble compared to the ingress states from each other (81% accuracy, P < 0.01), and a linear classifier trained to decode tremble versus stationary states does not generalize to decode ingress versus stationary states nor vice versa (tremble to ingress: 54% accuracy, ingress to tremble: 50% accuracy, P > 0.05). Thus, although ingress and tremble are correlated, and a tremble often leads to an ingress, a representation of tremble exists independent of the ingress state.

Prevalent mixed selectivity in BLA

The ability to decode CS identity, valence, tremble and ingress indicates that BLA contains neurons selective for these variables. This selectivity could be specialized at the single-neuron level, with different neurons selective for each variable, or BLA neurons could exhibit mixed selectivity for two or more variables, or both. We, therefore, quantified the selectivity of individual neurons. We used two approaches, one using each neuron’s decoding weight as its proxy for selectivity and one using the area under the receiver operating characteristic curve (AUC). We then computed three statistical measures to assess whether more specialized selectivity was observed than expected by chance across the population. The three measures involved calculating (1) the Spearman’s correlation coefficient between selectivity measures for both variables; (2) a mean specialization index that quantified the relative selectivity between the two variables; and (3) an index called the L-score for quantifying the degree to which datapoints within a two-dimensional scatter plot of selectivity for the two variables lie along the axes. For all three measures, we determined if the observed value indicated more specialized selectivity than expected by chance given a null model that implements mixed selectivity (correlation coefficient less than 95% of values of null model). For example, a highly negative Spearman’s correlation coefficient between selectivity measures for two variables is observed when there is a preponderance of neurons with specialized selectivity (Fig. 4a). By contrast, when no correlation is observed between selectivity measures, the observed data would fall within the distribution of correlation coefficients from the null model, indicating that there was not more specialized selectivity than expected by chance (Fig. 4b). Of course, in this scenario, neurons with specialized selectivity may still exist, falling in the tail of a continuous distribution. Indeed, the presence of a sufficient number of mixed selectivity neurons can skew the correlation coefficient more positive despite the presence of some neurons with specialized selectivity.

Fig. 4. Prevalent mixed selectivity in BLA.

Fig. 4

a,b, Illustrations depicting how the Spearman’s correlation coefficient can be used to determine if a neural ensemble exhibits more specialized selectivity than expected by chance. a, Scatter plot of toy data where the absolute values of decoding weights for two variables are plotted against each other. In this example, neurons tend to have high decoding weights for one or the other variable but not both (specialized selectivity). The regression slope (orange line) and Spearman’s correlation coefficient are negative. The observed Spearman’s correlation coefficient is compared with the distribution of correlation coefficients obtained from a null model that implements mixed selectivity across the neural ensemble. If there is more specialized selectivity than expected by chance, the observed correlation coefficient (red line, ‘Data’) will be less than 95% of the values obtained from the null model. b, Scatter plot of different toy data where many neurons exhibit high decoding weights for both variables. There is no correlation between decoding weights for the two variables (orange line), and the Spearman’s correlation coefficient (red line, ‘data’) falls within the null distribution, indicating that there is not more specialized selectivity than expected by chance (mixed selectivity). c–e, For each recorded neuron, the decoding importance (weight SNR; Methods) for two variables are plotted against each other (identity versus valence (c), ingress versus tremble (d) and tremble versus valence (e)). Yellow data points indicate neurons with apparent ‘specialized’ selectivity that are artificially ablated in i–k. f–h, Spearman’s correlations from comparison of decoding weight data depicted in c–e (red line, ‘Data’) plotted with respect to the correlation coefficients obtained from iterations of the null model (distributions). f, Valence versus identity null: 0.00 ± 0.05, data: 0.12, P < 0.01. g, Ingress versus tremble null: 0.01 ± 0.07, data: 0.08, P = 0.13. h, Tremble versus valence null: 0.00 ± 0.07, data: 0.08, P = 0.12. i–k, Decoding performance for valence and CS identity (i), tremble and ingress (j), and valence and tremble (k) after ablating (eliminating from analyses) either neurons with apparent specialized selectivity for one variable or neurons with mixed selectivity (averaged across iterations). Gray error bars indicate mean and 95% confidence interval for null model generated from n = 20 iterations of ablating different, random selections of mixed selectivity neurons. NS, not significant.

Plotting the selectivity measures for CS identity versus valence, tremble versus ingress and tremble versus valence against each other (Fig. 4c–e; note that we examine the representational geometry of ingress with respect to valence in a later section of the paper on safety coding), we found that all three measures indicated that neurons did not exhibit more specialized selectivity than expected by chance (Fig. 4f–h and Extended Data Fig. 6). For the analysis of selectivity of CS identity and valence, results were similar regardless of which identity dichotomy was employed. Thus, although specialized neurons could exist in BLA, our data indicate that specialized selectivity is not observed more often than expected by chance under the assumption of a null model that implements mixed selectivity.

Extended Data Fig. 6. Characterization of mixed selectivity in BLA.

Extended Data Fig. 6

a-b, BLA mixed selectivity for valence and identity characterized using decoding weights and ROC analysis. a, Mean specialization and L-score of neurons calculated from normalized decoding weights from the data in Fig. 4c (red line, ‘data’) and null model (distribution). b, For each neuron, the area under the curve (AUC) computed from an ROC analysis is plotted for both valence and identity. Spearman’s correlation, mean specialization, and L-score calculated between the AUC values for valence and identity data (red line, ‘data’) and from iterations of the null model (distribution). c-d, BLA mixed selectivity for valence and tremble characterized using decoding weights and ROC analysis. c, Mean specialization and L-score of neurons calculated from normalized decoding weights from the data in Fig. 4d (red line, ‘data’) and null model (distribution). d, For each neuron, the AUC computed from an ROC analysis is plotted for both tremble and ingress. Spearman’s correlation, mean specialization, and L-score calculated between the AUC values for tremble and ingress data (red line, ‘data’) and from iterations of the null model (distribution). e-f, BLA mixed selectivity for valence and tremble characterized using decoding weights and ROC analysis. e, Mean specialization and L-score of neurons calculated from normalized decoding weights from the data in Fig. 4e (red line, ‘data’) and null model (distribution). f, For each neuron, the AUC computed from an ROC analysis is plotted for both valence and tremble. Spearman’s correlation, mean specialization, and L-score calculated between the AUC values for valence and tremble data (red line, ‘data’) and from iterations of the null model (distribution).

We next performed a benchmarking analysis to quantify the probability that neurons in the recorded ensemble exhibited mixed selectivity, as opposed to the possibility that neurons in fact possess only specialized selectivity. In this analysis, we constructed a model in which the degree of mixed selectivity exhibited by neurons for two variables was varied using a parameter called ‘mixing factor’. For each mixing factor, we varied the percentage of every neuron’s activity explained by signal versus random noise. Extended Data Fig. 7a–c shows the probability of observing our data given each combination of mixing factor and noise and for each two-variable comparison of selectivity. We explored different levels of noise because we assumed, for simplicity, that the noise is isotropic and the same for all experimental conditions. The noise of the real data is more complex, but it cannot be accurately modeled with our limited data. The highest probability of observing our data was obtained when the mixing factor was substantially greater than 0 (CS valence versus identity, >0.75; tremble versus ingress and tremble versus valence, approximately 0.5–0.7). In all cases, when the ground truth mixing factor was 0 (indicative of only specialized selectivity), the probability of observing our data was less than 0.05 with high noise and substantially lower than that when noise was lower. These results indicate that our data are most likely accounted for by prevalent mixed selectivity at the individual neuron level in BLA.

Extended Data Fig. 7. High probability of mixed selectivity in BLA with apparent specialized selectivity changing across time intervals.

Extended Data Fig. 7

a-c, A ground truth model was implemented in which the degree of mixed selectivity and noise of individual neurons was varied across different sets of iterations of the model. The probability of observing the correlation coefficient from experimental data used to evaluate if there is more specialized selectivity than expected by chance is plotted as a function of mixing factor in the model for each modeled level of noise (colors). a, Probability of observing the data for the valence-CS identity correlation. b, Probability of observing the data for the ingress-tremble correlation. c, Probability of observing the data for the tremble-valence correlation. In all cases, the probability of observing the data when the ground truth is that neurons exhibit specialized selectivity (mixing factor = 0) is less than 0.05. The probability of observing our data is highest when the mixing factor is greater than 0.5 in all cases, indicative of prevalent mixed selectivity. d-f, Each plot shows decoding importance (weight SNR; see Methods) for two variables plotted against each other for 3 time epochs analyzed:, CS onset intervals, ingress vs. stationary time intervals, and tremble vs. stationary time intervals. d, (Left) neurons with apparent specialized selectivity during the CS onset interval are labeled (yellow, CS identity; cyan, valence) in each plot. Neurons with apparent specialized selectivity for CS identity or valence during the CS onset time interval exhibit selectivity for additional variables during the other time intervals (middle, right). e, (Middle) neurons with apparent specialized selectivity for tremble or ingress during their respective time intervals in comparison to stationary time epochs are labeled in each plot (magenta, tremble; green, ingress). Neurons with apparent specialized selectivity for tremble or ingress often exhibit selectivity for valence and/or CS identity in other time intervals (left, right). f, (Right) neurons with apparent specialized selectivity during the tremble vs. valence time interval are labeled (magenta, tremble; cyan, valence) in each plot. Neurons with apparent specialized selectivity for tremble or valence during the tremble vs. valence time interval exhibit selectivity for additional variables during the other time intervals (left, middle). As a result, even neurons that appear to have specialized selectivity in one time interval in fact modulate their activity in relation to other variables at other time intervals, lending further support to the conclusion that BLA neurons predominantly exhibit mixed selectivity.

Even if neurons in BLA predominantly exhibit mixed selectivity, it remains possible that direct readout of neurons with specialized selectivity accounts for the observed decoding performance. To test this, we eliminated neurons with apparent specialized selectivity (that is, neurons close to either axis in Fig. 4) from the analyses. For all variables, decoding performance was unaffected and indistinguishable from when a similar number of mixed selectivity neurons were eliminated (P > 0.05 in all cases; Fig. 4i–k). Note, however, that the neurons along the axes of one scatter plot (apparent specialized selectivity) do not lie along the axes when considering other variables and/or other time intervals (Extended Data Fig. 7d–f).

Thus far, our analyses tested whether there are more BLA neurons with specialized selectivity than expected by chance that encode each of two task-related variables (Fig. 4, and Extended Data Figs. 6 and 7). However, neurons could specialize to encode a specific condition defined by combinations of variables. To test for this type of categorical specialization, we employed an approach inspired by studies of categorical selectivity43–45. The analysis determined if neurons are clustered in functionally distinct groups that respond differently to any combination of conditions. In particular, we asked whether they cluster more than what is expected in an unstructured unimodal (non-clustered) distribution fit to the data. The analysis is agnostic to explicitly defined task-related variables and could unveil clusters of neurons responding to nonlinear combinations of experimental variables. For our data, we analyzed activity within a high-dimensional space described by six conditions: tremble, ingress and stationary on CS+ and CS− trials. We found no difference in clustering quality in the data compared to a unimodal (non-clustered and multivariate) null model (Extended Data Fig. 8). These results suggest that BLA neurons exhibit a continuum of selectivity to conditions or combinations of conditions rather than categorically distinct groups of neurons specialized to encode any particular combination of variables.

Extended Data Fig. 8. Clustering quality analysis in the conditions space.

Extended Data Fig. 8

The data was analyzed using methods described in ref. 43 to determine if there was evidence of clustering of neurons that exhibit response selectivity to a task-related variable or to a combination of task-related variables. Clustering would be indicative of the presence of a group of neurons specialized to encode a particular variable or a particular combination of variables. Failure to demonstrate clustering would be consistent with the notion that across the neuronal population, there are not groups of neurons exhibiting selectivity in a categorical manner; instead, task-related variables are represented in a manner such that there are a diverse and continuous (non-categorical) range of mixed-selectivity neurons selective for combinations of task-related variables. a, Marginal distribution of probability of mean activity rates of neurons in response to the six experimental conditions included in the analysis (I, Ingress; T, Tremble; S, Stationary; +, CS + ; -, CS-). The null model (a log-normal distribution, orange) is fit to the data in each condition. b, Neuron-neuron correlation matrix of z-scored activity rate (across conditions), sorted by similarity, for the data (top) and for one iteration of the null model (bottom). Each panel on the right shows the activity matrix (conditions x neurons) sorted using the same index. c, Clustering quality of the data, measured by the silhouette score of clusters found by k-means (red line), compared to 25 iterations of the null model (gray distribution). The observed clustering in the data is not significantly different than the clustering observed when randomly sampling data from the null model distribution (p > 0.05, two-sided, one-sample t-test).72 To ensure that very sparse neurons did not dominate the results (thereby possibly hiding clusters of more active neurons), only neurons active in at least 20% of the trials across the whole session were included in the analysis. To fit the log-normal null model, zeros in the activity matrix were clipped to the 5th-percentile of the non-zero values across all neurons and conditions.

Specialized readouts for tremble and valence

We next sought to determine whether, despite mixed selectivity within BLA, there still exist specialized readouts of different variables. We focused first on the co-occuring variables tremble and valence (Fig. 5a). Readout specialization for tremble and valence would enable tracking of the value of both valence and tremble without interference from each other. This entails being able to read out whether a CS+ versus CS− is present in both the tremble or stationary state and being able to read out if the mouse is in the tremble state regardless of which CS is present. This ability is advantageous because tremble could be represented without sacrificing the ability to know whether a (threatening) CS+ is present. In fact, in our data, tremble versus stationary is decodable on both CS+ and CS− trials, and valence is decodable during tremble and stationary epochs (Fig. 5b). It remains possible, nonetheless, that the representations of these two variables remain partially correlated, and the readouts would, therefore, not be specialized.

Fig. 5. BLA representational geometry reveals specialized and disentangled circuits for tremble and valence.

Fig. 5

a, Neural activity within time epochs of at least 500 ms during tremble or stationary states was selected for decoding analyses. b, Trial conditions were defined by response state and stimulus valence (+t, +s: tremble, stationary on CS+ trials; −t, −s: tremble, stationary on CS− trials). Decoding performance for valence on tremble and stationary trials and decoding for tremble on both CS+ and CS− trials were high (valence (tremble): 92% accuracy, valence (stationary): 98%, tremble (CS+): 96%, tremble (CS−): 98%). c, Left: diagram of a simple neural network comprising neurons with specialized selectivity for valence or tremble. Each neuron contributes to the readout of either valence or tremble but not both. Right: diagram of neural network comprising neurons with mixed selectivity for valence and tremble. Each neuron contributes to the readout of both valence and tremble. d, Two measures of representational geometry used to characterize the computational properties of the neural ensemble: CCGP computed for valence and tremble and CVI. To compute CVI, a linear classifier is trained to decode a variable (for example, valence) using randomly selected trials from all four trial conditions (tremble and stationary on CS+ and CS− trials). During training, each epoch of activity is labeled according to valence. The decoder is then tested on heldout trial conditions where each epoch of neural activity is labeled according to response state, ‘tremble’ or ‘stationary’, and not according to valence. e–g, Different representational geometries confer different computational properties to neural circuits encoding valence and tremble. Plots depict geometries when the activity of three mixed selectivity neurons is plotted in the firing rate space across four trial conditions. e, A geometry where tremble and valence are decodable, CCGP is high for both variables (top, CCGP analysis shown for tremble) and CVI is at chance (no interference) (bottom). Here, the coding directions for tremble and valence are orthogonal with respect to each other (see hyperplanes for decoding the two variables). f, A representational geometry where the response at each condition is at a random location in the firing rate space (forming a tetrahedron). Tremble and valence are decodable, and CCGP and CVI are at chance. Thus, in some geometries, coding directions can be orthogonal, but generalization across conditions is not conferred. g, A representational geometry where CCGP is at chance (top) and CVI is present, indicating interference between readouts (bottom). In this case, CVI arises from coding directions for tremble and valence that are nearly parallel. h, BLA neural ensembles exhibit a geometry where CCGP for valence and tremble is high (valence CCGP: 82% accuracy, tremble CCGP: 89% accuracy). i, Decoding accuracy after artificial ablation of neurons with apparent specialized selectivity or after artificial ablations of equivalent numbers of mixed selectivity neurons (gray dot, average; gray error bars, 95% confidence interval for null model generated from iterations of ablating mixed selectivity neurons). j, Decoding performance for CVI is at chance (accuracy: 54%, P > 0.05). k, BLA representational geometry visualized with dimensionality reduction. The coding directions for tremble (pink lines) and valence (blue lines) appear to be orthogonal (explaining the absence of CVI), yet the coding directions for pairs of conditions for each variable appear parallel, accounting for high CCGP as in the schematics depicted in e. Gray error bars indicate mean and 95% confidence interval of null model, n = 20 iterations. Statistical tests: two-sided, one-sample t-test. ***P < 0.001. Dec, decoding; PC, principal component; Trem, tremble; Val, valence.

Specialized readouts are easily achieved if individual neurons specialized to encode only one variable are connected to output neurons whose activity reports the values of each variable (Fig. 5c, left). To test whether the computational properties defining specialized readouts are still met in a BLA ensemble of mixed selectivity neurons (Fig. 5c, right), we employed two measures of representational geometry. The first measure, cross-condition generalization performance (CCGP), was described previously26. To compute CCGP, data from only a subset of conditions are used to train a decoder; testing involves assessing decoding performance on the data from heldout conditions (Fig. 5d). High CCGP is observed only with certain representational geometries, such as when pairs of conditions corresponding to two values of the same variable have parallel coding directions26. High CCGP means that many different inputs, including novel ones, can generate the same output—a computational property that could explain emotional generalization. Emotional generalization refers to the propensity of novel or neutral stimuli or events to elicit emotional responses, such as approach or defensive behaviors (‘Discussion’). The second measure is called cross-variable interference (CVI). For CVI, a linear decoder is trained to read out the value of a variable (for example, valence) using a subset of the epochs from all conditions (Fig. 5d). The decoder is then tested to read out the value of the other variable (for example, tremble) on the heldout data. If CVI is near 0.5 (chance levels), it is indicative of orthogonal coding directions for the two variables, which means that there is no interference between the readouts. On the other hand, if CVI is significantly greater than 0.5, then there would be interference between readouts.

We now illustrate how CVI and CCGP capture different aspects of the geometry that confer distinct computational properties. Figure 5e shows a geometry that allows readouts to specialize. The two variables, tremble and valence, each have parallel coding directions for different pairs of conditions describing each variable (high CCGP), and the coding directions for the two variables are orthogonal with respect to each other (CVI at chance). By contrast, if the activity for each condition is plotted in a random location in the firing rate space, both tremble and ingress can still be robustly decoded with chance-level CVI, but CCGP is also at chance (Fig. 5f). Consequently, readouts are not specialized. Finally, in yet other geometries, CVI can be high (coding directions for tremble and valence nearly parallel), with CCGP low (Fig. 5g).

We used CVI and CCGP to determine if readouts of tremble and valence from BLA ensemble activity are specialized. CCGP for valence across tremble and stationary response states, and CCGP for tremble across both valences, were both significantly above chance (CCGP valence: 82%, CCGP tremble: 89%, P < 0.001 for both; Fig. 5h). CCGP did not depend upon direct readouts of neurons with apparent specialized selectivity, as eliminating such neurons from analyses did not diminish CCGP nor did it differ from eliminating an equivalent number of mixed selectivity neurons (Fig. 5i). In addition, CVI indicated a lack of interference between the two readouts (CVI = 54%, P > 0.05; Fig. 5j). Consistent with these data, the decoding weights for tremble were highly correlated with neuronal selectivity for tremble on a cell-by-cell basis (r = 0.80, P < 0.001), but the weights were uncorrelated with selectivity for valence (r = 0.06, P > 0.05). Similarly, decoding weights for valence were highly correlated with neuronal selectivity for valence on a cell-by-cell basis (r = 0.82, P < 0.001) but were uncorrelated with selectivity for tremble (r = 0.07, P > 0.05). Thus, a BLA neuron’s contribution to decoding each variable is related to its selectivity for that variable, with no detectable contribution to decoding a variable being due to its also possessing selectivity for another variable. A visualization of the geometry that provides specialized readouts of tremble and valence is shown in Fig. 5k using dimensionality reduction.

We also analyzed CVI between CS identity and valence and CCGP for valence across CS identity during the tremble versus stationary response states. CVI was at chance levels (CVI = 58% accuracy, P > 0.05), but CCGP for valence was high (86%, P < 0.001). High CCGP for valence across stimulus identity, as well as a lack of CVI between valence and identity, could not be attributed to a lack of CS identity coding during this time interval (CS identity decoding accuracy during tremble = 71%, P < 0.01). Note that, during tremble, both CS identity coding and CCGP for valence are lower than they are earlier in trials, during the 2-second time epoch after CS onset (CCGP for valence: 96%, P < 0.001; Extended Data Fig. 9a). CCGP for valence during the earlier time interval after CS presentation also did not rely on neurons with apparent specialized selectivity, as eliminating those neurons from analyses did not diminish CCGP (Extended Data Fig. 9b; see Extended Data Fig. 9c for visualization of the geometry after CS onset using dimensionality reduction).

Extended Data Fig. 9. The geometry of valence representations with respect to odor and ingress coding.

Extended Data Fig. 9

a, Left, to compute CCGP for valence after CS onset, a decoder is trained on trials from a subset of conditions, and tested on trials from held-out conditions (for example +A v. -C for training; +B v. -D for testing). CCGP is the average performance across all ways of choosing testing/training conditions. Right, CCGP for valence across CS identity during the 2 sec following CS onset (96% accuracy). b, CCGP for valence after eliminating from analyses neurons with apparent specialized selectivity (yellow), or an equivalent number of neurons with mixed selectivity (Grey error bars: 95% confidence intervals across iterations of eliminating different randomly chosen mixed selectivity neurons). c, Two views of PCA plot depicting BLA representational geometry following CS onset. Top, visualization of parallel coding directions across pairs of conditions for CS valence, which accounts for high CCGP. Bottom, visualization showing that despite possessing low-dimensional structure for encoding valence, the geometry has higher dimensional components that enable decoding of CS identity. d-f, the geometry of valence coding during ingress vs. stationary coding. d, Cross-Variable Interference between ingress and valence is above chance (accuracy: 64%), indicating that the coding directions for these variables are not orthogonal. e, BLA neural ensembles exhibit a geometry where CCGP for valence is chance but CCGP for ingress is high (valence CCGP: 56% accuracy, ingress CCGP: 74%). f, Mean parallelism score computed between coding directions between each condition and each of the other three conditions. Parallelism was computed as the Pearson correlation of the differences in mean firing rates (mfr) between pairs of conditions (for example, to compute parallelism to S + , mfr[I + ] – mfr[S + ] vs. mfr[S-] – mfr[S + ]). Error bars show the standard deviation across all three possible pairs of differences. The coding direction between the +S (unsafe) condition and each of the other (safe) conditions have a high parallelism score, accounting for high CCGP in Fig. 6g. This type of geometry (parallel coding directions) is not observed with respect to the other conditions (-S, -I, +I). Grey error bars, mean and 95% confidence interval of null model, n = 20 iterations (a,b,d,e). Statistical tests: two-sided, one-sample t-test. *p < 0.05, ***p < 0.001.

The data just presented indicate that, despite prevalent mixed selectivity, BLA can achieve a representational geometry that allows for specialized readouts of tremble and valence. These features of the data can be replicated in an artificial neural network using a general approach for obtaining disentangled abstract representations46. We trained the network to read out the value of each of two variables simultaneously. The input to the network was high dimensional (high decoding, CCGP at chance), and it was generated by starting from the two variables and projecting them into a space in which the participation ratio (a measure of dimensionality) was maximized. After learning, the representation in the last hidden layer of the network exhibited the two computational properties that define specialized readouts: high CCGP for both variables and low CVI (Extended Data Fig. 10a). These specialized readouts were not achieved by the emergence of neurons with specialized selectivity in the hidden layer (Extended Data Fig. 10b). Instead, there were changes in the representational geometry, with prevalent mixed selectivity retained at the individual unit level (Extended Data Fig. 10c,d). Other models that require energy minimization can lead to different representations that include specialized neurons47. However, our model reinforces the notion that specialized readouts can be realized without requiring the presence of neurons with specialized selectivity.

Extended Data Fig. 10. Neural network model.

Extended Data Fig. 10

a, Schematic of the neural network model adapted from Johnston et al.46. The model has three layers: input, hidden, and readout. The input layer has 200 neurons and receives information about two variables, denoted as A and B, which are represented initially in a 2D latent space. The input layer is then trained to transform the representation into an entangled, high dimensional geometry (see Methods), which is characterized by high decoding and low CCGP for both variables. Next, the hidden layer, which has 300 neurons, and the readout layer, which has 2 neurons, are trained together so that the two neurons in the readout layer provide specialized readouts of the values of variables A and B. b, Computational properties of the the hidden layer representation of A and B after training. Both variables are highly decodable, with CCGP also high for both variables, and with low CVI between readouts of A and B. c, Decoding importance for readouts of A and B for units in the hidden layer after training plotted against each other. d, Correlation, selectivity, and L-score indices (red lines) computed from units in the hidden layer after network training are plotted along with the null model distribution, analogous to analyses done for experimental data. The value of each index indicates that the input layer does not possess more neurons with specialized selectivity than expected by chance, consistent with a mixed selective code for the two variables A and B. Grey error bars, mean and 95% confidence interval of null model, n = 20 iterations (b). Statistical tests: two-sided, one-sample t-test. ***p < 0.001.

BLA representational geometry reveals encoding of safety

We interpret the ingress response state as one of relative safety because tremble is markedly decreased after an ingress compared to before an ingress (Fig. 2c) and because previous work showed that mice ingress into the virtual burrow in response to a looming stimulus33 not just to aversive conditioned stimuli. Thus, the ingress response may be part of a conserved behavioral repertoire for responding to threat, with tremble being akin to freezing and ingress akin to fleeing. If the ingress state is perceived as safe, then stimulus valence may become behaviorally irrelevant upon ingress despite the continued presence of conditioned stimuli. We, therefore, examined neural activity during the 2 seconds before and after ingress (Fig. 6a). As before, we subsampled trials so that an equal number of CS+ and CS− trials were included for all analyses. Valence was decodable immediately before an ingress but not right afterwards (accuracy before ingress = 96%, P < 0.001; accuracy after ingress = 41%, P > 0.05; Fig. 6b). The dependence of valence encoding on response state might differ in other tasks in which some conditioned stimuli are associated with a reward, as valence may retain behavioral relevance in the ingressed state. However, in this task, the representation of valence was state dependent and not inextricably sustained during the presence of a CS+. Notably, however, during the ingress response state, one can decode whether a mouse had exhibited a tremble bout earlier in the trial or not (decoding accuracy = 0.90, P < 0.001; Fig. 6c). These data indicate that BLA neural ensemble activity retains a persistent signal of the tremble response state during ingress, despite the fact that stimulus valence is not represented persistently. Persistence has been described as one of the fundamental properties of emotional states21.

Fig. 6. BLA representational geometry of safety.

Fig. 6

a, Neural activity is analyzed in 3 time epochs on CS+ and CS− trials: two 2-second time windows before and after mice reach the ingressed position and a 2-second window when they are stationary and have not ingressed. Odor delivery remains constant during all of these time periods. I, animal will or has ingressed; S, stationary. ±, CS+ or CS− trial. b, Valence is highly decodable before ingress (96%) but not right after ingress (41%) (P > 0.05). Ingress is decodable on CS+ (94%) and CS− (85%) trials. c, Prior tremble is decodable during ingress (accuracy = 90%). d, PCA plot depicting BLA representational geometry during ingress and stationary conditions (I, ingress; S, stationary; +, CS+; −, CS−). e, Dichotomies for examining safety encoding and for evaluating if safety encoding generalizes across different types of conditions. For safety, the variable being decoded is the +S condition versus the three remaining conditions (top). CCGP for safety is calculated by training to decode safety using half the +S (unsafe) trials from one of the safe trial conditions (+I, −I or −S; bottom diagram illustrates training on +S versus +I). The decoder is then tested on decoding safety using the remaining half of +S trials from each of the remaining two safe trial conditions (bottom panel depicts testing on heldout +S trials versus −I trials). The CCGP analysis is performed three ways so that each of the safe trial conditions is used for training. f, BLA neural ensemble activity encodes safety (safety decoding: 96%). g, CCGP for safety is high (safety CCGP: 82%, 83% and 81%, respectively, for each way of training the decoder). Gray error bars indicate mean and 95% confidence interval of null model, n = 20 iterations. Statistical tests: two-sided, one-sample t-test. ***P < 0.001.

We next sought to determine whether BLA ensembles that represent ingress and valence exhibit the computational properties required for specialized readouts. BLA ensemble activity encoded whether mice had ingressed into the burrow on both CS+ and CS− trials (Fig. 6b), but the coding directions for ingress and valence were not orthogonal, as there was some CVI (Extended Data Fig. 9d). This finding emphasizes the fact that two variables (in this case, ingress and valence) can be represented in a high-dimensional activity space without possessing orthogonal coding directions. This may occur when two variables and their underlying representation are related (but not identical). Consistent with this, for ingress and valence in BLA, the encoding of valence does not generalize across ingress and stationary states, but encoding of ingress does generalize across stimuli of both valences (Extended Data Fig. 9e). Thus, although there is CVI, the representations of the two variables are not identical.

Visualization of BLA representational geometry during ingress using dimensionality reduction suggested that the pattern of activity on CS− trials when mice were stationary and not ingressed bore similarity to the activity observed when mice are in the ingressed state regardless of CS valence (Fig. 6d). This pattern of activity is quite different from that observed when a CS+ is presented and mice are stationary, not having ingressed. Of course, within our experiment, three conditions might allow one to conclude that a mouse feels ‘safe’: one in which a neutral stimulus (CS−) is presented and mice have not chosen to ingress and remain stationary and two other conditions, CS+ and CS− trials, when mice have ingressed into the burrow. By contrast, an unsafe condition could be experienced upon presentation of a shock-associated CS+ prior to ingress execution. Thus, a variable we refer to as ‘safety’ divides trials into two (uneven) groups: +S (unsafe) trials and +S/+I/−I (safe) trials (Fig. 6e).

To determine whether and how BLA neural ensembles represent safety, we used decoding and an adaptation of our CCGP analysis (Fig. 6e). These analyses revealed that BLA ensemble activity could be used to decode with high accuracy the +S (unsafe) condition versus the other three safe conditions combined (96%, P < 0.001; Fig. 6f). Furthermore, the variable safety was generalizable across different pairs of conditions (mean accuracy across the three ways of creating pairs of safe/unsafe conditions: 82%, P< 0.001; Fig. 6g). Indeed, the coding directions between the +S (unsafe) condition and each of the three safe conditions tended to be parallel, unlike the coding directions for separating any of the other conditions from the remaining three conditions (Extended Data Fig. 9f). Safety was, therefore, represented by BLA ensembles with low-dimensional structure. However, note that this geometry does not discard all information about how the −S condition differs from +I and −I conditions. In the firing rate space, the −S condition versus +I and −I conditions can still be decoded with 85% accuracy (P < 0.001). The degree to which the −S condition appears to cluster tightly with the +I and −I conditions in principal component analysis (PCA) plots depends upon the viewing angle.

Discussion

In this study, we presented aversive and neutral stimuli to mice in a virtual burrow assay, eliciting two responses used to infer distinct states: tremble for fear and ingress into the burrow for safety. Across the population of BLA neurons recorded, the combination of several lines of evidence indicated that neurons predominantly exhibited mixed selectivity for multiple variables, with few neurons appearing to have specialized selectivity for only one variable, such as valence. Furthermore, BLA neurons exhibited a continuum of selectivity for combinations of variables; we did not find evidence of clusters of neurons with specialized selectivity for any combination of variables. The seemingly disorganized and heterogeneous pattern of response selectivity in BLA poses a challenge for implementing readouts that focus exclusively on a few specialized neurons on the tail of a continuous distribution of selectivity. Instead, we propose a more efficient mechanism that can read out all the highly heterogeneous neurons while still realizing computational properties traditionally thought to be conferred by neurons with specialized selectivity.

Our proposal is that particular representational geometries confer two computational properties that can define specialized readouts even when mixed selectivity neurons are prevalent. In particular, BLA contained a representational geometry whereby valence and the tremble state were simultaneously represented, with no interference between the readouts and the capacity to generalize across conditions for both variables. Because BLA provides independent readouts of tremble and valence, one can (1) determine the emotional valence of a situation without contamination from tremble signals and (2) monitor tremble as an index of the animal’s fear state, which can fluctuate over time. If BLA had encoded only valence, and not also tremble, it would not have represented aspects of the richness and complexity of emotional states. Critically, not all representational geometries confer these computational properties, as the same properties were not present during the ingress state, and previous work has shown entanglement of different variables such as social rank and reward value in the amygdala30.

Our findings suggest that mixed selectivity neurons might contribute to distinct specialized readouts at different target structures. Consistent with this notion, recent studies have shown that some BLA neurons project to more than one anatomical target9,48. The proposal that individual neurons contribute to multiple specialized readouts remains to be tested experimentally, as current techniques, to our knowledge, do not allow one to characterize individual neuron contributions to computations at two distinct target structures in vivo. Establishing this demands in vivo measurements of an individual neuron’s synaptic weights at two targets during behavior.

Neuronal populations for valence coding in BLA

Individual neurons in BLA have often been observed to exhibit selective responses to the valence of either or both conditioned and unconditioned stimuli7,10,12,16,17. Furthermore, recent studies have demonstrated that perturbing the activity of specific BLA neurons or their nerve terminals at projection targets can cause valence-specific effects on emotional behavior9,10. Appetitive and aversive neuronal populations in BLA have also been described as comprising anatomically segregated and genetically defined populations of BLA neurons: Rspo2-expressing pyramidal neurons and another population expressing Ppp1r1b8. Together these results suggest the existence of BLA ensembles specialized to encode valence49. However, subpopulations of Rspo2-expressing neurons have now been shown to have different valence preferences depending upon their projection target11. Of course, a combination of response selectivity, anatomical projection target and molecular transcriptomic characterization might identify the valence selectivity of BLA neurons. Most previous studies, however, have not characterized neural response properties across a broad enough range of parameters to assess the degree to which neurons represent other variables in addition to valence. The present experiments, as well as some previous studies in monkeys, show that even valence-selective neurons often modulate activity in relation to other variables12,18.

Genetically defined, distinct circuit elements have been identified in the central nucleus of the amgydala (CeA) that mediate freezing and fleeing to safety in freely moving animals (somatostatin-expressing (SOM+) neurons, related to the generation of freezing, and corticotropin release factor-expressing (CRF+) neurons, mediating flight behaviors)50. These responses are analogous to the tremble and ingress responses in our experiments. Although BLA input to SOM+ and CRF+ neurons in CeA has been demonstrated50,51, it remains unknown if any individual BLA neurons project to both of these distinct neural populations. Nonetheless, polysynaptic pathways may exist both within and beyond the amygdala. For example, BLA neurons project to the intercalated masses, to the insula and to numerous other structures that then have direct connections to CeA52,53. In addition, complex processing within BLA may occur within its microcircuitry, as recent experiments have shown that valence-selective BLA neurons inhibit some nearby neurons and excite others48. These locally activated and inactivated neurons may have various response properties and projection targets, providing another means for individual neurons to contribute to more than one output computation. Advances in multiphoton techniques that allow the simultaneous perturbation and recording of activity-defined ensembles in BLA may help shed light on mechanisms at the microcircuit level that determine whether, and perhaps how, mixed selectivity neurons contribute to multiple specialized readouts17.

Representational geometry and the generalization of emotional states

The generalization of emotional states across situations, including new ones, has long been appreciated as an important phenomenon implicated in psychopathology54–58. Previous studies typically investigated underlying mechanisms by either focusing on the role of the amygdala at the cellular/molecular level in stimulus generalization or examining how the tuning properties of single neurons with respect to a sensory variable change after aversive conditioning59,60. We found that BLA representational geometry encoded three variables—valence, tremble and safety—with a geometry in which linear readouts did not depend on the value of other variables. This property is indicative of lower-dimensional structure, enabling generalization across different conditions (high CCGP), which can account for emotional generalization21.

To provide an intuition as to why high CCGP can account for emotional generalization, consider the geometry encoding the variable valence both after CS onset and during tremble. When a BLA ensemble responds to a novel stimulus, the pattern of activity will be located somewhere along the coding direction for valence. Depending upon the location along the valence coding direction, the novel stimulus will be decoded as either aversive or not, even though it has no prior emotional meaning and even though that pattern of activity has never been activated in the past. In principle, a variety of factors could dictate where a novel stimulus is represented with respect to the valence coding direction in BLA. These factors include an individual’s preexisting affective state, the similarity of a stimulus to other previously experienced stimuli possessing emotional importance and the environmental situation. Regardless of the factors that might modulate how a novel stimulus is represented in BLA, the low-dimensional representation of valence means that readouts of valence for a novel stimulus could produce emotional states and their associated valence-specific behavioral and physiological responses.

Summary

Neural circuits are commonly thought to rely on the computation of an output to drive a response, and the circuit can be considered specialized when this is its only function. Mixed selectivity neurons make understanding how specialized circuits are implemented more complex, as they render unclear how specialized readouts could be computed by the circuit. Our results indicate that BLA representational geometry is dynamic, and, in some configurations, it enables specialized readouts of variables describing emotional states without requiring the existence of neurons with specialized selectivity for only one variable. This implies that understanding the coding properties of any given BLA neuron will prove inadequate for understanding how the amygdala represents emotional states. Instead, we propose that understanding representational geometry dynamics in neural circuit elements defined anatomically is the next critical step for understanding the role of the amygdala in representing emotional states so as to drive behavior.

Methods

Mice

C57BL/6J male and female mice (The Jackson Laboratory) were singly housed on a 12-hour light/dark cycle with ad libitum access to food and water. All procedures were performed in accordance with standard ethical guidelines and were approved by the Columbia University Institutional Animal Care and Use Committee. Twenty-four mice were used for initial experiments characterizing behaviors. A subset of nine mice underwent two-photon imaging. A cohort of 15 mice was used for pharmacogenetic experiments. An additional five mice were used for respiration studies. All experiments were performed during the light cycle on three consecutive days. Surgical procedures were performed on mice at 8–10 weeks of age. Mice included in all behavioral, inactivation and imaging experiments were between 12 weeks and 16 weeks of age. No statistical methods were used to predetermine sample sizes, but our sample sizes are similar to those reported in previous publications15,28.

Virus injection surgical procedure

Animals were anesthetized with isoflurane and secured in a stereotactic apparatus (Stoelting). Internal body temperature was regulated through a heating pad placed under the body. Ophthalmic ointment was applied to the eyes to prevent corneal drying (Patterson Veterinary), and buprenoprhine (0.05 mg kg−1) was administered as an analgesic. The surgical site was clipped and cleaned with iodine followed by ethanol washes. Lidocaine was applied topically to the scalp to numb the area of incision. The skull was exposed and cleaned with sterile cotton swabs. One machine screw was fixed to the skull to anchor the dental cement. For behavior-only experiments, the skull surface was then immediately covered in a thin layer of cement (MetaBond; Parkell Inc.). A titanium headplate was lowered onto the skull, centered at lambda and secured with additional applications of cement.

For DREADD inactivation and calcium imaging experiments, after attachment of the machine screw, a craniotomy was performed using a microdrill to access the brain for viral injection. All injections were performed using a microinjection pipette, Nanoject II (Drummond Scientific, 6563A01). For inactivation experiments, we made bilateral injections of 200–400 nl of hSyn–hM4Di–tdTomato (Addgene, 50475-AAV2) into the BLA (AP: ±3.30, ML: −1.55, DV: −4.95, −4.85, relative to bregma). For calcium imaging experiments, we made a unilateral injection of 600 nl of CAMKII–GCaMP6f (Addgene, 100834-AAV1) in the left hemisphere using the same coordinates. Viral injections were followed by either headpost attachment or both headpost attachment and gradient-index (GRIN) lens implantation. Mice were given 2 weeks to recover after headpost-only surgery and 4 weeks to allow for adequate viral expression after viral injections before starting behavioral experiments.

Implantation of GRIN lens

In the group of mice that underwent two-photon imaging, a 0.85-mm microendoscope probe (Grintech GmBH) was stereotactically implanted in the BLA. Brain tissue was first aspirated to a depth of approximately 1 mm below skull surface to reduce intracranial pressure from the implant. The lens implant was lowered to DV −4.8 mm relative to bregma and fixed in place using VetBond adhesive (3M) followed by a layer of dental cement and headpost attachment. A layer of Kwik-Cast (World Precision Instruments) was applied to the GRIN lens to protect it from damage between imaging sessions. After 4–6 weeks, the level of GcaMP6f expression was assessed using the two-photon microscope. Imaging experiments began when viral expression was sufficiently bright, as judged by visual inspection. Lens placement was confirmed through histological processing after the experiment. Mice with lenses outside the basolateral amygdala were excluded from the dataset.

Implantation of thermocouple

To measure respiration, mice were implanted with a custom-made thermocouple. Thermocouple wires were inserted in the intranasal cavity and affixed to the skull using dental cement.

Virtual burrow assay

Detailed methodology of the virtual burrow assay design and operation is described in the original publication33. In brief, the virtual burrow is composed of a 3D-printed tube enclosure. A trimmed, absorbent underpad is attached to the floor of the burrow, underneath the mouse, and a wooden stick is adhered to the front of the tube to serve as a handlebar for mice to grip with their forepaws. The virtual burrow is mounted on near-frictionless air bushings set at 15 psi (New Way Air Bearings). These air bushings slide on two parallel rails to constrain movement in one dimension. The animal is headfixed using two custom-machined clamps fitted to the titanium headplate cemented to the mouse skull. The burrow is tethered to a linear actuator with a fishing line. The actuator is employed to place the mouse in a neutral position within the burrow during intertrial periods. The linear displacement of the mouse is measured using a laser displacement sensor focused on a 3D-printed flag that is affixed to the side of the tube enclosure. The laser readout provides a continuous, time-dependent, one-dimensional variable of position. All analog voltage signals from the laser displacement sensor are digitized at 1 kHz using a National Instruments NI-DAQ for behavior-only experiments or at 10 kHz for calcium imaging experiments.

Odor delivery

Odorants acetophenone, octanal, pinene and limonene (Sigma-Aldrich) were mixed at a 1% dilution in mineral oil before the start of each experiment. Odor was delivered into a constant air stream through a tube running across the nose. A custom-designed olfactometer was designed to control air flow, including a four-way valve to route the air stream to exhaust and replace it with a stream of odorized air during a trial. At the end of the trial, the odorant stimulus was switched off by the valve routing the odor air back to exhaust and replacing with air stream. Custom-written Arduino code was used to structure the trials, which included communication between the virtual burrow assay and the olfactometer. Odor stimulus onsets were logged on the same DAQ as incoming burrow displacement data. Odor concentrations during each trial were recorded using a photoionization detector (Aurora Scientific, miniPID) as voltage signals also collected on the DAQ.

Aversive conditioning paradigm

During pre-test, mice in the virtual burrow assay were presented with odor stimuli in 10 blocks of trials. Each block consisted of the four odors delivered in a random order for a total of 40 trials. Odor stimulus duration was 8 seconds, and odor identity was varied for different mice (for example, acetophenone was a CS+ for one mouse and a CS− for another mouse). We measured tremble and ingress during this ‘pre-test’ day prior to learning, and these measures did not differ between CS+ and CS− trials. The next day, mice were placed in a Med Associates chamber fitted with a grid floor to deliver foot shocks. During ‘conditioning’, each odor was delivered eight times, with two odors paired with a 0.7-mA footshock while the other two remained unpaired. Odor was removed with a strong vacuum attached to the conditioning chamber. The intertrial interval lasted for 3 minutes to ensure sufficient clearing of odor from the chamber. Odor delivery was controlled by an Arduino and footshock triggered with transistor–transistor logic (TTL) pulses to a Med Associates shock scrambler. The next day, ‘testing day’, mice were tested in the virtual burrow assay using the same block structure as pre-test day.

Chemogenetic inactivation of BLA

Mice that were bilaterally injected with hM4Di–tdTomato were randomly split into two groups on testing day: saline or C21 (1 mg kg−1) groups. Because testing in the burrow was done in the absence of unconditioned stimuli (that is, testing was done during extinction), separate groups of mice were employed for saline and C21 groups. Mice were given an intraperitoneal injection of either saline or C21 30 minutes prior to being placed in the burrow assay and tested for ingress and tremble responses to odor presentations as detailed above. Data collection and analysis were not performed blinded to the conditions of this experiment.

Two-photon imaging

All images were acquired using a multiphoton microscopy system (Prairie Technologies, now Bruker) with a ×20 objective (0.5 numerical aperture; Nikon) and an ultra-fast pulsed laser beam (920-nm wavelength; Coherent). Time series were collected at 6.5 Hz and 128 × 256 pixels per frame. We continuously acquired fluorescence with a photomultiplier tube (GaAsP PMT) operated by PrairieView software. Each mouse received two imaging sessions, during pre-test and test days (all data presented are from test day).

Segmentation and extraction of calcium traces

Calcium imaging time series were motion corrected using a planar hidden Markov model (SIMA)61. Data were then imported to MATLAB. Cell regions of interest (ROIs) corresponding to active neuronal somata were identified from the time series of images using the MATLAB CaImAn package62, which implements a constrained non-negative matrix factorization (CNMF) algorithm. The ROI number was set at 80 for each field. Spatial footprints were extracted, and a convolutional neural network, using the cnn_classifier function, was used for further classification. ROIs that did not pass the classifier were discarded. ROIs with non-soma-like countours were removed by visual inspection of the remaining spatial footprints. Finally, we used the extract_DF_F function in the same CNMF package, and deconvolved traces were used for subsequent single-cell and population analyses. These analyses resulted in 30–60 neurons per mouse.

Neural network classification of behavior and respiration

We trained a neural network to distinguish among periods of stationary displacement, tremble displacement and directed motion. The model was designed to perform the classification task of distinguishing among the three movement states based on displacement and spectrograms of the displacement. As features for the model, we input the displacement as well as the displacement convolved with kernels of varying sizes to capture past and future displacement and, lastly, values from each trial’s spectrogram computed over the displacement using MATLAB’s continuous wavelet transform (CWT) function.

The process of labeling a training set involved a semiautomated process whereby all of the displacement over time traces from all mice were pooled, and 200 trials were selected at random without replacement. The displacement over time plot for each trial was displayed for a human observer to label with identical x and y scales (2 seconds before CS onset to 12 seconds after CS onset and −2 mm to 20 mm, respectively). The observer carried out the labeling process by manually selecting non-overlapping windows of time and selecting one of the three motion types: active, stationary or tremble. The observer was instructed to understand active motion as large (>2 mm), non-periodic displacements, including possible ingress-like movements (the automatically detected ingress timepoints were not labeled). Stationary reflected small (<2 mm), non-periodic displacements. One trial could contain one or multiple labels, depending on how confident the observer felt in assigning labels for a given trial. From 200 trials spanning 37 mice, the observer labeled 535 time windows: 194 active, 167 stationary and 174 tremble. The observer typically labeled more than one time window in a given trial (76 trials with one label versus 134 with more than one label). The duration of the time windows for each behavior type was typically shorter, although, for some trials, stationary periods were obtained that spanned the entire duration of the trial.

The two-layer feedforward neural network was trained using MATLAB’s patternnet function. The patternnet routine trained the neural network to classify individual timepoints based on information about displacement 100 ms before and after. The neural network was trained using a cross-entropy loss function, which quantifies the difference between the predicted probability distribution of the model and the true distribution of the labels. Model performance was evaluated using metrics including accuracy, precision, recall and F1 score on the testing dataset. After running 1,000 iterations of the training routine, the neural network achieved nearly perfect accuracy (99.9%; cross-entropy = 0.0020337). The trained neural network was then used to label every timepoint of every trial’s spectrogram and displacement data into ‘stationary’, ‘tremble’ or ‘motion’.

Behavior and respiration quantification

The CWT was computed from the displacement and respiration data using MATLAB’s CWT function on a per-trial basis, with parameters set to 10 octaves and 48 voices per octave. Additionally, for each trial, ‘ingress onset’ was defined as the first timepoint when displacement exceeded 1 mm. The ‘ingress magnitude’ was calculated as a ratio of the maximum displacement attained after an ingress divided by the maximum achievable within the virtual burrow assay for the session. The ‘tremble duration’ was computed as the total time from all the tremble segments in a trial.

Prediction of ingress using tremble features

To explore a possible relationship between tremble and ingress, the trials were separated into ingress and no-ingress trials. Three logistic regression models were trained and tested using sklearn’s LogisticRegression module within Python with balancing of class weights. The three models were based on (1) tremble timing features including the duration of a segment, the time that segment began and the total time spent trembling in that trial; (2) the tremble’s mean spectral power between 4 Hz and 8 Hz and the tremble’s maximum frequency; and (3) the trial number on which a tremble occurred. The cross-validated accuracy was computed using 150 cross-validations for each model.

Analyses of representational geometry

Analyses of representational geometry examine the configuration of points in the ‘activity space’. In this space, ‘points’ correspond to the activity of every recorded neuron in an ensemble plotted against each other for every experimental condition26,63. The configuration constitutes the representational geometry of a neural ensemble. To characterize representational geometry, we trained linear decoders to read out task-relevant variables from ensemble activity. Training the decoder assigns a weight to each neuron of the ensemble. These weights differ for each variable being decoded, and they determine the hyperplane within the geometry that best discriminates between the different conditions (that is, the different values of a variable). The assigned weights can be thought of as the synaptic weights of recorded neurons onto target neurons that compute an output64,65. The vector containing the weights defines the ‘coding direction’ for the readout of that variable, and it is orthogonal to the separating hyperplane. Our characterization of representational geometry employed three distinct applications of a linear decoder, each of which is described below: neural decoding, CVI and CCGP.

Neural decoding analysis

Neural decoding analysis was performed using the Decodanda package in Python66 using a linear classifier based on a support vector machine (SVM) architecture available within the scikit-learn package67. The following describes the fundamental steps implemented by Decodanda for the decoding analysis of neural activity. Note that the decoder employed can assign positive or negative weights to each neuron. For details on the implementation, see the package’s documentation: https://github.com/lposani/decodanda.

Throughout the analyses, we used the following parameters for the decoding functions unless specified differently. The unspecified parameters were taken at their default values in each function.

  • ‘training_fraction’: 0.8, fraction of trials used for training during cross-validation

  • ‘cross_validations’: 20, number of cross-validations per decoding analysis

  • ‘nshuffles’: 20, number of null model iterations

  • ‘ndata’: 200, number of resampled patterns per condition

We used the following parameters in the Decodanda constructor

  • ‘min_trials_per_condition’: 4, excludes sessions with fewer than four trials per condition

  • ‘exclude_silent’: True, excludes silent trials (all neurons silent) from the analysis

  • ‘min_activations_per_cell’: 1, excludes neurons with less than one activation total

  • ‘squeeze_trials’: True; create one vector per trial by taking the mean activity across all timebins in that trial.

Data labeling

For all decoding analyses, we used inferred spiking activity as computed by CNMF. Each neuron’s spiking activity was z-scored based on the mean and standard deviation of its baseline activity from a 15-minute period prior to any CS presentation. Trials were obtained by taking a time window of at least 500 ms for tremble and stationary and windows of 2 seconds after ingress and were labeled according to the observed behavior and the presented stimulus (+A, +B, −C and −D). The average activity of each neuron within each trial was then computed to obtain a single vector of activity for each trial.

Pseudo-population sampling and cross-validation

The decoding performance was computed by a 20-fold cross-validation procedure. For each cross-validation fold, the trial activity vectors for each subject were randomly divided into training and testing sets (2/3 for training and 1/3 for testing) and used to construct two populations of training and testing pseudo-simultaneous activity vectors by pooling together all the recorded subjects that passed a minimum inclusion criterion of at least four trials per condition. To build a single pseudo-simultaneous activity vector, each subject was sampled q times to obtain vectors of length qN, where N is the total number of recorded neurons. In this work, we used q = 5. These pseudo-population sets were then used to train and test a linear SVM to obtain a decoding accuracy value. The whole procedure, from training/testing separation to pseudo-simultaneous sampling and SVM accuracy testing, was repeated k = 20 times, and the mean SVM decoding accuracy was taken as the measure of decoding performance. In the sampling procedure, we select vectors of neurons recorded simultaneously instead of single neurons. This ensures that the neuron-to-neuron correlation structure is preserved, avoiding the alteration of the decoding performance that might arise when destroying the correlation structure64,68. Note that with pseudo-population sampling, if neurons come from different animals, then the correlation between neuron i and neuron j will be zero on average. This results in a potentially different correlation structure compared to a dataset with the same number of neurons sampled from a single subject. We, therefore, also performed the same analyses on simultaneously recorded neurons in single subjects.

Balanced sampling

Throughout the decoding analysis, the same number of pseudo-simultaneous vectors was sampled for all conditions (that is, for all combinations of values of the decoded variables). Consider the decoding of two variables from the same neural data: valence (CS+ versus CS−) and behavior (tremble versus stationary). Because, in general, tremble is more frequent during CS+ presentations than during CS− presentations, valence could act as a confound when decoding behavior and vice versa. This balanced sampling ensures that the four conditions (tremble and CS+, tremble and CS−, stationary and CS+ and stationary and CS−) are equally represented in the training set. Thus, variables are ‘disentangled’, and their individual contribution to neural activity is analyzed independently of each other. Unless differently noted, throughout this work, we sampled 200 pseudo-simultaneous vectors for each condition. For comparing tremble and ingress decoding, in order to eliminate the possibility that activity related to a tremble extended beyond the tremble itself and thus affected the decoding of both tremble and ingress states, we restricted the analysis such that any trial could contribute data only for the decoding of ingress or tremble but not both. This restriction was achieved by randomly assigning all trials containing both trembles and ingress to the decoding of only one of the two response states.

Decoding with a subsampled population of neurons

To analyze how decoding performance depends on the number of neurons used in the analysis, we repeated the decoding analysis, as described above, using a random subsample of the neural population with a given size n. We varied n in increments of 5% of the total number of neurons for a total of 19 values (5% to 100%). We repeated the random selection 10 times to obtain a population of decoding performances for each value of n.

CVI

We devised CVI to measure the degree to which information about one variable (for example, valence) can be used to decode a second variable (for example, tremble) and vice versa within a cross-validated decoding scheme. To compute the CVI, we used the same balanced cross-validated decoding scheme described above, with the difference that, across each cross-validation step, the training and testing data were labeled differently, each according to one of the two variables considered in the cross-variable analysis. The final CVI value was computed as the mean decoding performance across the two ways of choosing the training and testing variables (for example, training on tremble versus stationary and testing on CS+ versus CS− and vice versa). Note that each of these decoding performances is itself the average over k cross-validation folds. In general, CVI will be at chance (no interference) when the coding directions for two variables are orthogonal with respect to each other.

CCGP

CCGP was computed as described in Bernardi et al.26. CCGP is an analysis that is always performed on neural ensemble activity across different experimental conditions. Indeed, when neurons exhibit mixed selectivity, one must consider activity across an ensemble to know if generalization across conditions is conferred by a particular representational geometry. We first constructed pseudo-simultaneous activity vectors as described above, except that we did not group data from pairs of conditions with the same decoding variable. Rather, trials used for training a given classification came from one of the pairs of conditions that both contained the decoding dichotomy for a given classification while sharing the same non-decoding variable. The corresponding testing set consisted of data from the other pair of conditions that shared the non-decoding variable. For example, when decoding valence across behavior, one training set consisted of data during interactions with CS+ versus CS− during behavior = tremble, and the testing set consisted of data from CS+ versus CS− during behavior = stationary. The decoding for a given dichotomy was then repeated, swapping the classes of trials used for the training and testing data. CCGP was obtained from the mean decoding performance from the two pairs of training and testing conditions. Previously, we showed that parallel coding directions between pairs of conditions for a variable confers high CCGP26.

Null model and ρ value

We tested the decoding performance and CCGP obtained by the procedures described above against a null model where the labels of trials were randomly shuffled. After each shuffling, the same procedures were repeated, obtaining a null model value for decoding performance. We repeated the shuffling 10 times to obtain a distribution of null model performance values. The ρ value for decoding performance or CCGP was then derived from the z-score of the performance computed on data compared to the distribution of null model values.

Multiselectivity analysis

We performed the following analysis to assess whether cells were specialized for one of two variables (hereby called variable A and variable B) or whether they encode the variables with mixed selectivity. First, we used a cross-validated decoding analysis to ensure that both A and B are encoded in the population activity. For a given variable X and each cell i, we identified the decoding importance wiX of each individual cell through its decoding weight signal-to-noise ratio (SNR)63. The weight SNR is computed as the absolute value of the average decoding weight given by classifiers to a given cell for a given variable, normalized by the standard deviation over k cross-validation folds:

wiX:=Ewi,nXnσwi,nXn

where wi,nX is the SVM decoding weight of cell i in the nth cross-validation fold. We obtained a vector of all the values across the recorded population of cells:

WX=w1X,w2X,…,wNX

We denoted these vectors as WA for variable A and WB for variable B. If the recorded population is specialized, neurons that encode A will not encode B and vice versa. Therefore, a population of specialized neurons will be characterized by anticorrelated values of WA and WB (Fig. 3d, left panel). On the other hand, if neurons are not specialized (mixed selectivity), we expect no relationship between A and B coding, resulting in a null correlation between WA and WB (Fig. 3d, right panel).

To assess the degree of specialization of neurons, we computed the Spearmanʼs correlation between the two decoding importance vectors, denoted as ρ(WA,WB). We then compared the value of ρ(WA,WB) with those obtained by a null model where mixed selectivity is implemented by performing a solid random rotation of the decoding weights of the two variables in the neural activity space. Note that the rotations preserve the geometry of the representation in the neural activity space, so decoding abilities are preserved; however, the iterations break the alignment with the neural axes so as to implement mixed selectivity. In this null model, the two coding vectors WA and WB have no relationship with each other. For each null model iteration k, we sample a random rotation matrix Rk and use it to rotate the weights vectors of A and B decoding before taking the average across cross-validations. This procedure was repeated 100 times, each time with a new rotation matrix, to obtain a population of null values. The recorded population of cells was then classified as either mixed or selective depending on the significance of the correlation, computed using the z-score of the Spearmanʼs correlation compared to the null model:

  • ρ(WA,WB) < null model: selective population

  • ρ(WA,WB) ≈ null model: mixed selectivity

Using weights SNR over simple decoding weights overcomes substantial methodological limitations to assessing decoding importance. For example, decoding weights typically scale with the mean activity of neurons; thus, most methods using decoding weights preprocess the activity so as to normalize the mean firing rate of all neurons. However, this introduces arbitrariness in the choice of normalization procedure (for example, across the whole session or across only the data used for decoding). Also, it is unclear whether the normalization should take care of unbalanced conditions—that is, whether it should weigh underrepresented conditions more to compensate for the unbalanced behavior. The weight SNR does not require any normalization, as the scale factor of the activity is taken care of by the normalization with the standard deviations across cross-validations.

Another limitation of using simple decoding weights is that, in very sparse datasets, a few activations could skew the decoding weight of a given cell, even if this cell is not, in fact, important for decoding in a cross-validated way (that is, its selectivity is not reproducible). The weight SNR corrects for this limitation by taking into account different subsets of the data and taking the mean and standard deviation of the decoding weight resulting from decoding these subsets. Doing so, the weight SNR will be high only for those neurons that are reproducibly important for decoding.

To assess whether the recorded population was specialized, we used weight SNR together with two more complementary approaches, described below. In each case, the results showed that both in every mouse considered individually as well as on average across mice, we did not observe more neurons with specialized selectivity than expected by chance given a neural model that implements mixed selectivity.

L-score

To quantify the degree of specialization of a population of neurons for two given variables (hereby called variable A and variable B), we devised a measure of how much neurons lie on the axis in a scatterplot where the decoding importance for the two variables are plotted against each other, which we called L-score. This measure is computed by measuring the overlap between the top ρ values for variable A and the top ρ values for variable B, normalized so that if the two sets are the same neurons, the overlap is 1:

Op(A,B)≔Ap∩BpAp∪Bp

where Ap is the set of the top ρ selective neurons for variable A and Bp is the set of the top ρ selective neurons for variable B. By varying ρ from p = 0 to ρ = 1 (where ρ is expressed as fraction of the total number of neurons), we obtain a curve from which we compute the area under the curve, AUC(Op). If the selectivities for A and for B are uncorrelated random variables, the expected value of the overlap is Opunc=12p−1, and the corresponding AUC is:

AUCOpunc(A,B)=∫0112p−1dp=log4−1

We then take the difference between the random uncorrelated case and the one computed from the data, AUC(Opunc)−AUC(Op), as a measure of specialization in the neural population. To obtain a value that ranges between 0 and 1, we then normalize with the expected value of AUC in the case of a perfectly specialized population—that is, when half of the neurons have high selectivity for variable A and low selectivity for variable B and the vice versa for the other half. In this specialized case, Opspec=0 if p∈[0,0.5] and Opspec=2p−1 if p∈0.5,1, so the corresponding AUC is AUC(Opspec)=0.25.

Finally, the L-score is defined as:

LA,B:=AUCOpunc(A,B)−AUCOp(A,B)AUCOpunc(A,B)−AUCOpspec(A,B)=log4−1−AUCOp(A,B)log4−0.75−

Ablation analysis to assess decoding importance of selective cells

To assess the relative importance of specialized and mixed neurons in the decoding performance for a given variable, we performed an ‘ablation’ analysis where each class of cells (specialized and mixed) is selectively excluded from the data used for the decoding analysis. The purpose of these analyses was to test whether decoding performance relied on the direct readout of neurons with apparent specialized selectivity. Say we are testing the decoding importance of two variables, A and B. First, we identified the nA specialized cells for variable A and the nB specialized cells for variable B as described in the multiselectivity analysis methods. Those neurons that are not specialized for either A or B were labeled as ‘mixed’. We then excluded all the nA + nB neurons that were identified as specialized and performed the decoding analysis for variables A and B (as described in the decoding methods) to get the decoding performances DPAsel and DPBsel. We then randomly selected the same number of mixed neurons by choosing a random value of selectivity lower than the selectivity threshold used to identify specialized neurons, which is equivalent to a random angle in the WA versus WB graph (see Fig. 3e and multiselectivity methods), and choosing the nA + nB neurons that have the selectivity closest to this random value (pink dots in Fig. 3e). We excluded these neurons and repeated the decoding analysis to obtain the decoding performances, DPAmix and DPBmix. By repeating this random choice procedure 20 times, we obtained a population of decoding values for both variables when excluding mixed selectivity neurons from the decoding analysis (pink error bars in Fig. 3i). Finally, the decoding performances DPAsel and DPBsel were compared to the population of DPAmix and DPBmix values to assess whether excluding specialized neurons affected decoding performance differently than excluding mixed selectivity neurons. Statistical significance for each variable was assessed by computing the z-score of DPsel compared to the corresponding DPmix population.

Visualization of neural patterns in a reduced-dimensionality space

To visualize the geometry of conditions in the neural activity space, we performed a dimensionality reduction of the recorded neural patterns using a PCA approach. Say we have C conditions. These could be, for example, the 2v combinations of v experimental binary variables or multiple values of a single variable. First, for each condition, we sampled Nc pseudo-population patterns from the activity of the recorded subjects as described in the decoding analysis methods. We then used PCA to obtain the first three principal components of the resulting CNc sampled patterns. We then projected the CNc patterns on the three principal components to obtain C collections of Nc vectors in the three-dimensional PCA space. We then computed the centroid of each condition by taking the median position of its Nc vectors in the PCA space. Using the median instead of the mean ensures that outliers that could be due to artifacts will not dominate the position of the centroid. Finally, we visualized the resulting C centroids in the three-dimensional PCA space.

Neuronal selectivity

We performed an analysis that examined the correlation between neuronal selectivity for tremble and valence and unsigned decoding weights for tremble and valence. Response selectivity is quantified by an index that is the difference in firing rate between two conditions (that is, tremble versus stationary or CS+ versus CS−) divided by their sum, an index that ranges from −1 to 1. Note that we balance for subconditions, so that if, for example, A = tremble and B = stationary, we make sure that CS+ and CS− trials have the same weight when calculating mean firing rates for A and B.

Ground truth modeling to benchmark selectivity analysis

To evaluate the statistical tests described in this study, we implemented a ground truth simulation model in which neurons exhibited variable degrees of mixed selectivity to two binary task variables, A∈0,1 and B∈0,1. The degree of mixing was controlled by a ‘mixing factor’ parameter, m∈0,1. For m = 0, neurons were purely specialized, with half of the responsive neurons selective for the first variable and half for the second. For m = 1, neurons exhibited equal mixed selectivity for both variables. For each simulation, we used the same number of neurons as in experimental data. We matched their individual activity rate, as described below, to account for the hetereogeneity observed in the data. For each neuron i, we sampled its spiking activity in a series of trials t from a Poisson distribution with a rate that depended on its response to the two variables (signal) and a random term (noise).

For the first half of neurons, the signal term of neuron i in trial t was modeled as follows (A and B were inverted for the second half of neurons):

rit=fi1−m2aiAt+m2biBt

where m is the mixing factor; ai,bi~N0,1 are the excitatory/inhibitory weights of each neuron to variable A and B (sampled from a unitary normal distribution); and fi is the empirical activity rate for neuron i in the data. The number of spikes for neuron i and timebin t was then sampled from a Poisson distribution characterized by a noisy rate:

xit=Poisson1−γr~it+γηt

where ηt~N0,1 is a random noise term sampled from a unitary normal distribution, and γ controls the noise level relative to the normalized signal term r~it=rit∑qriq. This sampled activity was analyzed with the decoding importance pipeline described above, including the comparison to a rotated null model distribution, obtaining a z-scored decoding importance Spearmanʼs corelation value ρm,γ. For the analyses presented here, we used T = 100 trials, varied the level of noise between γ = 0.4 and γ = 0.8 and varied the mixing factor between 0 and 1.

Using the ground truth model to estimate the most likely mixing factor from the data

For each combination of noise and mixing factor values, the simulation and analysis pipeline described above were repeated 50 times to obtain a distribution of z-scored decoding importance correlation values ρm,γ. We used this population of values to estimate the probability distribution Pρ∣m,γ under the assumption of normality by computing the mean and standard deviation of the sampled population. We then used this estimated probability distribution to compute the probability of a specific ground truth mixing factor m0 given the observed empirical value ρdata and a noise value γ by Bayesian inversion, Pm0ρdata,γ)=Pρdatam0,γ)∑mPρdatam,γ). For these estimations, we used the simulated mixing factor values m = 0, 0.1,…, 1.0.

Neural network model

The model described in Extended Data Fig. 8 is an adaptation of that of Johnston and Fusi46. Details on the model can be found in the original paper. In brief, the model is a feedforward neural network composed of three layers. The first layer (called the ‘input layer’) receives information about two independent continuous variables (variable A and variable B), each taking values within the range [−1, 1], and is trained to entangle those variables by maximizing the dimensionality of their representations (using a loss function that includes a term inversely proportional to the participation ratio; see the original paper for more details). These high-dimensional representations of A and B are then passed to the second layer (‘hidden’ layer), which is then read out by a ‘readout’ layer of two neurons. The synaptic connectivity between input-hidden and hidden-readout is trained to ensure that the two readout neurons are specialized readouts for variable A and variable B, respectively. This is done by training with an objective function that requires the first neuron to report whether variable A takes a positive or negative value and similarly for the second neuron and variable B. In the presented analysis, the input and hidden layers contained 200 and 300 units, respectively. The network was trained for 200 epochs using backpropagation with the Adam optimization algorithm, using batch size = 30 and 10,000 training samples (see the original paper for more details). After training, the hidden layer was sampled for T = 10,000 values of (A, B), and its representations of the two variables (binarized with a threshold = 0 to allow comparison to the data) were analyzed with the same pipelines for used for the data to evaluate if there is more specialized selectivity than expected by chance. To allow for a qualitative comparison to the data, where neurons have different levels of noise, a non-homogeneous noise term was added to the sampled representations as follows:

x~it=xit+ξitγi

where each term ξit was sampled from a normal distribution that had 0 mean and variance = 0.5, and γi was a neuron-dependent modulation of the noise that was sampled from a log-normal distribution with mean and variance = 0.5.

Statistical analysis

When paired comparisons were possible, paired t-tests were used to compute statistical significance. For comparing distributions, the Kolmogorov–Smirnov test was used to compute statistical significance. The α value for computing significance was 0.05. For all box plots, the top and bottom edges of the box indicate the 75th and 25th percentiles of the data. The whiskers extend to the most extreme data points not considered outliers. For decoder performance graphs showing shaded errors, the 95% confidence intervals obtained from the cross-validation runs are used for the upper and lower extents of the shading. None of our statistical tests has strong assumptions of normality, as we used non-parametric tests throughout the work. Statistical analyses were performed using MATLAB (MathWorks) and Python.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Online content

Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at 10.1038/s41593-026-02315-y.

Supplementary information

Reporting Summary (105.5KB, pdf)

Acknowledgements

We are grateful to W. J. Johnston for generously providing code for the neural network model that generates disentangled abstract representations and to G. Allen for insightful discussions on how to study and interpret the weights of sparse decoders. We thank R. Axel for his generosity and numerous contributions as well as J. Gordon and members of the Salzman laboratory for helpful comments on the paper. P.-K.O. was supported by National Institute of Mental Health (NIMH) T32MH015144, the Brain and Behavior Research Foundation (BBRF) Young Investigator Award and NIMH K01MH123783. L.P. was supported by NIMH K99MH135166. C.D.S. and S.F. were supported by R01 MH082017 and the Simons Foundation.

Extended data

Author contributions

P.-K.O. and C.D.S. conceived and designed the project, with input from C.E.S. and A.J.P.F. P.-K.O. collected the data, with technical support from P.W. P-.K.O., J.M. and L.P. analyzed the data, with guidance from S.F. and C.D.S. The results were interpreted by P.-K.O., L.P., S.F. and C.D.S. The paper was written by P.-K.O., L.P., S.F. and C.D.S., with feedback from J.M., C.E.S. and A.J.P.F.

Peer review

Peer review information

Nature Neuroscience thanks the anonymous reviewer(s) for their contribution to the peer review of this work.

Data availability

Data to generate the figures are available via figshare at 10.6084/m9.figshare.31808005 (ref. 69).

Code availability

Code for running the behavioral experiment is available on GitHub (https://github.com/pkoneill/Burrow-Amygdala-Code).

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Pia-Kelsey O’Neill, Lorenzo Posani.

Contributor Information

Pia-Kelsey O’Neill, Email: pia.oneill@dartmouth.edu.

C. Daniel Salzman, Email: cds2005@columbia.edu.

Extended data

is available for this paper at 10.1038/s41593-026-02315-y.

Supplementary information

The online version contains supplementary material available at 10.1038/s41593-026-02315-y.

References

  • 1.Blanchard, D. C. & Blanchard, R. J. Ethoexperimental approaches to the biology of emotion. Ann. Rev. Psychol.39, 43–68 (1988). [DOI] [PubMed] [Google Scholar]
  • 2.Blanchard, D. C., Griebel, G., Pobbe, R. & Blanchard, R. J. Risk assessment as an evolved threat detection and analysis process. Neurosci. Biobehav. Rev.35, 991–998 (2011). [DOI] [PubMed] [Google Scholar]
  • 3.Weiskrantz, L. Behavioral changes associated with ablation of the amygdaloid complex in monkeys. J. Comp. Physiol. Psychol.49, 381–391 (1956). [DOI] [PubMed] [Google Scholar]
  • 4.LeDoux, J. E. Emotion circuits in the brain. Annu. Rev. Neurosci.23, 155–184 (2000). [DOI] [PubMed] [Google Scholar]
  • 5.Maren, S. Neurobiology of Pavlovian fear conditioning. Ann. Rev. Neurosci.24, 897–931 (2001). [DOI] [PubMed] [Google Scholar]
  • 6.O’Neill, P.-K., Gore, F. & Salzman, C. D. Basolateral amygdala circuitry in positive and negative valence. Curr. Opin. Neurobiol.49, 175–183 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Gore, F. et al. Neural representations of unconditioned stimuli in basolateral amygdala mediate innate and learned responses. Cell162, 134–145 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Kim, J., Pignatelli, M., Xu, S., Itohara, S. & Tonegawa, S. Antagonistic negative and positive neurons of the basolateral amygdala. Nat. Neurosci.19, 1636–1646 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Beyeler, A. et al. Divergent routing of positive and negative information from the amygdala during memory retrieval. Neuron90, 348–361 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Namburi, P. et al. A circuit mechanism for differentiating positive and negative associations. Nature520, 675–678 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Zhang, X. et al. Genetically identified amygdala–striatal circuits for valence-specific behaviors. Nat. Neurosci.24, 1586–1600 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Paton, J. J., Belova, M. A., Morrison, S. E. & Salzman, C. D. The primate amygdala represents the positive and negative value of visual stimuli during learning. Nature439, 865–870 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Schoenbaum, G., Chiba, A. A. & Gallagher, M. Neural encoding in orbitofrontal cortex and basolateral amygdala during olfactory discrimination learning. J. Neurosci.19, 1876–1884 (1999). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Uwano, T., Nishijo, H., Ono, T. & Tamura, R. Neuronal responsiveness to various sensory stimuli, and associative learning in the rat amygdala. Neuroscience68, 339–361 (1995). [DOI] [PubMed] [Google Scholar]
  • 15.Grewe, B. F. et al. Neural ensemble dynamics underlying a long-term associative memory. Nature543, 670–675 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Zhang, W. et al. Functional circuits and anatomical distribution of response properties in the primate amygdala. J. Neurosci.33, 722–733 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Piantadosi, S. C. et al. Holographic stimulation of opposing amygdala ensembles bidirectionally modulates valence-specific behavior via mutual inhibition. Neuron112, 593–610 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Belova, M. A., Paton, J. J. & Salzman, C. D. Moment-to-moment tracking of state value in the amygdala. J. Neurosci.28, 10023–10030 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Burgos-Robles, A. et al. Amygdala inputs to prefrontal cortex guide behavior amid conflicting cues of reward and punishment. Nat. Neurosci.20, 824–835 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Stuber, G. D. et al. Excitatory transmission from the amygdala to nucleus accumbens facilitates reward seeking. Nature475, 377–380 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Anderson, D. J. & Adolphs, R. A framework for studying emotions across species. Cell157, 187–200 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Rigotti, M. et al. The importance of mixed selectivity in complex cognitive tasks. Nature497, 585–590 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Fusi, S., Miller, E. K. & Rigotti, M. Why neurons mix: high dimensionality for higher cognition. Curr. Opin. Neurobiol.37, 66–74 (2016). [DOI] [PubMed] [Google Scholar]
  • 24.Saez, A., Rigotti, M., Ostojic, S., Fusi, S. & Salzman, C. D. Abstract context representations in primate amygdala and prefrontal cortex. Neuron87, 869–881 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Saez, R. A., Saez, A., Paton, J. J., Lau, B. & Salzman, C. D. Distinct roles for the amygdala and orbitofrontal cortex in representing the relative amount of expected reward. Neuron95, 70–77 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Bernardi, S. et al. The geometry of abstraction in the hippocampus and prefrontal cortex. Cell183, 954–967 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Kyriazi, P., Headley, D. B. & Pare, D. Multi-dimensional coding by basolateral amygdala neurons. Neuron99, 1315–1328 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Gründemann, J. et al. Amygdala ensembles encode behavioral states. Science364, eaav8736 (2019). [DOI] [PubMed] [Google Scholar]
  • 29.Peck, C. J., Lau, B. & Salzman, C. D. The primate amygdala combines information about space and value. Nat. Neurosci.16, 340–348 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Munuera, J., Rigotti, M. & Salzman, C. D. Shared neural coding for social hierarchy and reward value in primate amygdala. Nat. Neurosci.21, 415–423 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Belova, M. A., Paton, J. J., Morrison, S. E. & Salzman, C. D. Expectation modulates neural responses to pleasant and aversive stimuli in primate amygdala. Neuron55, 970–984 (2007). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Chung, S. Y. & Abbott, L. F. Neural population geometry: an approach for understanding biological and artificial neural networks. Curr. Opin. Neurobiol.70, 137–144 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Fink, A. J., Axel, R. & Schoonover, C. E. A virtual burrow assay for head-fixed mice measures habituation, discrimination, exploration and avoidance without training. eLife8, e45658 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Davis, M. The role of the amygdala in fear and anxiety. Annu. Rev. Neurosci.15, 353–375 (1992). [DOI] [PubMed] [Google Scholar]
  • 35.Bagur, S. et al. Breathing-driven prefrontal oscillations regulate maintenance of conditioned-fear evoked freezing independently of initiation. Nat. Commun.12, 2605 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Moberly, A. H. et al. Olfactory inputs modulate respiration-related rhythmic activity in the prefrontal cortex and freezing behavior. Nat. Commun.9, 1528 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Schenberg, L. C., Corral Vasquez, E. & Barcellos da Costa, M. Cardiac baroreflex dynamics during the defence reaction in freely moving rats. Brain Res.621, 50–58 (1993). [DOI] [PubMed] [Google Scholar]
  • 38.Hofer, M. A. Cardiac and respiratory function during sudden prolonged immobility in wild rodents. Psychosom. Med.32, 633–647 (1970). [DOI] [PubMed] [Google Scholar]
  • 39.Bolles, R. C. Species-specific defense reactions and avoidance learning. Psychol. Rev.77, 204–214 (1970). [DOI] [PubMed] [Google Scholar]
  • 40.Fanselow, M. S. The role of learning in threat imminence and defensive behaviors. Curr. Opin. Behav. Sci.24, 44–49 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Mobbs, D., Headley, D. B., Ding, W. & Dayan, P. Space, time, and fear: survival computations along defensive circuits. Trends Cogn. Sci.24, 228–241 (2020). [DOI] [PubMed] [Google Scholar]
  • 42.Salzman, C. D. & Fusi, S. Emotion, cognition, and mental state representation in amygdala and prefrontal cortex. Ann. Rev. Neurosci.33, 173–202 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Posani, L., Wang, S., Muscinelli, S., Paninski, L. & Fusi, S. Rarely categorical, highly separable representations along the cortical hierarchy. Nature (in the press). [DOI] [PubMed]
  • 44.Raposo, D., Kaufman, M. T. & Churchland, A. K. A category-free neural population supports evolving demands during decision-making. Nat. Neurosci.17, 1784–1792 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Hirokawa, J., Vaughan, A., Masset, P., Ott, T. & Kepecs, A. Frontal cortex neuron types categorically encode single decision variables. Nature576, 446–451 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Johnston, W. J. & Fusi, S. Abstract representations emerge naturally in neural networks trained to perform multiple tasks. Nat. Commun.14, 1040 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Whittington, J. C. R., Dorrell, W., Ganguli, S., Timothy, S. & Behrens, E. J. Disentanglement with biological constraints: a theory of functional cell types. Proc. of the Eleventh International Conference on Learning Representations (ICLR, 2023); https://openreview.net/pdf?id=9Z_GfhZnGH
  • 48.Beyeler, A. et al. Organization of valence-encoding and projection-defined neurons in the basolateral amygdala. Cell Rep.22, 905–918 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Namburi, P., Al-Hasani, R., Calhoon, G. G., Bruchas, M. R. & Tye, K. M. Architectural representation of valence in the limbic system. Neuropsychopharmacology41, 1697–1715 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Fadok, J. P. et al. A competitive inhibitory circuit for selection of active and passive fear responses. Nature542, 96–100 (2017). [DOI] [PubMed] [Google Scholar]
  • 51.Massi, L. et al. Disynaptic specificity of serial information flow for conditioned fear. Sci. Adv.9, eabq1637 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52.Sah, P., Faber, E. S. L., De Armentia, M. L. & Power, J. The amygdaloid complex: anatomy and physiology. Physiol. Rev.83, 803–834 (2003). [DOI] [PubMed] [Google Scholar]
  • 53.Hagihara, K. M. et al. Intercalated amygdala clusters orchestrate a switch in fear state. Nature594, 403–407 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Lonsdorf, T. B. & Kalisch, R. A review on experimental and clinical genetic associations studies on fear conditioning, extinction and cognitive-behavioral treatment. Transl. Psychiatry1, e41 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Pitman, R. K. et al. Biological studies of post-traumatic stress disorder. Nat. Rev. Neurosci.13, 769–787 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Lissek, S. Toward an account of clinical anxiety predicated on basic, neurally mapped mechanisms of Pavlovian fear-learning: the case for conditioned overgeneralization. Depress. Anxiety29, 257–263 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Lissek, S. et al. Classical fear conditioning in the anxiety disorders: a meta-analysis. Behav. Res. Ther.43, 1391–1424 (2005). [DOI] [PubMed] [Google Scholar]
  • 58.Jovanovic, T. & Ressler, K. J. How the neurocircuitry and genetics of fear inhibition may inform our understanding of PTSD. Am. J. Psychiatry167, 648–662 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Resnik, J. & Paz, R. Fear generalization in the primate amygdala. Nat. Neurosci.18, 188–190 (2015). [DOI] [PubMed] [Google Scholar]
  • 60.Shaban, H. et al. Generalization of amygdala LTP and conditioned fear in the absence of presynaptic inhibition. Nat. Neurosci.9, 1028–1035 (2006). [DOI] [PubMed] [Google Scholar]
  • 61.Kaifosh, P., Zaremba, J. D., Danielson, N. B. & Losonczy, A. SIMA: Python software for analysis of dynamic fluorescence imaging data. Front. Neuroinform.8, 80 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62.Giovannucci, A. et al. CaImAn an open source tool for scalable calcium imaging data analysis. eLife8, e38173 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 63.Boyle, L. M., Posani, L., Irfan, S., Siegelbaum, S. A. & Fusi, S. Tuned geometries of hippocampal representations meet the computational demands of social memory. Neuron112, 1358–1371 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 64.Stefanini, F. et al. A distributed neural code in the dentate gyrus and in CA1. Neuron107, 703–716 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 65.Corrigan, B. W. et al. Distinct neural codes in primate hippocampus and lateral prefrontal cortex during associative learning in virtual environments. Neuron110, 2155–2169 (2022). [DOI] [PubMed] [Google Scholar]
  • 66.Posani, L. Decodanda: a Python toolbox for best-practice decoding and geometric analysis of neural representations. Preprint at bioRxiv10.64898/2026.03.16.711920 (2026).
  • 67.Pedregosa, F. et al. Scikit-learn: machine learning in Python. J. Mach. Learn. Res.12, 2825–2830 (2011). [Google Scholar]
  • 68.Moreno-Bote, R. et al. Information-limiting correlations. Nat. Neurosci.17, 1410–1417 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 69.O’Neill, P. & Salzman, C. D. Dataset: representational geometry of emotional states in basolateral amygdala. figshare10.6084/m9.figshare.31808005 (2026). [DOI] [PMC free article] [PubMed]

Associated Data

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

Supplementary Materials

Reporting Summary (105.5KB, pdf)

Data Availability Statement

Data to generate the figures are available via figshare at 10.6084/m9.figshare.31808005 (ref. 69).

Code for running the behavioral experiment is available on GitHub (https://github.com/pkoneill/Burrow-Amygdala-Code).


Articles from Nature Neuroscience are provided here courtesy of Nature Publishing Group

RESOURCES