Main

The reorganization of neural circuits during learning relies on a complex interplay between excitatory and inhibitory signals in the brain, accompanying highly specific synaptic modification. Various synaptic changes contributing to this interplay have been observed at the scale of individual cells and whole circuits. The observed formation and elimination of dendritic spines in cortical pyramidal neurons (PyNs) during learning suggests that learning is associated with changes in neuronal connectivity1,2,3,4. At the circuit level, neuronal activity is synchronized in a subpopulation of neurons, resulting in a high correlation between neuronal activity patterns and learned behaviors3,5,6. GABAergic inhibition plays a critical role in shaping learning-dependent circuit changes. Interneurons are categorized by anatomical and electrophysiological features, with genetically defined subtypes such as parvalbumin (PV)-expressing, somatostatin (SOM)-expressing and vasoactive intestinal polypeptide (VIP)-expressing neurons, demonstrating distinct functions during learning7,8,9,10,11. However, these subtypes still contain a remarkable degree of heterogeneity, such that the precise role of each interneuron type in mediating inhibition has yet to be determined.

The ChC (that is, ‘axo-axonic cell’) is a bona fide GABAergic interneuron subclass with distinct axonal geometry, subcellular synapse connectivity and fast-spiking electrophysiological properties12,13. A single ChC exhibits a characteristic axonal geometry with many prominent vertical branches, which contain strings of synaptic boutons exclusively aligned along the axon-initial segments (AISs) of neighboring PyNs. Because the AIS is the site of action potential initiation, ChCs can have decisive control over spike generation in an ensemble of PyNs, thereby regulating network synchrony and oscillations. These functions are thought to be critical for higher-order cognitive processes, such as working memory14,15,16. In this study, using a transgenic mouse line specifically engineered to target ChCs, we examined the role of ChCs in sculpting cortical circuits involved in motor learning. We discovered that the ChC is essential for improving the direction-tuning of targeted cells by suppressing irrelevant activity at the population level. ChCs shaped this sophisticated inhibitory motif among a specific set of neuron types. Thus, ChCs primarily take a ‘select and focus’ strategy rather than serve as a uniform gain setter.

Results

Improved directional control of movement

Previous studies showed that ChCs increased activity during locomotion17,18. The premotor cortex (M2, anteromedial agranular cortex, homologous to supplementary motor areas in the primate brain) is involved in gating sensory inputs and motor outputs for movement planning, fine action control and decision-making19,20,21. To investigate the role of ChCs in controlling the activity of M2 neurons during locomotion, we used a spatial navigation task that requires goal-directed motor control22. Mice were trained to traverse a multi-textured ball maze with four distinctive tactile surface cues and to reach a goal spot on the ball, where a water reward was given (Fig. 1a, Supplementary Movie 1 and Methods). The task required directional motor control accurately aimed to the goal spot. While animals were navigating the ball maze, we recorded neuronal activity of the L2/3 premotor population using Ca2+ imaging via two-photon microscopy. Mice with water restriction (experimental group) showed reward-seeking behavior on the ball maze, developed a preferred pathway and generated goal-oriented locomotion with learning, whereas mice with ad libitum water (control group) did not (Fig. 1b). The number of successfully reaching the goal spot increased in the experimental group but not in the control group (Fig. 1e). Time spent in the goal (rewarded) quadrant (Q1) increased with training (Fig. 1f). We further examined the relationship between motor control and reward-seeking behavioral performance by analyzing the parameters of motor control. To examine whether general movement parameters, such as speed and acceleration, could be the main cause for these improvements, we compared the motor control between experimental and control conditions. The movement of the control group showed similar general motor parameters (for example, speed and acceleration) to the experimental group (Fig. 1c,d). Overall latency to the reward decreased with training, indicating the increased effectiveness of the animals’ movements at achieving rewards (Fig. 1g). We observed that mice showed increased proximity to the goal with learning, by tuning their movement to the goal (Fig. 1h). The movement accuracy as the percentage of goal-aimed movements increased with training (Fig. 1i), indicating that the enhanced movement direction (MD) controls toward the goal spot. Mice in the experimental group showed better control in turning toward the goal during navigation than the control (Fig. 1j,k). These results indicate that the directional control of movement is improved with learning.

Fig. 1: Improved directional control of movement with learning.
figure 1

a, Schematic of the spatial navigation task on a multi-textured floating ball maze, in which head-fixed mice freely navigate toward a goal spot in the target quadrant (Q1) based on tactile cues. Two-photon calcium imaging was simultaneously performed in layer 2/3 of premotor cortex (M2). b, Representative movement trace (100 s) of mice in the experimental (water restricted) and control (water ad libitum) groups from training sessions 1 to 7 (left) and their two-dimensional projection (right). A circle with a dashed line indicates the goal spot on the ball. Heat map and contour lines of the times of mice spent on the location are presented. c, Average movement speed (n = 27 mice for the experimental group; n = 14 mice for the control group; two-way repeated-measures ANOVA, Fgroup = 3.85, P = 0.072). d, Average movement acceleration (two-way repeated-measures ANOVA, Fgroup = 154, P = 0.24). e, Average number of successes obtained in training sessions (two-way repeated-measures ANOVA, Fgroup = 26.97, P = 1.73 × 10−4). f, Percentage of time spent in each quadrant during navigation in the experimental group. g, Average latency to reward (two-way repeated-measures ANOVA, Fgroup = 7.43, P = 0.017). h, Average goal proximity (two-tailed t-test, t = −5.19, P = 1.03 × 10−6 for the experimental group; t = 1.15, P = 0.26 for the control group). i, Movement accuracy (two-tailed t-test, t = −7.04, P = 2.01 × 10−10 for the experimental group; t = 1.74, P = 0.09 for the control group). j, Cumulative turning angle over time in sessions 1 and 7. k, Comparison of cumulative turning angle between the experimental and control groups (two-tailed t-test, t = −5.84, P = 5.76 × 10−8 for the experimental group; t = 0.019, P = 0.98 for the control group). NS, not significant; *P < 0.05; ***P < 0.001; error bars indicate s.e.m. In the box plot, the midline, box size and whisker indicate median, 25th–75th percentile and 10th–90th percentile, respectively. Exp, experimental; CW, clockwise; CCW, counterclockwise; a.u., arbitrary units.

Source data

Motor learning refines direction coding

To determine how neurons mediate precise motor control with learning, we examined direction coding of M2 neurons at the cellular and population levels. To test whether M2 is required for neuronal adaptation to control task-related motor behavior, we used an adeno-associated virus (AAV)-based approach to express tetanus toxin light chain (TeTxLC), which abolishes presynaptic vesicle release23,24, in M2 excitatory neurons (Extended Data Fig. 1a and Supplementary Movie 2). Mice expressing TeTxLC in M2 excitatory neurons (CaMKII-TeTxLC mice) showed deficits in learning the task (Extended Data Fig. 1e). The reward-seeking behavioral parameters did not improve with training (Extended Data Fig. 1e–j), suggesting that M2 neurons play an essential role in mediating the motor learning required for the task.

We performed two-photon Ca2+ imaging in L2/3 of M2 with a genetically encoded calcium indicator, GCaMP6s, while mice navigated on the ball maze (Extended Data Fig. 2a). Consistent with the established role of M2 in motor planning, overall population activity in L2/3 correlated with locomotion (Extended Data Fig. 2b). Individual premotor neuron activities bi-directionally changed in a time-locked fashion at movement onset (Extended Data Fig. 2c). Most neurons were movement related (total 98.0%; positively correlated: 79.7 ± 3.3%; negatively correlated: 18.4 ± 3.2%; and not correlated: 2.0 ± 0.4%; see Methods for classification), and the proportion of movement-related neurons in the population remained relatively constant throughout training sessions (Extended Data Fig. 2d).

We next measured direction selectivity of individual premotor neurons over training and analyzed the changes. Distinct neuronal populations responded to different MDs (Fig. 2a and Extended Data Fig. 2e–g). A subset of L2/3 neurons exhibited tuning to the MD, which was defined as its preferred direction (PD). Its topological map was arranged in a salt-and-pepper pattern in the M2 area (Extended Data Fig. 2i,j).

Fig. 2: Motor learning refines direction coding through the suppression of irrelevant activity.
figure 2

a, Schematic of MD. An average pixel-based activity map of MD (top, n = 6 mice). Color-coded map of PDs of direction-tuned neurons (bottom, von Mises fitting, P value of correlation coefficients, P < 0.05, and DSI ≥ 0.4), colored according to their PD. Non-direction-tuned neurons (P ≥ 0.05 or DSI < 0.4) are shown in gray. b, Example heat map of premotor neurons’ tuning for MD in early learning (session 1, top) and late learning (session 7, bottom). Data are sorted from the location of peak likelihood probability P(active|MD). Corresponding precisions of population responses for each MD (right). c, Changes of average precision curves of population responses. d, Comparison of population response precisions (n = 6 mice for the experimental group, two-tailed paired t-test, t = −4.98, P = 0.0042; n = 5 mice for the control group, t = 2.56, P = 0.063). e, Normalized percentage of active cells in the population as a function of distance from the PD (n = 830 cells for early, n = 937 cells for late in the experimental group; n = 705 cells for early, n = 671 cells for late in the control group). f, Changes in the percentage of active cells (two-tailed Student’s t-test, t = 5.149, P = 0.0036 for the experimental group; t = 0.106, P = 0.920 for the control group). g, Movement speed (top), posterior probabilities (middle) and corresponding actual and decoded MD estimated with MAP (bottom). h, Changes in posterior probabilities, P(MD|active), normalized by chance level (dashed line) as a function of distance from MD with learning. i, Probability distributions of decoding error. j, Pairwise correlations with respect to ΔPD normalized by early session 1 (angular difference in PD between neuronal pairs, n = 58,456 pairs for session 1, n = 67,143 pairs for session 7 for the experimental group; n = 51,285 pairs for session 1, n = 45,156 pairs for session 7 for the control group). **P < 0.01; error bars and shading indicate s.e.m. Exp, experimental.

Source data

