Abstract
Sensory processing in the cortex reflects both adaptation to external stimuli and changes in internal state. To investigate how these processes interact in layer 2/3 of mouse V1 we combined calcium imaging, optogenetics and circuit modelling. We find that locomotion preferentially increases gain in pyramidal cells (PCs) that sensitize during visual stimulation compared to those that depress. A model explains this differential modulation through three mechanisms: (i) variations in the strength of PV and SST connectivity to individual PCs, (ii) broad locomotion-dependent weakening of PC and PV synapses, and (iii) reduced SST inhibition targeting sensitizing PCs. These results demonstrate that behavioural state selectively shifts cortical computation toward distinct adaptive regimes. The apparently paradoxical combination of increased PC gain but decreased synaptic strength is consistent with a state-dependent gating mechanism that boosts signals leaving V1 while simultaneously preventing disruption of the local excitatory-inhibitory balance required for stable computation.
Introduction
Sensory processing in the cortex is adjusted both by adaptation to the external environment and changes in the internal physiology of the animal associated with behavioural states such as attention, arousal and satiety1–5. The mechanisms by which external and internal variables interact within the cortical circuitry are not understood. Here we investigate this question by analyzing how the change in state associated with locomotor activity impacts adaptation in primary visual cortex (V1) of mice6.
The dynamics of neurons in V1 reflect adaptation on multiple time-scales. In pyramidal cells (PCs), the initial excitatory response to an increase in contrast is followed by a fast (subsecond) decrease in gain reflecting depression in feedforward inputs from the LGN7,8. This is immediately followed by a slower phase of adaptation that varies dramatically across the PC population: while some PCs depress in response to a high-contrast stimulus others simultaneously sensitize9. PCs within layer 2/3 are not, therefore, a homogenous population: to understand gain control we must take into account variations in local inhibitory circuits in which they are embedded.
The onset of locomotion signals changes in internal state associated with attention or arousal, acting in less than a second to amplify visual responses in PCs3,10–12. A major driver of this increase in gain are cholinergic fibers arriving from the basal forebrain2,13–15. Some of these fibers make direct synaptic connections that excite interneurons expressing vasoactive intestinal peptide (VIP)16, leading to amplification of PC responses through a VIP->SST->PC disinhibitory pathway. The majority of the cholinergic input, however, innervates V1 diffusely to modulate circuit function through extra-synaptic (muscarinic) receptors2,13,16. In vitro experiments have shown that M1 and M3 receptors on soma and dendrites of PCs can increase excitability while M2 receptors on axonal compartments reduce synaptic release probability16–18. Accounting for state-dependent changes in cortical processing therefore requires an integrated understanding of changes in both electrical activity and the strength of synaptic connections12. The difficulty is that modulations of synaptic strengths are very hard to quantify in awake and behaving animals: recording from connected neuron pairs remains technically challenging and is limited to anaesthetized animals in which inhibitory microcircuits are severely compromised19–21. Current understanding of synaptic modulation in cortical circuits is derived from ex vivo studies or inferred from indirect in vivo observations and modelling12,22,23.
To understand how locomotion and adaptation interact in V1 of mice we used calcium imaging to record visual responses in PCs and the three major classes of interneuron (VIP, SST and PV) together with optogenetics to identify key interactions and a data-driven circuit model to estimate changes in synaptic weights. The model demonstrates that long-range inputs to VIPs that increase visual gain in the locomoting state also govern the time-course of adaptation over the behavioural time-scales of seconds. These inputs do not act uniformly across the PC population but preferentially increase the gain of neurons that sensitize to a high-contrast stimulus. Contrary to the prevailing model of gain control through the VIP->SST->PC pathway we find that visual responses in SSTs are not inhibited by locomotion but instead weakly enhanced. The model reconciles these observations through a neuromodulatory decrease in synaptic outputs across PCs and interneurons. Locomotion preferentially increases the gain of PCs that undergo the sensitizing form of adaptation because these receive a stronger SST connection than depressor PCs rendering them more sensitive to the weakening of SST synapses. These results provide an integrated view of the circuit mechanisms that adjust visual processing in V1 when an animal switches between resting and active states.
Results
Differential effects of locomotion on the fast and slow phases of adaptation
To understand how changes in brain state interact with adaptation in V1 we used two-photon calcium imaging to measure the activity of excitatory and inhibitory neurons in layer 2/3 during periods of rest and locomotion (Fig 1A, see Methods). The GCaMP6f signal in PCs responding to a high contrast stimulus (20° drifting grating at 1 Hz, 10 s duration) are shown in Fig. 1B. Locomotion increased the response averaged across all PCs by a factor of 2.2 ± 0.9. The dynamics of these responses varied widely between individual neurons; while some PCs responded with high initial gain and then depressed, others responded with low initial gain and then sensitized. This heterogeneity is illustrated by the raster plot in Fig. 1B which shows 522 neurons ordered by the time of peak activity: depression (early peak) and sensitization (late peak) were similarly represented in the two behavioural states (Fig 1B, top).

Slow adaptation in pyramidal cells during rest and locomotion.
A. Top: Mice running on a treadmill were shown a visual stimulus (drifting grating, 20° in size) for 10 seconds. Bottom: example field of view (FOV) showing PCs in V1 expressing GCaMP6f (grey) and corresponding regions-of-interest (ROIs) for individual neurons (rainbow). Scale bar represents 200 µm and stimulus lasts 10 s. B. Top: raster plots showing average calcium responses from individual PCs that were responsive to the stimulus during locomotion and rest (Same cells recordings between rest and locomotion, n = 522 neurons, from 9 mice, cells nested within animals). Responses are averaged over 10 stimulus trials then sorted by time of maximum amplitude in rest and locomotion independently. Bottom: average calcium response of all PCs to the visual stimulus during locomotion (left) and rest (right). C. Distributions of adaptive indices (AIs) in the PC population during locomotion (top) and rest (bottom) in sensitizers (blue), intermediate cells (grey) and depressors (green). Both distributions can be described by Gaussians with similar x0 and different width (Rest, x0 =0.001±0.9, width = 0.93±0.4; Loco, x0 = -0.006±0.3, width = 0.33±0.02). D, E, F. Splitting the distribution of PCs according to their AI reveals that the tertile with lower AI showed slow sensitization, the tertile with intermediate values showed little adaptation, and the tertile with higher AI showed slow depression. G. Differences in gain of sensitizers (blue), intermediate cells (grey) and depressors (green) measured as the integral during the stimulus show that locomotion caused a stronger gain increase in sensitizers than in depressors (p < 0.001, Linear Mixed Model).
The increase in gain during locomotion was manifested in two ways; a 6-fold increase in the number of PCs generating a significant response (Supplementary Table 1) and an increase in the average amplitude of these responses measured as the integral during the 10 s stimulus (Fig. 1B). To investigate how these changes in gain affected PCs undergoing different forms of adaptation we split the population into three groups of equal size based on the distribution of a metric called the adaptive index (AI; Methods). These groups were sensitizing (AI less than zero), intermediate and depressing (AI more than zero; Fig. 1C). The AI, when computed separately for rest and locomotion and averaged across the whole PC population, was similar during locomotion (-0.006 ± 0.3; mean ± sem) and rest (0.001 ± 0.9; Fig. 1C) but the amplitude of the visual response increased by a factor of 4.5 ± 0.7 in sensitizing PCs, 2.5 ± 0.3 in intermediate group and 2.2 ± 0.2 in depressors. Locomotion therefore increased the gain of sensitizing PCs about twice as strongly as depressors (Fig. 1D-G).
Locomotion was associated with a second notable change in the dynamics of the PC population – a narrower distribution of adaptive effects (Fig. 1C). Cells that depressed at rest showed a shift towards sensitization, while cells that sensitized showed a shift towards depression (Supplementary Figure 1). Although this convergence may partly reflect differences in variability between states, the more uniform dynamics of adaptation parallels the increased temporal correlation observed across the PC population in behavioural states characterised by locomotion24.
The immediate spiking response to a high-contrast stimulus is dominated by depressing adaptation7,8 but the raw signal from calcium reporter proteins such as GCaMP does not easily distinguish this phase because of the gradual accumulation of calcium in the neuron. Several algorithms for estimating spike rates from calcium signals are now in use25–27 and we applied MLspike because it is based on a biological model of GCaMP activation and calcium dynamics that has been shown to perform better than others28 (Fig. 2-A-C). The first component of the spiking response was followed by fast depressing adaptation, as expected from electrophysiology7,8,29 (red arrows In Fig. 2A-B). During locomotion, the initial peak amplitude was not significantly different in PCs that depressed (1.15 ± 0.08 Hz) or sensitized (1.11 ± 0.08 Hz), indicating similar strength of the feedforward input across the PC population (Fig. 2C).

