# Inhibitory top-down projections from zona incerta
mediate neocortical memory

Anna Schroeder, M. Belén Pardi, Joram Keijser, Tamas Dalmay, Ayelén Groisman, Erin Schuman, Henning Sprekeler, Johannes Letzkus

► To cite this version:

Anna Schroeder, M. Belén Pardi, Joram Keijser, Tamas Dalmay, Ayelén Groisman, et al. Inhibitory top-down projections from zona incerta mediate neocortical memory. Neuron, 2023, 111 (5), pp.727-738.e8. 10.1016/j.neuron.2022.12.010. hal-04092133

HAL Id: hal-04092133

https://u-paris.hal.science/hal-04092133

Submitted on 9 May 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Neuron

## Inhibitory top-down projections from zona incerta
mediate neocortical memory

### Graphical abstract

<figure><img src="image_2.png" /></figure>

### Authors

Anna Schroeder, M. Belén Pardi,
Joram Keijser, ..., Erin M. Schuman,
Henning Sprekeler,
Johannes J. Letzkus

### Correspondence

anna.schroeder@physiologie.uni-freiburg.de (A.S.),
johannes.letzkus@physiologie.uni-freiburg.de (J.J.L.)

### In brief

Schroeder et al. identify a key pathway that flexibly tunes neocortical computations according to the individual's experience. These long-range inhibitory afferents derive from the subthalamic zona incerta, preferentially target neocortical interneurons, and encode the learned top-down relevance of sensory information in a bidirectional and balanced fashion to enable memory.

### Highlights

* Zona incerta sends long-range inhibitory projections to auditory cortex layer 1

* These axons transmit integrated top-down information that is essential for learning

* Sensory stimulus encoding in incertocortical boutons is highly experience dependent

* Learned top-down relevance is encoded in a bidirectional and balanced fashion

<figure><img src="image_3.png" /></figure>
## Article

# Inhibitory top-down projections from zona incerta mediate neocortical memory

Anna Schroeder,<fnref n="1" />,<fnref n="2" />,* M. Belén Pardi,<fnref n="1" />,<fnref n="3" /> Joram Keijser,<fnref n="4" />,<fnref n="5" /> Tamas Dalmay,<fnref n="6" /> Ayelén I. Groisman,<fnref n="1" /> Erin M. Schuman,<fnref n="2" /> Henning Sprekeler,<fnref n="4" />,<fnref n="7" />,<fnref n="8" /> and Johannes J. Letzkus<fnref n="1" />,<fnref n="9" />,<fnref n="10" />,<fnref n="11" />,*

## SUMMARY

Top-down projections convey a family of signals encoding previous experiences and current aims to the sensory neocortex, where they converge with external bottom-up information to enable perception and memory. Whereas top-down control has been attributed to excitatory pathways, the existence, connectivity, and information content of inhibitory top-down projections remain elusive. Here, we combine synaptic two-photon calcium imaging, circuit mapping, cortex-dependent learning, and chemogenetics in mice to identify GABAergic afferents from the subthalamic zona incerta as a major source of top-down input to the neocortex. Incertocortical transmission undergoes robust plasticity during learning that improves information transfer and mediates behavioral memory. Unlike excitatory pathways, incertocortical afferents form a disinhibitory circuit that encodes learned top-down relevance in a bidirectional manner where the rapid appearance of negative responses serves as the main driver of changes in stimulus representation. Our results therefore reveal the distinctive contribution of long-range (dis)inhibitory afferents to the computational flexibility of neocortical circuits.

## INTRODUCTION

The sensory neocortex is a critical substrate for higher brain functions including perception and memory. The underlying computations require the integration of bottom-up sensory signals with internally generated top-down information representing the previously acquired relevance of stimuli and the individual's current aims.<sup>1,2</sup> Decades of work have elucidated how the sensory neocortex processes physical stimulus features. By contrast, the encoding of top-down information by brain-wide afferents and the mechanisms that enable these signals to converge with bottom-up representations are only starting to emerge.<sup>3,4</sup> This work has so far focused on a number of top-down pathways that derive from regions with established roles for memory, including other cortical areas,<sup>5,6</sup> the higher-order thalamus,<sup>7,8</sup> and the amygdala.<sup>9,10</sup> These projection systems display a number of commonalities in that they all establish excitatory

afferents that are strongly enriched in the outermost layer of the neocortex (L1), where they provide input to the distal dendrites of pyramidal neurons (PNs) as well as to local interneurons (INs).<sup>3,4,6,7,11</sup> In addition to recruiting both excitation and inhibition, these afferents display a common regime for memory encoding through straightforward potentiation of their stimulus responses,<sup>5-8</sup> giving rise to the hypothesis that they collectively operate as a simple memory switch.<sup>3</sup>

In parallel to these intensely investigated excitatory systems, the brain contains a sparser and much less understood complement of long-range inhibitory projections.<sup>12,13</sup> Whether such inhibitory systems might provide top-down control of sensory neocortex with potentially distinct signaling mechanisms, connectivity, and information content is unknown. To address this, we focus on the subthalamic zona incerta (ZI), a predominantly inhibitory area that is much less studied than the aforementioned sources of excitatory top-down signals. Emerging

<figure><img src="image_4.png" /></figure>

<footnote n="1">¹Institute for Physiology, Faculty of Medicine, University of Freiburg, 79108 Freiburg, Germany</footnote>

<footnote n="2">²Max Planck Institute for Brain Research, 60438 Frankfurt, Germany</footnote>

<footnote n="3">³Université Paris Cité, Institute of Psychiatry and Neuroscience of Paris (IPNP), INSERM U1266, 75014 Paris, France</footnote>

<footnote n="4">⁴Modelling of Cognitive Processes, Institute of Software Engineering and Theoretical Computer Science, Technische Universität Berlin, 10587 Berlin, Germany</footnote>

<footnote n="5">⁵Charité – Universitätsmedizin Berlin, Einstein Center for Neurosciences Berlin, 10117 Berlin, Germany</footnote>

<footnote n="6">⁶Institute of Molecular and Clinical Ophthalmology Basel, 4031 Basel, Switzerland</footnote>

<footnote n="7">⁷Bernstein Center for Computational Neuroscience Berlin, 10115 Berlin, Germany</footnote>

<footnote n="8">⁸Science of Intelligence, Research Cluster of Excellence, 10587 Berlin, Germany</footnote>

<footnote n="9">⁹Center for Basics in NeuroModulation (NeuroModul Basics), University of Freiburg, 79106 Freiburg, Germany</footnote>

<footnote n="10">¹⁰IMBIT//BrainLinks-BrainTools, University of Freiburg, 79110 Freiburg, Germany</footnote>

<footnote n="11">¹¹Lead contact</footnote>

<footnote>*Correspondence: anna.schroeder@physiologie.uni-freiburg.de (A.S.), johannes.letzkus@physiologie.uni-freiburg.de (J.J.L.)
https://doi.org/10.1016/j.neuron.2022.12.010</footnote>
<figure><img src="image_5.png" /><figcaption>Figure 1. Incertocortical long-range inhibition preferentially targets the auditory cortex layer 1</figcaption></figure>

(A) Schematic for triple retrograde tracing from ACx (A), SSCx (S), and VCx (V).

(B) Fraction of ZI neurons projecting to the targets out of all cortex-projecting neurons (n = 74 neurons, 44 slices, and 9 mice). ZI projects most strongly to ACx.

(C) Schematic for retrograde tracing from ACx.

(D) Example images of ACx-projecting GABAergic ZI neurons (arrowheads). Scale bars, 40 µm.

(E) The large majority of ACx-projecting ZI neurons is GABAergic (n = 58 sections, 15 mice).

(F) Schematic for anterograde tracing.

(G) Viral expression of EYFP in GABAergic ZI neurons. Scale bars, 500 µm.

(H) Left: ZI axons display a mediotemporal density gradient and preferentially target L1. Right: close up of secondary ACx (AuV). Scale bars, 100 µm.

(I) Axon density across cortical depth in primary ACx (Au1) and AuV (n = 12 sections, 5 mice). L1 width; dotted lines.

Statistics: (E) Wilcoxon matched-pairs signed rank test. See Table S1 for the full results of the statistical tests. Data are shown as mean ± SEM.
***p < 0.0001. See also Figure S1.

work indicates that the ZI integrates a range of multisensory signals relating to arousal, motivation, and attention,¹⁴,¹⁵ suggesting that this area may be ideally suited to supplying top-down input to the neocortex. However, although recent investigations have revealed a range of behaviors including sleep,¹⁶ feeding,¹⁷ pain,¹⁸ novelty seeking,¹⁹ and anxiety²⁰ that are orchestrated by the ZI via its widespread subcortical outputs to the thalamus, hy-

pothalamus, and periaqueductal gray (PAG), the function of its projection to neocortex has remained elusive.

## RESULTS

### A disinhibitory incertocortical circuit

To address whether the ZI projects to the sensory neocortex, we performed triple retrograde tracing from the auditory cortex (ACx), visual cortex (VCx), and somatosensory cortex (SSCx) using counterbalanced combinations of cholera toxin B and FluoroGold (Figures 1A and S1A–S1D). These data revealed ZI afferents to all three sensory cortices. However, the vast majority of labeled neurons project to ACx, suggesting that this pathway may preferentially contribute to auditory behavior (Figure 1B). We therefore focused on the ACx, which in addition is suited for these analyses since it is critical for associative memory.²¹⁻²³ To determine the proportion of ACx-projecting ZI neurons that are inhibitory, we injected retrograde tracers in GAD2-nuclear-mCherry mice (Figure 1C). This showed that a small subset of overwhelmingly GABAergic neurons located in the ventral ZI projects to ACx (Figures 1D and 1E; see STAR Methods and Table S1 for all statistical tests and results in the study). In line, anterograde tracing from GABAergic neurons after injection of a conditional adeno-associated viral vector (AAV) into the ZI of GAD2-IRES-Cre mice revealed a robust projection to ACx (Figures 1F–1H). These afferents display a mediotemporal density gradient that matches the contribution of cortical areas to learning and memory.²² Within the local circuit, incertocortical projections are strongly enriched in L1, a known hub for top-down signaling (Figures 1H and 1I).³,⁵⁻⁹ By contrast, projections to VCx and SSCx were sparse with minimal innervation in L1 (Figures S1E–S1H). These data expand on previous work in other species and during development²⁴,²⁵ by identifying the ZI as a major source of long-range inhibitory input to L1 of the ACx. The small number of retrogradely labeled ZI neurons together with the robust projection to ACx furthermore suggest a considerable degree of divergence in this system.

How these inputs control the local circuit depends on their targets. To assess physiological connectivity, we expressed channelrhodopsin-2 (ChR2) in GABAergic ZI neurons to perform functional circuit mapping (Figures 2A and 2B).²⁶ Whole-cell recordings from L1 INs, L2/3 PNs, and L5 PNs in ACx of acute brain slices indicated that light stimulation of ZI afferents in superficial layers caused inhibitory currents in L1 INs with greater amplitudes and probabilities than in L2/3 or L5 PNs (Figures 2C–2E and S1I–S1L). Similar results were obtained from recordings of neighboring L1 INs and L2/3 or L5 PNs (Figures S1M and S1N), ruling out experimental variability as the source of the observed differential connectivity. The sparse, weak innervation of PNs by this pathway is in line with previous observations in immature neocortex.²⁵ Incertocortical transmission was blocked by Gabazine (GZ), identifying GABA<sub>A</sub> receptors as the underlying substrate (Figure 2F). In addition, inhibitory currents displayed longer latencies in L2/3 and L5 PNs than in L1 INs, consistent with the innervation of distal PN dendrites in L1 (Figure 2G). These results reveal preferential targeting of INs over PNs by incertocortical projections.
<figure><img src="image_6.png" /></figure>

(H) Schematic for AAV1-mediated anterograde transsynaptic tracing combined with FISH for identifying postsynaptic targets.

(I) Examples of *Eyfp*-positive (green) neurons expressing either *PValb* (yellow), *Sst* (orange), *Ndnf* (violet), or *Camk2a* (red). Scale bars, 10 µm.

(J) ZI overwhelmingly targets interneurons expressing the markers *PValb*, *Sst*, or *Ndnf* in ACx (n = 218 neurons, 81 sections, 4 mice).

Statistics: (E) Kruskal-Wallis test with Dunn's multiple comparisons test, (F) two-tailed paired t test, and (G) ordinary one-way ANOVA with Sidak's multiple comparisons test. See Table S1 for the full results of the statistical tests. Data are shown as mean ± SEM. **p** < 0.01, ***p** < 0.001, ****p < 0.0001. See also Figure S1.

Cortical interneurons display great morphological and func-
tional diversity. To determine the identity of the postsynaptic
partners in greater depth, we employed AAV1-mediated antero-
grade transsynaptic tracing from ZI neurons (Figure 2H). This
technique has been validated and used in a number of brain
areas from both glutamatergic and GABAergic afferents to
both excitatory and inhibitory targets (see STAR Methods for
full discussion).<sup>27,28</sup> Our experiments produced sparse trans-
duction of neurons that were localized throughout the cortical
depth (Figures S1O–S1X). To identify the labeled neurons, we
employed fluorescent *in situ* hybridization (FISH) against well-es-
tablished, non-overlapping molecular markers. The over-
whelming proportion of postsynaptic neurons expressed the IN
markers *Pvalb*, *Sst*, or *Ndnf*, whereas only very few excitatory
*Camk2a* cells or disinhibitory *Vip* INs were found (Figures 2I
and 2J). Collectively, these results uncover the striking speci-
ficity of incertocortical axons for IN types supplying direct inhibi-
tion to PNs, whereas direct inhibition of PN dendrites in L1 is
considerably weaker. This organization differs fundamentally
from excitatory top-down projections, which control cortical ac-
tivity by recruitment of both PNs and INs.<sup>3,6,7,11</sup> Functionally, the
net disinhibition of the local circuit evoked by ZI inputs has been
identified as a conserved processing motif enabling network
plasticity during learning and memory.<sup>11,13,29,30</sup>