We estimated the likelihood distributions of neural tuning curves as a function of MD (Fig. 2b). Premotor neurons showed the highest likelihood to fire at their PD. We defined population tuning precision as the reciprocal of the variance of total neural activity given MD. Tuning of premotor neurons to MD became more precise over sessions. The precision of population responses increased for all MDs in the experimental group but not in the control group (Fig. 2c,d). We next estimated the probability of the cell being active as a function of the distance between MD and the cell’s PD. When the MD was far from the cell’s PD (distance from PD > 90°), the probability of being active decreased with learning (Fig. 2e). When the MD was opposite to the cell’s PD, the probability of the cell being active was significantly lower in session 7 than in session 1 for mice in the experimental condition but not in the control condition (Fig. 2f).

We took a Bayesian approach to decode the MD from neural activity (Methods). We computed the posterior probability density function to provide the most likely estimate of the mouse’s MD during navigation (Fig. 2g and Extended Data Fig. 3a–c). Moment-to-moment MDs were decoded by the estimated MD corresponding to the maximum value of the posterior probability density function. During behavior, posterior probability density functions of MD sharpened over sessions in the experimental group, enhancing near the MD and waning at null MDs (Fig. 2h). In contrast, posterior functions were flattened over sessions in the control group. Consequently, we observed lower decoding errors in the experimental group (Fig. 2i). Similarly, we tested neural coding of MD based on a population vector (PoV) as a vector sum of PDs of a sparse population of active direction-tuned neurons at a given moment25,26 (Extended Data Fig. 3d). In this coding scheme, MDs were also flexibly encoded in a moment-to-moment manner from the distinct sparsely distributed activity of neuronal ensembles (Extended Data Fig. 3e,f). The fraction of decoded direction (PoV around 0°) increased and that of anti-decoded direction (PoV around 180°) decreased in session 7 in the experimental group but not in the control group, indicating an increased coding accuracy associated with learning (Extended Data Fig. 3g–i). We further measured angular errors between the active neuron’s PD and MD to see how directional neuronal activity was accurately aligned with MD on a moment-to-moment basis. Similar to the change in decoding error, the fraction of PD increased and that of anti-PD decreased in session 7 in the experimental mice, whereas the fraction of anti-PD increased in session 7 in the control mice, indicating that the fraction of irrelevant activity reduced with learning (Extended Data Fig. 3j,k). To test whether the motor learning mediates a direction-dependent change in network connectivity, we compared pairwise correlations between neuronal pairs of diametrically opposed PDs. The pairwise correlations of neuronal pairs decreased in the experimental group as a function of the difference in their PDs, whereas they increased over sessions in the control group (Fig. 2j). These results suggest that the observed reduction of incorrectly tuned responses shapes the direction coding of the M2 population.

Manipulation of PV interneurons disrupts global neural activity

To determine how neuronal ensembles suppress irrelevant activity during learning, we asked how interneurons might be uniquely involved. Several GABAergic interneuron subtypes have been hypothesized to serve specific roles in regulating cortical functions by forming circuit motifs with features such as recurrence and feedforward inhibition27. We tested the regulative role of two major interneuron groups that are known to form inhibitory synapses at specific compartments of excitatory PyNs and comprise 70% of all cortical interneurons28. Specifically, PV interneurons (PV-INs) inhibit perisomatic regions, and SOM interneurons (SOM-INs) target distal dendrites29. We bilaterally silenced activity of PV-INs or SOM-INs during behavior by expressing an inhibitory opsin, eNpHR3.0, in the M2. We found that inactivation of premotor PV-INs disrupted goal-directed motor performance but inactivation of SOM-INs did not, suggesting that perisomatic inhibition mediated by PV-INs may be involved in circuit motifs that guide task-related directional control of movement (Fig. 3a and Extended Data Fig. 4).

Fig. 3: Manipulation of PV-INs alters global neural activity.
figure 3

a, Behavioral performance of the number of successes with training and photo-inhibition. Inactivation of PV-INs, but not SOM-INs, resulted in a deficit in finding a hidden goal (n = 8 mice for PV-NpHR, one-way repeated-measures ANOVA, Fsession = 30.0, P = 8.69 × 10−6, Fisher multiple comparisons tests, ***P < 0.001; n = 5 mice for SOM-NpHR, Fsession = 0.42, P = 0.67). b, Schematic of blockage of GABA release from PV-INs by expressing TeTxLC in PV-Cre mice. c, Representative image of increased excitability in PV-TeTxLC mice (n = 6 mice). d, Average transient fluorescence traces of premotor neurons aligned to movement onset (n = 647 cells from six mice for PV-TeTxLC, n = 480 cells from seven mice for PV control). e, An example of movement speed (top), the normalized activity of neurons (middle) and probability of maximum neuron activation (bottom) aligned to movement onsets. f, Average movement speed (top) and corresponding changes of the probability of maximum neuron activation (bottom) aligned to movement onsets. g, Example pairwise correlation matrices. h, Population fraction of neuronal pairs with positive and negative correlation (n = 31,660 pairs for PV-TeTxLC, n = 24,061 pairs for control; chi-square test, χ2 = 1.03 × 104, P = 0). in, The activity of PV-INs and ChCs related to the movement initiation. i, An example field of view showing premotor neurons expressing GCaMP6s (green) and flex-tdTomato (red). j, An example trace of movement speed (top) and corresponding heat map of transient fluorescence signals of PV-INs (bottom). k, The normalized activity of PV-INs aligned to movement onset (n = 59 cells from seven mice in PV control). l, The normalized activity of neurons aligned to movement onset in the PV-TeTxLC group (n = 647 cells from six mice in PV-TeTxLC). m, Average ΔF/F traces of PV-INs (top) and neurons in the PV-TeTxLC group (bottom) aligned to movement onset. n, Probability distributions of peak activity timing of PV-INs and neurons in the PV-TeTxLC group aligned to movement onset. ***P < 0.001; error bars and shadings indicate s.e.m.

Source data

Perisomatic inhibition from PV-INs provides powerful inhibitory control over the principal neuron population29,30,31,32. To further examine the role of PV-IN perisomatic inhibition in local neuronal activity during motor control, we abolished presynaptic GABA release from PV-INs by expressing Cre-dependent TeTxLC virus in PV-Cre mice (PV-TeTxLC mice) and monitored the M2 neuron activity (Fig. 3b). Consistent with the notion that PV-INs are critical regulators of cortical excitatory and inhibitory (E/I) balance33,34, the abolishment of perisomatic inhibition in PV-TeTxLC mice led to excessively increased overall activity of M2 neurons during movement (Fig. 3c,d)35 and hypersynchronization at movement initiation, which disrupted the propagation of sequential network activity and decreased the sparseness of neural activity during subsequent movements (Fig. 3e,f). Accordingly, the pairwise correlation and the proportion of pairs with positive correlations were significantly higher in PV-TeTxLC mice than in PV control mice (Fig. 3g,h). A significant proportion of PV-INs also showed increased activity for movement initiation (Fig. 3j), suggesting that the excessive activity of M2 neurons in PV-TeTxLC mice may result from unmasked responses of neurons that were previously inhibited by PV-INs (Fig. 3k–n). These results suggest that PV-IN perisomatic inhibition is involved in task-related motor control, but this manipulation also leads to global excitability changes that limit the applicability of current approaches to specify mechanisms of directional motor control.

Sparse, sequential activity is preserved in ChC manipulation

In our attempt to specify the underlying mechanisms of perisomatic inhibition, we targeted ChCs by using the ChC-specific transgenic mouse line (Nkx2.1-2a-CreER::Ai14 as ChC control mice, Nkx2.1-2a-CreER::Flex-FlpO mice as ChC-Flp mice and Vipr2-Cre)36,37. This genetic strategy allowed us to selectively label ChCs, including their distinctive axonal arborizations and cartridge terminals (Extended Data Fig. 5a–c and Supplementary Movie 3). A larger proportion of ChCs were found in the upper L2/3 of M2, with a smaller number present in L5 (mean soma depth ± s.e.m = 178.9 ± 10.7 μm from pial surface) (Extended Data Fig. 5d). We confirmed that the axonal cartridges of ChCs made synapses on the AISs of neighboring neurons (Fig. 4a). To find out if ChC manipulation impacts global network excitability, we abolished presynaptic inhibitory GABAergic inputs to the AISs of neighboring neurons by expressing FlpO-dependent TeTxLC (AAV9-CAG-dfrt-TeTxLC-HA-WPRE) bilaterally in ChC-Flp mice and monitored activity of M2 neurons (Fig. 4b). In contrast to the hypersynchronous neuronal activity in PV-TeTxLC mice, we did not observe a global change. Instead, we observed sparse, sequential activity propagation in both ChC-TeTxLC and control mice during movement (Fig. 4c,d). Pairwise correlation indicated local, not global, correlated activity between neuronal pairs in both groups (Fig. 4e). The proportions of pairs with positive and negative correlations were similar between the two groups (Fig. 4f). In contrast to PV-INs, most ChCs showed increased activity during movement rather than movement initiation (Fig. 4g), and ChC-TeTxLC manipulation did not evoke the excessive activity of M2 neurons at movement onset shown in PV-TeTxLC mice (Fig. 4h–j). These results demonstrate that ChCs have a distinct activity profile from PV-INs and that overall network excitability is not globally altered by silencing the activity of ChCs.

Fig. 4: Sparse, sequential activity is preserved in ChC manipulation.
figure 4

a, Example image of the axonal projection of ChCs (expressing mCherry, in magenta) to AISs (post hoc AnkG staining, in cyan) of neighboring L2/3 neurons (expressing GCaMP6s, in green, n = 9 mice). Axonal boutons of ChCs innervating an AIS (right). Yellow arrowheads indicate putative cartridges associated with AISs. Gray dashed lines indicate laminar boundaries for cortical layers 1 to 2/3. b, Schematic of selective abolition of GABA release from ChCs in M2 by expressing TeTxLC in ChC-Flp mice (Nkx2.1-2a-CreER::Flex-FlpO mice). c, An example of movement speed (top), the normalized activity of neurons (middle) and probability of maximum neuron activation (bottom) aligned to movement onsets in ChC-TeTxLC and ChC control. d, Average movement speed (top) and corresponding changes in the probability of maximum neuron activation (bottom) aligned to movement onsets. e, Example pairwise correlation matrices of ChC-TeTxLC and ChC control mice. f, Population fraction of neuronal pairs with positive and negative correlation (n = 14,082 pairs for ChC-TeTxLC, n = 57,956 pairs for ChC control; two-tailed chi-square test, χ2 = 1.21, P = 0.27). gj, The activity of ChCs related to the movement initiation. g, The normalized activity of ChCs aligned to movement onset (35 cells from three mice). h, The normalized activity of neurons aligned to movement onset in the ChC-TeTxLC group (n = 982 cells from nine mice). i, Average ΔF/F traces of ChCs (top) and neurons in the ChC-TeTxLC group (bottom) aligned to movement onset. j, Probability distributions of peak activity timing of ChCs and neurons in the ChC-TeTxLC group aligned to movement onset. Error bars and shading indicate s.e.m. NS, not significant.

