Synaptic plasticity is required for oscillations in a V1 cortical column model with multiple interneuron types

Neural rhythms are ubiquitous in cortical recordings, but it is unclear whether they emerge due to the basic structure of cortical microcircuits, or depend on function. Using detailed electrophysiological and anatomical data of mouse V1, we explored this question by building a spiking network model of a cortical column incorporating pyramidal cells, PV, SST and VIP inhibitory interneurons, and dynamics for AMPA, GABA and NMDA receptors. The resulting model matched in vivo cell-type-specific firing rates for spontaneous and stimulus-evoked conditions in mice, although rhythmic activity was absent. Upon introduction of long-term synaptic plasticity, broad-band (15-60 Hz) oscillations emerged, with feedforward/feedback input streams enhancing/suppressing the oscillatory drive, respectively. These plasticity-triggered rhythms relied on all cell types, and specific experience-dependent connectivity patterns were required to generate oscillations. Our results suggest that neural rhythms are not intrinsic properties of cortical circuits, but rather arise from structural changes elicited by learning-related mechanisms.


Introduction
Cell-specific activity of cortical networks has been increasingly scrutinized experimentally in recent years, but our mechanistic understanding of cortical dynamics is still incomplete. Fast (>15 Hz) cortical oscillatory activity is a paradigmatic example, as it constitutes a widespread phenomenon, the functional relevance of which is still under debate [1][2][3][4][5] . Fast cortical oscillations may emerge in neural circuits due to a wide range of mechanistic origins, including excitatory-inhibitory interactions, delayed recurrent dynamics, and others 1,6 . The particular postsynaptic receptors involved (i.e. AMPA, GABA, NMDA, etc) are likely to influence qualities such as oscillatory frequency 7 . Likewise, neural oscillations have been found to depend not only on simple excitatory-inhibitory interactions [7][8][9] , but also on interactions between different cell types such as parvalbumin-positive (PV), somatostatinpositive (SST) or vasoactive intestinal peptide-positive (VIP) interneurons 10,11 , which modulate their emergence as well as other dynamic properties of circuits [12][13][14][15][16] .
The functions of fast neural oscillations are less clear. Evidence from electrophysiological recordings traditionally established fast oscillations as a plausible mechanism for intra-and inter-areal communication 2,17,18 , with recent work broadening or challenging the idea 5,19-21 .
For example, computational models have shown that frequency-dependent inter-areal coherence can be enhanced without rhythmic input to neural circuits 20 . This questions the potential importance of neural oscillations for communication 21,22 although the presence of neural oscillations seems to enhance communication with respect to non-rhythmic communication 20 . Human noninvasive recordings have established a link between alpha/low beta rhythms in occipital cortex and local inhibition 23,24 , but it is uncertain whether oscillations are the cause or consequence of such inhibition. Due to the relative ease with which oscillations arise in neural circuits and the lack of a clear functionality, it is difficult to discern whether oscillations are simply a byproduct of canonical neural circuits or whether they are linked more fundamentally to brain function. Characterizing which conditions, beyond those present in canonical circuits, are necessary for the emergence of rhythmic activity is a key step in this process. about 85% of the cells are pyramidal neurons and the remaining 15% are inhibitory interneurons -with the precise proportion of each inhibitory cell type in each layer given by anatomical data 28 and depicted in Fig. 1 as the relative size of the respective inhibitory population (see Supplementary Tables 1 and 2 for more information). To establish the overall connection strength between any two populations, we combined the average synaptic strength with the connection probability taken from experimental measurements 28 . Besides the input from other neurons within the column, each neuron also received abackground noise, generated by a Poissonian generator specific to each cell (Table   S9). Neurons were specified as current-based leaky integrate-and-fire (LIF) models with dynamic variables for AMPA, GABA and NMDA receptors (see Methods).

