Experimental design, behavior, histology and calcium imaging.

a,Experimental design illustrating discriminative fear conditioning with either a 15 kHz CS⁺ or a 3 kHz CS⁺ (experimental groups), and no-shock controls tested at identical time points but never exposed to footshock. All groups were tested with 3 and 15 kHz tones and two intermediate frequencies (7 and 11 kHz) on days 1, 15 and 30 after conditioning. b, Behavioral responses across testing days (CS⁺15 kHz: n = 27 mice; CS⁺3 kHz: n = 22 mice; no-shock controls: n = 13 mice). Two-way repeated-measures ANOVA: CS⁺15 : effect of day F(2,52) = 13.28, p < 0.001, frequency: F(3,78) = 85.09, p < 0.001, day × frequency interaction: F(6,156) = 3.79, p = 0.002; CS⁺3: effects of day F(2,42) = 14.42, p < 0.001, frequency: F(3,63) = 58.81, p < 0.001, day × frequency interaction: F(6,126) = 1.41, p = 0.217; no-shock controls: effects of day: F(2,20) = 1.38, p = 0.276, frequency: F(3,30) = 1.43, p = 0.253; day × frequency interaction: F(6,60) = 0.335, p = 0.916. Significant Tukey multiple comparisons are denoted by asterisks, *** p < 0.001. c, Representative histological section showing GCaMP6f expression. Imaging depth did not exceed 300 μm, restricting recordings to PL. d, Example calcium imaging data showing raw fluorescence signals, deconvolved activity, thresholded events and corresponding activity traces.

Neuronal activity distributions across days and stability of the active network.

a,Raster plots from an animal trained with a 15 kHz CS+, ordered by activity level. Raster plots illustrate positive sound-responsive neurons (bottom), negative sound-responsive neurons (top), and mixed or non-responsive neurons (middle). b, Proportions of neuronal response types across experimental groups and testing days. Number of cells: CS+15: conditioning: 3,834; day 1: 3,177; day 15: 4,186; day 30: 3,693, CS+3 conditioning: 1,628; day 1: 1,381; day 15: 1,881; day 30: 1,833, control: conditioning: 1,118; day 1: 986; day 15: 1,386; day 30: 563 (2 mice only yielded data up to day 15). c, Venn diagrams showing the proportions of consistently active neurons (active across all retrieval sessions; one-way ANOVA: F(2,13) = 2.70, p = 0.104), partially active neurons (active in two sessions; one-way ANOVA: days 1–15, F(2,13) = 1.45, p = 0.271; days 15–30, F(2,13) = 1.02, p = 0.388; days 1–30, F(2,13) = 0.33, p = 0.723), and transiently active neurons (active in a single session; day 1, Kruskal–Wallis: H(2) = 1.90, p = 0.387; day 15, one-way ANOVA: F(2,13) = 0.06, p = 0.942; day 30, Kruskal–Wallis: H(2) = 7.52, p < 0.05). Diagrams and analyses for control mice include only mice recorded for 30 days.

Population activity of positive sound responders shows emotional graded valence patterns of activity in response to tones.

a-c, Population responses in animals trained with a 15 kHz CS+ (a), a 3 kHz CS+ (b), and no-shock controls (c). In all groups, upper panels show positively responsive neurons and lower panels negatively responsive neurons. Boxplots show the median (center line), interquartile range (box), and whiskers extending to ±1.5× the interquartile range; points outside the whiskers represent individual observations beyond this range. CS+15: positively modulated: day 1: F(3,18) = 9.963, p < 0.001; day 15: F(3,18) = 9.973, p < 0.001; day 30: F(3,18) = 6.627, p = 0.003; negatively modulated: day 1: F(3,18) = 2.483, p = 0.094; day 15: F(3,18) = 1.877, p = 0.178; day 30: F(3,18) = 2.753, p = 0.073). CS+3: positively modulated: day 1: F(3,12) = 6.899, p = 0.006; day 15: F(3,12) = 9.247, p = 0.002; day 30: F(3,12) = 6.123, p = 0.009; negatively modulated: (day 1: F(3,12) = 0.87, p = 0.484; day 15: F(3,12) = 0.512, p = 0.641; Day 30: F(3,12) = 1.448, p = 0.278); no shock control: positively modulated: day 1: F(3,15) = 0.527, p = 0.670; day 15: F(3,15) = 1.852, p = 0.181; day 30: F(3,9) = 1.046, p = 0.418; negatively modulated: day 1: F(3,13) = 1.205, p = 0.347; day 15: F(3,13) = 1.375, p = 0.294; day 30: F(3,9) = 0.95, p = 0.457. Significant Tukey multiple comparisons are denoted by asterisks, *p < 0.05, **p < 0.01, ***p < 0.001.