Source data

Inhibition of ChCs disrupts the direction selectivity

The TeTxLC experiments suggest that the major role of ChCs is not control of general network gain but more target-specific control of neighboring neurons. We tested whether ChC suppression would affect the direction tuning of M2 neurons during the behavioral task. We bilaterally expressed FlpO-dependent chemogenetic silencer (AAV9-CAG-dfrt-hM4Di-mCherry) in the M2 of ChC-Flp mice to suppress the activity of ChCs upon the application of clozapine N-oxide (CNO), an hM4Di agonist (Fig. 5a). We first verified the effectiveness of CNO in brain slices. Whole-cell electrophysiological recordings showed that CNO application reduced the activity of ChCs expressing hM4Di (Fig. 5b). After 7 d of training, we administered either saline or CNO. CNO administration in the ChC-Flp:hM4Di mice significantly impaired goal-directed navigation performance and turning movement (Fig. 5c–f). CNO or saline injection alone had no effect on behavioral performance (ChC-Flp:hM4Di mice with saline, ChC-Flp mice with saline or CNO injection) (Fig. 5d).

Fig. 5: Chemogenetic inhibition of ChCs disrupts the direction selectivity of premotor neurons.
figure 5

a, In vivo two-photon Ca2+ imaging of ChC and neighboring neurons expressing GCaMP6s and selectively co-expressing the chemogenetic silencer hM4Di-mCherry in ChCs of M2, in an FlpO-dependent manner, using Nkx2.1-2a-CreER::Flex-FlpO mice (ChC-Flp mice, n = 9). b, Bath-application of CNO (10 μM) reduced the firing rate in ChCs expressing hM4Di. Example whole-cell current-clamp recording from a ChC. c, The average number of successes of ChC-hM4Di mice increased with training from sessions 1 to 7. CNO or saline injection was followed on session 8 or 9 (n = 9 mice, one-way repeated-measures ANOVA, Fsession = 31.1, P = 3.09 × 10−6; Fisher multiple comparisons tests, session 7 versus CNO, P = 2.40 × 10−6; session CNO versus saline, P = 7.58 × 10−6; session 7 versus saline, P = 0.53). d, Cumulative turning angle of ChC-hM4Di mice across conditions (session 7, CNO and saline). In the box plot, the midline, box size and whisker indicate median, 25th–75th percentiles and 10th–90th percentiles, respectively. e, Comparison of cumulative turning angle across conditions (one-way repeated-measures ANOVA, Fsession = 8.99, P = 0.0024; Fisher multiple comparisons tests, session 7 versus CNO, P = 0.0035; session 7 versus saline, P = 0.45; CNO versus saline, P = 0.0013). f, Comparison of performance between conditions (n = 6 mice for ChC control with saline or CNO; n = 9 mice for ChC-hM4Di with saline or CNO, one-way ANOVA, Fsession = 9.50, P = 2.06 × 10−4). In the box plot, the midline, square, box size and whisker indicate median, mean, 25th–75th percentiles and 10th–90th percentiles, respectively. g, Example ΔF/F traces of a ChC during locomotion in CNO and saline conditions. h, Average ΔF/F traces of ChCs aligned to movement onset in CNO and saline conditions (six ChC-hM4Di mice, n = 497 cells for CNO; n = 475 cells for saline). i, Co-activity percentage of neurons during periods of locomotion and rest (two-tailed Friedman test, χ2 = 9.33, P = 0.0094 for locomotion; χ2 = 0.33, P = 0.85 for rest). j, Example tuning curves of each individual premotor neuron for MD in CNO (top) and saline (bottom) conditions. Data are sorted from the location of peak likelihood probability P(active|MD). Corresponding precisions of population responses for each MD (right). k, Average precision curves of population responses across later learning, CNO and saline conditions. l, Comparison of population response precisions (one-way repeated-measures ANOVA, Fsession = 6.39, P = 0.016; Fisher multiple comparisons tests, session 7 versus CNO, P = 0.0068; session CNO versus saline, P = 0.023; session 7 versus saline, P = 0.486). m, Normalized percentage of active cells in the population as a function of distance from the PD (n = 484 cells for session 7, n = 407 cells for CNO, n = 582 cells for saline). n, Changes in the percentage of active cells across conditions (one-way repeated-measures ANOVA with Greenhouse–Geisser correction, Fsession = 7.26, P = 0.037; Fisher multiple comparisons tests, session 7 versus CNO, P = 0.006; session CNO versus saline, P = 0.011; session 7 versus saline, P = 0.372). o, Pairwise correlations with respect to ΔPD normalized by session 7 (angular difference in PD between neuronal pairs, n = 17,933 pairs for session 7; n = 24,205 pairs for CNO; n = 22,735 pairs for saline). *P < 0.05; **P < 0.01; ***P < 0.001; NS, not significant; CW, clockwise; CCW, counterclockwise. Error bars and shading indicate s.e.m.

Source data

To determine the role of ChC activity in the direction tuning of M2 neurons, we co-expressed AAV9-CAG-dfrt-hM4Di-mCherry and AAV1-hSyn-GCaMP6s into the L2/3 M2. We then used chemogenetic manipulations and performed Ca2+ imaging of ChCs and their neighboring neurons during the behavioral task. In line with the ex vivo results, ChC activity was suppressed upon CNO administration during locomotion (Fig. 5g,h). Consequently, we observed that the co-activity of M2 neurons increased upon CNO application during locomotion but not during rest (Fig. 5i), consistent with recent work demonstrating the inhibitory postsynaptic effects of ChCs on M2 neurons in vivo17,31. We compared the likelihood distributions of neural tuning curves as a function of MD with and without CNO administration. We observed that neurons are more likely to be active at non-PDs in the CNO (ChC-silenced) condition than in the saline condition (Fig. 5j), resulting in less precise population responses to the MD (Fig. 5k,l). The probability of the cell being active at a certain MD increased upon CNO administration (Fig. 5m). When the MD was at the opposite of the cell’s PD, the probability of the cell being active was higher after CNO administration than it had been in session 7 or in the saline condition (Fig. 5n). CNO application increased pairwise correlations between neuronal pairs as opposed to the enhanced decorrelation between pairs seen with learning (Fig. 5o). These results suggest that the suppression of ChC activity increased behaviorally irrelevant neural activity, impairing the precise coding of movement.

Variability of ChC activity increases during learning

To examine the activity dynamics of ChCs during learning, we expressed GCaMP6s in the L2/3 ChCs and recorded ChC activity while mice performed the behavioral task (Fig. 6a). Consistent with previous reports17,18, ChCs displayed increased activity during episodes of locomotion (Fig. 6b), with a more synchronized pattern of activity in session 1. In session 7, activity patterns became more diverse and desynchronous, which led to the formation of subclusters of ChCs (Fig. 6c). To quantify this shift, we calculated the pairwise correlations between ChCs during the behavioral task and found that the correlation decreased and ChCs formed subclusters as learning progressed (Fig. 6d,e). We next examined how temporal relationships between ChCs and M2 neurons change with learning. Various temporal relationships in activity were shown between ChCs and neighboring M2 neurons (Fig. 6f). We calculated cell-to-cell activity correlations (Pearsonʼs correlation) in pairs of ChCs and M2 neurons during locomotion and rest epochs and compared their distributions of correlation coefficients. In session 1, the proportion of high correlation coefficient (corr(r) > 0.6) was decreased during locomotion compared to rest, reflecting the increased decorrelation. In session 7, the overall proportions of positive correlation coefficient (corr(r) > 0) and of negative coefficient (corr(r) < 0) were remarkably decreased during locomotion compared to rest, indicating the enhanced decorrelation in gross pairs of ChC and M2 neuron (Fig. 6g). These results suggest that ChC activity becomes more heterogeneous with learning, and such decorrelated temporal relationship between ChCs and neighboring M2 neurons implies an increased specificity of population activity control.

Fig. 6: Variability of ChC activity increases during learning.
figure 6

a, Representative field of view showing L2 ChCs expressing GCaMP6 (n = 3 mice). b, Example fluorescence traces from ChCs that show increased activity during episodes of locomotion. c, Movement speed and the heat map of ChC activity during navigation in sessions 1 and 7. The synchronous activation of ChCs in session 1 during locomotion becomes asynchronous in session 7. d, Changes in the correlation between a pair of ChCs (n = 189 pairs in 35 cells from three mice; two-tailed Wilcoxon signed-rank test, Z = 11.92, P = 0). e, Example correlation matrix of ChCs in sessions 1 and 7. f, Various temporal relationships between activity of ChC (magenta) and neighboring M2 neurons (gray) during episodes of locomotion in ChC-hM4Di mice. g, Cell-to-cell Pearson’s correlation of ChC–M2 neuron pairs in sessions 1 and 7 during locomotion and rest epochs (four ChC-hM4Di mice, n = 1,957 pairs for session 1, two-tailed two-sample Kolmogorov–Smirnov test, locomotion versus rest, D = 0.076, P = 2.12 × 10−5; n = 1,723 pairs for session 7, locomotion versus rest, D = 0.28, P = 4.049 × 10−61). ***P < 0.001; shadings indicate s.e.m.

Source data

Abolition of ChC functions impairs refined direction coding

We asked if the abolition of ChC-mediated inhibition would affect the refinement of direction coding and learning ability. We abolished presynaptic ChC GABA release by expressing FlpO-dependent TeTxLC (AAV9-CAG-dfrt-TeTxLC-HA-WPRE) in ChC-Flp mice and performed two-photon calcium imaging in M2 neurons across sessions (Fig. 7a–c). ChC-TeTxLC mice showed a deficit in learning the task, indicating the necessary role of axo-axonic inhibition for learning goal-directed motor control (Fig. 7d–l). Given the vast difference in the numbers of PV-INs and ChCs37, it is possible that the suppression of a similar number of PV-INs has similar effects to the effects exerted by the selective suppression of ChCs. To test this possibility, we abolished the inhibition presynaptic GABA release of a fraction of PV-INs that corresponds approximately to the percentage of ChCs in the premotor network (Extended Data Fig. 6a–c). The sparse, sequential activity was observed in sparse PV-TeTxLC mice similar to PV control (Extended Data Fig. 6d). However, in contrast to ChC-TeTxLC mice, the sparse PV-TeTxLC mice showed normal improvement of learned performance (Extended Data Fig. 6e,f).