Spontaneous cell type and layer-specific activity
To match the spontaneous firing rates of all cell types observed in vivo, we adjusted the global scaling value for the entire connectivity and the cell-specific background inputs to the column, similar to previous work 27,29 . The resulting simulated spontaneous spiking activity in the cortical column is displayed as a raster plot in Fig. 2A. For all cell types in our model, asynchronous irregular activity patterns were obtained, with firing rate levels matching quite closely those observed in vivo (Fig. 2B). The activity varied significantly across layers and cell types. Across all layers, pyramidal neurons exhibited the lowest firing rates in their laminar module, with mean firing rates around 2 Hz for layer 5 and below or close to 1 Hz for other layers, in agreement with experimental data 28 . In all layers, firing rates of inhibitory cells exceeded those of excitatory cells, except for VIP cells in layer 4. This sets the columnar model in an inhibition-dominated regime with a basal pattern of asynchronous firing 31 .
In addition to the heterogeneity in firing rates found between layers and cell types, singleneuron firing rates within the same population also displayed substantial variability (Fig. 2C).
For example, some pyramidal neurons in layer 2/3 fired at 2 Hz, while the majority of them were rather quiescent, emitting less than one spike per second. This is in agreement with previous findings 27 . Overall, single-unit activity was quite irregular, with the mean of the single-unit coefficients of variation of the inter-spike intervals of all cell types being >0.5 ( Fig. 2D, left panel) and membrane potential traces 32 displaying a rather marked asynchrony, measured using standard procedures 32 . Because the role of inhibitory neurons is crucial to control the level of firing activity in the columnar model, we analysed the effects of inactivating different interneuron populations.
As shown in Fig. S1, the activity of all neurons drastically rose when inhibitory neurons were shut down. In particular, we blocked the transmission of signals from inhibitory to all other neurons, resulting in a sharp increase in pyramidal cell firing rates, which in turn drove the inhibitory firing rate up (even though this firing of inhibitory neurons was not able to suppress the columnar activity).
We controlled for the size of the cortical column model, as it has been reported that not all measurements in spiking columnar models scale linearly with network size and finite-size scaling studies must be performed 29 . When increasing the size of the network in our model and rescaling the weights accordingly (see Methods), we obtained the same firing rate statistics for sufficiently large networks. In Fig. S2, we show the mean firing rates of spontaneous activity using a network of 5,000 neurons, a network of 10,000 neurons, and a network of 20,000 neurons, with similar results in all cases.

Stimulus-evoked responses of the column
Once the model parameters were fitted to reproduce spontaneous activity, we tested its response to feedforward stimuli mimicking a simple sensory signal. Confronted with a feedforward thalamic input arriving to layer 4, the columnar model responded with a stereotypical rise and propagation of activity through different layers. Fig. 3A shows an example raster plot of the model when a constant input was given to all pyramidal neurons in layer 4. Pyramidal cells in layers 2/3, 4 and 6 considerably increased their relative activity in response to the stimulus, while those in layer 5 showed a weaker response. Fig. 3B shows the mean firing rates as the input arrives to layer 4 pyramidal cells. Both excitatory and inhibitory populations displayed a significant increase in firing rate due to the input.
Inhibitory neurons played a substantial role in how the signal was propagated throughout the column. For example, the reason why pyramidal neurons in layer 5 might respond so weakly to layer 4 input is the PV cell activation in layer 5, where this activity increased significantly (compared to most other inhibitory cell types in other layers) and prevented a further increase in pyramidal neuron activity in layer 5. To illustrate the power of the model in predicting responses to feedforward stimuli, Fig. 3C shows the mean firing rates after the input had been activated in comparison with experimental data from mouse V1 during passive visual stimulation 28 . Although not specifically fitted to reproduce stimulus-evoked activity, the columnar model performed reasonably well and provided good firing rate estimations for all PV interneurons as well as pyramidal neurons (falling within one standard deviation of the experimental range 28 ).
Experimental data on the evoked activity of SST and VIP cells were not available, therefore the results in Fig. 3D may serve as model predictions for future studies.
After the feedforward input excited pyramidal neurons in layer 4, the signal propagated to layer 2/3, then 5 and finally to layer 6 pyramidal cells -generating the sequential activation pattern in canonical microcircuits as proposed in classic neuroanatomical studies 33,34 . This was not captured by previous cortical models 27,29 , which indicates that explicitly considering the role SST and VIP neurons is important to understand feedforward activation in the cortical column. The order of responding is clearly shown in Fig. 3D, which shows the activation latency of each population, quantified as the time at which each population reached half of its maximum evoked firing rate. In each layer, the cell type activated first was the pyramidal neuron, followed by inhibitory interneurons after a certain delay, caused by the smoother ramping of inhibitory activity in general. Notably, while the order of activation is the same for pyramidal, PV and VIP cells (layer 4 to 2/3 to 5 to 6), SST cells display a different activation trajectory -inceasing their firing rate first on layer 5 and shortly thereafter in layer 2/3, while remaining at spontaneous levels in layer 4 and 6. This suggests that activation patterns in canonical cortical circuits are specific to cell types. The difference in activation latency between the input layer and the deep output layers in our columnar model was about 40 ms, with variations depending on cell type.
While activity in the spontaneous condition was quite irregular (Fig. 2D) as in experimental observations, experimental evidence suggests that rhythmic activity in the range of beta (15)(16)(17)(18)(19)(20)(21)(22)(23)(24)(25)(26)(27)(28)(29)(30) or gamma (30-70 Hz) oscillations is often evoked by visual stimulation. We analyzed the temporal evolution of firing rates across all layers in our model and found, however, no evidence of rhythmic activity (Fig. 3E) under a variety of parameter settings, i.e. different external input strengths or sizes of the network. This suggests that the emergence of neural oscillations might require more conditions than explored thus far.