Transfer of integrated information is essential for
learning

On top of its output connectivity, a major determinant of the *in vivo* function of the incertocortical pathway is the inputs it receives. To specifically identify the brain-wide inputs to ZI neurons with a direct projection to the ACx, we made these cells competent for retrograde transsynaptic tracing by injecting ret-

roAAV³¹ into ACx. After the injection of helper AAV and subsequently rabies viral vector to transduce starter cells exclusively in the ZI (Figures 3A, 3B, and S2F), this approach uncovered a large number of input sources spanning across the neuroaxis (Figures 3C, 3D, and S2A–S2E; see Table S2 for definitions of all abbreviations), including the midbrain, striatum, thalamus, cortex, and cerebellum. These data are consistent with known afferents to the ZI as a whole.¹⁴,¹⁵ In addition, this indicates that ZI sends integrated information from diverse upstream areas to ACx, consistent with a function for top-down signaling. Of note, several of these input regions such as the higher-order auditory thalamus (HO-MG), central amygdala (CEA), and PAG have been implicated in threat learning,³² suggesting that ACx-projecting ZI neurons may play a central role in this form of memory.

A major behavioral capacity enabled by top-down projections
is memory.<sup>3,5-8</sup> Based on the recent finding that the ZI is impli-
cated in threat memory via its subcortical network,<sup>33</sup> we aimed
to directly address whether incertocortical afferents impact
learning. To this end, we employed a form of discriminative threat
conditioning that critically depends on the function of the sec-
ondary auditory cortex (AuV) and adjacent temporal association
cortex (TeA) due to the use of complex conditioned stimuli (CSs,
trains of frequency-modulated sweeps, Figures 4A and 4B).<sup>21,22</sup>
To achieve control over incertocortical transmission, we ex-
pressed the chemogenetic inhibitor hM4DGi<sup>34</sup> in GAD2-positive
ZI neurons and implanted bilateral cannulae into ACx (Figures 4A
and S2G–S2J) for temporally and spatially controlled infusion of
the ligand clozapine-N-oxide (CNO, 3 µM). Post hoc analyses
together with published evidence<sup>35</sup> indicate that synaptic
silencing was centered on ACx (Figures S2K–S2O) but may
have encompassed parts of TeA in some instances. CNO was

<caption>Figure 2. A disinhibitory incertocortical circuit</caption>

(A) Schematic for ChR2 expression in GABAergic ZI axons.

(B) ZI axons were stimulated in acute brain slices by light pulses (5 ms) directed at the superficial layers of AuV while L1 INs, L2/3 PNs, or L5 PNs were recorded.

(C) Example mean IPSC traces (blue: light pulse).

(D) Percentage of connected neurons.

(E) IPSC amplitudes for all recorded neurons (both connected and non-connected). ZI inputs to L1 INs (45.9 ± 8.2 pA, n = 60 L1 INs, 28 mice) are stronger than for L2/3 PNs (7.7 ± 0.9 pA, n = 37 L2/3 PNs, 18 mice), or L5 PNs (12.6 ± 2.0 pA, n = 38 L5 PNs, 10 mice).

(F) Application of Gabazine (GZ) to connected L1 INs (CTL) abolishes light-evoked responses.

(G) Quantification of latency to IPSC peak for all connected L1 INs, L2/3 PNs, and L5 PNs (n = 32 L1 INs, 28 mice; 4 L2/3 PNs, 18 mice; 10 L5 PNs, 10 mice).
<figure><img src="image_7.png" /><figcaption>**Figure 3.** Zona incerta transmits integrated information to the auditory cortex</figcaption></figure>

(A) Schematic for identifying brain-wide monosynaptic inputs to ZI neurons that project to ACx.

(B) Starter cells (EGFP+/mCherry+, arrowheads), presynaptic cells (mCherry+), and non-starter cells (EGFP+) in the ZI. Scale bars, 200 µm (inset, 50 µm).

(C) Representative presynaptic neurons (HO-MG, higher-order auditory thalamus; CEA, central amygdala; TeA, temporal association cortex; PAG, peri-aqueductal gray) in regions essential for auditory threat learning. Scale bars, 200 µm.

(D) Distribution of presynaptic cells ipsilateral (red) and contralateral (gray) to injection (19,009 neurons, 5 mice; logarithmic scale; bars overlap). Abbreviations used in (C) and (D) are defined in Table S2. Ipsi, ipsilateral; Contra, contralateral. Data are shown as mean ± SEM. See also Figure S2.

infused just prior to the memory acquisition session during which one of two initially neutral CSs (CS+) was repeatedly paired with an unconditioned stimulus (US, a mild foot shock), whereas the CS- was left unpaired. In the recall session, the experimental animals displayed reduced freezing levels to both CSs relative to EYFP controls, indicating that silencing of incertocortical axons during learning results in a highly significant memory deficit (Figure 4C). By contrast, CS discrimination was not changed by the manipulation, suggesting that the strength rather than the specificity of the auditory memory was affected (Figure 4D). Notably, this differs from other systems that demonstrated an impact on memory specificity,⁷,³⁶ which may either relate to floor effects or alternatively to differential contributions to CS discrimination. No effect on acute freezing behavior during acquisition was observed, indicating that US perception and short-term memory were not perturbed (Figures S2P and S2Q). Silencing ZI afferents moreover left contextual threat memory that is independent of the neocortex intact (Figure 4E). These results therefore demonstrate that inhibitory ZI projections to ACx selectively mediate the formation of long-term auditory threat memory.

## Encoding of auditory stimuli and primary reinforcers

How does information transmitted by ZI afferents contribute to ACx function and associative memory? To address this, we performed chronic two-photon imaging of ZI synaptic boutons expressing an axon-targeted calcium indicator³⁷ in L1 of awake, head-fixed GAD2-IRES-Cre mice after identification of area AuV using intrinsic imaging (Figure 5A).⁷,²²,³⁸ This was combined with a novel threat conditioning paradigm in which all phases occurred under the microscope in head fixation (Figures 5B and S3A–S3K), enabling us to longitudinally track the responses of individual boutons prior to (habituation), during (acquisition),

and after learning (recall). Note that only boutons that could be identified in all three sessions were analyzed (Figures 5C and S3L–S3N). To obtain an online readout of threat memory in head-fixed mice, we used changes in eye pupil dilation in response to the CSs instead of freezing behavior (Figure 5D), metrics that display a strong correlation.⁷,²²,³⁸ Pupil responses increased across the paradigm for the CS+ but not the CS–, leading to behavioral CS discrimination during the recall session (Figures 5D–5F). By contrast, non-associative pseudoconditioning (PC) (auditory stimuli are termed CS1 and CS2 here) caused a reduction of pupil responses (Figures 5G, 5H, S3G, and S3H). We conclude that threat memory strength during recall is low for CS1/2, intermediate for CS–, and high for CS+. These data are in line with analogous results from freely behaving animals,⁷,²²,³⁸ thus validating the head-fixed paradigm for longitudinal dissection of threat memory acquisition and expression.

Given that this pathway has not been investigated, our first objective was to characterize the information it transmits in naive animals. CSs elicited clear positive or negative responses (NRs) in a subset of boutons (Figures 6A–6C), indicating that this non-canonical pathway encodes auditory information. Training a linear decoder to predict stimulus identity from the bouton response patterns furthermore showed that ZI afferents are able to discriminate auditory stimuli above chance level at both the single-bouton (Figure 6D) and population level (Figures 6E and S4A–S4L). Given that the CSs largely overlap in frequency content, this suggests remarkably precise encoding of auditory information by this projection. In addition, ZI boutons respond robustly to the mild tail shock used as the US³⁹ with an increase in average activity (Figures 6F and S5A–S5E). These results uncover that inhibitory ZI afferents transmit information about both the auditory CSs and the primary reinforcer to ACx.
<figure><img src="image_8.png" /><figcaption>Figure 4. Incertocortical projections are essential for threat memory</figcaption></figure>

(A) Schematic for bilateral chemogenetic inhibition of ZI afferents in ACx by local agonist application via cannulae.

(B) Discriminative auditory threat conditioning paradigm using complex CSs. CNO was infused prior to acquisition.

(C) Freezing behavior during recall indicates reduced memory strength compared with controls for both the CS+ and the CS- (n = 14 mice per group).

(D) Discrimination index for controls and hM4DGi-expressing animals, suggesting that CS discrimination was not affected by the manipulation (n = 14 mice per group).

(E) Recall of contextual threat memory (n = 14 mice per group).

Statistics: (C) two-way RM ANOVA with Tukey's multiple comparisons test between trial types and Sidak's multiple comparisons test between animal groups and (D and E) two-tailed, unpaired t test. See Table S1 for the full results of the statistical tests. Data are shown as mean ± SEM. n.s. p > 0.05, *p < 0.05, **p < 0.001, ****p < 0.0001. See also Figure S2.

## Plasticity of incertocortical signaling

A defining feature of top-down information is that it encodes acute and long-term experiences. In line, ZI boutons displayed pronounced plasticity of CS response patterns across the behavioral paradigm. These changes were bidirectional, with some boutons developing strong positive responses (PRs) (excitatory potentiation), whereas others started to display NRs (inhibitory potentiation). Plasticity emerged during memory acquisition and was even more robust in memory recall (Figures 6A–6C and S3O–S3R). It materialized in all possible rearrangements, with either positive or negative responding boutons undergoing either excitatory or inhibitory potentiation (Figures S3S–S3U). Moreover, the percentage of responsive boutons grew with learning (Figure 6G), driven by the emergence of strong NRs that were largely absent prior to learning (Figures S5H–S5L). These plastic changes occurred for the CS+ and to a lesser extent for the CS–, consistent with the strength of threat memory to these stimuli (Figures 5D, 5E, 5H, S3E, and S3H). To address whether the observed plasticity relates to associative memory or alternatively to spontaneous drift of the representation, we used control animals that underwent non-associative PC and thus did not form a threat memory (Figures 5G, 5H, S3G, and S3H). These data display smaller changes in CS responses between habituation and recall

(Figures S3S–S3U), indicating less plasticity. In addition, the changes that did occur were opposite to the ones found after threat conditioning (Figures 6I, S3R, and S3U). Incertocortical signaling thus encodes associative memory.

One prominent consequence of the bidirectional changes in threat-conditioned animals is an increase in the standard deviation of CS responses between boutons (Figures 6H and S3V), raising the question of how this affects the transmission of sensory information. Single bouton and population decoding analysis showed that stimulus discrimination by ZI boutons improves with threat learning (Figures 6D, 6E, and S4A–S4L), in line with the enhanced behavioral discrimination of CS+ and CS− (Figures 5F and 5H). Moreover, decoding accuracy correlates with CS discrimination at the behavioral level during memory recall but not during habituation (Figures S4J and S4K), highlighting the tight link between incertocortical information transfer and discriminative memory. Conversely, PC led to a reduction in both response standard deviation (Figure 6J) and stimulus discrimination at the neuronal level (Figures S4A–S4L), along with decreases in pupil responses for both CSs (Figure S3G). Interestingly, we observed a transient increase in decoding accuracy during PC (Figures S4D–S4G) that may relate to the isolated USs that the animal receives during that session. We next analyzed trial-by-trial activity correlations between boutons, which can limit the information content of sensory responses.⁴⁰ Threat memory acquisition resulted in a decrease in pairwise noise correlations between boutons, which was not observed after PC, suggesting a learning-related increase in the amount of information transferred by this pathway (Figure 6K and S5M–S5O). To elucidate how learning changes CS encoding in ZI boutons at the population level, we combined all bouton responses in high-dimensional space and computed the population vectors in habituation and recall (Figure 6L).⁴¹ The angle between these vectors indicates that threat conditioning causes a robust change in the representation of both CS+ and CS− that is almost twice as large as in control mice after PC. Importantly, these changes enabled the boutons to represent memory strength: the absolute response to a given CS in the recall session correlates with pupil dilation as an online readout of memory, whereas this relationship is absent in habituation (Figures 6M and 6N). To address whether memory specificity impacts these mechanisms, we segregated the mice into discriminators and generalizers based on the discrimination index and observed similar relationships between memory strength and bouton responses (Figures 5F and S6A–S6D). Finally, we asked whether, in addition to learned top-down relevance, incertocortical afferents also encode bottom-up salience related to the physical properties of sensory stimuli.⁴² We therefore imaged ZI boutons in response to noise-train stimuli at different intensities (Figures S4M–S4P). This revealed a significant albeit weaker correlation between absolute response magnitude and the perceived salience of the stimulus compared with top-down encoding (Figure S4Q). Moreover, whereas increased top-down salience causes a reduction in the population responses of ZI boutons (Figure S3O), the opposite effect is observed for bottom-up stimuli (Figures S4R and S4S). In conclusion, bottom-up and top-down relevance are encoded by distinct yet partially overlapping mechanisms in incertocortical synapses. Furthermore, memory manifests as a balanced form of
<figure><img src="image_9.png" /></figure>

<figure><img src="image_10.png" /></figure>

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /></figure>

<figure><img src="image_15.png" /></figure>

<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /></figure>

<figure><img src="image_18.png" /></figure>