Fig. 7: Abolition of ChC inhibition impairs the refinement of direction coding and motor learning.
figure 7

a, Generation of Nkx2.1-2a-CreER::Flex-FlpO mice. Nkx2.1-2a-CreER::Flex-FlpO mice were generated by crossing Nkx2.1-2a-CreER with ROSA-Flex-FlpO mouse lines. The targeting vector containing Rosa26 homology arms, a CAG promoter and a FLEX-Flp cassette was constructed. Similarly to Nkx2.1-2a-CreER::Ai14, Tmx was administered to timed pregnant Swiss Webster females by oral gavage at E17. b, Schematic for selective abolition of GABA release from ChCs in M2 by expressing TeTxLC in ChC-Flp mice (Nkx2.1-2a-CreER::Flex-FlpO mice). c, A representative image of ChC neurons expressing TeTxLC-HA and neighboring neurons expressing GCaMP6s in Nkx2.1-2a-CreER::Flex-FlpO mice (left, n = 9 mice) and post hoc validation of ChCs’ axonal projection to the AIS of neighboring PyNs by AnKG staining (right). Yellow arrowheads indicate putative cartridges associated with AISs. dl, Behavioral impact of ChC manipulation. d, Representative movement traces of mice in ChC control (top) and ChC-TeTxLC (bottom) navigating on the multi-textured floating ball maze in session 7 (100 s). A circle with a dashed line indicates the goal spot on the ball. Heat map and contour lines of the times of mice spent on the location are presented. e, Average movement speed (n = 9 mice for ChC-TeTxLC group; n = 8 mice for ChC control group; two-way repeated-measures ANOVA, Fgroup = 1.16, P = 0.32). f, Average movement acceleration (two-way repeated-measures ANOVA, Fgroup = 3.22, P = 0.12). g, Average number of successes obtained in training sessions (two-way repeated-measures. ANOVA, Fgroup = 8.54, P = 0.011). h, Average latency to reward (two-way repeated-measures ANOVA, Fgroup = 7.81, P = 0.0136). i, Average goal proximity (two-tailed t-test, t = −2.52, P = 0.017 for ChC control; t = 1.38, P = 0.177 for ChC-TeTxLC). j, Movement accuracy (two-tailed t-test, t = −3.80, P = 6.67 × 10−4 for ChC control; t = −1.05, P = 0.30 for ChC-TeTxLC). k, Cumulative turning angle over time in sessions 1 and 7. l, Comparison of cumulative turning angle between ChC-TeTxLC and ChC control (two-tailed t-test, t = −3.21, P = 3.51 × 10−3 for ChC control; t = −1.39, P = 0.175 for ChC-TeTxLC). m, Example tuning curves of individual premotor neurons for movement. Data are sorted from the location of peak likelihood probability P(active|MD). n, Normalized percentage of active cells in the population as a function of distance from the PD (n = 378 cells for session 1, n = 416 cells for session 7 in ChC-TeTxLC; n = 665 cells for session 1, n = 689 cells for session 7 in ChC control). o, Changes of the percentage of active cells from session 1 to session 7 (n = 5 mice for ChC-TeTxLC, two-tailed Student’s t-test. t = 0.56, P = 0.606; n = 4 mice for ChC control. t = −17.97, P = 3.76 × 10−4). p, Pairwise correlations with respect to ΔPD normalized by session 1 (angular difference in PD between neuronal pairs, n = 15,028 pairs for session 1, n = 22,589 pairs for session 7 for ChC-TeTxLC; n = 57,956 pairs for session 1, n = 62,104 pairs for session 7 for ChC control). q, Changes in posterior probabilities, P(MD|active), normalized by chance level (dashed line) as a function of distance from MD with learning. NS, not significant; *P < 0.05; **P < 0.01; ***P < 0.001; error bars and shading indicate s.e.m. In the box plot, the midline, box size and whisker indicate median, 25th–75th percentile and 10th–90th percentile, respectively. 2p, two-photon; CW, clockwise; CCW, counterclockwise; a.u., arbitrary units.

Source data

To determine the specific role of ChCs in suppressing irrelevant activity, we analyzed the probabilistic distributions of neural tuning to MD as a function of learning. Compared to the decrease in activity responding to non-PDs seen with learning, ChC-TeTxLC mice did not show a reduced likelihood of non-PD activity over training (Fig. 7m). Although the estimated probability of the cell being active for non-PD movement (distance from PD > 90°) decreased in the ChC control mice with learning, such reduction was not observed in ChC-TeTxLC mice (Fig. 7n). When the MD was opposite to the cell’s PD, the probability of the cell being active significantly decreased in the ChC control group but not in the ChC-TeTxLC group (Fig. 7o). Consistently, we found that the decreases in pairwise correlation of neural responses with learning were specific to ChC control but not ChC-TeTxLC mice (Fig. 7p). Additionally, posterior probability density functions of MD were flattened over sessions in the ChC-TeTxLC group, indicating impaired encoding of MD due to the abolition of ChC-mediated inhibition (Fig. 7q). Given that intact ChC inhibition mediated the suppression of incorrectly tuned responses with learning, these results collectively suggest a necessary role of ChCs in refining distributed neural codes for active locomotion control.

Heterogeneous axo-axonic synaptic plasticity during learning

Our imaging data raised the possibility that ChC inhibitory synaptic strength may not be uniformly altered by learning. To understand the cellular evidence in support of this claim, we examined the structural rearrangement of axo-axonic synapses as proxies for the synaptic strength changes in target neurons. We developed an automated detection algorithm to discern the individual structures of ChC innervation on AISs of target PyNs, by using volumetric images of M2 (Extended Data Fig. 7 and Methods). A large number of inhibitory presynaptic and postsynaptic ChC-AIS structures, ChC axonal boutons and gephyrin signals (GABAergic inhibitory synapse scaffolding protein) along the AISs were systematically analyzed in both the experimental group (n = 1,634 AISs in five mice) and the control group with ad libitum water (n = 3,116 AISs in six mice) (Fig. 8a–d). We estimated structural synaptic strength by measuring presynaptic structural efficacy (Pre-SSE) as a presynaptic feature and postsynaptic structural efficacy (Post-SSE) as a postsynaptic feature based on ChC–AIS contacts and the corresponding gephyrin intensity, respectively (Extended Data Fig. 8a). The Pre-SSE and Post-SSE distributions showed intrinsic heterogeneity in both control and experimental mice, indicating uneven inhibitory weights for connections between ChCs and M2 neurons (Fig. 8d–h). These imaging results are consistent with early Golgi staining and recent electron microscopy data that show non-random distribution of ChC axonal terminations18,38. The strong correlation between Pre-SSE and Post-SSE showed the balance of presynaptic and postsynaptic strengths on AIS (Fig. 8i).

Fig. 8: Heterogeneous axo-axonic synaptic plasticity underlies organized motor control.
figure 8

a,b, Immunostaining of the AIS by AnkG (green) and inhibitory postsynaptic gephyrin (red) visualizes the corresponding synaptic composition (yellow) of ChC (magenta) to AIS contacts. DAPI stains nuclei (blue; n = 22 in total). c, Schematics of automated detection of ChC-innervated AISs (ChC–AISs). d, Representative examples of ChC–AIS evaluation of Pre-SSE and Post-SSE. Filled and empty arrows indicate ChC–AIS and non-ChC–AIS synapses, respectively. SSE values were classified into three subgroups (high: >1.5 for Pre-SSE, >0.6 for Post-SSE; low: <0.5 for Pre-SSE, <0.1 for Post-SSE; mid: between high and low). White triangles indicate gephyrin puncta on the AIS associated (filled) and non-associated (open) with the ChC cartridge. eh, Examples of pre-SSE and post-SSE distribution in each slice for the experimental (learning) group and the control group (n = 10 and n = 12 for the experimental group and control group, respectively). i, Scatter plot of pre-SSEs and post-SSEs for each group. j, SSEs by the position of AISs within the cortical layer 2 for each group (n = 5 and n = 6 for the experimental group and control group). k,l, CDFs from individual mice (P = 5 × 10−5 for k and P = 2 × 10−11 for l; error bars = s.e.m., left axis) and the difference between the averages for the experimental and control conditions (experimental versus control, right axis). m,n, Probabilities by pre-SSE and post-SSE strength subgroups (high, mid and low) from individual mice. Error bars indicate s.e.m. Differences of probability distributions for pre-SSE and post-SSE (experimental versus control) (o,p) and proportional changes (experimental versus control) in the probability of each subgroup (q,r), which is confirmed by 10 independent robust random samplings (n = 3,000 each). In both SSEs, high and low subgroups were increased. The results were compared to proportional changes between unlabeled random pairs. For bootstrapping statistics (or), the mean and error of each bin were calculated from 10 distributions generated by independent robust random sampling (n = 3,000). For each random sampling, the probability distribution of a mouse was randomly selected from each condition (experimental and control) and used to calculate differences. Error bars indicate s.d.; P = 2.0 × 10−4 for all bins. s, Model for axo-axonic structural plasticity by heterosynaptic competition. The CDFs were tested by two-tailed two-sample Kolmogorov–Smirnov test, and the other distributions were tested by two-tailed Wilcoxon–Mann–Whitney test. Scale bars, 100 μm (a,eh) and 5 μm (b,d). Every fluorescence image is presented by maximum intensity projection of the corresponding volumetric stack with pseudo-colors. ***P < 0.001; ****P < 0.0001; *****P < 0.00001. C, control; E, experimental; Exp., experimental.

Source data

A subset of ChCs in the prelimbic cortex was reported to selectively control PyNs located more superficially (<50 μm from L1/2 border) for their specific projection to the basolateral amygdala31. We tested whether the heterogeneity among axo-axonic synapses depends on the cortical depth of AIS location. The overall synaptic strengths were not different by the location of AISs in L2/3 of control mice and experimental mice (0–250 μm from L1/2 border, dotted and solid lines in Fig. 8j). However, we found that high and low portions of SSE distribution increased in the experimental group, suggesting that the increased heterogeneity in ChC–PyN connections with learning is not solely based on the cortical depth of AIS location (Fig. 8f,h).