Introducing synaptic plasticity
After replicating spontaneous activity statistics, our columnar model predicted stimulusevoked firing rates across cell types and layers, and provided a mechanistic intuition on wellknown properties of cortical functioning such as microcircuit communication pathways 33 and gain control by deep layers 35 . However, so far rhythmic activity was notoriously absent, particularly for stimulus-evoked conditions (Fig. 3E) which would be expected to display stimulus-induced fast oscillations as experimentally observed [36][37][38] . It is therefore possible that oscillations do not emerge directly from the canonical network of a 'naive' cortical column but rather reflect more detailed, experience-dependent changes.
To test this hypothesis, we introduced synaptic plasticity in all excitatory weights of the cortical column model, via the spike-timing-dependent plasticity (STDP) rule (Fig. 4A). To drive long-lasting changes in columnar connectivity, we applied a constant feedforward input arriving at half of the pyramidal neurons in layer 4. Each synaptic weight was initialized as in the results described above. Incorporating STDP resulted in changes in the spiking activity across the column, which evolved from an asynchronous, irregular regime

Oscillatory frequency and amplitude are modulated by feedforward and feedback input
Once the plasticity period was over (55 s), weights were fixed to study the resulting dynamics as a function of input strength. We observed that oscillations were triggered and maintained by the feedforward input, and as soon as the input was switched off, the oscillations faded away and activity returned to spontaneous baseline levels. If the input was switched back on, the oscillations automatically reappeared (Fig. S3). Similar to experimental observations with varying visual contrast [36][37][38] , the strength of the external input to layer 4 pyramidal cells modulated the frequency and amplitude of the resulting oscillations ( Fig. 5A and S4). As the input strength increased, the oscillatory frequency rose from 15 Hz up to 60 Hz (Fig. 5B). The oscillatory power exhibited an inverted-U relationship as a function of the input (Fig. 5C). The effect of (presumably feedback) input to layer 5 had the opposite effect: increasing input strength to layer 5 pyramidal cells (while keeping a constant input to layer 4) led to a reduction in layer 4 pyramidal oscillatory activity, with the reduction being proportional to the strength of input to layer 5 ( Fig. 5D and S5). Overall, excitatory input to layer 5 pyramidal cells led to a decrease of oscillatory frequency in all layers except in layer 5, where it increased with input strength (Fig. 5E) and to an overall reduction of oscillatory power across the entire column (Fig. 5F). Thus, feedback input had a strong dampening and slowing effect on the oscillations. Interactions between feedforward and feedback input are therefore able to precisely modulate the rhythmic components of cortical activity.