Differential effects of locomotion on fast and slow components of adaptation in PCs and interneurons.
A. Estimated spike rate averaged across all sensitizing PCs measured during locomotion (Data from all neurons responsive to the stimulus during locomotion including non-responsive cells during rest, n = 479 neurons from 14 mice). The GCaMP signal averaged across the same set of neurons is shown in grey. The fast depressing component of adaptation is highlighted by the red arrow. Stimulus duration 10 s. B. As A, but for the second (pre-dominantly non-adapting) tertile of PCs. C. As A, but for the depressing tertile. The trace from A is superimposed (light blue) showing the almost identical initial amplitude of the response in sensitizing and depressing PCs. D. Comparison of average spiking response at rest and during locomotion in the sensitizing tertile of PCs in which paired measurements were made (158 neurons in 9 mice). The relative change in the response during locomotion was 4.7 ± 1. E. Comparison of average spiking response at rest and during locomotion in the depressing tertile of PCs. The relative change in the response during locomotion was 1.4 ± 0.3 which was significantly smaller than the sensitizing tertile (T-test, p < 0.001). F. The time-varying difference in spike rate of sensitizing and depressing PCs. G. Average response of VIPs to the visual stimulus during locomotion and rest. The gain during locomotion increased by factor of 5.1 ± 1.0, measured from the integral of the responses. H. Average response of PVs to the visual stimulus during locomotion and rest. The gain during locomotion increased by factor of 1.7 ± 0.2. I. Average response of SSTs to the visual stimulus during locomotion and rest. SSTs showed a much smaller, nonsignificant, gain change 1.2 ± 0.2, p = 0.28. J. Distribution of adaptive indices in VIP interneurons (n = 122 neurons in 2 mice). Note that AI was measured from GCaMP signals, as for PCs in Fig. 1. VIPs were predominantly sensitizing. Psens = 0.56 at rest and 0.90 during locomotion. K. Distribution of adaptive indices in PVs (n = 97 neurons in 3 mice). PVs were predominantly sensitizing. Psens = 0.64 at rest and 0.86 during locomotion. L. Distribution of adaptive indices in SSTs (n = 82 neurons in 4 mice). SSTs were predominantly depressing at rest and during locomotion. Psens = 0.37 at rest and 0.21 during locomotion. Results from D to L are from cell-paired recordings in the two states.
Comparing activity at rest and while running revealed a powerful effect on both first and second phases of the response but this varied across the PC population. In the sensitizing tertile the initial peak driven by feedforward input underwent a relative increase of 2.1 ± 0.7 and the response integrated over the whole stimulus period a relative increase of 4.7 ± 1 (Fig. 2D). But in the depressing tertile, locomotion did not significantly change the initial fast response while the integrated response only increased by a factor of 1.4 ± 0.3 (Fig. 2E). Changes in internal state associated with locomotion do not, therefore, act uniformly across the PC population but preferentially increase the gain of neurons that undergo the sensitizing form of adaptation (Fig. 2F).
A data-driven model of contrast adaptation and the effects of locomotion
To understand how an active behavioural state differentially alters gain across PCs we constructed a population model of signal flow based on neuronal input-output functions expressed as firing rates30–32 (see Methods). The model took into account three aspects of circuits in layer 2/3: i) the measured response dynamics of PCs and the three major types of interneurons (Fig. 2G-L); ii) the dynamics of signals that arrive from other brain regions (Fig. 3A), and iii) the known connectivity patterns of neurons within this layer (Fig. 3B). Code and example data sets are available at https://github.com/lagnadoLab/CortexModel.

A model of signal flow in layer 2/3.
A. Schematic showing the targets of three external inputs into layer 2/3 of V1. Feedforward excitation targets PVs and PCs; feedback input targets all populations 50,51 and the slower sensitizing input enters through VIPs as well as directly activating PCs and PVs52. (Vertical bar: 0.5 Hz, horizontal bar: 5 s) B. Schematic showing the main excitatory (arrow tip) and inhibitory (round tip) connections between cell types within L2/3 of V1. PCs form excitatory connections with all other neuron types including themselves. PVs mainly target PCs and other PVs while SSTs inhibit all other cell types but avoid inhibiting each other. VIPs almost exclusively inhibit SST interneurons. (Vertical bar: 0.05 ΔF/F, horizontal bar: 5 s). C. Left: schematic showing the experimental paradigm to test if VIPs were a target for a slow sensitizing signal driving adaptation in layer 2/3: VIPs were silenced optogenetically while simultaneously recording activity in SSTs. Right: example response of an SST neuron during stimulus presentation alone and stimulus paired with optogenetic silencing of VIPs. D. Average response of SSTs with and without optogenetic silencing of VIPs (n = 83, from 4 mice). Silencing VIPs almost completely blocked slow adaptation. Light grey shade shows the stimulus time (10 s). E. The slow sensitizing input to the model (SS) was based on the average response of the VIP population during locomotion and consists of a step and sigmoid function with a time-constant = 1.71 s.
i) The dynamics of neurons in layer 2/3
A key determinant of the magnitude and direction of slow adaptive changes in a PC is the local inhibitory microcircuit in which it is embedded: PCs in which direct SST inputs dominate over PV inputs tend to sensitize while those in which PV inputs dominate depress9. We therefore also experimentally measured the effects of locomotion on gain and adaptation in the three major interneuron types to use their response dynamics in the model (Fig. 2G-L). VIPs underwent the strongest modulation: the density of responsive neurons changed by a factor of 3 (Supplementary Table 1), and the integrated amplitude of these responses by a factor of 5.1 ± 1.0 (Fig. 2G). Simultaneously, locomotion caused the ratio of sensitizing (AI <0) to depressing (AI > 0) VIPs to increase from 1.3 at rest to 9 (Fig. 2J). PVs were more weakly modulated, with integrated responses changing by a factor of 1.7 ± 0.2 while the ratio of sensitizers to depressors also increased from 1.8 to 6.1 (Fig. 2H and K). In contrast, locomotion did not significantly alter the number of responsive SST neurons or the amplitude of their responses (gain factor of 1.2 ± 0.2; p = 0.28; Fig. 2I and L). This observation was surprising given that VIPs powerfully inhibit SSTs and locomotion activates a VIP->SST->PC disinhibitory pathway often highlighted as an important contributor to gain control11,33,34. However, the influence of this pathway is known to vary, consistent with reports that SST response to locomotion depend strongly on the visual stimulus3,12. A major aim of the model, therefore, was to take a more integrated view of gain control that considered multiple interacting pathways within layer 2/3.
The distribution of response dynamics in interneurons was more homogeneous than in PCs. The probabilities of a PC being sensitizing (AI <0, Psens) or depressing (AI > 0, Pdep) were both ∼0.5 (Fig. 1C), but during locomotion sensitization dominated in VIPs and PVs (Psens = 0.9) while depression dominated in SSTs (Pdep = 0.8; Fig. 2J-L). These more consistent, cell-type-specific dynamics allowed us to represent each interneuron class by its characteristic average response (Fig. 2G-I), which we used as empirical input to a population mean-field model. Mean-field models have been widely used to describe the average behaviour of large populations of interacting neurons without simulating each neuron individually30,35,36. The network was represented by a system of four first order ordinary differential equations30:

where 𝑖, 𝑗 are iterating through the four neuronal populations (PC, VIP, PV and SST), 𝑗 is a presynaptic population and 𝑖 postsynaptic, 𝑟 is a firing rate and τi is the time-constant for that population. 𝑓(𝑥) is a neuronal input-output function and here we used a rectified power law32. The terms 𝑤𝑖𝑛 𝐼𝑛 express the connection weights and amplitude of external inputs, and 𝑏𝑖 the baseline activity of postsynaptic cell i. The connection weight between populations j and i, 𝑤j𝑖, is simply the product of the total number of synaptic connections, 𝐶j𝑖, and the average strength of an individual synapse between neuron type j and i, 𝑠j𝑖:

To compare the model to experiments, it was important to consider that not all presynaptic neurons are activated by the stimulus and, even if they are, they do not all activate the postsynaptic population because the connection probability (𝑝j𝑖) is usually less than one. If, for instance, electrodes are placed on a PC and a nearby PV interneuron the probability of them being connected is only ∼0.37 at distances less than ∼150 μm while the average probability of an SST interneuron is even lower at ∼0.2737–39. These factors can be taken into account by expanding relation 2 as

where 𝑁j is the number of responsive presynaptic cells, defined as described in Methods. Below we infer changes in individual synaptic weights (𝑠j𝑖) associated with a transition into the active state by comparing experimentally measured changes in 𝑁j (Supplementary Table 1) to changes in connection weights (𝑤j𝑖) estimated by fitting the model.
ii) The dynamics of signals entering layer 2/3
Excitatory signals entering layer 2/3 are of three main types40,41: feedforward (FF) drive originating from the lateral geniculate nucleus (LGN) and transmitted via layer 4, feedback from higher order cortices (FB)42,43 and modulated inputs (SS), such as those gated by cholinergic signals from the basal nuclei11. Electrophysiology has shown that FF inputs to layer 2/3 are dominated by fast depressing adaptation occurring within a few hundred milliseconds and the fast phase of adaptation in PCs fell within this range7,8 (Fig. 2A-B). Calcium imaging in vivo has shown that drifting gratings lasting seconds can also generate a slower sensitizing component in FF inputs that enter layer 2/3 from layer 422,44. The FF input was therefore modelled with both these components, as shown in Fig. 3A.
The second type of input to V1 is feedback from higher visual areas45–47 and SST interneurons are one of their targets46,48,49. We have limited understanding of the dynamics of the FB signal over the time-scale of our stimulus, so, for simplicity, it was modelled as a step beginning at a delay of 380 ms after stimulus onset (Fig. 3A).
The third type of inputs to layer 2/3 are visually-activated signals that are strongly sensitizing in the locomoting state and drive slow sensitization. The dynamics of this signal were inferred from the visual response of VIPs measured experimentally during locomotion (Fig. 2G). We used these measurements because optogenetic experiments confirmed that activity in VIPs drove adaptation in downstream SST neurons, to which they are known to connect strongly11,33,34 (Fig. 3C-D). To carry out this test we had to express the inhibitory photoprotein ArchT in VIPs and GCaMP6f in SSTs. Expressing different proteins in two interneuron populations was achieved by crossing a recombinant mouse line expressing Cre (VIP-Cre) with a Flippase expressing line (SST-Flp), then injecting two viral vectors that were Cre and Flippase dependent respectively (see Methods). Suppressing activity in VIPs almost completely abolished the slow component of adaptation in SSTs (Fig. 3D). Visually-driven inputs to VIPs include local recurrent excitation33 and inputs from higher visual areas53, and the combined dynamics of the later were modelled on the VIP response (Fig. 3E). This slow sensitizing signal appears quite distinct from inputs from the basal forebrain which provide a binary locomotion state signal but have been found not to respond to visual stimuli54. Notably, the dynamics of sensitization in VIPs were similar to sensitization in PCs suggesting that this input dominated slow adaptation throughout the network (Supplementary Figure 2).
iii) Connectivity within layer 2/3
Cortical connections have been probed using a number of approaches, including viral tracing55, electrophysiology33,37,39 and optogenetics38, and we only considered connections that have been consistently observed in layer 2/3 and are strong enough to significantly influence the circuit (Fig. 3B). Not all neuron types connect; SST interneurons, for example, do not interact with each other while the very small number of connections from VIPs to PCs were neglected because these are not strong enough to significantly influence the circuit33,38.
Using optogenetic manipulations to constrain model solutions and test its predictive ability
The model was fit to average populational responses of PCs and interneurons by adjusting the weights 𝑤j𝑖of external and internal connections in layer 2/3 (see Methods). Given the large parameter space spanned by the model, many solutions were of similar quality. Rather than identifying a single optimal solution, our fitting procedure revealed a region of parameter space that yielded good fits.
First, we generated 100,000 sets of evenly distributed initial parameters using Sobol sampling22,56,57. Of these, only 37 produced “good” solutions with chi-square < 10 in the locomotion condition, defining the approximate boundaries of the viable region. Next, this parameter subspace was explored further by local optimization using 20,000 Sobol initial conditions for each synaptic weight. This produced ∼9000 good solutions in the locomotion condition with similar average and standard deviation to the initial 37. We then applied a third stage involving a series of experiments in which interneuron activity was altered optogenetically, which constrained the number of good solutions (to ∼900) and the viable region of parameter space (Fig. 4). This third stage could not be usefully applied to data at rest because there were not enough recording episodes across all four optogenetic conditions and responses were smaller and more variable than during locomotion24. We therefore limited the number of solutions by using a lower chi-square value of 3. The average parameter values after reducing the number of good solutions through all the steps are used to analyze the predictions of the model in Figs. 5 and 6.