To decipher how learning reorganizes axo-axonic inhibition on AISs, the cumulative density functions (CDFs) of SSEs in the experimental group of mice were compared to the control group (Fig. 8k,l). If a subset of neurons is more tightly controlled by ChCs with learning (reflecting a sparse and determinant inhibitory control), we expect to see an increased percentage of AISs largely covered or scarcely covered by ChC boutons, respectively. Indeed, we observed an increased portion of both weak and strong ends in the distributions of Pre-SSEs and Post-SSEs in the trained mice. Classifying AISs into three subgroups by their SSE strength (high, mid and low), 4–9% of ChC–AISs underwent structural changes from mid to high or low (Fig. 8m,n). To validate whether this alteration was a result of training and not of high variance among samples (Extended Data Fig. 8b–e), we performed a bootstrapping test (n = 3,000 random sampling) on the data from each mouse (Extended Data Fig. 8f–i). Obtained from multiple bootstrapping tests (n = 10), changes in the SSE distributions for trained mice showed increases in high (>1.5 for Pre-SSE, >0.6 for Post-SSE) and low (<0.5 for Pre-SSE, <0.1 for Post-SSE) value ranges (Fig. 8o,p). We found increased divergence only between the experimental and control groups (Extended Data Fig. 8f–i, Exp. versus Ctrl.) and not between other condition comparisons (Exp. versus Exp.; Control versus Control; Unlabeled versus Unlabeled). The alterations in each subgroup were analogous and tested as significant (Fig. 8q,r). Thus, these data suggest that ChCs differentially regulate the degree of inhibition applied to each axo-axonic synapse during learning (Fig. 8s).

Discussion

Given the diversity of interneuron types and their specific connectivity in neural circuits, it has been a longstanding belief that the impact of inhibition on neural computation depends on a combination of interneuron cell types and their connectivity patterns30,39,40,41. Genetically defined interneuron groups, such as PV, SOM and VIP, and their connectivity motifs have profoundly advanced understanding of cortical computation and psychiatric disorders. Different interneuron subtypes display their own circuit motifs, but subtypes remain widely heterogeneous. Therefore, the precise and unique roles of inhibition mediated by most single interneuron subtypes are still not fully understood.

Despite the discovery of ChCs over four decades ago42 and their clinical relevance to neuropsychiatric disorders such as schizophrenia characterized by GABAa receptor dysregulation at AIS43, the functional role of ChCs in cognition and behavior has been enigmatic. Using a combination of chronic two-photon population imaging together with analyses on the structural plasticity at axo-axonic synapses, we demonstrated a critical role of the ChC in shaping the cortical coding of L2/3 M2 neurons during motor learning. ChC activity was necessary for improving the precision and accuracy of directional movement control. ChCs fine-tune the direction selectivity of individual premotor neurons and their collective tone. Notably, global population activity was not perturbed when ChCs were blocked. The necessary role of ChCs without perturbing overall network excitability implies that ChCs mediate their regulatory effect by establishing a specific neuronal connectivity pattern for learning. Quantification of a large number of ChC–AIS synapses uncovered revealed that subsets of them underwent modifications associated with learning. This analysis revealed a significant degree of heterogeneity, which provides evidence of unequal inhibitory weighting among ChC–PyN connections during learning.

Diverse interneurons have been shown to be involved in motor learning by shaping neuronal population activity. Particularly, it has been shown that SOM-INs targeting the dendrites and spines of PyNs in the primary motor cortex undergo plasticity during motor learning and control learning-dependent sequential activation of PyNs in a manner similar to what is attributed to ChCs here44. In addition, inhibiting SOM-INs during new learning destabilized previous learning-dependent sequential activity of PyNs, suggesting the importance of SOM-IN inhibition for maintaining previously learned sequential activation patterns and behavioral improvement when a new motor skill task is introduced. However, in our study, we observed that acute optogenetic suppression of SOM-INs did not significantly disrupt navigation task performance after learning had been established (Fig. 3a and Extended Data Fig. 4). Given the reduced activity of SOM-IN activity during learning and partial restoration of naive-like activity by post-learning SOM-IN reactivation45, the acute post-learning inhibition of SOM-INs is less likely to dominantly regulate neural representations formed with learning. We cannot rule out the possibility that SOM-INs are involved in shaping learning by dendritic-specific computation through synaptic plasticity on the dendritic spines of PyNs. It is possible that the suppression of irrelevant activity that is attributed to ChCs in the present study can be partly mediated by SOM-INs via their recurrent connectivity46. Subpopulations of SOM-INs increase and decrease activities during motor learning in a task-specific manner44. It is likely that diverse and task-specific activity of SOM-INs may mediate the temporal shift of motor learning-induced sequential activity in PyNs, which can complement organized population coding in sequence during goal-directed navigation.

The abolishment of perisomatic inhibition in PV-TeTxLC mice excessively increased the overall activities of M2 neurons, consistent with the notion that PV-INs are critical regulators of cortical E/I balance33,34. Perisomatic inhibition from PV-INs provides powerful inhibitory control over the PyN population29,30,31,32. Fast-spiking PV basket cells (PV-BCs) are well suited for regulating the balance, gain and network oscillation of relatively broad PyN populations47,48. Balanced and delayed inhibition of fast-spiking INs with movement activity may provide temporal sharpening of motor command and suppress irrelevant activities35.

PV-BCs and ChCs have different dendritic arborizations and laminar locations of their soma. They receive spatiotemporally distinct patterns of excitatory synaptic inputs from local PyNs, long-range thalamocortical connections and neuromodulatory inputs and, in turn, form different recurrent feedback excitation and inhibition patterns in a microcircuit49,50. The distinct wiring features and output properties of PV-BCs and ChCs may give their differential control over the spike-timing of PyNs51. Different cholinergic modulatory effects of synaptic inhibition between ChCs and PV-BCs have been reported52. Notably, a previous in vivo study showed that ChCs significantly increase their firing rate during arousal when brain states switched from slow to theta oscillations in the hippocampus and showed a low-amplitude desynchronized field potential in the prelimbic cortex, whereas the firing rates of PV-BCs and PyNs remained unchanged53. Given that arousal is often associated with cholinergic signaling, differential modulation by cholinergic receptor activation between ChCs and PV-BCs may result in their distinct contributions to population activity control in a state-dependent manner. A future study is needed to further clarify the functional difference between ChCs and other types of BCs in behavior control, which is important to specify the role of perisomatic inhibitory circuit motifs.

Our findings support a model that ChCs exert differential strengths of control over subsets of PyNs after learning. There exists substantial variability in the magnitude of ChC input to PyN AISs18,38. This variability reflects the ability of ChCs to regulate their inhibitory strength based on the characteristics of its target cell and may have a role in shaping the functional properties of PyNs. Variability in the number of axo-axonic ChC synapses correlated with structural features of individual target PyNs, including laminar depth of the soma, other sources of perisomatic inhibition and size of soma and AIS18. The innervated PyNs are not distributed at random but, rather, show a clustered distribution in a spatially heterogeneous fashion54, supporting the existence of target selectivity and/or avoidance by ChCs on local PyNs. Two factors possibly select PyNs for stronger/weaker inhibition. First, ChCs differently inhibit PyNs based on the projection targets of the PyNs. Recent studies showed that a subset of L2 ChCs selectively innervates PyNs projecting to the basolateral amygdala over those projecting to the contralateral cortex in the prelimbic cortex31. Second, ChCs differentially inhibit PyNs in an activity-dependent manner during learning55. In this study, we analyzed a restricted subset of ChCs in the L2 and sampled neighboring PyNs in the shallow part of L2/3. Deeper L2/3 PyNs may have different projecting targets. Nevertheless, our findings on learning-dependent changes of axo-axonic synapses in the shallow L2/3 suggest that the difference in ChC-mediated inhibition does not solely result from the anatomical properties of target neurons. Given experimental evidence for the activity-dependent structural plasticity of axo-axonic synapses56,57,58, it is conceivable that the plasticity of axo-axonic synapses provides an activity-dependent regulatory mechanism in the cell-by-cell level to fine-tune neuronal excitability across diverse cells involved in different functional networks. This can be mediated through precise inhibitory synaptic plasticity, which has been theoretically suggested as essential for the formation and maintenance of functional cortical circuitry59,60. Our findings suggest that the learning-dependent synaptic plasticity of axo-axonic synapses provides individualized inhibition to each PyN, which is adjusted to precisely balance excitation and inhibition based on the relevancy of its activity to the task goal.

Our measures of direction selectivity and population vector coding of MD may not fully capture high-order representations, such as state-dependent action selection. It is presumed that multiple other inputs, such as cholinergic, thalamic and other cortico-cortical inputs, innervate ChCs and PyNs. Premotor mechanisms of direction selectivity coding, MD and inhibitory synaptic plasticity coming from different inputs remain to be studied.

Here we revealed a specialized inhibitory role for ChCs in experience-dependent plasticity of cortical coding, which allows for flexible and robust learned behavior. Given the unknown functions of a number of heterogeneous interneuron types, our results suggest that such heterogeneity may have evolved to serve specific functional needs. Unraveling the multitude of inhibitory effects on neural representation and signal transmission across all cell types is essential for understanding how cognitive functions are internally and externally governed to give rise to meaningful behavior. Precise balance and target-specific inhibitory synaptic plasticity by each inhibitory cell type are thought to contribute to the formation and retrieval of distributed memory, providing fundamental neural circuit architecture for learning. The heterogeneity of inhibitory cell types with their diverse receptors and innervation patterns offer a glimpse into how the intricate and versatile neural coding in the cortex can be adopted to generate complex and flexible behavior. Our work sheds light on the importance of future studies to investigate additional single-cell type-specific plasticity rules and their impacts on network activity and behavior.

Methods

Animals