Origin of cortical oscillations
To better understand the relationship between synaptic plasticity and oscillations as suggested by our cortical column model, it is important to study the mechanisms giving rise to the observed oscillations. Our first aim in this sense was to find out whether oscillations emerge globally and simultaneously across the entire column, or whether a subcircuit directly mediated its generation, driving the rest of the columnar network. A candidate for such a driver role is the layer 4 microcircuit, as it receives the feedforward input initiating experience-dependent processing and has been identified as a gamma generator within visual columns 30 .
When the STDP rule was applied to all excitatory-to-excitatory synapses in the column, the column displayed fast oscillations after a plasticity period as before (Fig. 6A, panel A1). We then repeated the process by allowing STDP-mediated changes in all excitatory-to-excitatory synapses except for those from layer 4, resulting in a network in which oscillations were absent after the plasticity period (Fig. 6A, panel A2). We repeated the process once again, this time only allowing plasticity in excitatory synapses from layer 4. This was sufficient to drive oscillations in all layers (Fig. 6A, panel A3), suggesting that plasticity in the efferent connections from layer 4 is crucial for cortical rhythmicity and that the efferents from layer 4 are the main generator of fast oscillations -which later propagate to other layers, in agreement with experimental data 30 . This also suggests that plasticity in excitatory outputs from layer 2/3, 5 and 6 cells is not crucial for oscillations: without plasticity in these connections oscillations are still emerging.
To analyze which groups (i.e. a given cell type in a given layer) of interneurons are crucial for the emergence of oscillations, we investigated the effect of inactivating different types of interneuron in the whole column. Fig. 6B shows the raster plots for five different conditions, from left to right: (i) the control condition, and inactivation of (ii) SST cells only, (iii) VIP cells only, (iv) PV cells only, and (v) all inhibitory neurons. Inactivating PV cells had the largest effect amongst specific interneuron inactivations, leading to a sharp increase in the oscillatory frequency across the entire column). Inactivating SST or VIP cells had similar, but much more modest effects on the oscillations. Removing specific groups of interneurons in specific layers led to increases in oscillation frequency (Fig. S6-S10), with the notable exception of layer 5: inactivating interneuron groups in that layer drastically reduced the power of oscillations in other layers, due to the link between layer 5 pyramidal activity and column-wide rhythms (Fig. S7).
Importantly, the more groups we inhibited, the more the oscillation behaviour was influenced. In Fig. S6 we show that removing only one inhibitory group in layer 4 increases the oscillations frequency slightly, with PV4 having the biggest effect. However, the removal of only one group is not enough to drastically change the frequency of oscillations (Fig. S6).
In contrast, silencing more groups at the same time increased the oscillation frequency significantly (Fig. S7). Fig. S8 shows that inhibitory neuron groups in each layer are contributing to oscillations in the whole column , in fact the effect of silencing inhibitory neurons is similar for the different layers (removing inhibition from L2/3 vs L4 vs L6). With these analyses (and more not shown) we can conclude that all inhibitory neuron groups (PV, SST, VIP) make a contribution to maintain oscillations; all of them are relevant even though to different extents (PV being the most important). To further test the relevance of PV interneurons, we silenced all inhibitory groups except one type. Fig. S9 shows that when all inhibitory neuron types except PV are silenced (in all layers ), oscillations are still present, thus PV cells alone (but coupled to pyramidal cells) are able to maintain oscillations. In this case the oscillations became slightly faster because of the absence of SST and VIP cells. The same behaviour was not observed when SST or VIP cells were present alone, in this case oscillations were expressed at a much higher frequency. This suggests that, while all interneuron types participate in the generation of oscillations, PV cells appear to be more relevant than SST or VIP cells 39 . Given the important role of PV cells we investigated this further and in Fig. S10 we show how the frequency of oscillations can be modulated by applying differential external input to PV cells in layer 4. The more input current was applied, the slower the oscillations became.
After gaining insight in the full columnar model, we next focused on an isolated subcircuit of layer 4, given its crucial role in rhythm generation. Specifically, we isolated the layer 4 subcircuit by removing all its incoming and outgoing connections with other parts of the column, this was done after the plasticity period had been applied to the entire column from t = 0 until 55 s. This subcircuit was still showing oscillations, although the rhythmicity was not as clear as for the full column. The omission of inhibitory connections from the other layers resulted in faster oscillations: 37 Hz (compared to the full column case: 26 Hz) and a higher firing rate activity. We then inactivated (or silenced) one inhibitory population at a time to observe its effect on oscillatory behavior. As in the full-column model, we found a particularly strong effect when inactivating layer 4 PV cells, as this severely disrupted oscillations ( Fig. 6C and S11). Likewise, inactivating all types of layer 4 interneuron had a strong impact in terms of drops in power, while inactivating SST and VIP cells had only a slight to moderate impact. To test that the impact of PV cells was not due to the higher number of PV cells with respect to SST cells, we also inactivated a subpopulation of PV cells (PV-sub), equal in size to the number of SST neurons in layer 4 (i.e., the largest group of layer 4 inhibitory cells after PV cells), and the results were similar to the inactivation of the full PV population (this was also verified in the full column case, see S13). The prominent role of PV cells appeared to be related instead of their higher number to the synaptic connections from PV to pyramidal neurons, which are stronger than projections from SST to pyramidal neurons, given the preference of PV cells to establish synapses on pyramidal cell somata (as reflected in the connectivity strength data). Finally, inactivations did not drastically change the layer 4 oscillatory frequency in the case of SST and VIP cells, and led to higher frequencies for PV cells ( Fig. 6C and S11). This suggests that, while all interneurons participate in the generation of oscillations, PV cells seem to be more relevant than SST or VIP cells.