<figure><img src="image_19.png" /></figure>

<figure><img src="image_20.png" /></figure>

<figure><img src="image_21.png" /></figure>

<figure><img src="image_22.png" /></figure>

<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /><figcaption>Figure 5. A head-fixed paradigm for longitudinal dissection of threat memory in synaptic boutons</figcaption></figure>

(A) Schematic for chronic *in vivo* two-photon calcium imaging of GABAergic ZI boutons in ACx.

(B) Discriminative auditory threat conditioning (DTC) or pseudoconditioning (PC) in head fixation with eye pupil dilation as an online memory readout.

(C) Representative boutons across sessions. Scale bars, 20 µm.

(D) Mean pupil diameter response to CSs, normalized to the baseline period before CS onset (ΔD/D), in the three behavioral sessions for conditioned (n = 12 mice) and pseudoconditioned (n = 8 mice, CS1 and CS2 combined) mice.

(E) Pupil dilation in response to the CSs across behavioral sessions in DTC (n = 12 mice).

(F) CS discrimination index during habituation and recall. Note that DTC leads to a significant increase in discrimination (n = 12 mice).

(G) Pupil dilation in response to CS1/2 across behavioral sessions in PC (n = 16 CS1 and CS2 responses, 8 mice).

(H) Pupil response changes between habituation and recall in threat-conditioned (n = 12 mice) and pseudoconditioned animals (n = 8 mice, CS1 and CS2 combined).

Statistics: (E and G) RM one-way ANOVA with Sidak's multiple comparisons test, (F) Wilcoxon matched-pairs signed rank test, and (H) Ordinary one-way ANOVA with Sidak's multiple comparisons test. See Table S1 for the full results of the statistical tests. Data are shown as mean ± SEM. \*p < 0.05, \*\*p < 0.01, \*\*\*p < 0.001, \*\*\*\*p < 0.0001. H, Hab, habituation; A, Acq, acquisition; R, Rec, recall; P, pseudoconditioning; S, shock. See also Figure S3.

population plasticity in ZI afferents that improves CS discrimination and information transfer and encodes the strength of the memory trace, in line with the observed essential function of this pathway for learning (Figure 4C).

## Top-down memory encoding by two distinct activity regimes

Comparable experiments have found that excitatory top-down afferents to L1 encode memory-related information exclusively by the strengthening of positive stimulus responses.³,⁵⁻⁸ This indicates that the observed bidirectional plasticity may be a novel hallmark of ZI projections that enables them to transmit top-down signals by two separate coding motifs. To address the functional consequences, we segregated the boutons into two groups based on whether they showed PRs (average ΔF/F\*s > 0) or NRs (average ΔF/F\*s < 0) to the CS during threat memory recall (Figures 7A, 7B, S6I, S6K, and S6L). This revealed that both groups display positive mean responses during habituation and that the change during memory acquisition is predictive of their responses during recall (Figures 7C, 7D, S6M, and S6N). Boutons in either group also responded to the US with both positive and negative transients (Figure S6J), but no relationship between these post-shock responses and the CS response during acquisition or recall was identified (Figures S5F and S5G). To address the dynamics

of learning-related plasticity, we analyzed the responses across trial bins (Figures 7E, 7F, S6O, and S6P). This uncovered a striking dichotomy between PR and NR boutons during the acquisition session: while the main effect of learning for PR boutons is a stabilization of responses across trials, NR synapses display a rapid switch from initially positive to negative. This effect parallels the evolution of behavioral online learning (Figures S3I and S3J) and highlights the central role of NRs for acute encoding of memory by ZI afferents. Conversely, both PR and NR bouton responses were robustly potentiated in the memory consolidation time window between acquisition and recall, enabling both populations to encode memory strength in the recall session (Figures S6E–S6H). By contrast, CS responses remained stable during and after the PC session (Figures S6Q–S6V), demonstrating that bidirectional plasticity encodes associative memory. These results support the idea that ZI boutons engage in two plasticity regimes with distinct temporal dynamics and response properties, which unfold during memory acquisition, are further boosted during consolidation, and persist in recall.

Whether PR and NR boutons originate from the same or different axons is an open question. To address this, we quantified the pairwise distances of boutons within (PR/PR and NR/NR) and across (NR/PR) groups. This indicated that within-group distances are, on average, smaller (Figures S6W–S6Y), suggesting
<figure><img src="image_25.png" /><figcaption>Figure 6. Learning-related plasticity of incertocortical signaling</figcaption></figure>

(A) Trial-averaged single bouton responses to the CS+ sorted by amplitude (gray scale: rank order of bouton ID, vertical lines: FM-sweeps [gray] and tail-shocks [red], light gray: blanked period during US).

(B) Response integral distribution broadens across the paradigm for both CSs (n = 1,114 boutons, 12 mice).

(C) Representative single-trial (thin lines) and average (thick lines) CS+ responses illustrating excitatory and inhibitory potentiation in two boutons from the same field of view.

(D) Stimulus discriminability quantified for single boutons as the sensitivity index d' (n = 1,114 boutons).

(E) Accuracy of bouton population decoding between CS+ and CS- increases across the paradigm (n = 1,114 boutons, gray: chance level estimated by permuting stimulus labels).

(F) Response integral during the post-shock window for CS+ and CS- (n = 1,114 boutons).

(G) Percentage of CS+ sound responsive (SR) boutons (n = 12 mice).

(H) Standard deviation of CS+ responses across all boutons (n = 12 mice).

(I) Same as in (B) for pseudoconditioned animals (n = 1,070 CS1 and CS2 responses, 535 boutons, 8 mice).

(J) Same as in (H) for CS1/2 (n = 16 CS1 and CS2 responses, 8 mice).

(K) Noise correlations of CS+ responses between all pairs of boutons (n = 76,844 pairwise correlations, 1,114 boutons, 12 mice).

(L) Left: learning angle quantifies the change in orientation of population vectors between habituation and recall for a given CS. Right: CS+ and CS- vectors (n = 12 mice) display greater learning angles than CS1/2 (n = 8 mice).

(legend continued on next page)
A

<figure><img src="image_26.png" /></figure>

C

<figure><img src="image_27.png" /></figure>

E

<figure><img src="image_28.png" /></figure>

B

<figure><img src="image_29.png" /></figure>

D

<figure><img src="image_30.png" /></figure>

F

<figure><img src="image_31.png" /></figure>

G

<figure><img src="image_32.png" /></figure>

H

<figure><img src="image_33.png" /></figure>

I

<figure><img src="image_34.png" /><figcaption>Figure 7. Top-down memory encoding by two distinct activity regimes</figcaption></figure>

Boutons were segregated based on whether they displayed a positive response (PR, 531 boutons) or a negative response (NR, 583 boutons) during threat memory recall (n = 12 mice).

(A) Mean CS+ responses of PR boutons across the paradigm. Vertical lines: FM-sweeps (gray), tail-shocks (red).

(B) Same as (A) for NR boutons.

(C and D) Integral of CS+ responses.

(E) CS+ response integral over trials (every three binned) for PR boutons across the paradigm.

(F) Same as (E) for NR boutons. Note the rapid appearance of negative responses during acquisition.

(G) Schematic for quantification of learning dynamics as the angle between CS+ response vectors in population space for each acquisition trial relative to habituation (left, light blue) or recall (right, dark blue). Values for habituation and recall represent trial-to-trial variability within those sessions.

(H) PR boutons show no dynamic change across learning.

(I) NR boutons display rapid dynamics of CS+ representation.

Statistics: (C and D) Friedman test with Dunn's multiple comparisons test, (E and F) two-way ANOVA, with Sidak's multiple comparisons test, and (H and I) two-way ANOVA with Sidak's multiple comparisons test or two-tailed paired t test. See Table S1 for the full results of the statistical tests. Data are shown as mean ± SEM, except (C) and (D), which show full data range, median, and quartiles. n.s. p > 0.05, \*p < 0.05, \*\*p < 0.01, \*\*\*p < 0.001, \*\*\*\*p < 0.0001. See also Figures S6 and S7.

that boutons with the same response type are spatially clustered and may therefore often be positioned on the same axon. Next, we directly addressed this by identifying bouton pairs that were physically connected by an axon. This revealed that the overwhelming majority of sister boutons display the same CS response type (Figure S6Z). Collectively, this is consistent with the working hypothesis that incertocortical axons derive from two subpopulations of ZI neurons that undergo either positive or NR potentiation due to threat learning. However, this does not preclude possible contributions from additional mechanisms, such as activity-dependent plasticity of ZI boutons in cortex or acute presynaptic modulation via G-protein-coupled receptors.⁷,⁴³

To define the potentially unique role of NR boutons for the encoding of top-down information, we addressed how they contribute to the learning-related plasticity of CS representation in population space. To this end, we computed the angle between the response vectors of individual acquisition trials and the average population vector during either habituation or recall (Figures 7G and S7). For NR boutons, the angle between habituation and acquisition responses successively increased over consecutive CS+/US pairings while it simultaneously decreased between acquisition and recall (Figures 7H, 7I, and S7B). These changes occur rapidly: within only five acquisition trials, the CS

representation has become more similar to the final pattern that will emerge in recall than to the original one in habituation. By stark contrast, PR boutons show no change in CS encoding during learning (Figures 7H, 7I, and S7B). In consequence, the encoding dynamics of the entire bouton population are similar to those observed for NR boutons alone (Figures S7C and S7D). These results are largely mirrored, albeit with lower magnitude, for the CS— (Figures S7E–S7I) and do not occur in pseudo-conditioned mice (Figures S7J–S7N). Moreover, reanalysis of the population level changes between habituation and recall (Figure 6L), this time for PR and NR boutons separately, reveals a greater contribution of NR boutons also to long-term memory (Figure S7O). In conclusion, rapid NR potentiation is the major driver converting population response patterns from encoding neutral sensory information during habituation to the representation of stimuli with learned top-down relevance during recall.

DISCUSSION

The ZI has recently emerged as a major regulator of diverse brain functions.¹⁴⁻²⁰,³³ Moreover, deep brain stimulation of this area alleviates motor and potentially mood deficits in patients with Parkinson's disease.⁴⁴ Although a functional understanding of

(M) Correlation between pupil dilation and mean absolute bouton response in habituation (n = 12 threat-conditioned mice, 8 pseudoconditioned mice).

(N) Same as in (M) for recall (n = 12 threat-conditioned mice, 8 pseudoconditioned mice).

Statistics: (B, D, and G–K) Friedman test with Dunn's multiple comparisons test, (F) Wilcoxon matched-pairs signed rank test, (L) ordinary one-way ANOVA with Sidak's multiple comparisons test, (M and N) Pearson correlation, linear fit, and 95% confidence bands. See Table S1 for the full results of the statistical tests.

Data are shown as mean ± SEM, except (B), (D), (F), and (I), which show full data range, median, and quartiles. n.s. p > 0.05, \*p < 0.05, \*\*p < 0.01, \*\*\*p < 0.001, \*\*\*\*p < 0.0001. H, Hab, habituation; A, Acq, acquisition; R, Rec, recall; P, pseudoconditioning. See also Figures S4–S6.
the ZI is therefore crucial, the role of its projection to neocortex has not been established. Our multidisciplinary dissection identifies ZI afferents as a major determinant of ACx function that display both similarities and important differences to classical excitatory top-down projections deriving from other cortical areas, the thalamus, and the amygdala:³,⁵⁻⁹,¹¹ the similarities include the preferred targeting of L1, broad integration of brain-wide information, necessity for memory, and highly experience-dependent signaling. Conversely, the incertocortical pathway exhibits several unique features that identify it as a distinct source of top-down input, including its inhibitory mode of transmission, disinhibitory connectivity within the neocortex, and encoding of primary reinforcers. Moreover, the manner in which learned top-down relevance is encoded by these afferents differs fundamentally from long-range excitatory projections for which only positive transients and excitatory potentiation have been observed during memory acquisition and expression.³,⁵⁻⁸ By contrast, approximately half of the ZI boutons develop negative stimulus responses after just a few conditioning trials, which are the main carriers of top-down information at the population level. The resulting bidirectional changes encode the strength of the memory trace and improve stimulus discrimination in the absence of large effects on mean responses. The bidirectional implementation of this plasticity may serve to improve both the dynamic range and the metabolic efficiency of information transfer to neocortical circuits.

ZI projections likely contribute to associative learning via two distinct operations: first, acute disinhibition recruited by the US can instruct plasticity induction in the local circuit by boosting PN activity.¹¹,²⁹,³⁰ Such disinhibitory gating has been proposed as a signaling mode for long-range inhibition in the hippocampal formation,¹²,¹³ and our data reveal that it is also a major factor governing neocortical function. In that respect, future work on the physiological properties of ZI inputs to IN types beyond L1 will be important. Second, short- and long-term changes in CS encoding by ZI afferents themselves are likely to contribute to the representational plasticity that has been observed in several ACx circuit elements in response to learning.²¹⁻²³,³⁸ ZI projections preferentially target INs, and this disinhibitory connectivity provides a more flexible and dynamic substrate for circuit control than the direct excitation supplied by classical top-down afferents. This is the case since the effects on PNs depend not only on incertocortical signaling itself but also on the current activity patterns of the targeted IN types, which furthermore control different somatodendritic domains of PNs, are differentially modulated by a range of neuromodulators and are in addition optimized for signaling in different frequency bands.³⁸,⁴⁵,⁴⁶ Moreover, on top of the net disinhibition of cortical PNs that is likely caused by positive potentiation of incertocortical synapses, approximately half of the boutons displayed robust negative-going responses that lead to an increase in PN inhibition via disinhibition of the INs. A subset of PNs also receives direct inputs from ZI projections, further enriching this circuit diagram. Together, our results, therefore, identify ZI afferents as a novel top-down pathway for the experience-dependent redistribution of inhibition, with likely rich computational consequences for neocortical processing.