C57BL/6J, PV-Cre (cat. no. 8069), SOM-Cre (cat. no. 13044), Vipr2-Cre (cat. no. 31332) and Ai14 (cat. no. 7914) mice from Jackson Laboratory and Swiss Webster (cat. no. 24) mice from Charles River Laboratories were used in this study (4–9 weeks old, both sexes). All mice were maintained on a 12-h light/12-h dark cycle. All experimental procedures were carried out in accordance with protocols approved by the Johns Hopkins University Animal Care and Use Committee, the Max Planck Florida Institute for Neuroscience Institutional Animal Care and Use Committee (protocol no. MO22M170) and National Institutes of Health guidelines. For genetically targeting ChCs, Nkx2.1-2a-CreER was mainly used throughout the study, and, when Vipr2-Cre mice became available, Vipr2-Cre mice were also used for the specifically mentioned experiments. Both lines targeted ChCs efficiently. Swiss Webster mice were used as the background strain for Nkx2.1-2a-CreER mice, and C57BL/6J mice were used as the background strain for Vipr2-Cre mice. Nkx2.1-2a-CreER and ROSA-Flex-FlpO mouse lines were generated in the laboratory of Hiroki Taniguchi at the Max Planck Florida Institute for Neuroscience. For Nkx2.1-2A-CreER mice, a 2A-CreER cassette was inserted in the frame immediately after an open reading frame of an Nkx2.1 gene. The targeting vector containing 5′ and 3′ homology arms, a 2A-CreER cassette, an frt-Neo-frt cassette and an HSV-TK gene was constructed. For FLEX-Flp mice, the targeting vector containing Rosa26 homology arms, a CAG promoter and a FLEX-Flp cassette was constructed. Both targeting vectors were generated using a PCR-based cloning strategy. 129SVj/B6 F1 hybrid embryonic stem (ES) cells (V6.5) were electroporated with the targeting vectors and subjected to drug resistance tests. Neomycin-resistant ES clones for Nkx2.1-2A-CreER and FLEX-Flp were screened by mini-Southern blotting and PCR, respectively, for correct targeting. Positive ES clones were used for tetraploid complementation to obtain male heterozygous mice following standard procedures. Nkx2.1-2a-CreER::Ai14 and Nkx2.1-2a-CreER::Flex-FlpO mice were generated by crossing Nkx2.1-2a-CreER with Ai14 and ROSA-Flex-FlpO mouse lines, respectively. Both created ChC mice showed no visible behavioral phenotypes and were able to learn the behavior task used in this study. Both male and female animals were randomly allocated to experimental groups. A group of animals treated by different genetic or pharmacological manipulations was randomly assigned for experiments. Data collection and analysis were not performed blinded to the conditions of the experiments.

Tamoxifen administration

Tamoxifen (Tmx) was administered to timed pregnant Swiss Webster females that were bred to Nkx2.1-2a-CreER::Flex-FlpO males by oral gavage at embryonic day 17 (E17) to induce CreER activity in the offspring. To achieve a high density of ChCs, the Tmx dose was adjusted to 3 mg per 30 g of body weight. Tmx solution was prepared at a working concentration of 20 mg ml−1 in corn oil (Sigma-Aldrich), kept protected from light and kept refrigerated for no longer than 1 month.

Animal surgery and stereotactic viral injection

Surgeries were performed on 4–8-week-old mice. Mice were anesthetized with an intraperitoneal (i.p.) injection of an anesthetic cocktail containing ketamine (87.5 mg kg−1) and xylazine (12.5 mg kg−1) (Santa Cruz Animal Health). The animal’s scalp was shaved, and any remaining hair was removed with a hair remover lotion (Nair, Church & Dwight Co., Inc.). Ophthalmic ointment (Puralube Vet Ophthalmic Ointment) was applied to prevent eyes from drying. Next, the animal was placed in a stereotaxic device (Kopf, Model 900 Small Animal Stereotaxic Instrument). The surgical region was scrubbed by 10% betadine solution (Purdue Product) and cleaned with 70% alcohol solution. Body temperature (37–38 °C) was maintained by a thermostatically controlled heating pad (Harvard Apparatus). A small incision was made on the scalp. A small craniotomy (~0.5 mm in diameter) was made above the injection site (the right premotor cortex, A/P: +1.75 mm, M/L: +0.3 mm from bregma, D/V: −0.25 mm from the brain surface). AAV1-hSyn-GCaMP6s-WPRE-SV40 (400 nl, Penn Vector Core) for C57BL/6J mice as the experimental group; a mixture of AAV1-CaMKII0.4-Cre-SV40 (Penn Vector Core), AAV1-Syn-Flex-GCaMP6s-WPRE-SV40 (Penn Vector Core) and AAV9-CAG-Flex-TeTxLC (produced by ViGene Biosciences) (1:1:1 ratio, total injection volume: 800 nl) for C57BL/6J mice as CaMKII-TeTxLC; AAV9-EF1a-DIO-eNpHR3.0-eYFP-WPRE-hGH (400 nl, Penn Vector Core) for PV-Cre as PV-eNpHR and SOM-Cre mice as SOM-eNpHR; a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40 (400 nl) and AAV1-CAG-Flex-tdTomato-WPRE-bGH (400 nl, Penn Vector Core) for PV-Cre mice as PV control; a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40, AAV1-CAG-Flex-tdTomato-WPRE-bGH and AAV9-CAG-Flex-TeTxLC (ViGene Biosciences) (1:1:1 ratio, total injection volume: 800 nl) for PV-Cre mice as PV-TeTxLC; AAV1-hSyn-GCaMP6s-WPRE-SV40 (400 nl) for Nkx2.1-2a-CreER::Ai14 as ChC control; a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40 (300 nl) and AAV9-CAG-dfrt-hM4Di-mCherry-WPRE (500 nl) for Nkx2.1-2a-CreER::Flex-FlpO mice as ChC-hM4Di; a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40 (300 nl) and AAV9-CAG-dfrt-TeTxLC-HA-WPRE (500 nl) for Nkx2.1-2a-CreER::Flex-FlpO mice as ChC-TeTxLC; a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40 and AAVDJ-hSyn-FLEX-TeTxLC-P2A-dTom (1:2,000 dilution, a gift from the Sandeep Robert Datta laboratory) (1:1 ratio, total injection volume: 800 nl) for PV-Cre as sparse PV-TeTxLC; a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40 and AAVDJ-hSyn-FLEX-TeTxLC-P2A-dTom (1:1 ratio, total injection volume: 800 nl) for Vipr2-Cre mice as ChC-TeTxLC; AAV1-Syn-Flex-GCaMP6s-WPRE-SV40 (400 nl, Penn Vector Core) for Vipr2-Cre mice as ChC-GCaMP6; AAV1-CAG-Flex-TdTomato (400 nl, Addgene, cat. no. 28306) for Vipr2-Cre mice were used for virus injection. The viral constructs were injected via a beveled glass micropipette (tip size 10–20-μm diameter, BLAUBRAND) backfilled with mineral oil. Flow rate (100–150 nl min−1) was regulated by a syringe pump (World Precision Instruments). After virus injection, skin adhesive (3 M Vetbond) was applied to close the incision site. General analgesia (Buprenorphine SR, 0.6 mg kg−1) was injected subcutaneously, and mice were monitored until they recovered from anesthesia. Approximately 1 week later, mice were anesthetized, and hair was removed. The scalp was removed in a circular shape, and the surface of the skull was cleaned. A craniotomy (3.2-mm diameter) was made, and a glass cranial window (3-mm diameter, Warner Instruments) was implanted on the virus injection site, and a custom-made headplate was attached to the exposed skull with dental adhesive (C&B Metabond, Parkell).

Virus generation

To create AAV9-CAG-dfrt-hM4Di-mCherry-WPRE and AAV9-CAG-dfrt-TeTxLC-HA-WPRE, pAAV9-CAG-dfrt-hM4Di-mCherry-WPRE and pAAV9-CAG-dfrt-TeTxLC-HA-WPRE vectors were created by infusion of dfrt-hM4Di-mCherry and dfrt-TeTxLC-HA ‘R-products’ into pAAV9-CAG vectors. 293FT cells were transfected with pAAV-transfer vectors, PAD-Helper vectors and pSerotypeSpecific (AAV9) plasmids using a standard calcium phosphate method. After 70 h, cells were harvested in PBS and resuspended in 150 mM NaCl and 50 mM Tris, pH 8.5. After three freeze–thaw cycles, the virus solution was spun down at 4,000g for 30 min, and the supernatant was incubated in benzonase (100 U ml−1) at 37 °C for 1 h. Another centrifugation step of 4,000g for 25 min was followed by filtration of the supernatant through 0.45 μm and 0.22 μm. Next, the virus solution was put on top of a sterile iodixanol gradient in an ultracentrifugation tube (15%, 25%, 40% and 60% Iodixanol in 1 M MgCl2, 2.5 M KCl and 5 M NaCl in PBS). After centrifugation at 31,000 r.p.m. for 6 h, the 40% iodixanol band was harvested and stored in DPBS and concentrated using 100,000 concentrator vials (Amicon). The virus solution was aliquoted and stored at −80 °C until use.

Behavior training in a floating ball maze

More than 2 weeks (19–25 d) after virus injection, mice were trained to perform a tactile-based spatial navigation task while head-restrained on a custom-made spherical floating ball maze22. Mice in the water-restricted group were water restricted at 1 ml per day for 1 week before training started. Mice in the control group were given ad libitum water access, and, in addition, 2 ml of 10% sucrose was given 30 min before training. The floating ball maze was made of an air-supported 8-foot-diameter spherical styrofoam ball with quadrants that have different tactile surface textures (for example, plain, grooved, striped and grid). A simple auditory tone (8 kHz for 2 s) was delivered at the beginning and end of training. During navigation, mouse movement was monitored by a CMOS camera (Thorlabs), and ball movement was continuously monitored and recorded by a Bluetooth motion sensor (LPMS-B, LP-Research) placed at the center of the ball. Mice were trained to navigate to find a hidden goal location (surface area of 30° solid angle) in which a 10% sucrose reward (~10 μl per reward) was delivered if they were on the location. To facilitate animals’ exploration, a brief air puff (60 p.s.i., 200 ms) was applied to their hind limbs if they did not move for 30 s. The reward was delivered via a lick port positioned in front of the mouse’s mouth, and its timing was controlled by a solenoid valve (NResearch). To prevent excessive stay within the goal location and excessive access to the goal, a 3-s refractory period was assigned for the reward. Either a stay in the goal location or a re-visit to the goal location within 3 s from the last reward did not provide an additional reward. The behavioral setup was controlled by a custom-written code in MATLAB (MathWorks). Daily training sessions lasted 800 s and occurred for 7 d.

Optogenetic inhibition of PV-positive and SOM-positive INs