Importance of specific changes in the connectome for the emergence of oscillations
While the above analyses identify some of the key ingredients for the emergence of oscillations in response to long-lasting synaptic changes, it is still unclear what aspects of plasticity are crucial for the emergence of oscillations. It could be that oscillations simply arise due to a global increase (or upscaling) of synaptic weights, or alternatively that refined experience-dependent structural changes due to plasticity play a more important role. To test this, we shuffled the synaptic weights within our cortical model after the plasticity period (Fig. 7A1), as shuffling preserves any overall increase in global coupling level, and observed the impact of shuffling on columnar dynamics. We found that shuffling led to a significant decrease in oscillatory power across all layers ( Fig. 7A2 and S14), with oscillations becoming clearly weaker in layer 4 and almost vanishing from other layers such as 2/3 (Fig.   7A3). The oscillatory power at 26 Hz drops from ~7*10 ! to ~7*10 # for excitatory neurons in layer 2/3 (See S14 for details on all layers). This indicates that specific pairwise reinforcements and the associated structural cross-correlations sculpted by synaptic plasticity are key to the genesis of oscillations.
Next we compared the dynamics of a cortical column model with synaptic weights changed due to plasticity (Fig. 7A, middle panels) with a model in which weights were increased, independent from experience-dependent plasticity. In this 'uniformly increased' (UI) model, excitatory connections were artificially enhanced from the naive condition to match the overall strength of connectivity of the first model, but without undergoing STDP-regulated changes. This was done by calculating the average synaptic strength of all connections after plasticity induction, comparing this average to the average in the naive network and then increasing the synaptic strength of all connections by that same percentual change in our new UI network. As Fig. 7B shows, a simple increase in global excitatory-to-excitatory synaptic strength is not enough to induce oscillations, indicating again that a specific experience-dependent connectivity pattern and cross-correlations resulting from this pattern are required to generate oscillatory activity in our cortical column model. For model fitting, we focused on adjusting the parameters for background currents and global coupling strength, as these parameters are difficult to estimate from in vitro recordings but are important important determinants of the dynamics 41 , and are commonly used for fitting these type of models 27,29 . After the parameter adjustments, our columnar model was able to replicate in vivo spontaneous firing patterns (including mean firing rates, spiking irregularity, and synchrony measures) across all cell types and layers. Without further parameter tuning, the model was next able to provide good estimates of activity levels for stimulus-evoked conditions, which are in agreement with existing data for pyramidal and PV cells 27 and constitute useful predictions for SST and VIP cells. Although other models in the literature have also been able to match firing rates of excitatory and inhibitory cells under spontaneous and evoked conditions, they either did not account for interneuron variability 27,29 , or readjusted connectivity weights using biologically implausible optimization methods 28 or focused on other brain areas such as barrel cortex 42 . In this sense, our model constitutes perhaps the most biologically plausible model of the mqouse V1 column presented until now, particularly for understanding the effects of different types of interneuron on columnar dynamics (Figs. 6 and 7). This also opens the door to use our cortical column model to study the effects of heterogeneity within the same class of cells, using for example existing mean-field approaches 43,44 . Our model demonstrated a substantial level of agreement with experimental evidence.
Aside from the realistic cell-and layer-specific spontaneous and stimulus-evoked firing statistics, the model successfully replicated a number of experimental observations. First, feeding a feedforward signal to the columnar model triggered the sequential activation of different layers, as predicated by canonical microcircuit diagrams 33,34 . Because previous columnar models without different interneuron types did not show this pattern, this indicates that SST and VIP cells seem to play a role in this translaminar signal propagationpotentially relying on the benefits of interneuronal heterogeneity for signal transmission in cortical circuits 43,44 . Our model predicts a dependence on SST and VIP cells which can be experimentally tested by optogenetic inactivation. Second, activating pyramidal neurons in layer 5 had an inhibitory effect on other layers, particularly layer 2/3, in agreement with previous observations 45 . Third, after synaptic plasticity was enabled, feedforward input was able to generate fast oscillations, first in layer 4 and later in other layers. This temporal laminar sequence has in fact been experimentally observed 30 . Fourth, strong feedforward input increased the power and frequency of oscillations [36][37][38] . Fifth, feedback input suppressed fast oscillations or reduced their power, as observed in vivo in V1 recordings 30 .
Besides the generation of the model itself and its validation with existing data, our work reveals a fundamental property of cortical columnar circuits in generating neural oscillations. The finding that fast oscillations are a direct reflection of experience-driven changes in cortical circuits confronts traditional ideas in the field. Concretely, given that rhythmic activity is ubiquitous in the brain, and that synchrony can be easily obtained in abstract computational neuroscience models, it is sometimes assumed that oscillations naturally arise in canonical neural networks without involvement of experience-dependent plasticity and the fine connectivity structure it entails. Only by carefully addressing the question with a data-constrained columnar model, as done here, one may reveal the vital role that experience-dependent structural pairwise interactions have on generating cortical rhythmic dynamics. This aligns well with existing ideas which link fast oscillations to flexible mechanisms for the development of cognitive function, such as co-optation mechanisms 1 .
On the other hand, increasing the strength of all excitatory synapses to high levels in our model would also be expected to lead to oscillations without STDP -synchrony is, after all, an emerging property of networked excitable systems. However, when our model was subjected to STDP, excitatory synapses tended to be weak overall (for example compared to inhibitory neurons), so such a solution, while valid for simple models, does not seem to generalise to more realistic cortical column models.
Finally, we make several experimental predictions based on the results of our model.
Regarding the activity of different cell types, alternative canonical sequential activations should exist in the V1 column when looking at different interneuron types -for example, upon stimulus onset SST cells will be activated sequentially from deep to superficial layers, while PV and VIP cells will follow the classical sequence just like pyramidal neurons (Fig. 3D).
As concerns synaptic plasticity, we predict that plasticity in synapses originating in layer 4 (and targeting other cells inside and outside that layer) will be fundamental for the generation of oscillations in cortical circuits ( Figure 6A). Localized pharmacological inactivation of synaptic plasticity mechanisms in layer 4 should reveal important alterations in experience-dependent rhythmic patterns. Although we have not explicitly focused on the role of NMDA receptors in columnar dynamics, the model could be used in future work to study the relationship between pharmacological blocking of NMDARs and alterations in gamma oscillations 46,47 , or the interaction between NMDAR and different cell types in novel paradigms of working memory 45,48,49 .
Overall, our biologically realistic, data-constrained cortical column model suggests a clear link between experience-dependent plastic changes and the emergence of neural oscillations. These oscillations are not present anymore if synaptic weights are randomized after learning, and simply upscaling the values of all excitatory synapses in the non-STDP model is also not enough to obtain them. In realistic columnar models, a subtle, selforganizing distributed process driven by experience is needed to produce oscillations.