In addition to the ACx, the ZI projects widely to several brain areas,¹⁴,¹⁵ such as to the higher-order thalamus.⁴⁷,⁴⁸ At the

brain-wide level, an attractive possibility for the mechanistic implementation of its effects is therefore that the ZI serves to temporally coordinate and organize the activity patterns within this large-scale network in a manner that enables memory acquisition and expression.⁴⁹ In addition to memory, top-down information is critical for a number of further functions including credit assignment³,⁵⁰ and predictive coding.² Since the ZI is tightly linked to motor function,¹⁴,¹⁵,⁴⁴ incertocortical afferents may be particularly central for the neocortical computation of sensorimotor predictions.²,⁵¹ Importantly, given its bidirectional encoding of learned top-down relevance, the ZI may be able to contribute to the computation of both positive and negative prediction errors in the neocortex. Our study has begun to pinpoint the importance and unique attributes of inhibitory top-down projections in the neocortex and may thereby also enable future work on the contribution of additional long-range inhibitory systems¹²,⁵² to neocortical function.

## STAR★METHODS

Detailed methods are provided in the online version of this paper and include the following:

* KEY RESOURCES TABLE

* RESOURCE AVAILABILITY

* Lead contact

* Materials availability

* Data and code availability

* EXPERIMENTAL MODEL AND SUBJECT DETAILS

* Animals

* METHOD DETAILS

* Surgery

* Transsynaptic tagging with fluorescent in situ hybridization (FISH)

* Histology

* Acute brain slice recordings with optogenetics

* Discriminative threat conditioning paradigm (DTC) in freely-behaving animals with chemogenetics

* Discriminative threat conditioning (DTC) paradigm in head-fixation

* *In vivo* calcium imaging and noise-train stimulation

* Stimulus information in individual boutons

* Decoding from populations of boutons

* Dynamics of population vectors over learning

* Response variability and correlations across boutons

* QUANTIFICATION AND STATISTICAL ANALYSIS

## SUPPLEMENTAL INFORMATION

Supplemental information can be found online at https://doi.org/10.1016/j.neuron.2022.12.010.

## ACKNOWLEDGMENTS

We thank members of the Letzkus, Sprekeler, and Schuman labs, M.S. Fustinana Gueler, and P. Tovote for discussions; N. Dolensek, H. Liaw, S. Junek, F. Vollrath, F. Kretschmer, and G. Tushev for technical assistance; G. Keller for technical comments; L.L. Looger, J. Akerboom, D.S. Kim, the GENIE Project at Janelia Farm, K. Deisseroth, E.S. Boyden, H. Zeng, L. Tian, L. Zhang, J.M. Wilson, B. Roth, and K.-K. Conzelmann for generously sharing reagents;
and S. Pernitzsch from SciGraphix for graphical abstract design. This work was supported by the Max Planck Society, the German Research Foundation (LE 3804/3-1, LE 3804/4-1, and LE 3804/7-1 to J.J.L.), a Marie Skłodowska-Curie Fellowship (840701 to A.S.), two EMBO Long-Term Fellowships (ALTF 882-2018 to A.S. and ALTF 157-2022 to A.I.G.), and an Alexander von Humboldt Fellowship (to A.S.).

## AUTHOR CONTRIBUTIONS

A.S. and J.J.L. conceived the project. A.S. performed and analyzed all experiments with help from T.D. for chemogenetic experiments and A.I.G. for slice recording experiments. M.B.P. provided input on methodology and performed analyses. J.K. and H.S. performed computational analyses. E.M.S. provided input on data interpretation and infrastructure. A.S. and J.J.L. wrote the manuscript after discussions among all authors. J.J.L. supervised the project.

## DECLARATION OF INTERESTS

The authors declare no competing interests.

Received: April 4, 2022

Revised: October 19, 2022

Accepted: December 8, 2022

Published: January 6, 2023

## REFERENCES

1. Bastos, A.M., Usrey, W.M., Adams, R.A., Mangun, G.R., Fries, P., and Friston, K.J. (2012). Canonical microcircuits for predictive coding. Neuron 76, 695-711. https://doi.org/10.1016/j.neuron.2012.10.038.

2. Keller, G.B., and Mrsic-Flogel, T.D. (2018). Predictive processing: A canonical cortical computation. Neuron 100, 424-435. https://doi.org/10.1016/j.neuron.2018.10.003.

3. Shin, J.N., Doron, G., and Larkum, M.E. (2021). Memories off the top of your head. Science 374, 538-539. https://doi.org/10.1126/science.abk1859.

4. Schuman, B., Dellal, S., Prönneke, A., Machold, R., and Rudy, B. (2021). Neocortical Layer 1: an elegant solution to top-down and bottom-up integration. Annu. Rev. Neurosci. 44, 221-252. https://doi.org/10.1146/annurev-neuro-100520-012117.

5. Makino, H., and Komiyama, T. (2015). Learning enhances the relative impact of top-down processing in the visual cortex. Nat. Neurosci. 18, 1116-1122. https://doi.org/10.1038/nn.4061.

6. Doron, G., Shin, J.N., Takahashi, N., Drüke, M., Bocklisch, C., Skenderi, S., de Mont, L., Toumazou, M., Ledderose, J., Brecht, M., et al. (2020). Perirhinal input to neocortical layer 1 controls learning. Science 370, eaaz3136. https://doi.org/10.1126/science.aaz3136.

7. Pardi, M.B., Vogenstahl, J., Dalmay, T., Spanò, T., Pu, D.L., Naumann, L.B., Kretschmer, F., Sprekeler, H., and Letzkus, J.J. (2020). A thalamocortical top-down circuit for associative memory. Science 370, 844-848. https://doi.org/10.1126/science.abc2399.

8. Gambino, F., Pagès, S., Kehayas, V., Baptista, D., Tatti, R., Carleton, A., and Holtmaat, A. (2014). Sensory-evoked LTP driven by dendritic plateau potentials in vivo. Nature 515, 116-119. https://doi.org/10.1038/nature13664.

9. Burgess, C.R., Ramesh, R.N., Sugden, A.U., Levandowski, K.M., Minnig, M.A., Fenselau, H., Lowell, B.B., and Andermann, M.L. (2016). Hunger-dependent enhancement of food cue responses in mouse postrhinal cortex and lateral amygdala. Neuron 91, 1154-1169. https://doi.org/10.1016/j.neuron.2016.07.032.

10. Yang, Y., Liu, D.Q., Huang, W., Deng, J., Sun, Y., Zuo, Y., and Poo, M.M. (2016). Selective synaptic remodeling of amygdalocortical connections associated with fear memory. Nat. Neurosci. 19, 1348-1355. https://doi.org/10.1038/nn.4370.

11. Williams, L.E., and Holtmaat, A. (2019). Higher-order thalamocortical inputs gate synaptic long-term potentiation via disinhibition. Neuron 101, 91-102.e4. https://doi.org/10.1016/j.neuron.2018.10.049.

12. Melzer, S., and Monyer, H. (2020). Diversity and function of corticopetal and corticofugal GABAergic projection neurons. Nat. Rev. Neurosci. 21, 499-515. https://doi.org/10.1038/s41583-020-0344-9.

13. Basu, J., Zaremba, J.D., Cheung, S.K., Hitti, F.L., Zemelman, B.V., Losonczy, A., and Siegelbaum, S.A. (2016). Gating of hippocampal activity, plasticity, and memory by entorhinal cortex long-range inhibition. Science 351, aaa5694. https://doi.org/10.1126/science.aaa5694.

14. Mitrofanis, J. (2005). Some certainty for the "zone of uncertainty"? Exploring the function of the zona incerta. Neuroscience 130, 1-15. https://doi.org/10.1016/j.neuroscience.2004.08.017.

15. Wang, X., Chou, X.L., Zhang, L.I., and Tao, H.W. (2020). Zona incerta: an integrative node for global behavioral modulation. Trends Neurosci. 43, 82-87. https://doi.org/10.1016/j.tins.2019.11.007.

16. Liu, K., Kim, J., Kim, D.W., Zhang, Y.S., Bao, H., Denaxa, M., Lim, S.A., Kim, E., Liu, C., Wickersham, I.R., et al. (2017). Lhx6-positive GABA-releasing neurons of the zona incerta promote sleep. Nature 548, 582-587. https://doi.org/10.1038/nature23663.

17. Zhang, X., and van den Pol, A.N. (2017). Rapid binge-like eating and body weight gain driven by zona incerta GABA neuron activation. Science 356, 853-859. https://doi.org/10.1126/science.aam7100.

18. Masri, R., Quiton, R.L., Lucas, J.M., Murray, P.D., Thompson, S.M., and Keller, A. (2009). Zona incerta: a role in central pain. J. Neurophysiol. 102, 181-191. https://doi.org/10.1152/jn.00152.2009.

19. Ahmadlou, M., Houba, J.H.W., van Vierbergen, J.F.M., Giannouli, M., Gimenez, G.A., van Weeghel, C., Darbanfouladi, M., Shirazi, M.Y., Dziubek, J., Kacem, M., et al. (2021). A cell type-specific cortico-subcortical brain circuit for investigatory and novelty-seeking behavior. Science 372, eabe9681. https://doi.org/10.1126/science.abe9681.

20. Li, Z., Rizzi, G., and Tan, K.R. (2021). Zona incerta subpopulations differentially encode and modulate anxiety. Sci. Adv. 7, eabf6709. https://doi.org/10.1126/sciadv.abf6709.

21. Ceballo, S., Piwkowska, Z., Bourg, J., Daret, A., and Bathellier, B. (2019). Targeted cortical manipulation of auditory perception. Neuron 104, 1168-1179.e5. https://doi.org/10.1016/j.neuron.2019.09.043.

22. Dalmay, T., Abs, E., Poorthuis, R.B., Hartung, J., Pu, D.L., Onasch, S., Lozano, Y.R., Signoret-Genest, J., Tovote, P., Gjorgjieva, J., and Letzkus, J.J. (2019). A critical role for neocortical processing of threat memory. Neuron 104, 1180-1194.e7. https://doi.org/10.1016/j.neuron.2019.09.025.

23. Weinberger, N.M. (2007). Associative representational plasticity in the auditory cortex: a synthesis of two disciplines. Learn. Mem. 14, 1-16. https://doi.org/10.1101/lm.421807.

24. Lin, R.C., Nicolelis, M.A., and Chapin, J.K. (1997). Topographic and laminar organizations of the incertocortical pathway in rats. Neuroscience 81, 641-651. https://doi.org/10.1016/s0306-4522(97)00094-8.

25. Chen, J., and Kriegstein, A.R. (2015). A GABAergic projection from the zona incerta to cortex promotes cortical neuron development. Science 350, 554-558. https://doi.org/10.1126/science.aac6472.

26. Petreanu, L., Mao, T., Sternson, S.M., and Svoboda, K. (2009). The subcellular organization of neocortical excitatory connections. Nature 457, 1142-1145. https://doi.org/10.1038/nature07709.

27. Zingg, B., Peng, B., Huang, J., Tao, H.W., and Zhang, L.I. (2020). Synaptic specificity and application of anterograde transsynaptic AAV for probing neural circuitry. J. Neurosci. 40, 3250-3267. https://doi.org/10.1523/JNEUROSCI.2158-19.2020.

28. Trouche, S., Koren, V., Doig, N.M., Ellender, T.J., El-Gaby, M., Lopes-Dos-Santos, V., Reeve, H.M., Perestenko, P.V., Garas, F.N., Magill, P.J., et al. (2019). A hippocampus-accumbens tripartite neuronal motif guides appetitive memory in space. Cell 176, 1393-1406.e16. https://doi.org/10.1016/j.cell.2018.12.037.
29. Letzkus, J.J., Wolff, S.B., and Lüthi, A. (2015). Disinhibition, a circuit mechanism for associative learning and memory. Neuron 88, 264-276. https://doi.org/10.1016/j.neuron.2015.09.024.

30. Turi, G.F., Li, W.K., Chavlis, S., Pandi, I., O'Hare, J., Priestley, J.B., Grosmark, A.D., Liao, Z., Ladow, M., Zhang, J.F., et al. (2019). Vasoactive intestinal polypeptide-expressing interneurons in the hippocampus support goal-oriented spatial learning. Neuron 101, 1150-1165.e8. https://doi.org/10.1016/j.neuron.2019.01.009.

31. Tervo, D.G., Hwang, B.Y., Viswanathan, S., Gaj, T., Lavzin, M., Ritola, K.D., Lindo, S., Michael, S., Kuleshova, E., Ojala, D., et al. (2016). A designer AAV variant permits efficient retrograde access to projection neurons. Neuron 92, 372-382. https://doi.org/10.1016/j.neuron.2016.09.021.

32. Herry, C., and Johansen, J.P. (2014). Encoding of fear learning and memory in distributed neuronal circuits. Nat. Neurosci. 17, 1644-1654. https://doi.org/10.1038/nn.3869.

33. Zhou, M., Liu, Z., Melin, M.D., Ng, Y.H., Xu, W., and Südhof, T.C. (2018). A central amygdala to zona incerta projection is required for acquisition and remote recall of conditioned fear memory. Nat. Neurosci. 21, 1515-1519. https://doi.org/10.1038/s41593-018-0248-4.