Testing the model using optogenetics
A. Top: Average PC response with and without optogenetic activation of SSTs. Separate experiments indicated that this intensity of photoactivating light increased SST activity by a factor of ∼1.79. The red trace shows the model prediction when SST activity within the model was increased by the same factor. Activation of SSTs decreased PC gain and increased sensitization (top, RMSE = 0.27). The grey control trace (No Opto) is averaged over all four optogenetic conditions in A and B. Bottom: Average PC response with and without optogenetic inhibition of SSTs. Separate experiments indicated that this intensity of photoactivating light decreased SST activity by a factor of ∼1.99. The red trace shows the model prediction when SST activity within the model was decreased by the same factor. Silencing of SSTs resulted in an increase in gain and a shift to more depressing dynamics (bottom, RMSE = 0.31). B. Same as in C but when PVs were optogenetically activated (top, by a factor of ∼2.5) or silenced (bottom, by a factor ∼2.0) during stimulus presentations. Activation of PVs decreased the gain of PCs (top, RMSE = 0.32). Silencing of PVs resulted in an increase in gain and shift to more sensitizing dynamics (bottom, RMSE = 0.28). C. Proportion of the initial “good” solutions to the model (chi-square < 10) that also provided good solutions incorporating the results of the optogenetic manipulations in A and B. Filtering of solutions on the basis of adding optogenetic conditions was carried out in series in the order 1-4. Applying filter 4 (PV inhibition) had little further effect on the number of good solutions i.e almost all good solutions incorporating manipulations 1-3 also predicted the effects of PV inhibition. D. Comparison of connection weights (mean ± SD) of all good solutions after applying optogenetic filters 1-3 and 1-4. All weights remain similar after the fourth filter and it is these averages that are presented in Figs. 5 and 6.

Locomotion modulates both electrical activity and the strength of synaptic connections.
A-D. Top: Average firing rates of PCs (A, black), VIPs (B, green), SSTs (C, blue) and PVs (D, dark red) during stimulus presentation at rest and their corresponding fits from the average of solutions calculated by the model (light red, RMSE = 0.19). Note that these traces show the average activity of only partially paired recordings, where only a subset of cells are matched between rest and locomotion (Rest n=158 from 9 mice, Locomotion n = 1437 neurons, from 14 mice). Bottom: average activity during locomotion in the same neuronal populations (RMSE = 0.11). E. Average resting connection weights from all solutions estimated by fitting the model to the activity of responsive neurons (Equation 2). F. The relative change in connection weights caused by locomotion (Equation 4). G. Relative change in synaptic weights based on estimated changes in connection weights (F) and measured changes in number of responsive cells (Supplementary Table 1; equation 3). Note that all excitatory and inhibitory synapses weaken except for synapses from SST to VIP which strengthen. H. The change in the total synaptic input activated by the stimulus, calculated from the average activity (Supplementary Table 2) and the change in connection weight in F (equation 5). The last column is the net change taking into account the polarity of the synapse.

Differences in PV:SST input ratio determine the direction of PC adaptation and the change in gain associated with locomotion.
A. Activity of PCs from the tertile with lower AIs (sensitizers) at rest and during locomotion together with fits from the average of all good solutions calculated by the model (rest, RMSE = 0.22; loco, RMSE = 0.17). These are paired measurements from 158 neurons in 9 mice. During locomotion 7.5 ±1.2 more spikes were fired during the stimulus. B-C. As A, but for the intermediate and depressing tertiles, RMSEs were similar to sensitizers. During locomotion the stimulus generated 6.3 ± 0.9 more spikes in the intermediate group and 2.8 ± 0.4 in depressors. D-E. Heatmaps of the synaptic weights for each PC tertile at rest (D) and locomotion (E); sensitizers (Sen), intermediate (Int) and depressing (Dep). F. Amplitude change induced by optogenetic manipulation of SSTs and PVs in sensitizer (blue) and depressing (green) PCs. Note that sensitizers are preferentially modulated by SSTs and depressors by PVs as predicted by the model. (Inh: silencing with ArchT, Act: activation with ChrimsonR). G. Relative change in connection weights caused by locomotion for each subpopulation of PCs (calculated as equation 4). The key difference is the relative strength of PV and SST inputs. H. Relative change in synaptic weights caused by locomotion for each subpopulation of PCs. I. Change in total input during presentation of the stimulus received by each subpopulation of PCs. Sensitizers receive less SST inhibition than the intermediate and sensitizing tertiles. The last column shows the net change in total input, taking into account the polarity of the synapse.
The first optogenetic manipulation was to over-activate SSTs by expressing the excitatory photoprotein ChrimsonR using a Cre-dependent viral vector. Simultaneously, responses were recorded in PCs using GCaMP6f under the CaMKII promoter. The intensity of the photo-activating light was adjusted to increase the activity of SST interneurons by an average factor of ∼2 in locomoting animals, as estimated in a separate series of experiments9. Fig. 4A (top) shows how the average PC response in the locomotion state was reduced compared to interleaved control trials.
Scaling the average SST activity within the model by a factor of 1.7 while leaving all other parameters constant provided an accurate description of the change in average PC activity in only 74% of the original ∼9000 solutions (Fig. 4C). In other words, although a broad region of parameter space could reproduce the control data, introducing this optogenetic manipulation eliminated roughly one-quarter of the solutions, thereby narrowing the admissible parameter space.
After this first filtering step, we sequentially reduced the number of good solutions by constraining to results of SST silencing, PV activation and PV silencing, in this order. We found that while SST silencing and PV activation reduced the number of solutions to 25% and 11% of the original 9000, adding the last filter, PV silencing, had little further effect (Fig. 4C). Furthermore, connection weights remained identical when applying the first three optogenetic constraints compared to applying the fourth (Fig. 4D). PV silencing therefore served as a validation step: it confirmed the region of parameter space defined by the three previous filters instead of further refining it.
Locomotion increases PC gain but weakens their local synaptic output
Behavioural modulation of connection weights within layer 2/3 have been very hard to quantify experimentally, making it unclear how far changes in internal state adjust cortical processing through changes in neuronal activity as opposed to modulation of synaptic weights14,16. We used the model constrained by the four optogenetic manipulations to infer changes in synaptic weights. First, we investigated the action of locomotion averaged across the whole PC population (Fig. 5) and then explored why the subset of PCs that sensitize is modulated more strongly than those that depress (Fig. 6).
All the model solutions that allowed a good fit to the average visual responses in the four cell types closely followed both the fast and slow phases of adaptation at rest and during locomotion, as exemplified by the average solution (Fig. 5A-D, Supplementary Figure 3). Unsupervised clustering analysis identified a single cluster of solutions for locomotion and another for rest, indicating that these parameter sets form a continuum rather than falling into distinct categories. Moreover, examination of the distribution of each parameter revealed that all were unimodal, with no evidence for multiple peaks or clusters (data not shown). This pattern is consistent with gradual transitions within a single family of network configurations and supports the use of the mean as a representative summary. The average connection weights (Equation 2, wij) at rest are shown in the heatmaps in Fig. 5E and the relative changes with locomotion are summarized in Fig. 5F, calculated as:

