Nucleus accumbens core single cell ensembles bidirectionally respond to experienced versus observed aversive events

Fear learning is a critical feature of survival skills among mammals. In rodents, fear learning manifests itself through direct experience of the aversive event or social transmission of aversive stimuli such as observing and acting on conspecifics’ distress. The neuronal network underlying the social transmission of information largely overlaps with the brain regions that mediate behavioral responses to aversive and rewarding stimuli. In this study, we recorded single cell activity patterns of nucleus accumbens (NAc) core neurons using in vivo optical imaging of calcium transients via miniature scopes. This cutting-edge imaging methodology not only allows us to record activity patterns of individual neurons but also lets us longitudinally follow these individual neurons across time and different behavioral states. Using this approach, we identified NAc core single cell ensembles that respond to experienced and/or observed aversive stimuli. Our results showed that experienced and observed aversive stimuli evoke NAc core ensemble activity that is largely positive, with a smaller subset of negative responses. The size of the NAc single cell ensemble response was greater for experienced aversive stimuli compared to observed aversive events. Our results also revealed sex differences in the NAc core single cell ensembles responses to experience aversive stimuli, where females showed a greater accumbal response. Importantly, we found a subpopulation within the NAc core single cell ensembles that show a bidirectional response to experienced aversive stimuli versus observed aversive stimuli (i.e., negative response to experienced and positive response to observed). Our results suggest that the NAc plays a role in differentiating somatosensory experience from social observation of aversion at a single cell level. These results have important implications for psychopathologies where social information processing is maladaptive, such as autism spectrum disorders.

Learning about potential dangers and harmful events is critical for the survival of both humans and animals.Fear responses can be acquired through direct experiences or indirect transmission of social information 1 .For example, during observational fear learning, organisms form an association between an aversive stimulus and an outcome through the observation of conspecifics' aversive experience.Observational fear and other social learning paradigms are widely utilized to understand the transmission of social information 2 and the neural underpinnings of human psychopathologies.Indeed, perception of social information may be maladaptive in certain psychiatric conditions.Studies have shown that altered neuronal activity in brain regions involved in the processing of social stimuli may play a role in psychiatric pathologies such as autism spectrum disorder (ASD) and schizophrenia [3][4][5] .In addition, forming an association between a neutral stimulus and an aversive outcome through social means in the absence of direct experience likely contributes to the etiology of anxiety disorders 6 .Anxiety disorders are common companions of neurodevelopmental conditions such as ASD 7 as one of the leading factors of anxiety in individuals with ASD.Thus, in order to further our understanding of these pathologies, it is important to explore the neural underpinnings of aversive learning through social means.
The neuronal network underlying social information processing includes brain regions that also mediate aversive stimulus-response and reward learning 8,9 .For example, brain regions such as the anterior cingulate cortex (ACC), the amygdala, and the nucleus accumbens (NAc) are involved in the neural bases of both social behaviors and aversive learning [10][11][12][13][14][15][16] .Importantly, the social aspects of aversive learning have been linked to the NAc 17,18 .The NAc is a heterogeneous, limbic structure that is related to associative learning and conditioned behavioral responses; therefore, it plays a critical role in behavioral control 19 .Despite serving as a critical node in the brain's reward circuitry, the NAc is also critically involved in modulating responses to aversive stimuli 19,20 .It has also been previously shown that the NAc is involved in the acquisition of fear responses 19 .The NAc is comprised of two main subregions, the core and the shell, which play dissociable roles in the processing of aversive information 19,[21][22][23][24][25][26][27][28] .Studies have demonstrated that the NAc core is an important locus for aversive learning while the NAc shell is activated for fear extinction 21,27,28 .However, the involvement of the NAc core specifically in observational aversive learning remains mostly underexplored.
In this paper, we examined NAc core single cell ensemble activity in response to experiencing versus observing aversive events by performing in vivo optical imaging of calcium activity via miniature scopes.This approach is uniquely suited for this aim because it allows us to measure the activity of single cells and longitudinally follow each cell and its activity under different behavioral conditions.Using this approach, we tested mice in two separate behavioral contexts where they first experienced a set of footshocks followed by a session where they observed a conspecific receiving the same footshocks.In this way, we aimed to examine NAc core single cell activity when animals experience versus observe aversive stimuli.
Our results revealed a larger NAc core response to experienced shocks compared to observed shocks.In the experienced shock condition, there was a large single cell ensemble of positively responding cells, which was reduced to a smaller ensemble in the observed shock condition.These single cell calcium responses did not reveal a habituation pattern throughout the shock presentations as these responses remained relatively stable throughout the footshock presentations.However, our longitudinal analysis of single cells revealed that the NAc core cells that responded negatively to the experienced footshocks switched to responding positively when those shocks were observed.In sum, our results suggest that a sub-population in the NAc core single cell ensembles exhibits a bidirectional response pattern to experienced versus observed aversive stimuli.