Model architecture
The cortical column model, shown in Fig. 1, is composed of a total number (Ntotal)  We use the term connection with reference to subpopulations or groups, defined by the pre-and postsynaptic neuron types in each layer. The connection probability defines the probability for each possible pair of pre-and postsynaptic neurons to form a connection between them. If p=0.1 this connects all neurons pairs of the two groups with a probability of 10%. The connectivity probability matrix P is defined by the 16x16 + 16x2 = 288 connection probabilities p between the 17 considered cell groups (4 types in each of the 4 layers plus 1 group in layer 1; a group thus potentially receives inputs from the other 16 cell groups and also potentially projects to all of them). The connection probability matrix P used to constrain the model is available in the portal of the Allen database available at https://portal.brain-map.org/explore/models/mv1-all-layers. Each connection has also a particular strength which differs per neuron group. Thus, the strength was specified at the level of neuron type X projecting to neuron type Y. The strengths of connections between neurons are constrained using the matrix S available at https://portal.brainmap.org/explore/models/mv1-all-layers. How we set the strenghts of single synapse using the matrix S is explained above (Eq. 11).
Here an example of how two groups (X and Y) are connected: VIP cells in layer 1 (X) that have a connection going to SST cells in layer 4 (Y) will all have the same connection strength.
However, not all VIP cells in layer 1 are connected to SST cells in layer 4 because they connect with probability p.