Where free parameters predicted by the model could be compared with published experiment, there were several points of agreement. For instance, the relative strength of direct local connections to PCs were quantitatively similar to those measured using electrophysiology37,38. There were, however, differences with other attempts to infer connection weights. Using our nomenclature, a recent modelling study23 inferred a weight order in V1 at rest of 𝑤𝑃𝐶_𝑃𝑉 < 𝑤𝑃𝐶_𝑃𝐶 < 𝑤𝑃𝑉_𝑃𝑉 < 𝑤𝑃𝑉_𝑃𝐶, while our results infer 𝑤𝑃𝐶_𝑃𝐶 < 𝑤𝑃𝐶_𝑃𝑉 < 𝑤𝑃𝑉_𝑃𝑉 < 𝑤𝑃𝑉_𝑃𝐶 (Fig. 5E). This difference may reflect our models incorporation of long-range modulatory inputs, which also allowed it to predict other experimental observations, including a locomotion-dependent amplification of the slowly modulated input to VIPs11 and PCs52 and enhancement of feedforward drive to PCs58,59. The incorporation of long-range modulatory inputs into the model were essential to accurately estimating connection weights within layer 2/3 because removing these inputs did not yield any solutions following the same quality criteria (Supplementary Fig. 4, see Methods).
The model indicates that locomotion increases the gain of PCs through a broad combination of circuit effects but of particular importance is a 25-50% reduction in the strength of inhibitory synapses made by SSTs and PVs (Equation 3, sij; Fig. 5G). Strikingly, the model also predicts that the total weight of connections from PCs to all types of interneurons is decreased by one to three quarters following locomotion (Fig. 5F). The total synaptic input that neuron i receives from j, Iji, is proportional to the activity of j and can be expressed as:

Taking into account the 5-fold increase in the number of responsive PCs during locomotion (Supplementary Table 1) this leads to an estimated 90% decrease in synaptic strength across all PC targets (Fig. 5G). The model indicates that the large increase in PC and PV activity in the locomoting state is associate with a wide-spread decrease in the strength of their local synapses. This mechanism would allow large changes in the gain of signals leaving V1 for higher visual areas but without overexcitation of PC targets within the local circuit. The possible cholinergic mechanisms underlying these changes are considered in the Discussion.
In contrast to the rest of the local network, the average SST->VIP connection weight increased, by a factor of ∼8 (Fig. 5F). The number of responsive SSTs neurons increased by only 22% (Supplementary Table 1) indicating that the major cause was a strengthening of SST synapses (Fig. 5G). This differential pattern on excitatory synapses of PCs (suppression) and SSTs contacting VIPs (enhancement) could be consistent with known variations in the distribution of different muscarinic acetylcholine receptors (see Discussion).
Switching to the active behavioural state also increased the strength of specific inputs to layer 2/3, most obviously the FF connections to PVs and the SS and FB connections to VIPs (Fig. 5F). VIPs were the most striking target, explaining their dramatic increase in gain (Fig. 2G).
Another way to summarize the effects of locomotion is to consider the change in the total synaptic input (both excitatory and inhibitory) as PCs respond to the visual stimulus (Supplementary Table 2; equation 5; Fig. 5H). The last column in Fig. 5H shows this change, taking into account the input received from all connected populations averaged over the stimulus presentation. The net excitatory input driving the visual response is more pronounced in PCs and VIPs compared to PV and SST interneurons, consistent with the locomotion-associated changes in gain shown in Fig. 2. Notably, the model predicted almost zero net change in total input to SSTs, consistent with the negligible change in SST activity observed experimentally (Fig. 2I) but inconsistent with the simple VIP->SST->PC disinhibitory model. The overarching picture is that locomotion adjusts the gain of visual responses by modulating both excitatory signals entering layer 2/3 and the strength of local synaptic connections, expanding what has been observed in a previous study12.
Differential modulation of SST inputs onto sensitizing and depressing PCs
Why do some PCs sensitize while others depress? Optogenetic manipulations of interneurons indicate that the direction and amplitude of slow adaptation reflect the balance between PV and SST inputs9. PVs sensitize (Fig. 2H), so PCs in which these inputs dominate tend to depress, while SSTs depress (Fig. 2I), causing PCs in which these inputs dominate to sensitize. To make these ideas quantitative, we fit the model separately to the sensitizing, intermediate and depressing PC subpopulations (Fig. 6A-C). At rest, all the external connections to PCs had similar weights irrespective of adaptive properties; the stand-out differences were in the local inhibitory connections (Fig. 6D). In qualitative agreement with the “balance model”, the direction of adaptation of a PC was dependent on the ratio of the PV and SST inputs, which increased progressively between the sensitizing, intermediate and depressing populations in both rest (0.9, 1.8 and 2.7, respectively; Fig. 6D) and locomotion (1.3, 1.7 and 2.7, respectively, Fig. 6E). We tested this prediction of the model by comparing the effect of optogenetic manipulations of SST and PV interneurons in the locomotion condition, confirming that sensitizers are more influenced by SSTs while depressors are dominated by PVs (Fig. 6F). This balance also influences the release from inhibition that different PCs undergo during locomotion, with sensitizers receiving less inhibition than depressors from SST interneurons, while the inverse pattern is observed for PV connections (Fig. 6G).
In principle, the differences in connectivity between sensitizing and depressing PCs could reflect synaptic strength. We found, however, only slight differences in the synaptic weight of all cell types connecting to PCs (Fig. 6H) and similar net total input between depressors and sensitizers (Fig. 6I). Again, the key difference was the SST:PV input ratio: sensitizers experienced a pronounced decrease in total SST inputs and increase in PV input (Fig. 6I). Notably, the increase in PC gain associated with locomotion did not correlate with changes in total inhibitory input (Fig. 6I), consistent with evidence that inhibition acts divisively rather than subtractively60,61,62 (see Discussion). Overall, these results support the view that the enhanced gain observed in sensitizers is the result of their heightened exposure to a reduction in SST inhibition during locomotion.
Discussion
Adaptation is a fundamental aspect of sensory processing across cortical areas but it has not been clear how it is adjusted by changes in behavioural state that modulate these circuits. Here we have demonstrated that an active state acts on V1 to preferentially amplify responses in PCs that exhibit sensitizing adaptation over behavioural time-scales, with minimal effects on depressing PCs (Figs. 1 and 2). A data-driven network model indicates that locomotion modulates both the external inputs arriving to V1 and local synaptic connections. The differential modulation of the PC population reflects variations in their local inhibitory circuits: sensitizing PCs receive proportionally stronger SST input relative to PV input making them more susceptible to the locomotion-driven decrease in SST inhibitory strength (Fig. 6). More generally, these results build from the simple model of gain control through the VIP→SST→PC disinhibition pathway 11,63 by also considering the broader neuromodulatory actions of the cholinergic input to V1. The results, summarized in Fig. 7, indicate that locomotion increases the gain of PCs through a combination of circuit effects, including an increase in external inputs and a decrease in local inhibition (Figs. 5 and 6). We have not so far been able to identify other functions that correspond with sensitizing and depressing PCs: the initial gain of the visual response (Fig. 2C), receptive field location9 and orientation tuning9 are not significantly different between these groups.