34. Sternson, S.M., and Roth, B.L. (2014). Chemogenetic tools to interrogate brain functions. Annu. Rev. Neurosci. 37, 387-407. https://doi.org/10.1146/annurev-neuro-071013-014048.

35. Stachniak, T.J., Ghosh, A., and Sternson, S.M. (2014). Chemogenetic synaptic silencing of neural circuits localizes a hypothalamus → midbrain pathway for feeding behavior. Neuron 82, 797-808. https://doi.org/10.1016/j.neuron.2014.04.008.

36. Letzkus, J.J., Wolff, S.B., Meyer, E.M., Tovote, P., Courtin, J., Herry, C., and Lüthi, A. (2011). A disinhibitory microcircuit for associative fear learning in the auditory cortex. Nature 480, 331-335. https://doi.org/10.1038/nature10674.

37. Broussard, G.J., Liang, Y., Fridman, M., Unger, E.K., Meng, G., Xiao, X., Ji, N., Petreanu, L., and Tian, L. (2018). In vivo measurement of afferent activity with axon-specific calcium imaging. Nat. Neurosci. 21, 1272-1280. https://doi.org/10.1038/s41593-018-0211-4.

38. Abs, E., Poorthuis, R.B., Apelblat, D., Muhammad, K., Pardi, M.B., Enke, L., Kushinsky, D., Pu, D.L., Eizinger, M.F., Conzelmann, K.K., et al. (2018). Learning-related plasticity in dendrite-targeting Layer 1 interneurons. Neuron 100, 684-699.e6. https://doi.org/10.1016/j.neuron.2018.09.001.

39. Dolensek, N., Gehrlach, D.A., Klein, A.S., and Gogolla, N. (2020). Facial expressions of emotion states and their neuronal correlates in mice. Science 368, 89-94. https://doi.org/10.1126/science.aaz9468.

40. Cohen, M.R., and Kohn, A. (2011). Measuring and interpreting neuronal correlations. Nat. Neurosci. 14, 811-819. https://doi.org/10.1038/nn.2842.

41. Cunningham, J.P., and Yu, B.M. (2014). Dimensionality reduction for large-scale neural recordings. Nat. Neurosci. 17, 1500-1509. https://doi.org/10.1038/nn.3776.

42. Batista-Brito, R., Zagha, E., Ratliff, J.M., and Vinck, M. (2018). Modulation of cortical circuits by top-down processing and arousal state in health and disease. Curr. Opin. Neurobiol. 52, 172-181. https://doi.org/10.1016/j.conb.2018.06.008.

43. Huang, Y., and Thathiah, A. (2015). Regulation of neuronal communication by G protein-coupled receptors. FEBS Lett. 589, 1607-1619. https://doi.org/10.1016/j.febslet.2015.05.007.

44. Ossowska, K. (2020). Zona incerta as a therapeutic target in Parkinson's disease. J. Neurol. 267, 591-606. https://doi.org/10.1007/s00415-019-09486-8.

45. Fishell, G., and Kepecs, A. (2020). Interneuron types as attractors and controllers. Annu. Rev. Neurosci. 43, 1-30. https://doi.org/10.1146/annurev-neuro-070918-050421.

46. Wester, J.C., and McBain, C.J. (2014). Behavioral state-dependent modulation of distinct interneuron subtypes and consequences for circuit function. Curr. Opin. Neurobiol. 29, 118-125. https://doi.org/10.1016/j.conb.2014.07.007.

47. Urbain, N., and Deschênes, M. (2007). Motor cortex gates vibrissal responses in a thalamocortical projection pathway. Neuron 56, 714-725. https://doi.org/10.1016/j.neuron.2007.10.023.

48. Trageser, J.C., and Keller, A. (2004). Reducing the uncertainty: gating of peripheral inputs by zona incerta. J. Neurosci. 24, 8911-8915. https://doi.org/10.1523/JNEUROSCI.3218-04.2004.

49. Dejean, C., Courtin, J., Karalis, N., Chaudun, F., Wurtz, H., Bienvenu, T.C., and Herry, C. (2016). Prefrontal neuronal assemblies temporally control fear behaviour. Nature 535, 420-424. https://doi.org/10.1038/nature18630.

50. Roelfsema, P.R., and Holtmaat, A. (2018). Control of synaptic plasticity in deep cortical networks. Nat. Rev. Neurosci. 19, 166-180. https://doi.org/10.1038/nrn.2018.6.

51. Schneider, D.M., Sundararajan, J., and Mooney, R. (2018). A cortical filter that learns to suppress the acoustic consequences of movement. Nature 561, 391-395. https://doi.org/10.1038/s41586-018-0520-5.

52. Saunders, A., Oldenburg, I.A., Berezovskii, V.K., Johnson, C.A., Kingery, N.D., Elliott, H.L., Xie, T., Gerfen, C.R., and Sabatini, B.L. (2015). A direct GABAergic output from the basal ganglia to frontal cortex. Nature 521, 85-89. https://doi.org/10.1038/nature14179.

53. Zingg, B., Chou, X.L., Zhang, Z.G., Mesik, L., Liang, F., Tao, H.W., and Zhang, L.I. (2017). AAV-mediated anterograde transsynaptic tagging: mapping corticocollicular input-defined neural pathways for defense behaviors. Neuron 93, 33-47. https://doi.org/10.1016/j.neuron.2016.11.045.

54. Krashes, M.J., Koda, S., Ye, C., Rogan, S.C., Adams, A.C., Cusher, D.S., Maratos-Flier, E., Roth, B.L., and Lowell, B.B. (2011). Rapid, reversible activation of AgRP neurons drives feeding behavior in mice. J. Clin. Invest. 121, 1424-1428. https://doi.org/10.1172/JCI46229.

55. Taniguchi, H., He, M., Wu, P., Kim, S., Paik, R., Sugino, K., Kvitsiani, D., Fu, Y., Lu, J., Lin, Y., et al. (2011). A resource of Cre driver lines for genetic targeting of GABAergic neurons in cerebral cortex. Neuron 71, 995-1013. https://doi.org/10.1016/j.neuron.2011.07.026.

56. Peron, S.P., Freeman, J., Iyer, V., Guo, C., and Svoboda, K. (2015). A cellular resolution map of barrel cortex activity during tactile behavior. Neuron 86, 783-799. https://doi.org/10.1016/j.neuron.2015.03.027.

57. Benavidez, N.L., Bienkowski, M.S., Zhu, M., Garcia, L.H., Fayzullina, M., Gao, L., Bowman, I., Gou, L., Khanjani, N., Cotter, K.R., et al. (2021). Organization of the inputs and outputs of the mouse superior colliculus. Nat. Commun. 12, 4004. https://doi.org/10.1038/s41467-021-24241-2.

58. Lee, J., Wang, W., and Sabatini, B.L. (2020). Anatomically segregated basal ganglia pathways allow parallel behavioral modulation. Nat. Neurosci. 23, 1388-1398. https://doi.org/10.1038/s41593-020-00712-5.

59. Beltramo, R., and Scanziani, M. (2019). A collicular visual cortex: neocortical space for an ancient midbrain visual structure. Science 363, 64-69. https://doi.org/10.1126/science.aau7052.

60. Paxinos, G., and Franklin, K.B. (1997). The Mouse Brain in Stereotaxic Coordinates (Elsevier).

61. Fürth, D., Vaissière, T., Tzortzi, O., Xuan, Y., Märtin, A., Lazaridis, I., Spigolon, G., Fisone, G., Tomer, R., Deisseroth, K., et al. (2018). An interactive framework for whole-brain maps at cellular resolution. Nat. Neurosci. 21, 139-149. https://doi.org/10.1038/s41593-017-0027-7.

62. Meira, T., Leroy, F., Buss, E.W., Oliva, A., Park, J., and Siegelbaum, S.A. (2018). A hippocampal circuit linking dorsal CA2 to ventral CA1 critical for social memory dynamics. Nat. Commun. 9, 4163. https://doi.org/10.1038/s41467-018-06501-w.

63. Morse, A.K., Leung, B.K., Heath, E., Bertran-Gonzalez, J., Pepin, E., Chieng, B.C., Balleine, B.W., and Laurent, V. (2020). Basolateral amygdala drives a GPCR-mediated striatal memory necessary for predictive learning to influence choice. Neuron 106, 855-869.e8. https://doi.org/10.1016/j.neuron.2020.03.007.

64. Ting, J.T., Daigle, T.L., Chen, Q., and Feng, G. (2014). Acute brain slice methods for adult and aging animals: application of targeted patch clamp
analysis and optogenetics. Methods Mol. Biol. 1183, 221-242. https://doi.org/10.1007/978-1-4939-1096-0_14.

65. Petreanu, L., Huber, D., Sobczyk, A., and Svoboda, K. (2007). Channelrhodopsin-2-assisted circuit mapping of long-range callosal projections. Nat. Neurosci. 10, 663-668. https://doi.org/10.1038/nn1891.

66. Ciocchi, S., Herry, C., Grenier, F., Wolff, S.B., Letzkus, J.J., Vlachos, I., Ehrlich, I., Sprengel, R., Deisseroth, K., Stadler, M.B., et al. (2010). Encoding of conditioned fear in central amygdala inhibitory circuits. Nature 468, 277-282. https://doi.org/10.1038/nature09559.

67. Courtin, J., Chaudun, F., Rozeske, R.R., Karalis, N., Gonzalez-Campo, C., Wurtz, H., Abdi, A., Baufreton, J., Bienvenu, T.C., and Herry, C. (2014). Prefrontal parvalbumin interneurons shape neuronal activity to drive fear expression. Nature 505, 92-96. https://doi.org/10.1038/nature12755.

68. Castaño-Díez, D. (2018). Freezing Analysis. GitHub. https://doi.org/10.17617/1.8Q.

69. Kretschmer, F. (2020). EyeTracker. MPCDF Gitlab. https://doi.org/10.17617/1.8M.

70. Silva, B.A., Gross, C.T., and Gräff, J. (2016). The neural circuits of innate fear: detection, integration, action, and memorization. Learn. Mem. 23, 544-555. https://doi.org/10.1101/lm.042812.116.

71. Larsen, R.S., and Waters, J. (2018). Neuromodulatory correlates of pupil dilation. Front. Neural Circuits 12, 21. https://doi.org/10.3389/fncir.2018.00021.

72. Pollack, G.A., Bezek, J.L., Lee, S.H., Scarlata, M.J., Weingast, L.T., and Bergstrom, H.C. (2018). Cued fear memory generalization increases

over time. Learn. Mem. 25, 298-308. https://doi.org/10.1101/lm.047555.118.

73. Kretschmer, F. (2020). PylonRecorder. MPCDF Gitlab. https://doi.org/10.17617/1.8N.

74. Kretschmer, F., and Unzué, D. (2020). AudioGameGUI. MPCDF Gitlab. https://doi.org/10.17617/1.8O.

75. Kretschmer, F., and Castaño-Díez, D. (2020). MotionCorrection. MPCDF Gitlab. https://doi.org/10.17617/1.8P.

76. Harris, C.R., Millman, K.J., van der Walt, S.J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N.J., et al. (2020). Array programming with NumPy. Nature 585, 357-362. https://doi.org/10.1038/s41586-020-2649-2.

77. Virtanen, P., Gommers, R., Oliphant, T.E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., et al. (2020). SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods 17, 261-272. https://doi.org/10.1038/s41592-019-0686-2.

78. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., et al. (2012). Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825-2830.

79. Keijser, J., and Sprekeler, H. (2022). Code for population analyses. https://doi.org/10.5281/zenodo.7377218.

80. Ecker, A.S., Berens, P., Keliris, G.A., Bethge, M., Logothetis, N.K., and Tolias, A.S. (2010). Decorrelated neuronal firing in cortical microcircuits. Science 327, 584-587. https://doi.org/10.1126/science.1179867.
## STAR★METHODS

### KEY RESOURCES TABLE