Population vector similarity across tones and time.

a-c, Population similarity maps for all tone pairs across the time course of sound presentation in the CS+15 (a), CS+3 (b), and no-shock control (c) groups. d, Schematic illustrating the color scale and map orientation; the y-axis denotes the earlier tone in the comparison, and the x-axis denotes the later tone. e-f, Box plots showing population similarity during the first 5 s following tone onset, quantified relative to the CS+ for the CS+15 (e, F(3,36) = 12.025, p < 0.001) and CS+3 (f, F(3,24) = 7.435, p = 0.004) groups. Significant Tukey multiple comparisons are denoted by asterisks, p < 0.05, p < 0.01, p < 0.001.

Clustering of PL subnetworks based on signed mutual information

a,Schematic of the mutual information (MI)–based clustering pipeline. An unsorted MI matrix computed from simultaneously recorded prelimbic (PL) neurons was first subjected to spectral clustering to identify primary clusters based on shared information structure, independent of response sign. The MI matrix was then reordered according to these primary cluster assignments. Within each primary cluster, MI values were combined element-wise with a corresponding sign matrix encoding the direction of correlation between cell pairs, yielding a signed MI matrix. Spectral clustering was subsequently applied independently within each primary cluster to identify secondary subclusters with distinct signed interaction patterns. Each subcluster was assigned a unique label, and all labels were combined to generate the final clustered signed MI matrix, enabling separation of positively and negatively modulated sound-responsive neurons. b, Final clustered signed MI matrices for each experimental and control groups. Matrices are sorted by cluster labels for the CS+15 group (top), CS+3 group (middle), and No Shock group (bottom). Color scale indicates signed MI strength (HI to LO). c, Average stimulus-aligned population responses for clusters showing strong positive modulation to individual tones. C.1–C.4 show primary responses to 3 kHz, 7 kHz, 11 kHz, and 15 kHz tones, respectively, across groups. d, Average stimulus-aligned population responses for clusters showing strong negative modulation to individual tones. D.1–D.4 show primary responses to 3 kHz, 7 kHz, 11 kHz, and 15 kHz tones, respectively, across groups.

Graded emotional response clusters are present in experimental groups.

a-b, Average stimulus-aligned population responses for clusters showing graded emotional valence in animals trained with a 15 kHz CS+, showing positive (a) and negative (b) response patterns. c-e, Average stimulus-aligned population responses for clusters showing graded emotional valence in animals trained with a 3 kHz CS+, showing positive (c-d) and negative (e) response patterns. f-g, Analysis of stability of neuronal identity within graded valence clusters across retrieval sessions. Benjamini–Hochberg corrected significance denoted by asterisks. h-i, Baseline/stimulus firing rate ratio (BSR) showing changes in activity of graded clusters only present in the experimental CS+15 (h) and CS+3 (i) groups across days. Significant Tukey multiple comparisons are denoted by asterisks, *p < 0.05, **p < 0.01, ***p < 0.001.

Sex differences in behavior.

a-c, Sex differences in CS⁺15-trained mice. No sex differences were observed on any testing day (effect of sex: day 1, F(1,25) = 1.52, p = 0.23; day 15, F(1,25) = 0.55, p = 0.467; day 30, F(1,25) = 0.17, p = 0.681). On all days, there was a significant main effect of frequency, indicating successful learning in both males and females (day 1, F(3,75) = 33.46, p < 0.001; day 15, F(3,75) = 26.32, p < 0.001; day 30, F(3,75) = 51.47, p < 0.001). No sex × frequency interactions were detected on any testing day (p > 0.05). Post hoc comparisons showed that on day 1, mice discriminated 3 kHz from 7, 11 and 15 kHz (p < 0.05), but generalized among the higher frequencies (p > 0.05). On days 15 and 30, mice discriminated 3 kHz from 7, 11 and 15 kHz (p < 0.05) and 7 kHz from 11 and 15 kHz (p < 0.05), while generalization persisted between 11 and 15 kHz (p > 0.05). d-f, Sex differences in CS⁺3-trained mice. No main effect of sex was observed on any testing day (day 1, F(1,20) = 1.24, p = 0.279; day 15, F(1,20) = 0.78, p = 0.388; day 30, F(1,20) = 0.003, p = 0.956). A significant main effect of frequency was present across all days, indicating learning in both sexes (day 1, F(3,60) = 40.65, p < 0.001; day 15, F(3,60) = 30.17, p < 0.001; day 30, F(3,60) = 35.19, p < 0.001). A significant sex × frequency interaction was observed on day 1 (F(3,60) = 6.91, p < 0.001) and day 15 (F(3,60) = 3.55, p < 0.02), reflecting sex-specific differences at 11 kHz on day 1 and at 3 kHz on day 15. These effects were not consistent across frequencies or present on day 30 (F(3,60) = 0.76, p = 0.522), likely reflecting increased behavioral variability in females, rather than stable sex differences. Significant Tukey multiple comparisons are denoted by asterisks, ** p < 0.01.