Summary of effect of locomotion in V1.
From rest (left) to locomotion (right) the connections from external inputs increase while the strength of PC connections to other targets is reduced. Sensitizers (top) receive stronger SST inhibition, being more sensitive to their reduction during locomotion, while depressors (bottom) receive stronger PV inhibition.
Gating of the feedforward signal
The increase in gain during locomotion was profound: the number of PCs responding to the stimulus increased by a factor of six (Supplementary Table 1) and the average amplitude of those responses by a factor of 2-3 (Figs. 1 and 2). About 70–80% of PCs in layer 2/3 send axon collaterals to higher visual areas64,65 so these combined effects will strongly amplify the feedforward visual signal, at least to the drifting grating stimulus used here. The local recurrent signals are, however, strongly damped by a wide-spread decrease in the strength of recurrent PC synapses subject to local modulation (Fig. 5). This decoupling of spiking activity and synaptic efficacy suggests a mechanism by which V1 can amplify its output to downstream targets, such as higher visual areas, without generating excessive excitation in the local recurrent network. Such a mechanism could be important for maintaining the stability of computations that rely on balanced excitation and inhibition within V1. We suggest that the suppression of PC output reflects a gating mechanism that allows feedforward communication to be selectively boosted while shielding local circuits from saturation. This prediction could be tested by performing paired electrophysiological recordings of PC→PC connections during state transitions, but direct measurements of changes in synaptic strength in the cortex of behaving mice are currently extremely challenging - most of the available evidence is inferred from circuit-level activity patterns and in vitro studies.
Acetylcholine release triggered by activity in the basal forebrain and prefrontal cortex acts across large areas through volume transmission15,66 but different muscarinic receptor types are expressed at specific locations, very often presynaptically, which provides spatiotemporally specific modulation67. The reduction in strength of local PC synapses during locomotion inferred from the model is in line with the known actions of acetylcholine on presynaptic M2 receptors, which reduce glutamate release at PC terminals16–18. Many cortical areas are subject to modulation through the cholinergic input that they receive 15,66, raising the possibility that signals from the basal forebrain also contribute to the increase in external input predicted by the model (Figure 5F).
Locomotion shapes cortical dynamics through multiple pathways
The first effect of locomotion was to enhance a slow sensitizing signal activated by the visual stimulus, the major target of which was VIP interneurons (Fig. 3). The source of this signal is likely the higher visual areas43 gated by acetylcholine, and optogenetic experiments demonstrate that it determined the dynamics of adaption in SSTs (Fig. 3 and Supplementary Figure 2). The second major effect predicted by the model was an over 90% reduction in the strength of PC synapses across all targets (Fig. 5G), consistent with a range of evidence obtained in vitro demonstrating that M2 muscarinic receptors cause presynaptic inhibition16,17,68. A similar mechanism likely operates at PV, where release probability is reduced by M2 and M4 receptors69–71. However, the situation is different for SST interneurons. Our modelling shows that VIPs receive weak SST inputs at rest and that these synapses are potentiated during locomotion (Fig. 5E-G). This is likely to reflect a post-synaptic action of M1 receptors which have been shown to enhance postsynaptic GABAA currents in visual and somatosensory cortices71,72. In contrast, SST inputs to PCs and PVs appeared weaker during locomotion.
SSTs are a heterogenous class of inhibitory cells that target other cortical neurons in two distinct ways. The most numerous subtype, Martinotti cells, synapse on distal apical dendrites of PCs in layer 1 and show strong depressing adaptation, while Non-Martinotti cells generate more variable responses48,73,74. We suggest that SSTs contacting VIP interneurons are predominantly Non-Martinotti cells because they are the only subtype known to be enhanced by acetylcholine through M1 and M3 receptors in vitro75. It may also be that other neuromodulatory systems contribute to these mixed effects, including noradrenaline, serotonin and dopamine2,11. The models might be refined by splitting SSTs into two populations once their responses are measured separately76, but a more critical next step is to test the predicted changes in synaptic strength. As for PC→PC connections, the best way to test this would be to make paired electrophysiological recordings of identified SST→PC and SST→VIP connections during state transitions.
A key insight from our modelling is that the relative strength of PV and SST inputs predicts both the direction of PC adaptation and the degree of locomotion-induced gain modulation (Fig. 6). Depressing PCs receive stronger PV input, consistent with their rapid and temporally precise inhibition77. In contrast, sensitizing PCs receive relatively stronger SST input which slowly depress to drive sensitization9. These differences in PV:SST ratio may also contribute to the changes in gain associated with locomotion: because SST→PC inputs decrease substantially during locomotion (Fig. 5), PCs already dominated by SST input exhibit the largest gain enhancement. It is well established that there are substantial variations in the inhibitory input patterns to PCs but it is unclear how far these reflect the development of specific wiring patterns as opposed to the variability that will arise from random connections37,78,79. PV and SST interneurons are much sparser than PCs80 and connect to them with low probabilities37,39, such that simple random connectivity can give rise to PCs receiving different proportions of PV and SST inhibition – a pattern that at least partially occurs in V181.
Modulation of SST→PC inputs during changes in brain state
An intriguing prediction of our model is that the number of SST→PC synapses onto sensitizing PCs weaken whereas their PV→PC inputs increase selectively during locomotion (Fig. 6I). As a result of these opposing effects of inhibition, the total net input does not differ substantially from that of depressor PCs. There has been controversy regarding the computational form of SST and PV inhibition onto PCs: under certain experimental conditions SST inhibition has been described as subtractive and PV divisive60, while different manipulations show the opposite61,62. Although in our model we initially considered both types of inhibition subtractive, one possibility is that SST interneurons induce divisive inhibition during rest, such that their effect strengthens disproportionately with increasing inhibition. This may therefore account for the marked gain increase we observed in sensitizer PCs, which receive stronger SST inhibition. In principle, this prediction could also be tested by targeted recordings of identified SST→PC connections during state transitions.
What are the consequences of the enhanced gain of sensitizing PCs during locomotion? One possibility is that these changes maintain responsiveness to low contrast and transient stimuli in a visual environment that has become more dynamic with a strong component of visual flow. By selectively enhancing PCs that resist rapid depression, the circuit may preserve sensitivity to behaviourally relevant stimuli58,82. From a computational perspective, the ability to differentially modulate adaptive subpopulations allows the cortex to tune its operating regime to changes in behaviour. Locomotion not only modulates the synaptic and gain mechanisms we focus on here but can also enhance neural representations of visual stimuli in V158. Our findings might, therefore, also be interpreted in terms of broader theories of predictive coding and attention83: locomotion likely reflects an internal state of heightened predictive engagement with the environment and selective amplification of sensitizing PCs could in principle support enhanced cortical representations of expected sensory features.
Methods