<table><thead><tr><th>REAGENT or RESOURCE</th><th>SOURCE</th><th>IDENTIFIER</th></tr></thead><tbody><tr><td colspan="3"><strong>Antibodies</strong></td></tr><tr><td>Mouse monoclonal anti-NeuN</td><td>Merck Millipore</td><td>Cat# MAB377; RRID: AB_2298772</td></tr><tr><td>Rabbit polyclonal anti-RFP</td><td>MBL</td><td>Cat# PM005; RRID: AB_591279</td></tr><tr><td>Fab Fragment Goat anti-mouse IgG</td><td>Jackson ImmunoResearch</td><td>Cat# 115-007-003; RRID: AB_2338476</td></tr><tr><td>Goat anti-mouse, Alexa 546</td><td>Thermo Fisher Scientific</td><td>Cat# A-21133; RRID: AB_2535772</td></tr><tr><td>Goat anti-rabbit, Alexa 546</td><td>Thermo Fisher Scientific</td><td>Cat# A-11035; RRID: AB_2534093</td></tr><tr><td colspan="3"><strong>Bacterial and virus strains</strong></td></tr><tr><td>AAV2/5-EF1a-DIO-EYFP-WPRE-hGH</td><td>Penn Vector Core</td><td>Cat# AV-5-27056</td></tr><tr><td>AAV2/1-pEF1a-DIO-FLPo-WPRE-hGHpA</td><td>Zingg et al.<sup>53</sup></td><td>Gift from Li Zhang.<br>Addgene Cat# 87306-AAV1</td></tr><tr><td>AAV2/5-EF1a-fDIO-EYFP-WPRE</td><td>UNC Vector Core</td><td>Cat# AV6154B</td></tr><tr><td>AAV2/5-Ef1a-dflox-hChR2(H134R)-mCherry-WPRE-hGH</td><td>Penn Vector Core</td><td>Cat# AV-5-20297P</td></tr><tr><td>AAV2/5-synP-DIO-sTpEpB</td><td>UNC Vector Core</td><td>Cat# AV6118CD</td></tr><tr><td>pENN-AAV-hSyn-Cre-WPRE-hGH</td><td>Addgene</td><td>Gift from James M. Wilson.<br>Addgene Cat# 105553-AAVrg</td></tr><tr><td>RV-N2C-dG-mCherry-EnvA</td><td>Gift from Dr. Karl-Klaus<br>Conzelmann</td><td>N/A</td></tr><tr><td>AAV2/5-hSyn-DIO-hM4D(Gi)-mCherry</td><td>Krashes et al.<sup>54</sup></td><td>Gift from Bryan Roth.<br>Addgene Cat# 44362-AAV5</td></tr><tr><td>AAV2/5-CamKII0.4-eGFP-WPRE-rBG</td><td>Penn Vector Core</td><td>Cat# AV-5-PV1917</td></tr><tr><td>AAV2/5-hSynapsin1-Flex-axon-GCaMP6s</td><td>Broussard et al.<sup>37</sup></td><td>Gift from Lin Tian.<br>Addgene Cat# 112010-AAV5</td></tr><tr><td>AAV2/9-FLEX-tdTomato</td><td>Addgene</td><td>Gift from Edward Boyden.<br>Addgene Cat# 28306-AAV9</td></tr><tr><td colspan="3"><strong>Chemicals, peptides, and recombinant proteins</strong></td></tr><tr><td>DAPI</td><td>Thermo Fisher Scientific</td><td>Cat# D1306</td></tr><tr><td>Gabazine, 95531 hydrobromide</td><td>Tocris</td><td>Cat# 1262</td></tr><tr><td>Clozapine-N-oxide (CNO)</td><td>Merck</td><td>Cat# C0832</td></tr><tr><td>RNAScope Probe Diluent</td><td>Advanced Cell Diagnostics</td><td>Cat# 300041</td></tr><tr><td>RNAScope Probe EGFP</td><td>Advanced Cell Diagnostics</td><td>Cat# 400281</td></tr><tr><td>RNAScope Probe Mm-Vip-C2</td><td>Advanced Cell Diagnostics</td><td>Cat# 415961-C2</td></tr><tr><td>RNAScope Probe Mm-Camk2a-C2</td><td>Advanced Cell Diagnostics</td><td>Cat# 445231-C2</td></tr><tr><td>RNAScope Probe Mm-Sst-C2</td><td>Advanced Cell Diagnostics</td><td>Cat# 404631-C2</td></tr><tr><td>RNAScope Probe Mm-Pvalb-C3</td><td>Advanced Cell Diagnostics</td><td>Cat# 421931-C3</td></tr><tr><td>RNAScope Probe Mm-Ndnf-C3</td><td>Advanced Cell Diagnostics</td><td>Cat# 447471-C3</td></tr><tr><td>RNAScope Probe Mm-Sst-C3</td><td>Advanced Cell Diagnostics</td><td>Cat# 404631-C3</td></tr><tr><td>CTB-488</td><td>Thermo Fisher Scientific</td><td>Cat# C34775</td></tr><tr><td>CTB-647</td><td>Thermo Fisher Scientific</td><td>Cat# C34778</td></tr><tr><td>FluoroGold, Hydroxystilbamidine bis(methanesulfonate)</td><td>Bio-Techne</td><td>Cat# 6406/10</td></tr><tr><td>Alexa Fluor 488 Hydrazide</td><td>Thermo Fisher Scientific</td><td>Cat# A10436</td></tr><tr><td colspan="3"><strong>Critical commercial assays</strong></td></tr><tr><td>RNAScope Fluorescent Multiplex Kit</td><td>Advanced Cell Diagnostics</td><td>Cat# 320850</td></tr></tbody></table>

(Continued on next page)
Continued

<table><thead><tr><th>REAGENT or RESOURCE</th><th>SOURCE</th><th>IDENTIFIER</th></tr></thead><tbody><tr><td colspan="3">Deposited data</td></tr><tr><td>Source data</td><td>This paper</td><td>https://doi.org/10.5281/zenodo.7389843</td></tr></tbody></table>

Experimental models: Organisms/strains

<table><tr><td>Mouse: C57Bl6/J</td><td>The Jackson Laboratory</td><td>JAX: 000664; RRID: IMSR_JAX:000664</td></tr><tr><td>Mouse: Gad2<sup>tm2 cre</sup>Zjh/J</td><td>The Jackson Laboratory</td><td>JAX: 010802; RRID: IMSR_JAX:010802</td></tr><tr><td>Mouse: Gad2<sup>tm1.1Ksvo</sup></td><td>The Jackson Laboratory</td><td>JAX: 023140; RRID: IMSR_JAX:023140</td></tr></table>

Software and algorithms

<table><tr><td>Fiji</td><td>Fiji</td><td>RRID: SCR_002285; https://imagej.net/Welcome</td></tr><tr><td>MATLAB</td><td>MathWorks</td><td>RRID: SCR_001622; mathworks.com</td></tr><tr><td>Python</td><td>Python Software Foundation</td><td>RRID: SCR_008394; python.org</td></tr><tr><td>pClamp</td><td>Molecular Devices</td><td>RRID: SCR_011323; https://www.moleculardevices.com</td></tr><tr><td>RPvdsEx</td><td>Tucker-Davis Technologies</td><td>https://www.tdt.com/component/rpvdsex/</td></tr><tr><td>Prism</td><td>GraphPad</td><td>RRID: SCR_002798; https://www graphpad com/scientific-software/prism/</td></tr><tr><td>FreezingAnalysis</td><td>Scientific Computing, MPI for Brain Research</td><td>https://doi.org/10.17617/1.8Q</td></tr><tr><td>EyeTracker</td><td>Scientific Computing, MPI for Brain Research</td><td>http://doi.org/10.17617/1.8M</td></tr><tr><td>PylonRecorder</td><td>Scientific Computing, MPI for Brain Research</td><td>http://doi.org/10.17617/1.8N</td></tr><tr><td>AudioGameGUI</td><td>Scientific Computing, MPI for Brain Research</td><td>http://doi.org/10.17617/1.8O</td></tr><tr><td>Motion Correction</td><td>Scientific Computing, MPI for Brain Research</td><td>https://doi.org/10.17617/1.8P</td></tr><tr><td>Computational analysis</td><td>Zenodo</td><td>https://doi.org/10.5281/zenodo.7377218</td></tr></table>

RESOURCE AVAILABILITY

Lead contact

Further information and requests for resources should be directed to and will be fulfilled by the lead contact, Johannes Letzkus (johannes.letzkus@physiologie.uni-freiburg.de).

Materials availability

This study did not generate new unique reagents.

Data and code availability

* Source data have been deposited at zenodo.org and are publicly available as of the date of publication. The DOI is listed in the key resources table.

* All original code has been deposited at GitHub.com, Gitlab.com or Zenodo.org and is publicly available as of the date of publication. DOIs are listed in the key resources table.

* Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.
# EXPERIMENTAL MODEL AND SUBJECT DETAILS

## Animals