Population activity of consistently active neurons.

a-b, Population activity of consistently active neurons from animals trained with a 15 kHz CS+ (a) or a 3 kHz CS+ (b). Upper panels show positively tone-responsive neurons and lower panels show negatively tone-responsive neurons. Adjacent boxplots display areas under the population response curves. Consistently active positive responders exhibit graded responses across test days (day 1 to day 30). CS⁺15: day 1, F(3,18) = 6.072, p < 0.005; day 15, F(3,18) = 4.492, p = 0.016; day 30, F(3,18) = 4.599, p = 0.015; CS⁺3: Day 1, F(3,12) = 9.304, p = 0.002; Day 15, F(3,12) = 3.022, p = 0.072; day 30, F(3,12) = 5.26, p = 0.015; controls: day 1, F(3,9) = 5.343, p < 0.02; day 15, F(3,8) = 0.399, p = 0.758; day 30, F(3,8) = 0.19, p = 0.90, *p < 0.05; **p < 0.01.

Population activity of emerging-retained neurons.

Emerging-retained neurons become part of the active ensemble after conditioning and are eded after that. a-b, Population activity of emerging-retained neurons from animals trained with a 15 kHz CS+ (a) or a 3 kHz CS+ (b). Upper panels show positively tone-responsive neurons and lower panels show negatively tone-responsive neurons. Adjacent boxplots display AUC. Emerging-retained neurons show greater variability on day 1 compared with later test days. Only positive responders show significant graded valence (CS⁺15: Day 1, F(3,16) = 4.587, p = 0.017; day 15, F(3,18) = 4.749, p = 0.013; day 30, F(3,18) = 4.748, p = 0.013; CS⁺3: day 1, F(3,9) = 1.684, p = 0.239; day 15, F(3,12) = 7.728, p = 0.004; day 30, F(3,12) = 5.63, p = 0.012). Significant post hoc multiple comparisons noted in the Figure with asterisks. *p < 0.05; **p < 0.01.

Population activity of transiently active neurons.

Transiently active neurons were active on only a single test day. a-b, Population activity of transiently active neurons from animals trained with a 15 kHz CS+ (a) or a 3 kHz CS+ (b). Upper panels show positively tone-responsive neurons and lower panels show negatively tone-responsive neurons. Adjacent boxplots display areas under the population response curves. Transiently active neurons did not show graded population responses on day 1; graded responses emerged by day 15 and were maintained through day 30 in positive sound responder neurons. *p < 0.05; **p < 0.01.

Clustering of PL subnetworks based on signed mutual information for the CS+ 15 kHz group per testing session.

a-b, Average stimulus-aligned population responses for clusters showing positive (a) or negative (b) modulation to individual tones (3, 7, 11, or 15 kHz, upper panels) or graded emotional tuning (a-b, bottom panels).

Clustering of PL subnetworks based on signed mutual information for the CS+ 3 kHz group per testing session.

a-b, Average stimulus-aligned population responses for clusters showing positive (a) or negative (b) modulation to individual tones (3, 7, 11, or 15 kHz, upper panels) or graded emotional tuning (a-b, bottom panels).

Clustering of PL subnetworks based on signed mutual information for the no shock control per testing session.

a-b, Average stimulus-aligned population responses for clusters showing positive (a) or negative (b) modulation to individual tones (3, 7, 11, or 15 kHz).

a–d, Baseline-to-stimulus firing rate ratio (BSR) illustrating changes in positively responding neurons within tone-specific clusters shown in Fig. 5, for the CS+15 (red), CS+3 (blue), and control groups. (a) BSR of neurons in clusters primarily responsive to 3 kHz (Fig. 5c.1), (b) 7 kHz (Fig. 5c.2), (c) 11 kHz (Fig. 5c.3), and (d) 15 kHz (Fig. 5c.4). ANOVA results are reported in Table S3; Tukey’s multiple-comparison tests indicate significance (p < 0.05; p < 0.01; p < 0.001).

Statistics corresponding to consistently active, emerging-retained, or transiently active neurons

Statistics corresponding to cell identity across time for all neurons clustered using MI

Statistics corresponding the baseline/stimulus firing rate changes (BSR) for tone-selective responders