Animal preparation
All experimental procedures in mice were conducted according to the UK Animals Scientific Procedures Act (1986). These were performed at University of Sussex under personal and project licenses granted by the Home Office following review by the Animal Welfare and Ethics Review Board.
The animals were housed in polypropylene cages (21 cm × 35 cm) that contained nesting material, a shelter, a treadmill, a tunnel and wooden sticks. Mice were housed in groups of 2 - 3, except in some instances when reintegration into a group was unsuccessful after surgery. All animals were kept on an inverted 12-hour light-dark cycle. Results are reported from four VIP-Cre mice (VIP tm1(cre)Zjh/J Jackson #010908), fourteen SST-Cre (SST tm2.1(cre)Zjh/J, Jackson #013044), four SST-Flp (Sst tm3.1(flpo)Zjh; Jackson #028579) x VIP-Cre and ten PV-Cre (Pvalb tm1(cre)Arbr/J, Jackson #008069), all of them adult mice aged from P90 to P260 from either sex. Mice were prepared for head-fixed multiphoton imaging through a surgical procedure in a stereotaxic frame under isoflurane anaesthesia. A titanium head plate was attached to the skull and a 3 mm craniotomy was drilled to expose the brain as described in detailed previously9. We then expressed AAV1.CaMKII.GCaMP6f.WPRE.SV40 to image calcium activity in pyramidal cells, AAV9.CAG.Flex.GCaMP6f.WPRE.SV40 to image interneurons in Cre lines and AAV1.EF1a-FLEX(frt)-GCaMP6f-WPRE to image SSTs in Flp lines. To excite interneurons optogenetically we used rAAV9/Syn.Flex.ChrimsonR.tdTomato and to inhibit them we used AAV5.CBA.Flex.ArchT.tdTomato.WPRE.SV40.
Multiphoton imaging in vivo
During imaging sessions mice were free to run on a cylindrical treadmill placed under a two-photon microscope, with stimuli being presented on two monitors covering most of the visual field. Visual stimuli were sinusoidal gratings drifting upwards (100% contrast, 1 Hz, 10 s duration) generated using the Python library PsychoPy84. The standard experimental protocol consisted of ten presentations of the stimulus with a 20 s interstimulus interval. When testing optogenetic manipulations these 10 trials were interleaved with 10 additional trials paired with illumination from an amber LED. The intensity of this LED was adjusted to activity of PCs to similar levels in different experiments. Running speed was measured with a rotary encoder and recorded through the imaging software (Scanimage5; Vidrio Technologies). The two-photon microscope (Scientifica SP1) employed a 16x water immersion objective (0.8 NA; Nikon) and imaging was carried out at a depth of 150-300 μm below the surface of the brain.
Raw movies were registered and segmented into regions of interest (ROIs) using the Suite2P package running in MATLAB 2021a85 and further analysed using custom-written code in Igor Pro 8 (Wavemetrics). Here we only analyse results from the first imaging session in which the animal was exposed to the stimulus to avoid the effects of habituation observed over multiple sessions. Stimulus trials were only included for analysis if the mouse was running faster than 3 cm/s for more than 80% of the time. To calculate the response dynamics of PC, PV, SST and VIP populations we only included cells that were positively correlated with the stimulus. For each cell, the Pearson’s correlation coefficients was computed between its activity trace (ΔF/F) and a stimulus trace binarized as either stimulus off (0) or stimulus on (1) using the StatsLinearCorrelationTest Function in IgorPro (Wavemetrics). The threshold for significant positive or negative correlation was set at p < 0.05. Measurements of adaptive properties were confined to cells which were significantly positively correlated with the stimulus. The adaptive index (AI) was calculated from the GCaMP6f signal as AI = (R1 − R2)/(R1 + R2) where R1 is the average response over the period 0.5 - 2.5 s after stimulus onset and R2 is the average at 8-10 s.
Estimation of firing rates
To estimate firing rates from the recorded ΔF/F data we used the MLspike algorithm using initial parameters expected for GCaMP6f25. Briefly, this finds the optimal spike train to fit the calcium fluorescence trace (ΔF/F) taking into account estimates of baseline fluorescence level and neuronal parameters including the amplitude of the unitary Ca2+ transient generated by a spike (A) and the decay time-constant of that transient (τ). These model parameters were obtained by maximum-likelihood autocalibration of ΔF/F traces, allowing conversion of relative fluorescence changes into inferred spike counts and corresponding firing rates.
In general, we followed recommendations and demos in the article and on the MLspike GitHub page. We set the range for A to be between 1 and 50% and τ was set at values from 0.05 to 3 seconds. The parameter Amax, which corresponds to the maximum amplitude of detected events, was 9, and the saturation parameter was set to 0.002. Finally, the Hill coefficient for Ca2+ binding to GCaMP6f was varied in the range from 1 to 3.75 with step sizes of 0.25.
Model of the circuit in layer 2/3 of V1
We built a rate-based data-driven population model of the network circuit in the mouse visual cortex layer 2/3 (code and example data sets at https://github.com/lagnadoLab/CortexModel). The purpose of the model was to understand adaptive gain control during rest and locomoting states of four main neuron populations (PC, PV, SST, and VIP). Model parameters, both fixed and fitted, are listed in Supplementary Table 3.
The network was represented by the system of four mean-field first order ordinary differential equations (equation 1)30. The neuronal input-output function, 𝑓(𝑥), was a rectified power law32

where 𝑘 is a scaling coefficient which was set to 1. This is a rectified linear function with a lower threshold, 
Connectivity between and within populations is represented by total connection weight 𝑤j𝑖which is dependent on both the number of responsive cells in the presynaptic population and the strength of individual synapses. The number of presynaptic neurons responding to the stimulus varied between rest and locomotion so to assess changes in synaptic strength caused by neuromodulators the total connection weight was divided by the number of responsive presynaptic cells (Supplementary Table 1 and equations 2 and 3 in Results). The aim of fitting the model to the average activity traces of each neuronal population was to obtain connection weights, 𝑤j𝑖. Weights were set to zero where published work indicated that connections are very weak or non-existent, as between SST interneurons33,38. The final connection weights matrix for connections within layer 2/3 was represented as:

based on the reasonable assumption that connection probabilities are constant on the time-scale of minutes.
External inputs driving activity
Three types of external input drove activity in the circuit which we termed feedforward (FF), slow sensitization (SS) and feedback input (FB): the forms and origins of these are discussed in Results. These were represented in Equation 1 by the variable 𝐼𝑛 that was specific for each input. The FF input was defined by the following system of equations:

The initial short fast-depressing component had an amplitude 𝐴𝑓 and decayed exponentially with a decay rate 𝜆𝑓. The variables 𝑠𝑠𝑡𝑎𝑟𝑡, 𝑠𝑑𝑒𝑙, 𝑠𝑑𝑢𝑟, 𝑠𝑘 represent stimulus start, delay in the initiation of the response in a cell, the stimulus duration and an offset after the initial peak, respectively. This offset defined the initiation of a second slow increase in feedforward input that has been observed in response to drifting gratings lasting seconds22,44. At the end of the stimulus presentation, experimental traces decayed relatively slowly compared with the time-constant of the model neurons and this was accounted for by including an exponentially decaying component to the input with the argument 𝑑𝑒𝑐𝑎𝑦𝑓.
The temporal form of the feedforward input measured experimentally reflects the application of a spatio-temporal Gabor filter to a sinusoidal wave of drifting gratings87. This oscillation was clear in the activity of individual PCs but less evident in population averages because neurons responded with different phases, depending on the location of their receptive fields relative to the stimulus. This 1 Hz oscillation was most clearly observed in the average response of the SST population (Fig. 5C, bottom) which have larger receptive fields and therefore display less phase shifting48. We did not, therefore, attempt to model the oscillatory component of individual neuronal responses and concentrated on capturing the average activity across populations. The feedforward input (FF) was defined as a step of duration 𝑠𝑑𝑢𝑟 with initial amplitude (𝐼5 + Af) which then decayed to a steady state of 𝐼5 with time-constant 210 ms, defined by fitting the initial peak of the average PC response. The steady state was half the initial maximum with Af = 𝐼5. The linear increase is a simplified representation of the sensitizing behaviour observed experimentally in layer 4 activity22,44.
The slow sensitizing input was represented by the following system of equations:

where 𝑠𝑠𝑡𝑎𝑟𝑡, 𝑠𝑑𝑢𝑟 represent the time of the stimulus start and the stimulus duration, respectively. The slow sensitizing (SS) component is represented by a sigmoid function with an amplitude 𝐴𝑠, growth rate 𝜆𝑠, and centre of sigmoid shifted to a 𝑑𝑒𝑙 value from the stimulus starting time. Similarly to FF, the decay phase after the stimulus end was accounted for by the argument 𝑑𝑒𝑐𝑎𝑦𝑠.
Finally, feedback input (FB) was represented by a step function:

where 𝑠𝑠𝑡𝑎𝑟𝑡, 𝑠𝑓𝑏_𝑑𝑒𝑙𝑎𝑦, 𝑠𝑑𝑢𝑟 represent time of the stimulus start, delay in the initiation of the response in a cell and the stimulus duration, respectively. The amplitude of the stimulus is defined by 𝐴𝑓𝑏. Similarly to FF and SS, the decay phase after stimulus end was accounted for by the argument 𝑑𝑒𝑐𝑎𝑦𝑓𝑏. The amplitudes of Afb, As and Io were fixed around 1 Hz based on the average response of PCs during locomoting state (Fig. 2).
Fitting the model
To obtain values of connection weights we fit the model simultaneously to the average activity traces of the four neuronal populations using the LMFIT library in Python88 by minimization of reduced chi-square parameter 𝜒2:

Where (𝑑𝑎𝑡𝑎𝑖 − 𝑚𝑜𝑑𝑒𝑙𝑖) represent an array of residuals between model and data points to be fitted, 𝑁 – is the number of datapoints, and 𝑒𝑝𝑠𝑖 is the uncertainty of the data points. We weighted the data with uncertainty. We used standard errors from the locomotion and rest data.

Where 𝑁 is the number of data points and 𝑁𝑣 is the number of variable parameters. We set the threshold chi-square value to be 10 for locomotion and 3 for rest, given their different variabilities. An ideal “good fit” would have a value of reduced chi-square around 1, as far as uncertainty is provided88. We used standard errors of the mean (S.E.M) to weight the uncertainty of locomotion and rest data (eps). Additionally, to have a measure of fit quality independent of the data uncertainty and number of varied parameters we calculated root mean square error (RMSE) for each fit:

Parameter Search Strategy
Due to the high dimensionality of the parameter space, multiple parameter sets often produced similar 
Instead, having access to the Artemis high performance computing cluster at Sussex University, we combined Sobol sampling89 with local optimization methods. Sobol sampling provides uniform coverage of high-dimensional parameter space. We generated 100,000 sets of evenly distributed initial parameters and each Sobol-sampled parameter set was subsequently refined using local optimization. We tested Levenberg-Marquardt, Nelder-Mead, Powell and L-BFGS-B methods and noticed that Nelder-Mead and Powell performed across a broad parameter range, whereas Levenberg-Marquardt and L-BFGS-B methods were more effective for final fine-tuning. This two-stage procedure (global Sobol sampling of the initial parameters followed by local optimization) allowed us to systematically explore parameter space and quantify the variability of estimated connection weights. For the locomotion condition, we only obtained 37 solutions which were considered good fits for having chi-square lower than 10. In order to obtain more solutions for further filtering, we repeated the two-stage procedure limiting 20,000 Sobol initial conditions to a subspace to average ± 2SD for each synaptic weight, rendering 9,341 good solutions without changing the average and SD compared to the initial 37 solutions.
An important additional constraint was provided by requiring the model to fit the results of optogenetic manipulations of the PV and SST populations (Fig. 4), leading to a reduced number of sets of possible synaptic weights. In these experiments, the intensity of the LED was set to increase or decrease PV or SST activity by a known factor between 1.6 and 2.5, as measured empirically in other parallel experiments measuring GCaMP6f responses in these interneurons9. The average PV or SST activity trace was then scaled by the same factor for comparing the model to observed PC activity, and RMSE value calculated for each comparison in optogenetic tests. We had a total of 4 conditions: SST activation, SST inhibition, PV activation and PV inhibition which we used for sequentially filtering the original group of solutions in 4 filtering steps. The threshold for a good opto fitting in each step was chi-square value smaller than 0.16 and 1.2 < OptoParam < 4. This approach allowed us to reduce the set of synaptic configurations, yielding parameter sets that captured both the average circuit dynamics during locomotion and the network’s response to optogenetic perturbations.
For the resting state fits, we repeated the Sobol sampling and local fitting procedure using the same initial steps excluding optogenetic filtering, which allowed us to estimate mean parameter values and their variability (Supplementary Fig. 3). Optogenetic filtering was not feasible due to the noisier nature of these traces. Alternative versions of the model were tested by setting the connection weights of the tested connections to zero, this was performed with the SS and FB inputs. Notably, all the resulting solutions had chi-squared values above threshold indicating that slow sensitizing and feedback inputs are essential to explain circuit dynamics on these time-scales (Supplementary Figure 4).
To assess whether model parameters segregated into distinct groups, we applied unsupervised clustering using both K-means and DBSCAN algorithms. For K-means, we used the Elbow method and Silhouette analysis to estimate the optimal number of clusters. We further applied DBSCAN, estimating the neighborhood parameter (eps) from the 5th nearest neighbor distance using the KneeLocator method.
Fitting the model to subpopulations of pyramidal cells
The whole PC population was split into tertiles (sensitizers, intermediate cells and depressors) based on the distribution of adaptive index (Fig. 1). The average response of each subpopulation was then fit separately in for each of the good solutions from the locomoting and resting states using the two-stage fitting procedure explained above to assess changes in connectivity that describe the adaptive properties of each (Fig. 6). Three simplifying assumptions were made. First, that each subpopulation of PC receives the same shape of inputs as the average PC across the population. Second, only the synaptic weight of those connections directly targeting PCs were left free to vary while the other connections within the circuit were fixed. This was done because there is no change in activities of interneurons when separating a PC population into three subgroups and excitatory input from PCs to interneurons was taken as an average response of the whole PC population, similarly as during fitting of the whole network. Third, we used the initial conditions of the average models scaled to match amplitudes of subpopulations to average response. From Equations 1 and 6 the scaling factor is:

where 𝑤𝑖 is a weight and 𝐴𝑖 is an average amplitude of response during stimulus. Corresponding scaling multiplication factors for locomotion are: sensitizers = 1.1, intermediate = 1.2, depressors = 0.8, and for resting state are: sensitizers = 0.9, intermediate = 1.1, depressors = 0.9.
Statistical analysis
For the statistical tests not directly related with the model fitting we used the analytical software Igor Pro 8 and/or SPSS (’Statistical Package for the Social Sciences’, IBM). To determine if the mean of one group was significantly different from another group we used a t-test (two-sided) if the distribution was normally distributed or a non-parametric Mann–Whitney U test (MWU) if it was not. We used linear mixed modelling (LMM) to test for significant interaction between locomotion state and AI tertile (Fig. 1), because cells were not paired between locomotion and resting states. Locomotion state and AI tertile were defined as fixed variables and the animal ID was defined as the random variable. All values are given as as mean ± standard error of the mean (SEM) or mean ± standard deviation (SD) as indicated in each figure legend.
Supplementary Information
Locomotion-dependent changes in adaptive properties of PCs

Locomotion-dependent changes in adaptive properties of PCs
A. The distribution of AIs at rest and during locomotion, reproduced from Fig. 1C. B. Scatter plot showing the change in AI as a function of resting AI (each point a single cell; n = 522 neurons, from 9 mice). Cells that depress at rest (AI > 0) rest showed AIs closer to sensitization during locomotion (blue box in lower right quadrant) while cells that sensitize (AI < 0) showed AI closer to depression (green box in upper left quadrant). These shifts in measured AI help explaining the narrowing of the AI distribution in A. The red dashed line is fitted to the data collected from the subset of PCs with AI between -0.5 and 0.5 and reflects a correlation coefficient of r = −0.69.
Similar time-scales of sensitizing and depressing adaptation

Identification of an external signal determining the time-course of slow adaptation.
A. Similar dynamics of slow depression in SSTs and the depressing tertile of PCs during locomotion. B. Similar dynamics of sensitization in VIPs and the sensitizing tertile of PCs (left axis, blue). C. The slow sensitizing input to the model (SS) was based on the average response of the VIP population during locomotion and consists of a step and sigmoid function with a time-constant = 1.71 s (see Fig. 4).
Parameter subspace of valid solutions

A brute force approach delimited a parameter subspace of valid solutions.
A. Average connection weights of all the solutions found in the parameter space to give a good fit for the experimental data during rest 

Removing external inputs impairs model performance

Removing external inputs impairs model performance.
A. Average firing rates of PCs (black), VIPs (green), SSTs (blue) and PVs (dark red) during stimulus presentation during locomotion and their corresponding fits from the solution with lower (RMSE = 0.14) calculated by a model without slow-sensitizing (SS) input. Note how VIP and PV dynamics are not properly captured. B. Same as in A for missing feedback input (FB) (RMSE = 0.14). Note how SST and PV dynamics are not properly captured.

Locomotion-associated changes in the number of neurons responding to the visual stimulus

Average response amplitudes in resting and active states



List of parameters used to fit the model
Data availability
All code and data reported in this paper will be shared by the lead contact upon request. Code and example data sets are available at https://github.com/lagnadoLab/CortexModel. Any additional information required to reanalyze the data reported in this manuscript is available from the lead contact upon request.
Acknowledgements
This work was supported by BBSRC grant BB/X009386/1, a PhD scholarship to SD from the Leverhulme Trust (DS-2017-011) and a Researchers at Risk Fellowship to YK from the British Academy and Council for At-Risk Academics (RaR/100503).
Additional information
Funding
UKRI | Biotechnology and Biological Sciences Research Council (AFRC) (BB/X009386/1)
Leon Lagnado
Leverhulme Trust (The Leverhulme Trust) (DS-2017-011)
Sina E Dominiak
References
- 1.Sensory adaptationCurr Opin Neurobiol 17:423–429https://doi.org/10.1016/j.conb.2007.07.001Google Scholar
- 2.Cellular mechanisms of brain state-dependent gain modulation in visual cortexNat Neurosci 16:1331–1339https://doi.org/10.1038/nn.3464Google Scholar
- 3.Behavioral-state modulation of inhibition is context-dependent and cell type specific in mouse visual cortexeLife 5https://doi.org/10.7554/eLife.14985Google Scholar
- 4.Cortical Membrane Potential Signature of Optimal States for Sensory Signal DetectionNeuron 87:179–192https://doi.org/10.1016/j.neuron.2015.05.038Google Scholar
- 5.Arousal regulates frequency tuning in primary auditory cortexProc Natl Acad Sci U S A 116:25304–25310https://doi.org/10.1073/pnas.1911383116Google Scholar
- 6.Synaptic Mechanisms of Feature Coding in the Visual Cortex of Awake MiceNeuron 95:1147–1159https://doi.org/10.1016/j.neuron.2017.08.014Google Scholar
- 7.A Quantitative Description of Short-Term Plasticity at Excitatory Synapses in Layer 2/3 of Rat Primary Visual CortexThe Journal of Neuroscience 17:7926–7940https://doi.org/10.1523/JNEUROSCI.17-20-07926.1997Google Scholar
- 8.Synaptic Depression and the Temporal Response Characteristics of V1 CellsThe Journal of Neuroscience 18:4785–4799https://doi.org/10.1523/JNEUROSCI.18-12-04785.1998Google Scholar
- 9.Opposite forms of adaptation in mouse visual cortex are controlled by distinct inhibitory microcircuitsNature Communications 13:1031https://doi.org/10.1038/s41467-022-28635-8Google Scholar
- 10.Modulation of visual responses by behavioral state in mouse visual cortexNeuron 65:472–479https://doi.org/10.1016/j.neuron.2010.01.033Google Scholar
- 11.A cortical circuit for gain control by behavioral stateCell 156:1139–1152https://doi.org/10.1016/j.cell.2014.01.050Google Scholar
- 12.Vision and Locomotion Shape the Interactions between Neuron Types in Mouse Visual CortexNeuron 98:602–615https://doi.org/10.1016/j.neuron.2018.03.037Google Scholar
- 13.Basal forebrain activation enhances cortical coding of natural scenesNat Neurosci 12:1444–1449https://doi.org/10.1038/nn.2402Google Scholar
- 14.Characterizing VIP Neurons in the Barrel Cortex of VIPcre/tdTomato Mice Reveals Layer-Specific DifferencesCereb Cortex 25:4854–4868https://doi.org/10.1093/cercor/bhv202Google Scholar
- 15.Spatiotemporally heterogeneous coordination of cholinergic and neocortical activityNat Neurosci 25:1706–1713https://doi.org/10.1038/s41593-022-01202-6Google Scholar
- 16.Distinct muscarinic receptor subtypes suppress excitatory and inhibitory synaptic responses in cortical neuronsJ Neurophysiol 77:709–716https://doi.org/10.1152/jn.1997.77.2.709Google Scholar
- 17.Cholinergic suppression specific to intrinsic not afferent fiber synapses in rat piriform (olfactory) cortexJ Neurophysiol 67:1222–1229https://doi.org/10.1152/jn.1992.67.5.1222Google Scholar
- 18.Association of m1 and m2 muscarinic receptor proteins with asymmetric synapses in the primate cerebral cortex: morphological evidence for cholinergic modulation of excitatory neurotransmissionProc Natl Acad Sci U S A 90:5194–5198https://doi.org/10.1073/pnas.90.11.5194Google Scholar
- 19.Inhibition dominates sensory responses in the awake cortexNature 493:97–100https://doi.org/10.1038/nature11665Google Scholar
- 20.In Vivo Monosynaptic Excitatory Transmission between Layer 2 Cortical Pyramidal NeuronsCell Rep 13:2098–2106https://doi.org/10.1016/j.celrep.2015.11.011Google Scholar
- 21.In vivo measurement of cell-type-specific synaptic connectivity and synaptic transmission in layer 2/3 mouse barrel cortexNeuron 85:68–75https://doi.org/10.1016/j.neuron.2014.11.025Google Scholar
- 22.A Disinhibitory Circuit for Contextual Modulation in Primary Visual CortexNeuron 108:1181–1193https://doi.org/10.1016/j.neuron.2020.11.013Google Scholar
- 23.In vivo extracellular recordings of thalamic and cortical visual responses reveal V1 connectivity rulesProc Natl Acad Sci U S A 119:e2207032119https://doi.org/10.1073/pnas.2207032119Google Scholar
- 24.Flexible neural population dynamics govern the speed and stability of sensory encoding in mouse visual cortexNat Commun 15:6415https://doi.org/10.1038/s41467-024-50563-yGoogle Scholar
- 25.Accurate spike estimation from noisy calcium signals for ultrafast three-dimensional imaging of large neuronal populations in vivoNature Communications 7:12190https://doi.org/10.1038/ncomms12190Google Scholar
- 26.Fast online deconvolution of calcium imaging dataPLoS Comput Biol 13:e1005423https://doi.org/10.1371/journal.pcbi.1005423Google Scholar
- 27.A database and deep learning toolbox for noise-optimized, generalized spike inference from calcium imagingNat Neurosci 24:1324–1337https://doi.org/10.1038/s41593-021-00895-5Google Scholar
- 28.Community-based benchmarking improves spike rate inference from two-photon calcium imaging dataPLoS computational biology 14:e1006157https://doi.org/10.1371/journal.pcbi.1006157Google Scholar
- 29.Efficiency and ambiguity in an adaptive neural codeNature 412:787–792https://doi.org/10.1038/35090500Google Scholar
- 30.Excitatory and Inhibitory Interactions in Localized Populations of Model NeuronsBiophysical Journal 12:1–24https://doi.org/10.1016/S0006-3495(72)86068-5Google Scholar
- 31.Neural Noise Can Explain Expansive, Power-Law Nonlinearities in Neural Response FunctionsJournal of Neurophysiology 87:653–659https://doi.org/10.1152/jn.00425.2001Google Scholar
- 32.The Stabilized Supralinear Network: A Unifying Circuit Motif Underlying Multi-Input Integration in Sensory CortexNeuron 85:402–417https://doi.org/10.1016/j.neuron.2014.12.026Google Scholar
- 33.Inhibition of inhibition in visual cortex: the logic of connections between molecularly distinct interneuronsNature Neuroscience 16:1068–1076https://doi.org/10.1038/nn.3446Google Scholar
- 34.Cooperative Subnetworks of Molecularly Similar Interneurons in Mouse NeocortexNeuron 90:86–100https://doi.org/10.1016/j.neuron.2016.02.037Google Scholar
- 35.Dynamics of sparsely connected networks of excitatory and inhibitory spiking neuronsJ Comput Neurosci 8:183–208https://doi.org/10.1023/a:1008925309027Google Scholar
- 36.The dynamic brain: from spiking neurons to neural masses and cortical fieldsPLoS Comput Biol 4:e1000092https://doi.org/10.1371/journal.pcbi.1000092Google Scholar
- 37.Principles of connectivity among morphologically defined cell types in adult neocortexScience 350:aac9462https://doi.org/10.1126/science.aac9462Google Scholar
- 38.Synaptic connectivity to L2/3 of primary visual cortex measured by two-photon optogenetic stimulationeLife 11:e71103https://doi.org/10.7554/eLife.71103Google Scholar
- 39.Local connectivity and synaptic dynamics in mouse and human neocortexScience 375:eabj5861.https://doi.org/10.1126/science.abj5861Google Scholar
- 40.A mesoscale connectome of the mouse brainNature 508:207–214https://doi.org/10.1038/nature13186Google Scholar
- 41.The Visual Cortex in ContextAnnu Rev Vis Sci 5:317–339https://doi.org/10.1146/annurev-vision-091517-034407Google Scholar
- 42.Object-based attention in the primary visual cortex of the macaque monkeyNature 395:376–381https://doi.org/10.1038/26475Google Scholar
- 43.A Sensorimotor Circuit in Mouse Cortex for Visual Flow PredictionsNeuron 96:1204https://doi.org/10.1016/j.neuron.2017.11.009Google Scholar
- 44.Learning enhances the relative impact of top-down processing in the visual cortexNature Neuroscience 18:1116–1122https://doi.org/10.1038/nn.4061Google Scholar
- 45.Experience-dependent spatial expectations in mouse visual cortexNat Neurosci 19:1658–1664https://doi.org/10.1038/nn.4385Google Scholar
- 46.Long-range and local circuits for top-down modulation of visual cortex processingScience 345:660–665https://doi.org/10.1126/science.1254126Google Scholar
- 47.Mouse Higher Visual Areas Provide Both Distributed and Specialized Contributions to Visually Guided BehaviorsCurr Biol 30:4682–4692https://doi.org/10.1016/j.cub.2020.09.015Google Scholar
- 48.A neural circuit for spatial summation in visual cortexNature 490:226–231https://doi.org/10.1038/nature11526Google Scholar
- 49.Predictive Processing: A Canonical Cortical ComputationNeuron 100:424–435https://doi.org/10.1016/j.neuron.2018.10.003Google Scholar
- 50.Distinct organization of two cortico-cortical feedback pathwaysNat Commun 13:6389https://doi.org/10.1038/s41467-022-33883-9Google Scholar
- 51.Organization of corticocortical and thalamocortical top-down inputs in the primary visual cortexNat Commun 15:4495https://doi.org/10.1038/s41467-024-48924-8Google Scholar
- 52.Opposing Influence of Top-down and Bottom-up Input on Excitatory Layer 2/3 Neurons in Mouse Primary Visual CortexNeuron 108:1194–1206https://doi.org/10.1016/j.neuron.2020.09.024Google Scholar
- 53.Selective attention. Long-range and local circuits for top-down modulation of visual cortex processingScience 345:660–665https://doi.org/10.1126/science.1254126Google Scholar
- 54.Cholinergic input to mouse visual cortex signals a movement state and acutely enhances layer 5 responsivenesseLife 12https://doi.org/10.7554/eLife.89986Google Scholar
- 55.Improved Monosynaptic Neural Circuit Tracing Using Engineered Rabies Virus GlycoproteinsCell Rep 15:692–699https://doi.org/10.1016/j.celrep.2016.03.067Google Scholar
- 56.Uncertainpy: A Python Toolbox for Uncertainty Quantification and Sensitivity Analysis in Computational NeuroscienceFront Neuroinform 12:49https://doi.org/10.3389/fninf.2018.00049Google Scholar
- 57.Systematic Integration of Structural and Functional Data into Multi-scale Models of Mouse Primary Visual CortexNeuron 106:388–403https://doi.org/10.1016/j.neuron.2020.01.040Google Scholar
- 58.Locomotion Enhances Neural Encoding of Visual Stimuli in Mouse V1J Neurosci 37:3764–3775https://doi.org/10.1523/JNEUROSCI.2728-16.2017Google Scholar
- 59.Effects of Locomotion Extend throughout the Mouse Early Visual SystemCurrent Biology 24:2899–2907https://doi.org/10.1016/j.cub.2014.10.045Google Scholar
- 60.Division and subtraction by distinct cortical inhibitory networks in vivoNature 488:343–348https://doi.org/10.1038/nature11347Google Scholar
- 61.Activation of specific interneurons improves V1 feature selectivity and visual perceptionNature 488:379–383https://doi.org/10.1038/nature11312Google Scholar
- 62.Asymmetric effects of activating and inactivating cortical interneuronseLife 5https://doi.org/10.7554/eLife.18383Google Scholar
- 63.Cortical interneurons that specialize in disinhibitory controlNature 503:521–524https://doi.org/10.1038/nature12676Google Scholar
- 64.Cortico-cortical projections in mouse visual cortex are functionally target specificNat Neurosci 16:219–226https://doi.org/10.1038/nn.3300Google Scholar
- 65.The logic of single-cell projections from visual cortexNature 556:51–56https://doi.org/10.1038/nature26159Google Scholar
- 66.Basal Forebrain Cholinergic Circuits and Signaling in Cognition and Cognitive DeclineNeuron 91:1199–1218https://doi.org/10.1016/j.neuron.2016.09.006Google Scholar
- 67.Spatiotemporal specificity in cholinergic control of neocortical functionCurr Opin Neurobiol 26:149–160https://doi.org/10.1016/j.conb.2014.02.015Google Scholar
- 68.Differential regulation of neocortical synapses by neuromodulators and activityNeuron 19:679–686https://doi.org/10.1016/s0896-6273(00)80380-3Google Scholar
- 69.GABAA receptor-mediated currents in interneurons and pyramidal cells of rat visual cortexJ Physiol 506:715–730https://doi.org/10.1111/j.1469-7793.1998.715bv.xGoogle Scholar
- 70.Perisomatic GABA release and thalamocortical integration onto neocortical excitatory cells are regulated by neuromodulatorsNeuron 58:911–924https://doi.org/10.1016/j.neuron.2008.04.024Google Scholar
- 71.Somatostatin-expressing neurons in cortical networksNat Rev Neurosci 17:401–409https://doi.org/10.1038/nrn.2016.53Google Scholar
- 72.An acetylcholine-activated microcircuit drives temporal dynamics of cortical activityNat Neurosci 18:892–902https://doi.org/10.1038/nn.4002Google Scholar
- 73.Anatomical, physiological, molecular and circuit properties of nest basket cells in the developing somatosensory cortexCereb Cortex 12:395–410https://doi.org/10.1093/cercor/12.4.395Google Scholar
- 74.Disynaptic inhibition between neocortical pyramidal cells mediated by Martinotti cellsNeuron 53:735–746https://doi.org/10.1016/j.neuron.2007.02.012Google Scholar
- 75.Layer-specific modulation of neocortical dendritic inhibition during active wakefulnessScience 355:954–959https://doi.org/10.1126/science.aag2599Google Scholar
- 76.GABAergic Interneurons in the Neocortex: From Cellular Properties to CircuitsNeuron 91:260–292https://doi.org/10.1016/j.neuron.2016.06.033Google Scholar
- 77.Parvalbumin-expressing interneurons linearly transform cortical responses to visual stimuliNeuron 73:159–170https://doi.org/10.1016/j.neuron.2011.12.013Google Scholar
- 78.Dense Inhibitory Connectivity in NeocortexNeuron 69:1188–1203https://doi.org/10.1016/j.neuron.2011.02.025Google Scholar
- 79.Differential connectivity and response dynamics of excitatory and inhibitory neurons in visual cortexNature neuroscience 14:1045–1052https://doi.org/10.1038/nn.2876Google Scholar
- 80.A method to estimate the cellular composition of the mouse brain from heterogeneous datasetsPLOS Computational Biology 18:e1010739https://doi.org/10.1371/journal.pcbi.1010739Google Scholar
- 81.Cell-type-specific inhibitory circuitry from a connectomic census of mouse visual cortexbioRxiv https://doi.org/10.1101/2023.01.23.525290Google Scholar
- 82.Subthreshold mechanisms underlying state-dependent modulation of visual responsesNeuron 80:350–357https://doi.org/10.1016/j.neuron.2013.08.007Google Scholar
- 83.Predictive coding in the visual cortex: a functional interpretation of some extra-classical receptive-field effectsNat Neurosci 2:79–87https://doi.org/10.1038/4580Google Scholar
- 84.PsychoPy--Psychophysics software in PythonJ Neurosci Methods 162:8–13https://doi.org/10.1016/j.jneumeth.2006.11.017Google Scholar
- 85.Suite2p: beyond 10,000 neurons with standard two-photon microscopybioRxiv https://doi.org/10.1101/061507Google Scholar
- 86.Parallel processing by cortical inhibition enables context-dependent behaviorNature Neuroscience 20:62–71https://doi.org/10.1038/nn.4436Google Scholar
- 87.Representational untangling by the firing rate nonlinearity in V1 simple cellseLife 8:e43625https://doi.org/10.7554/eLife.43625Google Scholar
- 88.LMFIT: Non-Linear Least-Square Minimization and Curve-Fitting for PythonZenodo
- 89.The production of points uniformly distributed in a multidimensionalGoogle Scholar
- 90.Differential Short-Term Plasticity of PV and SST Neurons Accounts for Adaptation and Facilitation of Cortical Neurons to Auditory TonesJ Neurosci 40:9224–9235https://doi.org/10.1523/JNEUROSCI.0686-20.2020Google Scholar
Article and author information
Author information
Version history
- Preprint posted:
- Sent for peer review:
- Reviewed Preprint version 1:
Cite all versions
You can cite all versions using the DOI https://doi.org/10.7554/eLife.110088. This DOI represents all versions, and will always resolve to the latest one.
Copyright
© 2026, Hinojosa et al.
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics
- views
- 56
- downloads
- 0
- citations
- 0
Views, downloads and citations are aggregated across all versions of this paper published by eLife.