We bilaterally injected AAV9-EF1a-DIO-eNpHR3.0-eYFP-WPRE-hGH (400 nl, Penn Vector Core) into the L2/3 M2 of PV-Cre mice or SOM-Cre mice and implanted fiber-optic cannulae (200-μm core, 0.37 NA, BFL37-2000, Thorlabs) with head plates. After 2 weeks of recovery from surgery and 1 week of water restriction, mice were trained on a floating ball maze for a session (800 s) per day for 7 d. After 7 d of training, mice were trained for a session and simultaneously received bilateral optogenetic inhibition using 589-nm light administration (continuous 800 s during the session, ~10 mW power at the optic fiber tip, MBL-FN-589, Changchun New Industries Optoelectronic Technology) through the fiber-optic cannulae. On the following day, mice were trained without optogenetic inhibition as a control.

Chemogenetic inhibition of ChCs

We bilaterally injected a mixture of AAV1-hSyn-GCaMP6s-WPRE-SV40 (300 nl) and AAV9-CAG-dfrt-hM4Di-mCherry-WPRE (500 nl) into the L2/3 M2 of ChC-Flp mice. After 7 d of training, to suppress the activity of ChCs expressing AAV9-CAG-dfrt-hM4Di-mCherry in an FlpO-dependent manner, mice were i.p. administered with CNO (Tocris, cat. no. 4936) 45 min before a behavioral session and underwent the session. On the following day, mice were i.p. administered with saline as control and underwent the session.

In vivo two-photon imaging

Imaging was conducted with a two-photon microscope (Bruker) using two pulsed Ti:sapphire lasers tuned to a wavelength of 920 nm (MaiTai HP DeepSee, Newport Spectra-Physics) for GCaMP6 signals or a wavelength of 1,045 nm (HighQ-2, Newport Spectra-Physics) for tdTomato and mCherry signals. The calcium imaging dataset was motion corrected using a custom-written MATLAB code based on a full-frame cross-correlation image alignment algorithm. Regions of interest (ROIs) were semi-automatically drawn using a custom algorithm based on fluorescence intensity, cell size and cell shape by visually inspecting movies, average of movies and s.d. of movies and then selecting neurons that showed fluorescence transients at least once during a session. The same area was imaged across training days to trace changes from same ensembles, but, due to intrinsic tissue movement, neuronal activity was realigned when calcium signals were analyzed. All pixels within each ROI were averaged to create a fluorescence time series, F. Surrounding ‘neuropil ROIs’ were drawn from 0.3 μm outside of the border of each neuronal ROI to 10.0 μm outside. Neuropil ROIs excluded adjacent neuronal ROIs. Pixels within neuropil ROIs that showed apparent calcium transients exceeding 3 s.d. of the difference in fluorescence between each neuropil ROI pixel time series and the neuronal ROI time series were excluded from further analysis. The remaining neuropil ROI pixels were considered as background fluorescence and averaged to create a time-varying background fluorescence trace. The time-varying baseline (F0) of a fluorescence trace was estimated by the following procedure. A preliminary baseline fluorescence time series, Pre F0, was LOESS smoothed with 120 frames. Preliminary ΔF, Pre ΔF, was obtained by subtracting Pre F0 from F. Noise of Pre ΔF was estimated by subtracting LOESS-smoothed Pre ΔF from the s.d. of Pre ΔF. The offset of ΔF was determined by the mean of the distribution of Pre ΔF that did not exceed two times the noise. The baseline fluorescence trace, F0, was estimated by adding the offset to Pre F0. ΔF/F for neuronal ROIs was obtained by subtracting F0 from F and dividing it by F0. The background fluorescence trace ΔF/F for neuropil ROIs was estimated in the same manner—that is, as the ΔF/F for neuronal ROIs. The background fluorescence trace was subtracted with a 0.7 weight from the neuronal ROI fluorescence trace for each neuronal ROI. For pixel-based imaging analysis of MD, fluorescence change maps of images were color-coded by MD and averaged. For pixel-based analysis of different movement paths, fluorescence change maps of images for each movement path were differently color-coded and overlaid.

Tissue fixation, immunohistochemistry and acquisition of confocal and light-sheet microscope images

Animals were deeply anesthetized with a mixture of ketamine and xylazine and then perfused transcardially, first with PBS (pH 7.4) and next with 4% paraformaldehyde (PFA) dissolved in PBS. The brains were removed and post-fixed in 4% PFA overnight at 4 °C. For confocal microscope images, the brains were embedded in 10% melted gelatin solution for 50 min at 50 °C. Melted gelatin solution was then refreshed, and the gelatin solution with the embedded brains was solidified at 4 °C for about 30 min. Then, the solidified gel was trimmed around the embedded brain to a small cube shape, and the cube was stored in 4% PFA overnight. The gelatin cube brain was coronally sectioned (100 μm thick) using a vibratome (Leica Biosystems). For PV immunohistochemistry, after blocking with a solution (1% normal donkey serum/0.1 Triton X-100 in PBS), brain slices were incubated in primary antibodies (1:500 mouse anti-PV, P3088, Sigma-Aldrich) for 48 h at 4 °C. After washing three times in PBS, the brain slices were incubated in a secondary antibody (Cy5-conjugated donkey anti-mouse IgG, cat. no. 715-585-150, diluted 1:1,000 in PBS, Jackson ImmunoResearch) for 2 h at room temperature, followed by three washes in PBS. The brain slices were mounted on the slide glass with a DAPI-containing mounting solution (DAPI Fluoromount-G, SouthernBiotech). For Nkx2.1-2a-CreER::Ai14 and Nkx2.1-2a-CreER::Flex-FlpO mice immunohistochemistry, after i.p. administration of ketamine/xylazine mixture (50 mg kg−1 ketamine, VETCO, 5 mg kg−1 xylazine, AKORN) and a foot pinch to check adequate sedation, the mice were trans-cardially perfused with 15 ml of cold saline solution, followed by 20 ml of cold 4% PFA solution in PBS. After post-fixation in 2% PFA in PBS overnight, 60-μm brain sections were prepared using a Leica vibratome and collected in PBS, permeabilized in 0.5% Triton X-100 in PBS followed by washing for 1 h in blocking reagent (BR: 0.1% Triton X-100 and 10% donkey serum in PBS). The sections were treated in primary antibody solution in BR overnight at 4 °C. The following primary antibodies were used: rat anti HA (1:500, Roche, cat. no. 11-867-423-001), chicken anti GFP (1:800, abcam, cat. no. ab13970) and mouse anti-AnkG (1:500, UC-Davis/NIH NEUROMAB, cat. no. clone N106/36 75-146). After three washes (10 min) in PBS, the slices were incubated in BR with secondary antibodies (Jackson ImmunoResearch) for 2 h at room temperature containing appropriate fluorophores (CyX or Alexa) at 1:1,000. The slices were embedded in Fluoromount-G (Thermo Fisher Scientific) (K1) after two final washing steps in PBS. The fixed and immuno-stained brain slices were imaged using an upright confocal microscope (Zeiss LSM880). For light-sheet microscope images, brains were perfused as described above and coronally sectioned (2 mm thick) using a vibratome (Leica Biosystems). The brain slices were cleared using the Passive Clarity protocol61. Images of the cortex were collected with a Zeiss light-sheet microscope at ×25 magnification. Light-sheet microscope image processing and three-dimensional rendering were performed with arivis Vision4D.

Preparation for acute cortical slices

Mice were anesthetized with isoflurane and decapitated. The brain was removed and rapidly placed into ice-cold cutting solution containing (in millimolar): 215 sucrose, 26 NaHCO3, 20 glucose, 4 MgCl2, 4 MgSO4, 2.5 KCl, 1 CaCl2 and 1.6 NaH2PO4. Cortical slices (300 μm thick) were prepared using a VT1000S vibratome (Leica Biosystems). Slices were incubated at 32 °C for 30 min in a holding chamber filled with artificial cerebrospinal fluid (ACSF) containing (in millimolar): 124 NaCl, 26 NaHCO3, 10 glucose, 3 KCl, 1.25 NaH2PO4, 2.5 CaCl2 and 1.3 MgSO4. Slices were then placed at room temperature and allowed to recover for 1 h before recording. All solutions were equilibrated with carbogen (95% O2/5% CO2).

Electrophysiology

Whole-cell patch-clamp recordings (electrode resistance 5–9 MΩ) were performed at room temperature using a Multiclamp 700B amplifier (Molecular Devices). Layer 2/3 ChCs were patched in current-clamp configuration using potassium-based internal solution (in millimolar: 10 NaCl, 1 MgCl2, 4 Na2-ATP, 124 K-gluconate, 10 Na2-phosphocreatine, 16 KCl, 0.4 Na-GTP and 10 HEPES) in ACSF containing (in millimolar: 124 NaCl, 26 NaHCO3, 10 glucose, 3 KCl, 1.25 NaH2PO4, 2.5 CaCl2 and 1.3 MgSO4). To examine the effect of DREADD virus hM4Di, we recorded the firing properties of hM4Di-expressing neurons before and after applying 10 μM CNO (Tocris, cat. no. 4936) (in ACSF).

Data acquisition and analysis

All data analysis was performed using Excel (Microsoft) and custom codes and toolboxes in MATLAB. Behavioral sessions in which the mouse made more than three successful accesses to the goal were analyzed. The movement signals of the ball maze, including quaternion and angular velocity, were sampled at 100 Hz and smoothed using a LOWESS regression of 500 ms width. We extracted animals’ virtual coordinates on the ball relative to the center of the hidden goal spot. We acquired mouse movement-related information based on translational movement (forward and backward; right and left) by using a precise Bluetooth motion sensor (LPMS-B, LP-Research).

Identification of movement bouts

We classified each behavior frame (sampled at 100 Hz, 1-ms bin size) as occurring during either rest or movement. We defined rest frames as those in which the movement speed is less than 0.02 m s−1 and acceleration is less than 0.2 m s−1. We defined movement frames as those in which a movement speed is greater than 0.03 m s−1 and not classified as rest frames. Parameter values were determined by visually comparing videos with movement speed and acceleration traces. The uncategorized frames that did not meet the above criteria were further categorized as follows. If both ends of the bout of uncategorized frames were connected to rest frames and the duration of the bout of uncategorized frames was less than 1 s, the uncategorized frames were identified as rest frames. If either both ends of the bout of uncategorized frames were connected to movement frames or the state of connected frames of one end of the bout was different from that of the other end, the uncategorized frames were identified as movement frames.