Model for neurons
All pyramidal cells and all three types of interneuron are modelled as leaky integrate-andfire neurons. Each type of cell is characterized by its own set of parameters: a resting potential Vrest, a firing threshold Vth, a membrane capacitance Cm, a membrane leak conductance gL and a refractory period tref. The corresponding membrane time constant is tm= Cm/gL. The membrane potential V(t) of a cell is given by: where Isyn(t) represents the total synaptic current flowing in the cell.
At each time point of simulation, a neuron integrates the total incoming current Isyn(t) to update its membrane potential V(t). When the threshold Vth is reached a spike is generated, followed by an instantaneous reset of the membrane potential to the resting membrane potential Vrest. Then, for a refractory period tref, the membrane potential stays at its resting value Vrest and no spikes can be generated. After tref has passed, the membrane potential can be updated again (see Tables S4-S8 for the corresponding parameter values).

Model of synapses
Each cell group in each layer is connected to all the other groups of the cortical column with These are all the inputs from all the other presynaptic neurons projecting to the neuron under consideration.
The total synaptic current that each neuron receives is given by: First, the AMPAR channels are described by where the time constant of the AMPA currents is tAMPA= 2 ms, and the sum over k represents the contribution of all spikes (indicated by delta, ) emitted by presynaptic neuron j. In the case of external AMPA currents (Eq. 3), the spikes are emitted accordingly to a Poisson process with rate ubkgnd. Each group of cells in each layer is receiving a different Poisson rate of background noise (see Table S9). The gating of single NMDAR channels is described by where the time constant of GABAA receptor current is 5 ms.

Parameters of the model
As previously mentioned, each type of cell in each layer is characterized by its own set of parameters: a resting potential Vrest, a firing threshold Vth, a membrane capacitance Cm, a membrane leak conductance gL and a refractory period tref. These data are taken from the Allen institute database (https://portal.brain-map.org/explore/models/mv1-all-layers). In

Synaptic plasticity rule
After having performed simulations with fixed weights, we explored the consequences of allowing synaptic plasticity in the model. To include plasticity we used the STDP learning rule 50 , given by where n is the index for the spike times of postsynaptic neuron j, and f the index for the spike times of presynaptic neuron j. The weight change of a synapse depends on the relative timing between pre-and postsynaptic spikes. The function used to account for this change is the following: where x is the difference between the spike time of the postsynaptic neuron minus the spike time of the presynaptic neuron, and t+ and tare time constants, both with the same value of 20 ms. Likewise, we set the parameters A+=0.02 and A-=0.021.
The values used to initialize the weights are defined using the S matrix (Eq. 11).
Only excitatory-to-excitatory weights are allowed to change; inhibitory connections are kept fixed during the simulation.
All differential equations were numerically solved using Euler's method, using a time step of 0.1 ms.

Acknowledgments:
This work was done with the support of EBRAINS and HBP computing services. We thank          Fig. 6C (left) as well as the frequency where maximal power was reached (right in Fig. 6C).
Figure S12: Weighs distribution for the trained network and uniformly increased network (see Fig. 7

all PV cells, and a subset of PV cells. To test whether the impact of PV cells was not solely due to the higher number of PV cells compared to SST cells, we inactivated a subpopulation of PV cells (PV-sub), equal in size to the number of SST neurons
in each layer. The effects on the oscillations, in this case, were significantly stronger than the inactivation of the SST population, thereby proving the stronger role of PV cells. The prominent role of PV cells appeared to be related, not solely to their higher number, but rather to the synaptic connections from PV to pyramidal neurons, which are stronger than the projections from SST to pyramidal neurons. Figure S14: Top: Power spectrum of the frequency of excitatory neuron firing rates in all layers of two distinct networks (STDP conditioned and Shuffled networks). As shown in Figure 7A, in the network with shuffled weights, the oscillatory activity disappears. The peaks at 26