Experienced aversive stimuli evoke a larger NAc core ensemble activity compared to observed aversive events
In this study, we aimed to identify single cell ensembles within the NAc that respond to experienced and/or observed aversive events.A group of C57BL/6 J mice (observer mice) were subjected to a set of footshocks in an operant box and the NAc core single cell activity was recorded by using in vivo optical imaging of calcium activity via miniature scopes during the "experienced shock session" (see Supp.Figs. 1 and 2 for GRIN lens placements used for the endoscopic miniature scopes and see Supp.Fig. 3 for a representative cell map and cell traces).Twenty-four hours later during the "observed shock session", cell responses from the same animals were recorded while they were observing another same-sex partner (performer mice) experience footshocks (Fig. 1a).During each session, animals were subjected to 17 footshocks with the same inter-stimulus interval (Fig. 1b).
Our results revealed that both experienced and observed footshock elicited a positive population response (Fig. 1c, d).However, the experienced aversive stimuli evoked a significantly greater NAc core single cell ensemble response compared to the observed aversive events (Fig. 1c, d; unpaired t-test, t 644 = 9.585, p < 0.0001, n = 250-396 cells; independent t-tests against the theoretical mean = 0 AUC for experienced footshocks t 249 = 10.43,p < 0.0001, mean = 29.61;for observed footshocks t 395 = 7.618, p < 0.0001, mean = 6.002).The experienced aversive stimuli elicited a large ensemble of positive cell activity (56% of all detected cells); meanwhile, there was a smaller portion of negative (12%) or no response (32%) cell ensembles.On the other hand, the observed aversive events also evoked a positive NAc core single cell ensemble response, but this response was relatively weaker, and the size of the ensemble was relatively smaller compared to the experienced aversive stimuli ensemble (56% for experienced versus 17.9% for observed footshocks; Fig. 1e).However, the size of the negative responses was relatively similar in both events (12% for experienced versus 5.8% for observed footshocks; Fig. 1e).Moreover, a separate comparison of the positive and negative responder cell activity revealed that the experienced aversive stimuli evoked larger positive (unpaired t-test, t 209 = 5.037, p < 0.0001, n = 71-140 cells) and negative (unpaired t-test, t 51 = 3.751, p = 0.0005, n = 23-30 cells) responses compared to the observed aversive events (Supp.Figs. 4 and 5).
Importantly, we verified that these differences were not due to any baseline changes.We found that the single cell responses were similar during the inter-stimulus interval (ISI) period (Supp.Fig. 6; unpaired t-test, t 644 = 1.587, p = 0.1130, n = 250-396 cells) as well as during the entirety of the experienced and observed footshock sessions (Supp.Fig. 7; unpaired t-test, t 644 = 0.6997, p = 0.4843, n = 250-396 cells).Moreover, we found that the footshock single cell responses returned to the baseline within the ISIs we employed in our behavioral design (10, 15, or 20 s ISIs) and the mean time to baseline (2/3 of the response magnitude) did not differ between experienced versus observed footshocks (Supp.Fig. 8a; unpaired t-test, t13021 = 0.4497, p = 0.6529, n = 4731-8292 responses).Nevertheless, the length of the ISI did not affect the average cell response magnitudes (Supp.Fig. 8b; paired t-test, t249 = 0.7505, p = 0.4537, n = 250 cells).These results suggest that the differences we see in the experienced and observed footshock single cell responses cannot be attributed to changes in baseline single cell responses between sessions.
We also wanted to determine if these cell responses habituate with repeated presentations of the experienced or observed aversive stimuli.The NAc core single cell responses showed a relatively stable pattern for each footshock presentation.Each experienced aversive stimulus evoked a similar trend of NAc core activity throughout the behavioral session.Likewise, each observed aversive event evoked a similar NAc core response.Therefore, the ensemble response to the experienced and observed aversive events was not habituated and remained relatively stable (Fig. 2a, b  These results demonstrate that NAc core single cell ensembles not only respond to experienced aversive events but also respond to observed aversive events, suggesting that aversive information encoding within the NAc core has a social dimension.

Sex differences in NAc core single cell responses to aversive stimuli
We examined whether the patterns of NAc core single cell responses to experienced and observed footshocks are conserved in male versus female mice.Importantly, we found that in female mice the NAc core single cell response to the experienced footshocks was larger in comparison to male mice (Fig. 3a, b; unpaired t-test, t 248 = 2.457, p = 0.0147, n = 82-168 cells).The percentage of positive response cells was also larger in females (58.5% in females versus 49.4% in males, Fig. 3c) whereas the percentage of negative response cells was relatively smaller in females (7.3% in females versus 14.3% in males.In contrast, we found no difference in the magnitude of the NAc core single cell responses to observed footshocks between male and female mice (Fig. 3d, e; unpaired t-test, t 394 = 0.3756, p = 0.7075, n = 191-205 cells) and the percentages of the positive and negative responding cells were also similar between sexes (Fig. 3f; positive: 18.8% male vs. 17.1% female; negative: 5.8% male vs. 5.8% female).Overall, these results suggest that female mice may have a larger accumbal response during aversive experiences compared to male mice.

A subpopulation within the NAc core single cell ensembles shows a bidirectional response to experienced versus observed aversive events
Next, we wanted to follow up each cell longitudinally to examine their specific responses to the events where the animal experienced aversive stimuli versus observed aversive stimuli.Longitudinal registration analysis revealed that a large number of NAc core cells were active during both experienced and observed aversive events.About 50% of the cells detected during the experienced shock session (127 out of the 250 cells detected) and 32% of the cells detected during the observed shock session (127 out of the 396 cells detected) were co-registered (Supp.Fig. 9).Importantly, a subpopulation in the NAc core single cell ensembles exhibited a bidirectional response pattern to experienced versus observed aversive stimuli.Specifically, a number of NAc core single cells that show   www.nature.com/scientificreports/ a positive response to experienced footshock switched to showing a weaker response when the animals observed the same aversive event (Fig. 4a, c; paired t-test, t 62 = 8.431, p < 0.0001, n = 63 cells).A majority of the NAc core single cells (73%; Supp.Fig. 10) that showed a negative response to experienced footshock also showed a positive response when the animals observed the same aversive event (Fig. 4a, c; paired t-test, t 16 = 5.298, p < 0.0001, n = 17 cells).We found a similar bidirectional response trend for the cell ensembles that show a negative response to observed aversive events (Fig. 4b, d; paired t-test, t 8 = 3.441, p = 0.0088, n = 9 cells ).However, the cells that exhibited a positive response to observed aversive events tended to show a similar positive response to experienced aversive stimuli (Fig. 4b, d; paired t-test, t 16 = 1.289, p = 0.215, n = 17 cells).
For an unbiased examination, we analyzed the longitudinal cell activities via hierarchical clustering.Our analysis revealed comparable results, which also showed that there were subgroups of NAc core cells that showed a bidirectional response to the experienced versus observed aversive stimuli (Fig. 5).These results suggest that there are specific subgroups of NAc core single cell ensembles that bidirectionally encode experienced versus observed aversive events.Thus, it is possible that NAc core single cells are functionally divergent depending on the source of the aversive information (e.g., social versus somatosensory).

Mice are socially engaged in aversive events they observe
Lastly, we wanted to analyze behavioral patterns animals display during the observational fear learning paradigm by evaluating the differences in "observer" mice's behavioral reactions, between Phase 1 and Phase 2, to an empty compartment and then to a conspecific receiving series of footshocks in the same compartment (Fig. 6a).Tracking of observer and performer mice via DeepLabCut markerless tracking and pose estimation analysis revealed increased immobility (Fig. 6b; paired t-test, t 3 = 5.906, p = 0.0097) and freezing (Fig. 6c; paired t-test, t 3 = 4.041, p = 0.0273) in Phase 2 in the presence of a conspecific receiving footshocks.The head direction angle analysis showed that the head direction of the observer mice took a turn from facing their own compartment (top half) towards the performer mouse's compartment (bottom half) during Phase 2 (Fig. 6d).Furthermore, the observer mice's head direction was significantly more oriented towards to bottom half than top half in Phase 2; whereas it was more oriented to the top half in Phase 1 (Fig. 6e, f; unpaired t-test, t 18 = 7.824, p < 0.0001).Thus, by evaluating behavioral outcomes, we confirmed that observer mice do observe their companion and react to their distress by displaying immobility and freezing.

Discussion
In the present study, we aimed to identify single cell ensembles within the NAc core that respond to aversive stimuli using cutting-edge approaches of in vivo optical imaging of calcium activity via miniature scopes.This methodology offers unique advantages for single neuron recordings as we were able to follow the activity patterns of NAc single cells throughout different behavioral sessions and experiences.Taking advantage of this methodology, we compared the activity patterns of NAc single cells when the mice experienced aversive stimuli versus observed aversive stimuli.Our results showed that experienced aversive stimuli evoke a NAc core ensemble activity that is largely positive with a smaller portion of negative responses.Interestingly, observed aversive events also elicited a significant positive response, however, this response was weaker.The size of the positively responding single cell ensembles was greater for experienced aversive stimuli compared to observed aversive events.These results are in line with the previous studies showing that the NAc mediates aversive stimuli through evoking neuronal activities, altered neuromodulation and gene expression, as well as behavioral responses [28][29][30][31][32][33][34][35][36][37][38][39][40][41] .Our results similarly showed that most NAc core single cells positively respond to aversive stimuli, however, there was also a smaller group of cells exhibiting a negative response to experienced aversive stimuli, which suggests that the NAc core single cell ensembles are heterogeneous in their response to aversive stimuli.
Our results also revealed a sex difference for positive NAC core single cell responses to experienced aversive stimuli.Females showed larger accumbal responses during the experienced footshock session compared to male mice.Current literature indicates sex differences in fear-and stress-related pathologies 42,43 where females tend to be more vulnerable to those diseases than males.Moreover, our own research has also shown that female mice prefer avoiding footshocks over receiving a reward whereas male mice show the opposite pattern of choosing rewards over avoiding aversive outcomes 44 .This suggests female mice may have an augmented perceived saliency of experiencing aversive stimuli.There is also evidence showing that female mice exhibit greater excitatory NAc core transmission compared to males 45 suggesting that female accumbal responses to external stimuli may be stronger at baseline.Overall, these results showing greater NAc core single cell response to experienced aversive stimuli in female mice add to the literature on sex differences in aversive learning processes.
Importantly, we found that not only experiencing aversive stimuli but also merely observing other mice experiencing aversive stimuli evokes NAc core single cell responses time-locked to the aversive event.This suggests that aversive information obtained through both somatosensory and social perception is processed within the NAc single cell ensembles.A number of studies have shown that aversive information such as fear can be learned through observation and a prior experience of the same aversive event enhances the acquisition of fear learning 18,46,47 .The neural basis of observational fear consists of the overlapping circuitry of social behavior and reward/aversive responses [9][10][11]17,19 including processing within the NAc 2,8,12,48 . Studis in mice have shown altered NAc activity in the course of social interactions 8,49 .Similarly, a functional magnetic resonance imaging study in humans showed NAc recruitment on social motivation (i.e., approval, disapproval 48 ). Our resuls are in line with these previous reports; however, they show that the NAc core single cell responses are less homogenous than was previously thought.
In addition to confirming that the NAc core is heavily involved in the processing of experienced and observed aversive stimuli, we critically found that there is a sub-population of NAc single cells that shows bidirectional response patterns to experienced versus observed aversive events.That is, a group of NAc core cells negatively  (c) Averaged cell responses depicted as mean AUCs (left) and averaged z-scores (right) from the cells that showed significant positive or negative responses to the experienced footshocks.The cells that showed a significant positive response to the experienced footshocks showed significantly weaker responses to the observed footshocks (paired t-test, t 62 = 8.431, p < 0.0001, n = 63 cells).The cells that showed a significant negative response to the experienced footshocks showed significantly stronger responses for the observed footshocks (paired t-test, t 16 = 5.298, p < 0.0001, n = 17 cells).(d) Averaged cell responses depicted as mean AUCs (left) and averaged z-scores (right) from the cells that showed significant positive or negative responses to the observed footshocks.The cells that showed a significant positive response to the observed footshocks showed similar size responses to the experienced footshocks (paired t-test, t 16 = 1.289, p = 0.215, n = 17 cells).The cells that showed a significant negative response to the observed footshocks showed significantly stronger responses for the experienced footshocks (paired t-test, t 8 = 3.441, p = 0.0088, n = 9 cells).Data represented as mean ± S.E.M. ** p < 0.01, **** p < 0.0001.www.nature.com/scientificreports/respond to experienced and positively respond to observed aversive events (or vice versa).There are multiple ways we can interpret this bidirectional computation within the NAc core.First, it is possible that this computation may be a part of the neural representation of self-perception where the organism differentiates between events happening to "self " versus "others".However, based on previous literature on the perception of "self " 50,51 it is likely that self-perception requires a widespread coordinated activity involving a larger network within the brain.Therefore, it is unlikely that the pattern of activation we observed in the NAc single cells is unique to this brain region and it may be observed in other brain regions.It is also possible that the differential activity patterns evoked within this sub-population are involved in differentiating aversive experiences versus avoidance of those aversive experiences.Although this would be in line with theories suggesting that NAc activity correlates with reward and relief signaling 38,52,53 , our results show that a larger part of the NAc single cell ensembles responds to the aversive events in a positive fashion.Thus, further investigation of the role of specific NAc core single cell sub-populations in the processing of social information is required.Although our behavioral validation experiments suggest that during our observational fear paradigm, the observer mice were indeed engaged with the aversive events their conspecific were experiencing and producing fear-like behavioral phenotypes, neural activity elicited by observed shocks can also be attributed to sources that are non-social.For example, it is possible that the neural responses we observe in the NAc core may be related to observing a salient event (e.g., a mouse moving).Previous research suggests that salient events such as varying intensity/volume of aversive stimuli or varying volume/type of rewarding stimuli can cause distinct activity patterns in the NAc 29,54 and inhibiting NAc neural activity induces a reduced preference for saliency 54 .Further, NAc core dopaminergic activity was elicited when the saliency of both aversive and rewarding stimuli was increased and this activity can be largely mapped onto the perceived saliency of external stimuli 29 .Finally, striatal regions are also heavily involved in motivated behavior and action 55,56 .Thus, it is possible that within the NAc core single cell population we captured, there may be single cell ensembles specifically evoked by locomotor activity or behavioral responses to motivational aspects of social learning.Future research is required to distinguish single cell ensembles responsible for these separate processes during observational aversive learning.
Social perception of aversive events (i.e., observational fear 2 ) may cause maladaptive features in a number of psychiatric conditions.It is well known that individuals with psychiatric pathologies do not find social stimuli as rewarding as neurotypicals do 57 , and studies showed altered neuronal activities in those overlapping regions during social stimuli 3,5 .Studies in children with ASD showed diminished NAc activity during social cues 57 .Another study in children with ASD evidenced that weak connectivity of NAc contributes to impaired social skills 4 .The NAc belongs to a larger network of overlapping aversive response-social circuitry, with studies showing the involvement of the ventral tegmental area, prefrontal cortex, anterior cingulate cortex and basolateral amygdala in this network 2,3,5,8,10,11 .Along with that, human and rodent studies suggest an involvement of the insular cortex in aversive response and anxiety disorders [58][59][60][61] .Therefore, investigations into the structures of these networks play a crucial role in building a better understanding of psychiatric pathologies and providing insights into their treatments.

Invididual Cells z-scores
In conclusion, the present study contributes to the literature of accumbal information processing by showing differential NAc activity patterns to physically and socially experienced aversive events, as well as subpopulations within the NAc core single cell ensembles displaying a bidirectional response to diverse aspects of an aversive stimulus.

Subjects
Male (n = 3) and female (n = 3) 6-to 8-week-old C57BL/6 J mice were obtained from Jackson Laboratories (Bar Harbor, ME; SN: 000664) and housed with five animals per cage.All animals were maintained on a 12 h reverse light/dark cycle.Animals received free access to food and water in their homecages.All experiments were conducted in accordance with the guidelines of the Institutional Animal Care and Use Committee (IACUC) at Rowan-Virtua School of Osteopathic Medicine and Vanderbilt University School of Medicine, which approved and supervised all animal protocols.

Apparatus
Mice were trained and tested daily in individual Med Associates (St.Albans, Vermont) operant conditioning chambers (MED PC operant boxes) fitted with visual stimuli including a standard house light and two cue lights located on each side of the box.

Behavioral procedures
All "observer" mice were placed in the MED PC operant boxes and received 17 footshocks with a variable interstimulus interval (ISI: 15 s on average; 10, 15, or 20 s) for the "experienced shock" session.The operant box was  www.nature.com/scientificreports/divided using a divider and all shocks were administered on the right side of the chamber.The divider was made of see-through plexiglass and holes were drilled to allow the passage of scents.Twenty-four hours after the "experienced shock" session, mice were returned to the same side of the chamber but this time the grid floors were covered with plexiglass, and another mouse (performer) was placed in the left side of the chamber.During the "observed shock" session, the performer mouse received 17 footshocks with the same ISI used in the experienced shock session.The mouse that had received the shock in the "experienced shock" session was allowed to observe the performer mouse.We specifically designed our experiment to let the observer mouse have a first-hand experience of the aversive footshocks before they observe another mouse receiving the same stimuli.The performer mouse was the same sex of the observer mouse.All shocks were set to 1.0 mA in intensity and 0.5 s in duration.

Observational fear learning paradigm
The MED PC operant box was divided using a plexiglass divider.In Phase 1, a group of mice (2 female, 2 male) were placed on the top half of the operant box (on a plexiglass surface) as "observers" and underwent the session without receiving footshocks.Another mouse (cagemates; 2 female, 2 male) was placed on the bottom half of the operant box and received 17 footshocks with a variable inter-stimulus interval (ISI: 15 s on average; 10, 15, or 20 s) in Phase 2. Meanwhile, observer mice did not receive any footshocks.All sessions were videotaped.
Behavioral patterns (immobility and head direction angle) were evaluated by using DeepLabCut 62 (see below).
Freezing response during Phase 2 was manually scored by an unbiased researcher every 10 s during the whole duration of Phase 2.

Deep lab cut markerless tracking analysis
We recorded the observer and performer mice's movement using a USB camera (Inscopix, 15 frames per second) attached above the operant box.We used DeepLabCut (Python 3, DLC, version 2.2b8, 112) for markerless tracking of position.DLC was trained on 139 frames from a single video and these frames were annotated and used to train a ResNet-50 neural network for 200,000 iterations.The locations of the mice were computed as x/y coordinates converted into centroids calculated as the average of x and y coordinates.The displacements were detected as the Euclidean distance between consecutive centroids.Immobility was calculated as the number of time points where the mouse is immobile (displacement < = threshold; Euclidean distance threshold = 2).We converted the number of immobile frames to the percentages of the total number of frames.The angles of the head orientations were calculated by converting the angle of the midpoint of the ears to radians, which were then converted into facing angles between 0 and 360 degrees.Due to the orientation of the operant boxes in the videos, the head direction angles between 0 and 180 degrees were facing toward the bottom half (performer side) whereas the head direction angles between 181 and 360 degrees were facing toward the top half of the operant box (observer side).

Surgical procedure
Ketoprofen (5 mg/kg; subcutaneous injection) was administered at least 30 min before surgery.Under Isoflurane anesthesia, mice were positioned in a stereotaxic frame (Kopf Instruments), and the NAc core (bregma coordinates: anterior/posterior, + 1.4 mm; medial/lateral, + 1.0 mm; dorsal/ventral, − 3.8 mm; 0° angle) was targeted.Ophthalmic ointment was applied to the eyes.Using an aseptic technique, a midline incision was made down the scalp, and a craniotomy was made using a dental drill.A 10 mL Nanofil Hamilton syringe (WPI) with a 34-gauge beveled metal needle was used to infuse viral constructs.A calcium indicator virus, GCamP (AAV1.Camk2a.GCaMP6m.WPRE.SV40, Inscopix), was infused at a rate of 50 nL/min for a total of 500 nL.Following infusion, the needle was kept at the injection site for seven minutes and then slowly withdrawn.After the virus injection, using a 27-gauge needle (0.4 mm in diameter), a pathway for the subsequent lens implantation was opened.Permanent implantable Proview integrated lenses (baseplates with attached GRIN Lenses 0.6 mm diameter, 7.3 mm length, Inscopix) were implanted in the NAc.Lenses were positioned above the viral injection site (bregma coordinates: anterior/posterior, + 1.4 mm; medial/lateral, + 1.0 mm; dorsal/ventral, − 3.7 mm; 0° angle) and were cemented to the skull using a C&B Metabond adhesive cement system.Animals were allowed to recover for a minimum of six weeks to ensure efficient viral expression before commencing experiments.

Histology
Subjects were deeply anesthetized with an intraperitoneal injection of Ketamine/Xylazine (100 mg/kg/10 mg/kg) and transcardially perfused with 10 mL of PBS solution followed by 10 mL of cold 4% PFA in 1 × PBS.Animals were quickly decapitated; the brain was extracted and placed in 4% PFA solution and stored at 4 °C for at least 48 h.The brains were then transferred to a 30% sucrose solution in 1 × PBS and allowed to sit until the brains sank to the bottom of the conical tube at 4 °C.After sinking, brains were sectioned at 35 μm on a freezing sliding microtome (Leica SM2010R).Sections were stored in a cryoprotectant solution (7.5% sucrose + 15% ethylene glycol in 0.1 M PB) at − 20 °C until immunohistochemical processing.Sections were incubated for 5 min with DAPI (NucBlue, Invitrogen) to achieve counterstaining of nuclei before mounting in Prolong Gold (Invitrogen).Following staining, sections were mounted on glass microscope slides with Prolong Gold antifade reagent.Fluorescent images were taken using a Keyence BZ-X700 inverted fluorescence microscope (Keyence), under a dry 10 × objective (Nikon).The injection site location and the fiber implant placements were determined via serial imaging in all animals.

Single-photon calcium imaging analysis
Data was acquired at 10 frames per second using an nVista miniature microscope (Inscopix).TTLs from MedPC were directly fed to the nVista system, which allowed alignment to behavioral timestamps without further processing.The recordings were spatially down-sampled by a factor of 2 and corrected for motion artifacts using the Inscopix Data Processing Software (IDPS v1.3.1).The ΔF/F values were computed for the whole field view as the output pixel value represented a relative percent change from the baseline.We used Nonnegative Matrix Factorization-Extended (CNMF-e 63,64 ) to identify and extract calcium traces from individual cells (CNMF-e cell detection parameters: patch_dims = 50, 50; K = 20; gSiz = 20; gSig = 12; min_pnr = 20; min_corr = 0.8; max_ tau = 0.400).Raw CNMFe traces were used for all analyses.The spatial mask and calcium time series of each cell were manually inspected using the IDPS interface.Cells found to be duplicated or misdetected due to neuropils or other artifacts were discarded.The raw ΔF/F data were exported and used for TTL analysis, in which we cropped the data around each significant event (cue presentations; TTL) and z-scored it in order to normalize for baseline differences.Z-scores were calculated by taking the pre-TTL ΔF/F values (2 s prior to the event) as a baseline (z-score = (TTLsignal-b_mean)/b_stdev, where the TTL signal is the ΔF/F value for each post-TTL time point, b_mean is the baseline mean, and b_stdev is the baseline standard deviation).Using the z-scored traces, we then calculated whether the cell response to the experienced and observed footshock stimuli was significant in order to determine responsive and non-responsive cells as well as the direction of the response (positive or negative).For this analysis, we calculated averaged area under the curve (AUC) shock cell responses during a 2-s post-TTL window.We then ran one-tailed independent t-tests to determine if the response was significantly different than the baseline.Any positive cell response (mean of all 17 shock responses) that is significantly different than the baseline was considered a "positive response" cell, and any negative cell response that is significantly different than the baseline was considered a "negative response" cell.All other cells were considered as "no response" cells.The tau was calculated as the duration (seconds) to 2/3 of the peak height (peak height − (peak height * 0.33)) of each shock event where the peak height values were the maximum values within the first 2 s after the TTL onset.We calculated the tau values for the 15-s post-TTL period only.The inter-stimulus-interval (ISI) responses were calculated for each cell as the df/f values 5 s prior to each shock time converted to z-scores using the 2 s prior to that timepoint as the baseline.

Longitudinal registration
We used the longitudinal registration pipeline, defined in the Inscopix Data Process Software (IDPS) Guide, to identify the same cell across recording sessions in longitudinal series.Cell sets are preprocessed to generate a cell map which is then aligned to the first cell map (the reference).The images of the first cell set are defined as the global cell set against which the other cell sets are matched.We then find the pair of cell images between the global cell set and other aligned cell sets that maximize the normalized cross-correlation (NCC).The program then generates an output that aligns the same cell from across sessions.We co-registered a mean of 21.33 cells (+/− 12.33 SEM) from 6 mice between the experienced versus observed shock sessions.

Hierarchical clustering
Using the calcium traces from all the cells detected in the "experienced shock" versus "observed shock" sessions, we employed a hierarchical clustering approach to group cells based on their shock responses in an unbiased way.We used the "clustergram" Matlab function and the "correlation" distance metric to group the cell activity, which clustered the cell activity into 2 main groups (nodes) and then subsequent sub-groups (branches) based on activity patterns exhibited by the cells.We then combined all the cells that were clustered in Node 1 and Node 2 to visualize the group characteristics (e.g., positive response vs. negative response to shock). Vol

Figure 1 .Figure 2 .
Figure 1.NAc core single cell ensembles respond to both experienced and observed aversive events.(a) NAc core single cell activity was recorded via miniscopes combined with a calcium sensor (GcaMP6m) while mice received or observed another mouse receiving aversive footshocks.(b) Schematic demonstration of the footshock presentations during the experiment.In each session, mice either received 17 footshocks or observed another mouse receiving 17 footshocks.(c) Mean cell response to the experienced versus observed footshock presentations across all cells from all animals.(d) Mean area under the curve (AUC) for the population response was larger to the experienced compared to observed footshock events (unpaired t-test, t 644 = 9.585, p < 0.0001, n = 250-396 cells; independent t-tests against the theoretical mean = 0 AUC for experienced footshocks t 249 = 10.43,p < 0.0001, mean = 29.61;for observed footshocks t 395 = 7.618, p < 0.0001, mean = 6.002).(e) The experienced and observed footshock responses show bidirectionality.(left) Percentages of the cells showing a positive (56%), negative (12%), or no response (32%) to the experienced footshock.(right) Percentages of the cells showing a positive (17.9%), negative (5.8%), or no response (76.3%) to the observed footshock.Data represented as mean ± S.E.M. **** p < 0.0001.

Figure 3 .
Figure 3. Sex differences in NAc single cell responses to experienced versus observed footshocks.(a) Mean cell response to the experienced footshock presentations across all cells from male and female mice.(b)The mean area under the curve (AUC) for the population response was larger for the experienced footshocks in females compared to males (unpaired t-test, t 248 = 2.457, p = 0.0147, n = 82-168 cells).(c) The experienced footshocks lead to a larger percentage of positive responses in females compared to males (58.5% vs. 49.4%).(d) Mean cell response to the observed footshock presentations across all cells from male and female mice.(e) The mean area under the curve (AUC) for the population response to the observed footshocks did not differ between males and females (unpaired t-test, t 394 = 0.3756, p = 0.7075, n = 191-205 cells).(f) The experienced footshocks resulted in similar percentages of positive and negative responses in male and female mice.Data represented as mean ± S.E.M. * p < 0.05, ns = not significant. https://doi.org/10.1038/s41598-023-49686-xwww.nature.com/scientificreports/

Figure 4 .
Figure 4.A sub-population of the NAc core single cell ensembles show a bidirectional response pattern to experienced versus observed aversive events.Heatmaps showing responses to (a) experienced versus (b) observed footshocks from the NAc core single cell sub-population with significant positive or negative AUCs.The blue boxes highlight the cells that exhibited bidirectional response, which was a switch from a negative to a positive response.(c)Averaged cell responses depicted as mean AUCs (left) and averaged z-scores (right) from the cells that showed significant positive or negative responses to the experienced footshocks.The cells that showed a significant positive response to the experienced footshocks showed significantly weaker responses to the observed footshocks (paired t-test, t 62 = 8.431, p < 0.0001, n = 63 cells).The cells that showed a significant negative response to the experienced footshocks showed significantly stronger responses for the observed footshocks (paired t-test, t 16 = 5.298, p < 0.0001, n = 17 cells).(d) Averaged cell responses depicted as mean AUCs (left) and averaged z-scores (right) from the cells that showed significant positive or negative responses to the observed footshocks.The cells that showed a significant positive response to the observed footshocks showed similar size responses to the experienced footshocks (paired t-test, t 16 = 1.289, p = 0.215, n = 17 cells).The cells that showed a significant negative response to the observed footshocks showed significantly stronger responses for the experienced footshocks (paired t-test, t 8 = 3.441, p = 0.0088, n = 9 cells).Data represented as mean ± S.E.M. ** p < 0.01, **** p < 0.0001. https://doi.org/10.1038/s41598-023-49686-x

1 Figure 5 .
Figure 5. Unsupervised clustering algorithms group cells based on bi-directional response patterns.(a) Hierarchical clustering identified two major clusters of NAc core single cells based on their calcium responses: (1) Cells that show positive responses (shades of red) to the experienced footshock versus (2) Cells that show negative responses (shades of blue) to the experienced footshock.The second cluster mostly switched their response pattern to a positive response when the mice observed the same aversive event.

Figure 6 .
Figure 6.Observational Fear Learning Paradigm.(a) Graphic demonstration of the behavioral paradigm.In Phase 1, the observer mice were recorded in the absence of footshocks.In Phase 2, they observed their cage mates receiving footshocks.Observer mice (n = 4, 2 males and 2 females) exhibited higher levels of (b) immobility (paired t-test, t 3 = 5.906, p = 0.0097) and (c) freezing response (paired t-test, t 3 = 4.041, p = 0.0273) during Phase 2, in which they observed their conspecific receiving footshocks compared to Phase 1.(d) Head direction angles for each frame bin (15 frames) from all mice during Phase 1 and Phase 2. The black arrow indicates the mean of all head directions detected.(e) Frequency distribution of frame bins per head direction angle (0 to 360 degrees; 0-180 degrees for Bottom Half Orientation; 181-360 degrees for Top Half Orientation).(f) Head orientation angles (degrees) from observer mice during Phase 1 and Phase 2. Observer mice oriented mostly towards the bottom half in Phase 2 compared to Phase 1 (unpaired t-test, t 18 = 7.824, p < 0.0001).Data represented as mean ± S.E.M. * p < 0.05, ** p < 0.01, **** p < 0.0001.
order to record single cell activity in the NAc core in vivo.During each behavioral session, the miniscope was attached to the integrated lens baseplates implanted previously.The imaging parameters (gain, LED power, focus) were determined for each animal to ensure recording quality and were kept constant throughout the study.The imaging videos were recorded at 10 frames per second (fps).At the end of the recording session, the miniscope was removed and the baseplate cover was replaced.During each session, important events such as stimulus or outcome presentation times were recorded via transistor-transistor-logic (TTL) signals sent from the MedPC behavioral box to the Inscopix data acquiring computer.