Movement direction

Movement direction (MD) was determined by the inverse tangent of forward–backward speed over right–left speed. Goal angle was defined as the angle passing through the goal spot from the mouse’s two-dimensional virtual position. Goal-directed movement epochs were determined if the mouse’s MD was within the goal angle. Percentage of goal-directed movement was determined by the ratio of goal-directed movement epochs to overall movement epochs. Goal-directed movement bout was identified as a bout of movement in which mice pursued the hidden goal location and received the reward. Non-goal-directed movement bouts were defined as bouts wherein the animal does not reach the goal.

Classification of movement-related neurons

Modulation of neural activity was frequently observed between movement and rest epochs. We classified individual neurons into three categories: movement-positive, movement-negative and non-movement. Movement-positive or movement-negative neurons were identified if their mean activity during movement epochs was significantly higher or lower than during rest epochs, respectively. If there was no significant difference in mean neuronal activity between movement and rest epochs, neurons were classified as non-movement cells.

Estimation of probabilistic neural tuning curves

To estimate calcium events, calcium signals were deconvolved using an Online Active Set method to Infer Spikes (OASIS) with FOOPSI approach and auto-regressive models with order 2. The values of calcium event estimate s were thresholded to 0, producing binary events that represent estimated calcium events. To focus on the tuning curves of premotor neurons to MD, we, therefore, excluded periods of immobility. Using this event estimate, we computed the probability of a neuron to be active, P(active), as the period of activity of a neuron over the total period of a recording session, which corresponds to the marginal likelihood probability distribution in a Bayesian approach. We divided the MD in 5° bins. Each bin represents a discrete state of MD. We then computed the likelihood probability distribution that a cell is active given MD, P(active|MDi), as the period of activity in direction state MDi over the total period in state MDi. The distribution was smoothed with a Savitzky–Golay filter. To test s.d. from random firing patterns, we carried out a bootstrapping procedure as follows. For each cell, deconvolved data were circularly shifted by different random values of shifts, and the likelihood probability distribution of the randomized data was estimated. This procedure was repeated 100 times with different random values of shifts. The mean value and s.d. of the randomized dataset were used to compute the z-scored likelihood distribution of actual data. A cell is defined as an active cell if the likelihood distribution of actual data is significantly deviated from that of the randomized dataset (P < 0.05).

Neurons were considered to be directionally tuned if they showed significant tuning with MD (ANOVA, F-test, P < 0.05), and they showed a good fit of tuning function. To obtain the tuning curve, the z-scored likelihood distribution of actual data was fitted with the sum of two von Mises distributions62:

$$R(\theta )={a}_{0}+{a}_{1}{e}^{kcos(\theta -{\theta }_{0})}+{a}_{2}{e}^{kcos(\theta -{\theta }_{0}+180^\circ )}$$

where R is the response to movement in a direction θ; θ0 is the PD; and a0, a1, a2 and k are fitting parameters. We estimated fitting parameters by using lsqcurvefit in the MATLAB function. The preferred direction PDi for neuron i was defined as the MD corresponding to a peak in the tuning curve response. Neurons were considered to be direction selective if they fit the von Mises distribution well (P < 0.05), and if their direction-selective index (DSI) defined as \({DSI}=\frac{{R}_{{pref}}-{R}_{{oppo}}}{{R}_{{pref}}+{R}_{{oppo}}}\) was greater than 0.4, where Rpref and Roppo are the mean of the normalized response to the PD and that of the opposite direction (the PD + π), respectively.

Bayesian decoding analysis

In addition to the estimation of the likelihood distribution, P(active|MDi), we computed the probability of being in a given state of movement direction, MDi, P(MDi), as the period in the direction MDi over the total period of a recording session, which corresponds to the prior probability distribution. Using Bayesian approaches63, we inferred the posterior probability distribution function that the animal is in an MD given the activity of active neuron k at a given time point t.

$$P\left({MD}|{active}\right)=\frac{P\left({active}|{MD}\right)P\left({MD}\right)}{P\left({active}\right)}=\mathop{\prod }\limits_{k=1}^{N}\frac{P\left({{active}}_{k}|{MD}\right)P\left({MD}\right)}{P\left({{active}}_{k}\right)}.$$

where P(MD|active) is a vector of a posterior probability distribution of behavioral states, and N corresponds to the number of neurons used. To decode the direction of movement, we considered the direction associated with the maximum a posteriori (MAP).

$$\hat{\rm{S}} ={argmaxP}({MD}{\rm{|}}{active})={argmax}\frac{P({active}{\rm{|}}{MD})P({MD})}{P({active})}$$

where \({\hat{S}}\) is the decoded MD. The decoding error was computed as the angular difference between the decoded and actual MD at the observed time.

Pairwise correlations

We calculated pairwise correlations between neuronal pairs by measuring coincident events64. For neuron i, the events Ei were vectorized in a binary manner. The pairwise correlation for the pair i and j is given by

$${CI}_{ij}=\frac{{E}_{i} \times {E}_{j}-N {\langle}{E}_{i}{\rangle}{\langle}{E}_{j}{\rangle}}{N\sqrt{{\langle}{E}_{i}{\rangle}{\langle}{E}_{j}{\rangle}}}$$

where N is the number of image frames, and \(\langle {E}_{i}\rangle\) is the expected number of events for neuron i. We categorized positively and negatively correlated pairs if the confidence interval is greater than 0 and less than 0, respectively.

Automated detection of ChC–AIS

To label ChCs in M2, we injected AAV1-CAG-Flex-TdTomato (400 nl, Addgene, cat. no. 28306) into L2 of M2 in Vipr2-Cre mice. Once the brain slices were stained with immunohistochemistry and imaged through the confocal microscope described in the ‘Tissue fixation, immunohistochemistry and acquisition of confocal and light-sheet microscope images’ subsection, each stack of tiled confocal images (generally 3,800 × 1,950 × 10 in pixel or 400 × 206 × 10 in μm) from three different fluorescence channels (green for gephyrin puncta antibody, red for TdTomato expressed in ChC projection and far-red for ankyrin G (AnkG) antibody targeting AIS) was processed simultaneously to detect AISs innervated by axonal cartridges of ChC and co-localized gephyrin puncta using a custom-written program in MATLAB. Features of processed images were segmented automatically by boundary detection (bwboundaries function, MATLAB) in each planar image of red and far-red channels after binarization by adaptive threshold (adaptthresh function, MATLAB, sensitivity = 0.08 and neighborhood size = 19 for AIS, sensitivity = 0 and neighborhood size = 15 for ChC). Segments in different axial planes were then filtered through several criteria, including intensity, size and width, and registered to recover the whole AISs or ChC cartridges. Only AISs longer than 10 µm were selected for the further analysis. For each registered AIS, we overlaid its segment on detected ChC cartridges in each axial plane and classified it as a ChC–AIS when any co-localized area existed. For demonstration purposes, fluorescence images shown in figures are maximum intensity projections of corresponding volumetric stack with pseudo-colors.

Quantification of characteristic parameters

For each detected ChC–AIS segment, we calculated the lengthwise axis. Projected intensity profiles of ChC and AIS on the axis were then applied to measure the total AIS length (LAIS), the ChC cartridge length (LChC) and the AIS length covered by ChC (LChC_AIS). To ensure the exact LChC measurement, we extended the ROI 5 µm longer than the detected AIS segments that we identified. Half of the maximum intensity for each profile was used as a threshold for measurement. The area of ChC on AIS (AChC–AIS) was calculated as the mask size for segmentation. We computed the normalized ChC–AIS size, the presynaptic parameter, as

$${PRE}=\frac{{A}_{{ChC}-{AIS}}}{{L}_{{AIS}}}\times \frac{{L}_{{ChC}-{AIS}}}{{L}_{{ChC}}}$$

from these morphological quantities.

We used the particle detecting algorithm u-track65 to identify gephyrin puncta in each plane of the green channel. This algorithm fitted Gaussian kernels approximating the two-dimensional point spread function of the microscope (σ = 1.5 pixel or 234 nm) around local intensity maxima, where both position and amplitude were free parameters in the fit. The intensity of detected gephyrin punctum is represented by a modified z-score calculated from the median and s.d. of all the detected gephyrin puncta from the tiled image.

To evaluate the postsynaptic strength, a detected gephyrin punctum was classified as AIS-associated when its detected position resides in the boundary of a registered AIS. In the same manner, an AIS-associated gephyrin punctum was labeled ChC–AIS-associated when its position co-localizes in the boundary of ChC on AIS simultaneously. Summation of the z-score of gephyrin puncta associated with the total AIS (ZAIS), and only a portion of ChC–AIS (ZChC–AIS) was used for calculation of the corresponding gephyrin intensity, the postsynaptic parameter, as follows:

$${POST}=\frac{{Z}_{{ChC}-{AIS}}}{{Z}_{{AIS}}}$$

The corresponding gephyrin intensity equals 1 when all the gephyrin puncta on the AIS are located on the corresponding ChC. When the ChC does not have corresponding gephyrin puncta on the bound AIS, its value is 0.

Statistics

Statistical analyses were performed using either MATLAB (MathWorks) or OriginPro (OriginLab). No statistical methods were used to pre-determine sample sizes, but our sample sizes are similar to those reported in previous publications64. All statistical tests are described in the corresponding figure legends. Normality of distributions was tested for each dataset using Lilliefors test to decide whether to use parametric or non-parametric tests. For parametric tests, two-tailed Student’s t-test, two-sample t-test, two-tailed paired t-test, one-way ANOVA, one-way repeated-measures ANOVA and two-way repeated-measures ANOVA were performed to compare population means across animals and conditions except where noted. For ANOVAs, Fisher post hoc tests were used for multiple comparisons. When sphericity was violated, we used Greenhouse–Geisser correction. Chi-square analyses were used to compare proportions. Pearson’s linear correlation coefficient was used to measure the correlation between two variables. For non-parametric tests, two-tailed Wilcoxon–Mann–Whitney test and Friedman test with Dunn post hoc tests were performed to compare the population median and differences with dependent variables across animals and conditions, respectively. Two-sample Kolmogorov–Smirnov test was performed to compare probability distributions between groups. The number of animals and the number of cells used for analysis are specified in the figures, the figure legends and the text.

Reporting summary

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