All animal procedures were executed in accordance with institutional guidelines and approved by the prescribed authorities (Regierungspräsidium Darmstadt, approval numbers F126/1027 and F126/2000). Adult (>P35) C57Bl6/J mice (JAX stock #000664, The Jackson Laboratory), homozygous GAD2-IRES-Cre mice (Gad2tm2(cre)Zjh/J, JAX stock #010802, The Jackson Laboratory)⁵⁵ and GAD2-T2a-NLS-mCherry mice (Gad2tm1.1Ksvo, JAX stock #023140, The Jackson Laboratory)⁵⁶ were used. Animals were housed under a 12 h light/dark cycle, and provided with food and water *ad libitum*, except for water restriction periods in mice trained for head-fixation (body weight loss <15%). After surgical procedures, mice were individually housed. In behavioral experiments, only male mice were used. Research was conducted following the ARRIVE guidelines.

# METHOD DETAILS

The experiments were not randomized, sample sizes were not determined prior to experimentation, and the investigators were not blinded to allocation during experiments and outcome assessment.

## Surgery

In all cases, mice were anesthetized with isoflurane (induction: 4%, maintenance: 2%) in oxygen-enriched air (Oxymat 3) and fixed in a stereotaxic frame (Kopf Instruments). Body temperature was maintained at 37.5 °C by a feedback controlled heating pad (FHC). Analgesia was provided by local injection of Ropivacain under the scalp (Naropin) and i.p. injection of metamizol (200 mg/kg, Novalgin, Sanofi) and meloxicam (2 mg/kg, Metacam, Boehringer-Ingelheim). For surgeries involving chronic window implantation, buprenorphine (i.p injection, 0.1 mg/kg, cp-pharma) was used instead of metamizol. Adeno-associated viral vectors (AAVs) or retrograde tracers were injected from glass pipettes (P0549, Sigma) connected to a pressure ejection system (PDES-02DE-LA-2, NPI). For ZI, 200 nl of AAV was injected at -1.94 mm posterior and ±1.7 mm lateral from bregma, and -4.15 mm from the cortical surface. We experimentally tested a range of volumes and determined that 200 nl of AAV allows for selective targeting in the ZI in GAD2-IRES-Cre mice for all viruses used using these coordinates. Evidence for selective labeling using this approach is provided in Figures S1F, S1K, S2J, and S3C. For AAV injections in ACx, 500 nl of AAV was injected at -2.54 mm posterior and +4.6 mm lateral from bregma, and -1 mm from cortical surface. For retrograde tracing experiments, 250 nl of CTB-488 (#C34775, Thermo Fisher Scientific), CTB-647 (#C34778, Thermo Fisher Scientific) or 4% FluoroGold (Bio-Techne) were injected in ACx (same coordinates as for AAV), SSCx (-0.23 mm posterior, +4.0 mm lateral from bregma, and -1 mm or 1.4 mm from cortical surface) or VCx (-3.79 mm posterior, +3.2 mm or 3.5 mm lateral from bregma, and -0.3 mm from cortical surface) of GAD2-nuclear-mCherry mice. For AAV experiments, injection was followed by 5 weeks of expression, while for retrograde tracing, there was 1 week between injection and tissue collection. In surgeries for anterograde tracing experiments, GAD2-IRES-Cre mice were injected with AAV2/5-EF1a-DIO-EYFP-WPRE-hGH (Penn) in the ZI. For transsynaptic tagging experiments, GAD2-IRES-Cre mice were injected with AAV2/1-pEF1a-DIO-FLPo-WPRE-hGHpA (Addgene #87306-AAV1) in ZI, and in ipsilateral ACx with AAV2/5-EF1a-fDIO-EYFP-WPRE (UNC). For acute slice experiments, GAD2-IRES-Cre mice were injected with AAV2/5-Ef1a-dflox-hChR2(H134R)-mCherry-WPRE-hGH (Penn) in ZI. For rabies tracing, WT mice were first injected in the ZI with AAV2/5-synP-DIO-sTpEpB (UNC), and in ACx with pENN-AAV-hSyn-Cre-WPRE-hGH (Addgene, #105553-AAVrg) in an AAvrg backbone, and 6 weeks after expression, in ZI with RV-N2C-dG-mCherry-EnvA (kindly provided by Karl-Klaus Conzelmann). For chemogenetics experiments, GAD2-IRES-Cre mice were injected bilaterally with AAV2/5-hSyn-DIO-hM4D(Gi)-mCherry (Addgene, #44362-AAV5) in ZI. For the corresponding control group, either C57BL/6J or GAD2-IRES-Cre mice were injected bilaterally with AAV2/5-CamKII0.4-eGFP-WPRE-rBG (Penn) or AAV2/5-EF1a-DIO-EYFP-WPRE-hGH (Penn), respectively, in ZI. For both experimental and control animals, bilateral cannulae (Bilaney, #C315G/Spc, #C315I/Spc and #C315DC/Spc) were then implanted over ACx (-0.7 mm from cortical surface). For dye infusion experiments, bilateral cannulae were implanted over ACx of WT animals. In surgeries for calcium imaging experiments, GAD2-IRES-Cre mice were injected in the ZI with a 5:1 mix of AAV2/5-hSynapsin1-Flex-axon-GCaMP6s (Addgene, #112010-AAV5) and AAV2/9-FLEX-tdTomato (Addgene, #28306-AAV9). For chronic window implantation, a craniotomy was performed over ACx with a biopsy punch (Integra Miltex), and covered by a custom made window (a round cover glass glued with Norland optical adhesive #81 to a section of hypodermic tubing of outer diameter 3 mm). The window and a custom-made titanium head plate were fixed using Cyanoacrylate glue (Ultra Gel, Henkel) and dental cement (Paladur, Heraeus). The glass window was protected with silicone (Kwik-Cast). Calcium imaging was performed >5 weeks after surgery.

## Transsynaptic tagging with fluorescent in situ hybridization (FISH)

GAD2-IRES-Cre mice were injected with AAV2/1-pEF1a-DIO-FLPo-WPRE-hGHpA (Addgene #87306-AAV1) in ZI, and in ipsilateral ACx with AAV2/5-EF1a-fDIO-EYFP-WPRE (UNC). 6 weeks post-injection, mice were anesthetized with isoflurane, sacrificed and the brains were then dissected, embedded in Tissue-Tek O.C.T. compound (Sakura) and frozen in isopentane at -55 to -60°C. 16 µm-thick sections from these fresh frozen brains were prepared using a cryostat (Leica) and mounted on SuperFrost Plus microscope slides (Thermo Scientific). Sections were screened for fluorescence in auditory cortex (Zeiss Axio Zoom) and then stored at -80°C until FISH was performed using the RNAscope Fluorescent Multiplex Reagent Kit (#320850, Advanced Cell Diagnostics). Heating
<figure><img src="image_35.png" /></figure>

steps were performed using the HybEZTM oven (Advanced Cell Diagnostics). Tissue sections were treated with pretreatment solutions and then incubated with RNAscope probes (EGFP (which also labels EYFP), #400281; Mm-Camk2a-C2, #445231-C2; Mm-Vip-C2, # 415961-C2; Mm-Sst-C2, #404631-C2; Mm-Sst-C3, #404631-C3; Mm-Ndnf-C3, #447471-C3; Mm-Pvalb-C3, #421931-C3), followed by amplifying hybridization processes. DAPI was used as a nuclear stain. Prolong Gold Antifade (Thermo Scientific) was used to mount slides. Images were acquired on a confocal microscope (Zeiss LSM 880). EYFP-expressing cells, their distance from the pia and overlap with markers were quantified using a custom written MATLAB (MathWorks) script. Although the EGFP (anti-sense) probe labeled both mRNA and viral DNA, resulting in sparse puncta throughout the site of AAV2/5-EF1a-fDIO-EYFP-WPRE injection in ACx, cells that expressed mRNA (made possible via FLPo recombination) could be clearly distinguished from those that did not based on the intensity of expression (see Figure S1P). Anterograde transsynaptic tracing using AAV1 has been employed in a number of brain areas from both glutamatergic and GABAergic afferents to both excitatory and inhibitory targets.²⁷,²⁸,⁵³⁻⁵⁹ The approach depends on high viral titers and signal amplification via DNA recombinases.²⁷,²⁸,⁵³ Although the precise molecular mechanisms are not fully understood, the available evidence indicates that AAV1 is trafficked down the axon, is not released from fibers of passage, and that transneuronal spread is strongly dependent on synaptic transmitter release.²⁷,⁵³ The efficacy of transsynaptic spread was estimated to be roughly equal for excitatory and inhibitory afferents and excitatory and inhibitory postsynaptic targets.²⁷ This method recapitulates established connectivity patterns,²⁷ and AAV1 labeled neurons are more likely to receive functional synaptic input from the afferents in question than their unlabeled neighbors.²⁷,²⁸ While AAV1 can also spread retrogradely along axons, this caveat does not apply to the data presented here since we identify overwhelmingly post-synaptic INs which do not extend their axons to long-range targets. These results indicate that the differences in neuronal labeling we observe using this technique are highly likely to derive from differences in synaptic connectivity. While our results therefore indicate which neuronal cell-types receive preferential innervation by ZI projections, we note that the proportion of connected neurons identified for each cell-type is likely influenced by the difference in their respective density in ACx.³⁸

## Histology

Mice were anesthetized i.p. with 300 mg/kg ketamine and 20 mg/kg xylazine (WDT) and transcardially perfused with 4% paraformaldehyde (PFA) in PBS. Brains were post-fixed overnight in 4% PFA at 4 °C and then stored in PBS. Coronal sections (60-100 µm thick) were cut using a Leica vibratome (VT1000S) and washed in PBS. Vibratome sections were permeabilized with 0.5% triton (Sigma) and then blocked in PBS-0.2% gelatin with 10% normal goat serum (Sigma), 0.2 M glycine and 0.5% triton either overnight at 4 °C or at room temperature for 4 h. In cases where mouse primary antibodies would be used, 1:50 goat anti-mouse IgG antigen-binding fragments were included in the blocking solution (Jackson ImmunoResearch). Sections were incubated with primary antibodies in PBS-0.2% gelatin with 5% normal goat serum and 0.5% triton for 72 h at 4 °C. Primary antibodies used were the following: mouse anti-NeuN (1:500, RRID: AB_2298772, Merck Millipore) or rabbit anti-RFP (1:500, RRID: AB_591279, MBL). Sections were then washed in PBS with 0.5% triton and incubated, either overnight at 4 °C or at room temperature for 4 h, with fluorophore-conjugated secondary antibodies (1:1000, goat, Thermo Fisher Scientific) in PBS-0.2% gelatin with 5% normal goat serum and 0.5% triton. DAPI was used as a nuclear stain (5nM in PBS). Sections were mounted in Mowiol 4-88 (Polysciences) and imaged on a Zeiss confocal microscope (LSM 880). Brain regions were assigned using the Paxinos and Franklin's mouse brain atlas.⁶⁰ For ZI axon quantifications in cortex, A1 and AuV were defined as regions in 500 µm blocks moving medially along the pia away from the rhinal fissure. L1 depth was calculated separately for both regions based on the DAPI signal. L1/L2 border was defined as the last bin before the DAPI fluorescence intensity (bin size 10 µm, as a function of depth from the pia) exceeded 1 standard deviation above the average of the first 80 µm for 2 consecutive bins. For retrograde labeling quantifications, ZI was identifiable from GAD2-nuclear-mCherry labeling. Labeled cells and overlap with mCherry signal were quantified manually from sections spanning the full anteroposterior extent of the ZI (from bregma, ~-1.22 until ~-2.92 mm). For rabies tracing, mice were sacrificed 7 days post-RV injection. Perfused brains were cut in 60 µm coronal sections and counterstained with DAPI (30 min in 0.5 mg/ml, D1306, Thermo Fisher Scientific). To quantify the cell number per animal, every third section of the entire brain was scanned using Zen software (Zeiss) and cells were counted using a custom written MATLAB (MathWorks) script. To define the cell numbers in different brain regions, images were registered to the Allen Brain Atlas.⁶¹ Only brain regions that revealed presynaptic cells in all mice are reported. Mice which had starter cells outside of the ZI were excluded from analysis. For dye infusion experiments, animals were briefly anesthetized with isoflurane and 200nl of 1 mM Alexa Fluor 488 Hydrazide (#A10436, Thermo Fischer Scientific) was infused bilaterally via implanted cannulae in ACx using a Hamilton syringe (10 µl, 701N, Merck) and Nanoject stereotaxic syringe pump (Chemyx).⁶²,⁶³ A high concentration of dye was required for these experiments to be able to visualize it in tissue sections. 15 min after recovery, animals were perfused and the brains were cut in 150 µm coronal sections. Sections were then imaged on a Leica fluorescence microscope (DFC7000 GT) and fluorescence intensity was quantified using Fiji. The following histological images are compounds obtained by 'stitching' of different fields-of-view: Figures 1G, 1H,3B, and 3C; Figures S1B, S1C, S1F, S1G, S1H, S1K, S1P, S1W, S1X, S2F, S2H, S2I, S2J, S2M, and S3C.

## Acute brain slice recordings with optogenetics

35-40 days after virus injection, mice were anesthetized with isoflurane (5%) and decapitated into ice cold slicing solution containing (in mM): 93 NMDG, 2.5 KCl, 1.2 $NaH_2PO_4$, 30 $NaHCO_3$, 20 HEPES, 25 glucose, 5 sodium ascorbate, 2 thiourea, 3 sodium pyruvate, 10 $MgSO_4$ and 0.5 $CaCl_2$ (titrated to pH 7.3-7.4 with HCl 1 M, 310 mOsm). Coronal slices (350 µm thick) were prepared on a vibratome
(Leica VT 1200S) and incubated in slicing solution at 33 °C for 15 minutes.⁶⁴ Before the start of recordings, slices were incubated >45 minutes at room temperature in standard ACSF containing (in mM): 125 NaCl, 3 KCl, 1.25 NaH₂PO₄, 26 NaHCO₃, 10 glucose, 1 MgCl₂ and 2 CaCl₂ (310 mOsm). Solutions were continuously bubbled with carbogen gas (95% O₂, 5% CO₂). Slice recordings were performed at 31-34 °C. Cells were visualized using differential interference contrast microscopy (Scientifica slice scope), a water immersion objective (40x, 0.8 N.A., Olympus LUMPLFLN) and a CCD camera (Hamamatsu C11440 ORCA-flash4.0). Fluorophore excitation was performed with LEDs through the objective (Cool LED). Whole-cell recordings were performed with a Multiclamp 700B amplifier (Axon Instruments), low-pass filtered at 3 kHz and digitized at 20 kHz (Digidata 1550 and pClamp software, Molecular Devices). Series resistance compensation was set at 80%. Patch pipettes (4-6 MΩ) were pulled from borosilicate capillaries with filaments and filled with intracellular solution (in mM): 140 K-gluconate, 10 KCl, 10 HEPES, 4 Na-phosphocreatine, 4 ATP-Mg, 0.4 GTP (pH 7.3, 290 mOsm). For ChR2-assisted circuit mapping,⁶⁵ optogenetic stimulation of ZI axons was applied to superficial cortical layers using a 488 nm LED at 66.8 mW/mm² irradiance. Inhibitory postsynaptic currents in response to a 5 ms light pulse were recorded in neurons clamped at 0 mV. In some experiments, SR 95531 hydrobromide (10 µM, Tocris) was applied to block GABA<sub>A</sub>-R-mediated currents. L1 neurons and L2/3 pyramidal neurons were identified based on soma location and morphology. We note that these recordings were performed from neuron types that can be identified in acute slices in an unbiased fashion based exclusively on morphology and soma location.

## Discriminative threat conditioning paradigm (DTC) in freely-behaving animals with chemogenetics

Freely-behaving DTC experiments consisted of 3 sessions, each separated by 24 hrs. In each session, mice were presented with 2 sounds (conditioned stimuli, CS), which consisted of trains of 500 ms frequency-modulated (FM) sweeps (logarithmically modulated between 5-15 kHz in the upwards direction, or between 20-10 kHz in the downwards direction, with 50 ms rise/fall) delivered at 1 Hz at 75 decibel (dB) sound pressure level (SPL) at the speaker (designed in RPvdsEx, processed by RZ6 and delivered by MF1 speakers, Tucker-Davis Technologies). All sessions took place in freely-behaving contexts. In session 1 (habituation) and in session 3 (memory recall), sounds were presented alone. In session 2 (acquisition), the CS+ co-terminated with a mild foot-shock (unconditioned stimulus, US), while the CS- did not. To induce local silencing of hM4D(Gi)-expressing (in control animals, EGFP/EYFP-expressing) axons prior to the conditioning session, animals were briefly anesthetized with isoflurane and 200nl of 3 µM clozapine-N-oxide (CNO, #C0832, Merck)³⁵ was infused bilaterally via implanted cannulae in ACx using a Hamilton syringe (10 µl, 701N, Merck) and Nanoject stereotaxic syringe pump (Chemyx).⁶²,⁶³ 15-30 min after recovery, animals were placed in the conditioning chamber and the session began. Up-FM-sweeps and down-FM-sweeps were used as CS+ and CS- in a counterbalanced fashion between animals. In habituation, CS+ and CS- FM-sweep trains lasting 30 s were presented in an interleaved fashion, 4 times each, starting with the CS+. In conditioning, CS+ and CS- FM-sweep trains lasting 10 s were presented in an interleaved fashion, 15 times each, starting with the CS+, with pseudorandom inter-trial intervals (ITIs) between 20 s and 180 s. The onset of the last FM-sweep of each CS+ coincided with the onset of a foot-shock US, delivered via the floor (1 s, 0.6 mA AC, Coulbourn Precision Animal Shocker, Coulbourn Instruments). Habituation took place in the conditioning context, while cued (auditory) memory recall was performed in a new context. The contexts were cleaned before and after each session with 70% ethanol and 0.2% acetic acid, respectively. In recall, the CS- was presented 4 times followed by 4 presentations of the CS+, both lasting 30 s each and presented at pseudorandom time intervals. This is a standard paradigm design for research on threat memory.²²,³⁶,³⁸,⁶⁶,⁶⁷ As a measure of associative threat memory, freezing behavior was recorded using a webcam (HD C270, Logitech) and scored using a custom written MATLAB script.²²,³⁸,⁶⁸ Mice were considered to be freezing if no movement was detected for 2 s, and the measure was expressed as a percentage of time spent freezing. For cued memory recall, habituation and conditioning (Figures 4C and S2Q), freezing was quantified in 30 s intervals, starting at the onset of every CS. Baseline freezing was calculated during 30 s intervals randomly sampled in the first 3 minutes of each session, before any CS was presented. Discrimination index was calculated as CS+ freezing/(CS- freezing + CS+ freezing). For contextual memory recall, mice were placed in the conditioning context for 5 min, and freezing was quantified throughout the whole session.

## Discriminative threat conditioning (DTC) paradigm in head-fixation

Head-fixed DTC experiments consisted of 3 sessions, each separated by 24 hrs. In each session, mice were presented with 2 sounds (CS), which consisted of trains of 500 ms FM sweeps (logarithmically modulated between 5-15 kHz in the upwards direction, or between 20-10 kHz in the downwards direction, with 50 ms rise/fall) delivered at 1 Hz at 75 dB SPL at the speaker (designed in RPvdsEx, processed by RZ6 and delivered by MF1 speakers, Tucker-Davis Technologies). All sessions took place in head-fixation under the microscope. In all sessions, FM-sweep trains lasting 10 s were presented in an alternating fashion, 15 times each, with 70s inter-trial intervals (plus random interruptions required to adjust the microscope). In session 1 (habituation) and in session 3 (memory recall), sounds were presented alone. In session 2 (acquisition), the CS+ co-terminated with a mild tail-shock (unconditioned stimulus, US; 1 s, 0.4 mA, 10 Hz; delivered with ISO-STIM 01D (NPI Electronic), using Pulse Pal v2 (Sanworks) as a pulse train generator), while the other (CS-) did not. Shocks were applied to the tail using adhesive electrode tabs (#TER-MXT-1334, TerniMed) which were cut in half length-wise, and then placed approximately 1 cm apart at the center of the tail.³⁹ A lightweight, isolated cable with crocodile clamps connected the electrodes to the ISO-STIM 01D box. In sessions 1 and 3, the CS- was presented first, while in session 2, the CS+ was presented first. Up-FM-sweeps and down-FM-sweeps were used as CS+ and CS- in a counterbalanced fashion between animals. In all sessions, eye pupil diameter was recorded under infrared illumination (620 nm LED) at 16 Hz (Basler acA1920-25um camera) using
custom-written software⁶⁹ to assess associative threat memory to the CS- and CS+. Pupil dilation in response to the CSs was calculated as the integral of ΔD/D₀ in a 15 s time window for habituation and recall, where D₀ is the mean pupil diameter within 2 s before sound-train onset and ΔD=D(t)-D₀, where D(t) is the diameter at time t. In the acquisition session, we used a 9.5 s time window since the tail-shock caused a rapid constriction of the pupil.⁷⁰,⁷¹ Pupil dilation in response to the shock was calculated the same way as for the CSs, but in a 7.5 s time window starting 3.5 s after the shock ended. To account for the different time windows between sessions, values were normalized to a time interval of 1 s. Discrimination index was calculated as CS+/(CS+ CS+).⁷² In habituation and acquisition, mice were head-fixed in a body tube made of plastic and lined with electrical insulating tape, and a plastic dish filled with 70% ethanol was placed inside the microscope chamber. In order to change the behavioral context during recall, a body tube made of metal was used, and a plastic dish filled with 0.2% acetic acid was placed inside the microscope chamber. Pseudoconditioning (PC) was conducted like DTC except that during acquisition, CSs and USs were presented in an explicitly unpaired fashion (15 presentations each for CS1, CS2 and shock). In this case, none of the CSs elicited any associative memory, and they were therefore pooled for analysis.⁷,²²,³⁸ Note that the only difference between the CS+, CS- and CS1/2 is the level of threat memory they evoke, since the experiments occur under otherwise identical conditions (i.e. up- and down-sweeps used in a counterbalanced fashion between animals for the CSs, with mice being randomly assigned to DTC or PC groups). For this reason we plot these CSs together in our correlation plots (Figures 6M, 6N, S6B, S6D, and S6E–S6H) in order to illustrate the neuronal representation of the level of threat memory regardless of the stimulus that evokes it.

In vivo calcium imaging and noise-train stimulation

Secondary auditory cortex (AuV) was localized with intrinsic imaging under 1% isoflurane anesthesia as in previous work.⁷,²²,³⁸ AuV was selected as a focus for these experiments since it is critical for FM-sweep threat memory.⁷,²²,³⁸ In addition, technical limitations preclude imaging of the more temporal area TeA due to steric hindrance by the base of the zygomatic bone and the presence of the rhinal vein. Mice were water restricted and water delivery was used to facilitate habituation to handling and head-fixation on 6 consecutive days (4 days in the recording setup). Water was administered *ad libitum* before the experiments in head-fixation. Calcium imaging was performed with a resonant scanning microscope (Bruker Investigator). The femtosecond laser (Spectra Physics InSight) was tuned to 920 nm to excite axonGCaMP6s and tdTomato at an average excitation power under the objective (Nikon 16x, 0.8 N.A., 3 mm WD) of 20-25 mW. Images (512x512 pixels, 140x140 to 166x166 µm²) were acquired at 30 Hz in L1. Image acquisition, sound delivery and the camera for pupil tracking were controlled using custom written software.⁷,³⁴ For image analysis, acquired time series were first corrected for motion, taking tdTomato images as a reference and using a custom MATLAB code⁷⁵ where data was temporally binned every 2 frames. Based on the average response in the red channel (tdTomato) to the CS+ in conditioning trials, or to the tail-shock alone in pseudoconditioning trials, a window of exclusion surrounding the tail shock delivery was defined to account for the fact that some boutons could not be motion corrected during this period (exclusion window from 1 s before, until 3.5 s after shock delivery, see Figure S5A). Regions of interest (ROIs) were selected in Fiji from the axonGCaMP6s fluorescence time average of the entire session. The following pipeline in Fiji allowed selection of both small and large boutons in a semi-automated way (Figure S3L): first, the average axonGCaMP6s fluorescence image was filtered (maximum filter, 1 pixel radius); the resulting image was thresholded with the IsoData algorithm, keeping the ~5% highest intensity pixels; the resulting binary image was segmented with the watershed command; ROIs were obtained by applying the particle analysis, excluding particles on edges. Finally, ROIs were corrected manually in cases where more than 1 bouton was included inside an ROI, or in cases where ROIs delineated an axon segment without any bouton. Small boutons missed by the thresholding were also added manually. To superimpose frames from all sessions, axonGCaMP6s images were first translated and cropped in Fiji. ROIs were then obtained for each session independently (Figure S3M). ROI sets from all three sessions were overlaid, and overlaying ROIs were assigned as paired boutons (Figure S3N). Only paired boutons were used in the analysis. Average GCaMP6 fluorescence was measured for each ROI and frame, and data was subsequently analyzed in MATLAB. ROIs that displayed flat fluorescent traces without any calcium transients in the entire session were discarded. Traces were normalized either as ΔF/F₀ or as z-score=ΔF/σ, where ΔF= F(t)-F₀, with F(t) being the fluorescence at a given time t, and F₀ and σ the mean fluorescence before sound-train in each trial and its standard deviation, respectively. Boutons were considered sound responsive if they displayed significant activity that started no later than 10 s after sound-train onset (averaged z-score ≥ 1.96 or ≤ -1.645). Responses during FM-sweep sound-train were measured as the integral of ΔF/F₀ from sound-train onset to the end of the sound train (10 s sound-trains), except for conditioning, where only the first 9 s were measured to exclude shock-related motion artefacts or responses (Figure S5A). To account for the different time windows between sessions, values were normalized to a time interval of 1 s. Responses following shock delivery in conditioning or pseudoconditioning sessions were measured as the integral of ΔF/F₀ starting from 3.5 s after shock delivery, and then for 5 s. DTC boutons were segregated into two paired populations across sessions based on whether their mean CS response (ΔF/F₀\*s) in recall was above (‘positive response in recall’, PR boutons) or below (‘negative response in recall’, NR boutons) zero. Latency to response peak was calculated as the time from CS onset to the global response peak within 9 s for all 3 DTC sessions, in consideration of the shock during the conditioning session. For correlation with memory strength, we compared pupil and bouton response in habituation or recall for each mouse and stimulus (CS+, CS-, CS1/2). This was done independently for PR and NR boutons, and additionally the absolute value of these changes were added together to obtain the ‘absolute bouton response’. Viral targeting allows for efficient labeling of GAD2+ neurons with axonGCaMP6s and tdTomato throughout the mediolateral axis of the ZI (Figure S3C), making it unlikely that response plasticity could be influenced by bias or inter-individual differences in labeling. In sound intensity experiments, trains of
5 pulses of white noise (100 ms duration each, 10 ms rise/fall) were delivered at 5 Hz, at 60 dB, 75dB, 90 dB and 105 dB SPL (measured at the speaker) in pseudorandom order.

## Stimulus information in individual boutons

All computational analyses were performed in Python, using the NumPy,⁷⁶ SciPy,⁷⁷ and Scikit-learn⁷⁸ libraries. The amount of stimulus-specific information in the response of individual boutons was quantified using the sensitivity index, defined as:

$$d' = \frac{|\mu_{CS+} - \mu_{CS-}|}{\sqrt{(\sigma_{CS+}^2 + \sigma_{CS-}^2)/2}}$$

Here $\mu_{CS+}$ and $\mu_{CS-}$ are a bouton's mean response during the CS+ and CS- presentation, averaged over the duration of the stimulus and all trials in which the stimulus was presented. $\sigma_{CS+}$ and $\sigma_{CS-}$ denote the standard deviations of the responses across trials, after averaging across the stimulus window for each trial.

## Decoding from populations of boutons

To assess how much stimulus information is present on the population level, we trained linear decoders to predict stimulus identity from synaptic activity.⁷⁹ For each trial, we collected the time-varying population response during stimulus presentation, binned in time windows of 1 s. We excluded the last (shock) bin. Each stimulus was presented 15 times for 10 s, yielding 9 time bins for each of the 2x15 trials. We decoded the stimuli using L2-regularized logistic regression, using leave-two-trials out cross-validation to avoid overfitting and balance the number of training samples per stimulus. The remaining 28x9 training samples were randomly divided into 10 cross-validation folds, which were used to determine the regularization strength of logistic regression. The candidate regularization strengths were 10 values, equally spaced on a logarithmic scale between 1e-4 and 1e4 (the Scikit-learn default). These values determine the inverse regularization strength, such that smaller values correspond to stronger regularization. For optimal regularizing strength, we tested the classifier on the 2 left-out trials, repeating this cross-validation procedure by leaving out all pairs of consecutive trials (1x CS+, 1x CS- each):

$$\{(1, 2), \{3, 4\}, \dots, \{29, 30\}\}$$

The average accuracy (% of time frames correct) over all of these test trials is reported. To estimate chance level performance, we repeatedly trained classifiers after randomly permuting the stimulus labels of individual trials 1000 times. After each permutation, we ensured that both the training set and the test set consist of 50% of CS+ trials and 50% CS- trials. Decoders were trained on data from individual mice and on pooled data, for which we concatenated the responses from all mice for corresponding trials in the protocol. For the pooled data, we first used principal component analysis (PCA) to reduce the dimensionality of the data from the total number of boutons down to 200 dimensions, preserving approximately 90% of the variance. This sped up the analyses without qualitatively changing the results. We did not reduce the dimensionality before decoding from individual animals. To test if the higher decoding accuracy after conditioning compared to pseudoconditioning was due to a larger number of recorded boutons, we subsampled boutons from the conditioned mice. Specifically, decoders were trained on 100 random subsets of 535 boutons from conditioned mice, since this was the total number of boutons from all mice in our pseudoconditioning dataset. To assess whether differences in decoding accuracy were significant, bootstrapping was used to estimate the sampling distribution of the decoding accuracy. Specifically, we trained decoders on 1000 resamples (with replacement) of all boutons.

## Dynamics of population vectors over learning

To assess how stimulus-evoked population activity changes over the course of learning, we computed angles between population vectors at different moments in time and for different stimulus conditions.⁷⁹ The change from habituation to recall was quantified as the 'learning angle' between the mean population vectors for each session. The mean vectors were computed as the average population response, averaged across all trials and stimulus bins (again excluding the shock window), for each stimulus separately. The dynamics of the population vector during acquisition was quantified by the angle between the average population vector during habituation (or recall) and the single-trial population vectors during acquisition. The single-trial vectors were computed as the time-averaged response during stimulus presentation. To assess whether the differences in the population vector from one day to the next (i.e., between habituation and the beginning of acquisition, and the end of acquisition and recall) are due to trial-to-trial fluctuations or due to representational changes, we quantified the trial-to-trial variability during habituation and recall. To this end, we computed the average of the angle between the mean population vector during habituation (or recall) and the single-trial habituation (recall) vectors. To avoid underestimating trial-to-trial variability, we computed the angle between the population vector of trial t and the average vector from all trials other than trial t.

## Response variability and correlations across boutons

We observed that conditioning generated both positive and negative stimulus responses, thereby increasing the response variability across boutons. To quantify this effect, we computed the standard deviation across boutons of their trial-averaged responses, for each moment during stimulus presentation and for each mouse.⁷⁹ We also analyzed the correlation structure of trial variability, by
computing noise correlations between all pairs of simultaneously imaged boutons. To this end, we first computed the time-averaged response for each bouton and trial, before computing Pearson correlation coefficients. Correlation coefficients were then pooled across mice. We left out the first two trials, since the initial stimulus response on those trials led to unusually high noise correlations (of almost 1) for many boutons. Please note that, in part due to the relatively low number of trials per stimulus per session (n = 15), noise correlation distributions observed for our data are wider than those which have been observed in previous studies which used 100s instead of 10s of trials.⁸⁰

QUANTIFICATION AND STATISTICAL ANALYSIS

This was performed using GraphPad Prism and MATLAB. Data were considered normally distributed if Shapiro-Wilk, D'Agostino & Pearson and KS tests were passed. According to this result, and depending on whether data was paired or not, comparisons were performed using the following parametric or non-parametric tests: For two-group comparisons, 2-tailed t-test (normal distribution, non-paired), 2-tailed paired t-test (normal distribution, paired), 2-tailed Mann-Whitney test (non-normal distribution, non-paired) and 2-tailed Wilcoxon test (non-normal distribution, paired). For three-group comparisons, One-way ANOVA (normal distribution, non-paired) or One-way repeated measures (RM) ANOVA (normal distribution, paired) followed by Tukey's multiple comparisons test, and Kruskal-Wallis test (non-normal distribution, non-paired) or Friedman test (non-normal distribution, paired) followed by Dunn's multiple comparisons test. Two-way RM ANOVA followed by Sidak's and Tukey's multiple comparisons tests were used to compare groups across more than one factor. Correlations were computed as Pearson coefficients. Statistical tests used in each instance are indicated in the figure legends, and full details on all results in the study are provided in the supplementary materials. Results are reported as: n.s. (not significant) p>0.05, * p<0.05, ** p<0.01, *** p<0.001, **** p<0.0001.