Abstract
Sensory stimuli can be recognized more rapidly when they are expected. This phenomenon depends on expectation affecting the cortical processing of sensory information. However, virtually nothing is known on the mechanisms responsible for the effects of expectation on sensory networks. Here, we report a novel computational mechanism underlying the expectation-dependent acceleration of coding observed in the gustatory cortex (GC) of alert rats. We use a recurrent spiking network model with a clustered architecture capturing essential features of cortical activity, including the metastable activity observed in GC before and after gustatory stimulation. Relying both on network theory and computer simulations, we propose that expectation exerts its function by modulating the intrinsically generated dynamics preceding taste delivery. Our model, whose predictions are confirmed in the experimental data, demonstrates how the modulation of intrinsic metastable activity can shape sensory coding and mediate cognitive processes such as the expectation of relevant events. Altogether, these results provide a biologically plausible theory of expectation and ascribe a new functional role to intrinsically generated, metastable activity.
Introduction
Expectation exerts a strong influence on sensory processing. It improves stimulus detection, enhances discrimination between multiple stimuli and biases perception towards an anticipated stimulus1–3. These effects, demonstrated experimentally for various sensory modalities and in different species2,4–7, can be attributed to changes in sensory processing occurring in primary sensory cortices. However, despite decades of investigations, little is known regarding how expectation shapes the cortical processing of sensory information.
While different forms of expectation likely rely on a variety of neural mechanisms, modulation of pre-stimulus activity is believed to be a common underlying feature8–10. Here, we investigate the link between pre-stimulus activity and the phenomenon of general expectation in a recent set of experiments performed in gustatory cortex (GC) of alert rats6. In those experiments, rats were trained to expect the intraoral delivery of one of four possible tastants following an anticipatory cue. The use of a single cue allowed the animal to predict the availability of gustatory stimuli, without forming expectations on which specific taste was being delivered. Cues predicting the general availability of taste modulated firing rates of GC neurons. Tastants delivered after the cue were encoded more rapidly than uncued tastants, and this improvement was phenomenologically attributed to the activity evoked by the preparatory cue. However, the precise computational mechanism linking faster coding of taste and cue responses remains unknown.
Here we propose a mechanism whereby an anticipatory cue modulates the timescale of temporal dynamics in a recurrent population model of spiking neurons. In the model proposed here, neurons are organized in strongly connected clusters and produce sequences of metastable states similar to those observed during both pre-stimulus and evoked activity periods11–17. A metastable state is a vector of firing rates across simultaneously recorded neurons that can last for several hundred milliseconds before giving way to the next state in a sequence. The ubiquitous presence of state sequences in many cortical areas and behavioral contexts18–24 has raised the issue of their role in sensory and cognitive processing. Here, we elucidate the central role played by pre-stimulus metastable states in processing forthcoming stimuli, and show how cue-induced modulations of state sequences drive anticipatory coding. Specifically, we show that an anticipatory cue affects sensory coding by decreasing the duration of metastable states and accelerating the pace of state sequences. This phenomenon, which results from a reduction in the energy barriers separating the metastable states, accelerates the onset of specific states coding for the presented stimulus, thus mediating the effects of general expectation. Analysis of the experimental data confirmed the predictions of the model.
Altogether, our results unveil a novel computational mechanism accounting for the acceleration of coding induced by expectation, and demonstrate for the first time the functional significance of modulating pre-stimulus, ongoing dynamics in cortical circuits.
Results
Anticipatory cue accelerates stimulus coding in a clustered population of neurons
To uncover the computational mechanism linking cue-evoked activity with coding speed, we modeled the gustatory cortex (GC) as a population of recurrently connected excitatory and inhibitory spiking neurons. Excitatory neurons are arranged in clusters12,25,26 (Fig. 1a). Recurrent synaptic weights between neurons in the same cluster were potentiated compared to neurons in different clusters. Connections between excitatory and inhibitory neurons were random and homogeneous (i.e., non-clustered), as were connections between inhibitory neurons. Sensory inputs were modeled as depolarizing currents injected in randomly selected neurons. We used four sets of simulated stimuli, wired to produce gustatory responses like those observed in the experiments to sucrose, sodium chloride, citric acid, and quinine (see Supplementary Methods material for details on selectivity). In addition, we endowed the model with a set of anticipatory inputs designed to produce cue-responses analogous to those seen experimentally in the case of general expectation. To simulate general expectation, we connected anticipatory inputs with random neuronal targets in the network. The peak value of the cue-induced current for each neuron was sampled from a normal distribution with zero mean and fixed variance (see Supplementary Results). This choice reflected the large heterogeneity of cue responses observed in the empirical data, where excited and inhibited neural responses occurred in similar proportions10. Fig 1b shows two representative cue-responsive neurons in the model: one inhibited by the cue and one excited by the cue. Given these conditions, we simulated the experimental paradigm adopted in awake-behaving rats to demonstrate the effects of general expectation6,10. In the original experiment, rats were trained to self-administer into an intra-oral cannula one of four possible tastants following an anticipatory cue. At random trials and time during the inter-trial interval, tastants were unexpectedly delivered in the absence of a cue. To match this experiment, the simulated paradigm interleaves two conditions: in expected trials, a stimulus (out of 4) is delivered at t=0 after an anticipatory cue (the same for all stimuli) delivered at t=-0.5s (Fig. 1b); in unexpected trials the same stimuli are presented in the absence of the cue. We then tested whether cue presentation affected stimulus coding. A multi-class classifier (see Online Methods) was used to assess the information about the stimuli encoded in the neural activity. Stimulus identity was encoded well in both conditions, reaching perfect accuracy after a few hundred milliseconds (Fig. 1c). However, comparing the time course of the decoding accuracy between conditions, we found that the increase in decoding accuracy was significantly faster in expected than in unexpected trials (Fig. 1c, pink and blue curves represent expected and unexpected conditions, respectively). Indeed, the onset time of a significant decoding occurred earlier in the expected vs. the unexpected condition (decoding latency was 0.13 ± 0.01 s [mean±s.e.m.] for expected compared to 0.21 ± 0.02 s for unexpected, across 20 independent sessions; p=0.002, signed-rank=14, d.o.f.=39; inset in Fig. 1c). Thus, in the model network, the interaction of cue response and activity evoked by the stimuli results in faster encoding of the stimuli themselves, mediating the expectation effect.
The clustered architecture of the model was chosen for its ability to reproduce fundamental features of the activity observed in GC11,27. To clarify the role of neural clusters in mediating expectation, we simulated the same experiments in a homogeneous network (i.e., without clusters) operating in the balanced asynchronous regime25,26 (Fig. 1d, intra- and inter-cluster weights were set equal, all other network parameters and inputs were the same as for the clustered network). Even though single neurons’ responses to the anticipatory cue were comparable to the ones observed in the clustered network (see Supplementary Results), stimulus encoding was not affected by cue presentation (Fig. 1f, pink and blue curves represent expected and unexpected conditions, respectively). In particular, the onset of a significant decoding was similar in the two conditions (latency of significant decoding was 0.17 ± 0.01 s for expected and 0.16 ± 0.01 s for unexpected tastes averaged across 20 sessions; p=0.31, signed-rank=131, d.o.f.=39; inset in Fig. 1f).
The anticipatory activity observed in the clustered network was robust to variations in key parameters related to the sensory and anticipatory inputs, as well as network connectivity and architecture (Fig. S1 and Supplementary Results). Furthermore, acceleration of coding depended on the patterns of connectivity of anticipatory inputs, specifically on the fact that it increased the spatial spread in the afferent currents (Fig S1c). In a model where the cue recruited the recurrent inhibition (i.e., increasing the input currents to the inhibitory population), stimulus coding was decelerated (Fig S2), suggesting a potential mechanism mediating the effect of distractors.
Overall, these results demonstrate that a clustered network of spiking neurons can successfully reproduce the acceleration of sensory coding induced by expectation and that removing clustering impairs this function.
Anticipatory cue speeds up the network’s dynamics
Having established that a clustered architecture mediates the effects of expectation on coding, we investigated the underlying mechanism.
Clustered networks spontaneously generate highly structured activity characterized by coordinated patterns of ensemble firing. This activity results from the network hopping between metastable states in which different combinations of clusters are simultaneously activated11,14,15. To understand how anticipatory inputs affected network dynamics, we analyzed the effects of cue presentation for a prolonged period of 5 seconds in the absence of stimuli (Fig. 2). Activating anticipatory inputs led to changes in network dynamics, with clusters turning on and off more frequently (Fig. 2a). We quantified this effect by showing that a cue-induced increase in input spatial spread ()) led to a shortened cluster activation lifetime (left panel in Fig. 2b; Kruskal-Wallis one-way ANOVA: p<10-17, Χ 2 (5)=91.2), and a shorter cluster inter-activation interval (i.e., quiescent intervals between consecutive activations of the same cluster, right panel in Fig. 2b, kruskal-wallis one-way ANOVA: p<10-18, Χ2(5)=98.6).
Previous work demonstrated that metastable states of co-activated clusters result from attractor dynamics11,14,15. Hence, the shortening of cluster activations and inter-activation intervals observed in the model could be due to modifications in the network’s attractor dynamics. To test this hypothesis, we performed a mean field theory analysis28,29 of a simplified network with two clusters, comprising a reduced repertoire of configurations (or ‘attractors’), which include two configurations in which either cluster is active, and the other inactive. For instance, consider the transition from a configuration with cluster 1 active while cluster 2 is inactive, to the opposite configuration with cluster 2 active and cluster 1 inactive. These configurations are shown in Fig. 2c as potential wells ‘A’ and ‘B’, respectively. Due to finite size effects, configurations A and B are metastable, and Kramer’s theory predicts the network will switch between the two configurations with a finite transition probability P(A ↔ B), inversely proportional to the height 3 of the barrier separating them15,30. The presence of an anticipatory cue decreases the height of the barrier separating the two potential wells (Fig. 2c). This effect is proportional to the cue-induced spread in the afferent currents (Fig. 2c, lighter shades represent larger spatial spread σ).
This analysis shows that the anticipatory cue increases the spontaneous transition rates between the network’s metastable configurations by reducing the energy barrier necessary to hop among configurations. In the following we uncover an important consequence of this phenomenon for sensory processing.
Anticipatory cue induces faster onset of taste-coding states
The cue-induced modulation of attractor dynamics led us to formulate a hypothesis for the mechanism underlying the acceleration of coding. The activation of anticipatory inputs prior to sensory stimulation may allow the network to enter more easily configurations encoding stimuli while exiting more easily non-coding configurations. Fig. 3a shows population rasters in response to the same stimulus presented in the absence of a cue or after a cue. The red spikes represent activity in taste-selective clusters and show a faster activation latency in response to the stimulus preceded by the cue compared to the uncued condition. A systematic analysis revealed that in the cued condition, the clusters activated by the subsequent stimulus had a significantly faster activation latency than in the uncued condition (Fig. 3b, 0.22 ± 0.01 s (mean±s.e.m.) during cued compared to 0.32 ± 0.01 s for uncued stimuli; p<10-5, rank sum test R(39)=232).
We elucidated this effect using mean field theory. In the simplified two-cluster network of Fig. 3c (the same network as in Fig. 2c), the configuration where the taste-selective cluster is active (“coding state”) and the nonselective cluster is active (“non-coding state”) have initially the same potential energy, in the absence of stimulation (local minima of the black line in Fig. 3c), separated by an energy barrier whose height is reduced by the anticipatory cue (dashed vs. full line). When the taste stimulus is presented, it activates the stimulus-selective cluster, so that the coding state will now sit in a deeper well (lighter lines) compared to non-coding state. Stronger stimuli (lighter shades in Fig. 3c) increase the difference between the wells’ depths breaking their initial symmetry, so that now a transition from the non-coding to the coding state is more likely than a transition from the coding to the non-coding state30. The faster transition rate into coding configurations translates into faster coding, on average, of the stimuli encoded by those states.
We tested the model prediction on the data from Samuelsen et al. (Fig 4)6. To compare the data to the model simulations, we randomly sampled ensembles of model neurons whose sizes matched the empirical dataset ones. Since we only have access to a subset of neurons in the experiments, rather than the full network configuration, we segmented the ensemble activity for both model and data in sequences of metastable states via a Hidden Markov Model (HMM) analysis (see Methods). Previous work demonstrated that HMM states, i.e. patterns of coordinated ensemble firing activity, can be treated as reduced observations of metastable network configurations11. Indeed, activation of taste-coding configurations for a particular stimulus results in HMM states containing information about that stimulus (i.e., taste-coding HMM states). If the hypothesis originating from the model is correct, transitions from non-coding HMM states to taste-coding HMM states should be faster in the presence of the cue compared to uncued trials. We indeed found faster transitions to HMM coding states in cued trials for both model and data (Fig. 4a and 4c, respectively; color-coded horizontal bars overlay coding states). The latency of coding states was significantly faster during cued compared to uncued trials in both the model (Fig. 4b, mean latency of the first coding state was 0.32 ± 0.02 s for expected vs 0.38 ± 0.01 s for unexpected trials; rank sum test R(39)=319, p=0.014) and the empirical data (Fig. 4d: 0.46 ± 0.02 s for expected vs 0.56 ± 0.03 s for unexpected trials; rank sum test R(37)=385, p=0.026).
Altogether, these results demonstrate that anticipatory inputs speed up sensory coding by reducing the energy barriers separating metastable states.
Discussion
Expectations modulate perception and sensory processing. Expected stimuli are recognized more accurately and rapidly than unexpected ones. In the gustatory cortex, acceleration of taste coding has been related to changes in firing activity evoked by cues predicting the general availability of tastants6. However, the computational mechanisms linking pre-stimulus activity with changes in the latency of sensory coding are still unknown. Here we propose a novel mechanism that explains the effects of expectation through the modulation of the dynamics intrinsically generated by the cortex. Our results represent also the first theoretical evidence of a functional role for the erratic, intrinsically generated activity that is ubiquitously observed in cortical circuits11,18–21,24,31–34.
The proposed mechanism requires a recurrent spiking network where excitatory neurons are arranged in clusters, which has been demonstrated to capture essential features of the dynamics of neural activity in sensory circuits11,16. In such a model, network activity during both spontaneous and stimulus-evoked periods unfolds through state sequences, each state representing a metastable network attractor. In response to an anticipatory cue, the pace of state sequences speeds up, accelerated by a higher transition probability among states. The latter is caused by lowering the potential barrier separating metastable states in the attractor landscape. This anticipates the offset of states not conveying taste information and the onset of states containing the most information about the delivered stimulus (‘coding states’), causing the faster decoding observed by Samuelsen et al6 (see Fig. 1c).
Notably, this novel mechanism for anticipation is unrelated to increases in network excitability which would lead to unidirectional changes in taste-evoked firing rates. It relies instead on an increase in the spatial spread of the afferent currents to the sensory network brought about by the anticipatory cue. This increase in the input’s variance is observed experimentally after training10, and is therefore the consequence of having learned the anticipatory meaning of the cue. The acceleration of the dynamics of state sequences predicted by the model was also confirmed in the data from ensembles of simultaneously recorded neurons in awake-behaving rats.
These results show for the first time a precise and explanatory link between the intrinsic dynamics of neural activity in a sensory circuit and a specific cognitive process, that of general expectation6.
Clustered connectivity and metastable states
A key feature of our model is the clustered architecture of the excitatory population. Removing excitatory clusters eliminates the cue-induced anticipatory effect (Fig. 1d-f). The choice of such a network architecture reflects the existence of assemblies of functionally correlated neurons in GC and other cortical areas, and is further justified by growing evidence from electrophysiological and imaging experiments suggesting that pyramidal neurons in various cortical circuits may be arranged in clusters endowed with strong local connectivity35,36.
Theoretical work in recurrent networks shows that a clustered architecture can produce stable patterns of population activity called attractors12. Noise (either externally14,37 or internally generated11,15) may destabilize those states, driving the emergence of temporal dynamics based on the progression through metastable states. Network models with clustered architecture provide a parsimonious explanation for the state sequences that have been observed ubiquitously in alert mammalian cortex, during both task engagement17,18,38,39 and inter-trial periods.11,32,33 In addition, this type of models accounts for various physiological observations such as stimulus-induced reduction of trial-to-trial variability11,14,15,40, neural dimensionality27, and firing rate multistability11 (see also41,42).
The results presented here demonstrate another fundamental function performed by clustered networks: the modulation of coding latency. Changes in the depth of attractor wells, induced by the anticipatory cue (which in turn may depend on the activation of top-down and neuromodulatory afferents6,43), can accelerate or slow down network dynamics. The acceleration resulting from shallower wells leads to a reshaping of ongoing activity and to a quicker recruitment of states capable of coding sensory information.
Functional role of heterogeneity in cue responses
As stated in the previous section, the presence of clusters is a necessary ingredient to obtain a faster latency of coding. Here we discuss the second necessary ingredient, i.e., the presence of heterogeneous neural responses to the anticipatory cue (Fig. 1b).
Responses to anticipatory cues have been extensively studied in cortical and subcortical areas in alert rodents6,10,44,45. Cues evoke heterogeneous patterns of activity, either exciting or inhibiting single neurons. The proportion of cue responses and their heterogeneity develops with associative learning,10,45 suggesting a fundamental function of these patterns.
However, the presence of both excited and inhibited cue responses poses a challenge to simple models of neuromodulation. The presence of cue-evoked suppression of firing10 suggests that cues do not improve coding by simply increasing the excitability of cortical areas. Additional mechanisms and complex patterns of connectivity may be required to explain the suppression effects induced by the cue. Here we provide a parsimonious explanation of how heterogeneous responses can improve coding without postulating any specific pattern of connectivity other than i) random projections from thalamic and anticipatory afferents and ii) the clustered organization of the intra-cortical circuitry. Notice that the latter contains wide distributions of synaptic weights and can be understood as the consequence of Hebb-like re-organization of the circuitry during training46,47.
By incorporating excitated and inhibited cue responses in our model, cues-induced modulations do not affect the mean input to the network, but only change its spatial spread across neurons. As a result, the anticipatory cue leaves average firing rates unchanged in the clustered network (Fig. S3), and only modulates the network temporal dynamics. Our model thus provides a mechanism whereby increasing the spatial variance of top-down inputs has, paradoxically, a beneficial effect on sensory coding.
Cortical timescales, state transitions, and cognitive function
In populations of spiking neurons, a clustered architecture can generate reverberating activity and sequences of metastable states. Transitions from state to state can be typically caused by external inputs11,15. For instance, in frontal cortices, sequences of states are related to specific epochs within a task, with transitions evoked by behavioral events18,19,22. In sensory cortex, progressions through state sequences can be triggered by sensory stimuli and reflect the dynamics of sensory processing23,38. State sequences with a slow timescale have been observed also in the absence of any external stimulation, promoted by intrinsic fluctuations in neural activity11,34. However, the potential functional role, if any, of this type of ongoing activity has remained unexplored.
Recent work has started to uncover the link between ensemble dynamics and sensory and cognitive processes. State transitions in various cortical areas have been linked to decision making37,48, choice representation22, rule-switching behavior24, and the level of task difficulty23. However, no theoretical or mechanistic explanations have been given for these phenomena.
Here we provide a mechanistic link between state sequences and expectation, by showing that intrinsically generated sequences can be accelerated, or slowed down, thus affecting sensory coding. Moreover, we show that the interaction between external stimuli and intrinsic dynamics does not result in the simple triggering of state transitions, but rather in the modulation of the intrinsic transition probabilities. The modulation of intrinsic activity can dial the duration of states, producing either shorter or longer timescales. A shorter timescale leads to faster state sequences and coding anticipation after stimulus presentation (Fig. 1 and 4). Other external perturbations may induce different effects: for example, recruiting the network’s inhibitory population slows down the timescale, leading to a slower coding (Fig. S2).
The interplay between intrinsic dynamics and anticipatory influences presented here is a novel mechanism for generating diverse timescales, and has rich computational consequences. We demonstrated its function in increasing coding speed, but its role in mediating cognition is likely to be broader and calls for further explorations.
Author Contributions
LM, GLC, and AF designed the project and wrote the manuscript; LM performed model simulations and theoretical analyses; LM analyzed the empirical data.
Competing Financial Interests
The authors declare no competing financial interests.
References
Methods
Behavioral training and electrophysiology
Adult female Long–Evans rats were used in the experiment.1 Movable bundles of 16 microwires attached to a “mini-microdrive” were implanted bilaterally in the gustatory cortex and intraoral cannulae (IOC) were inserted bilaterally and cemented. All experimental procedures were approved by the Institutional Animal Care and Use Committee of Stony Brook University and complied with university, state, and federal regulations on the care and use of laboratory animals (for more details, see Supplementary Methods and Ref. 1). After postsurgical recovery, rats were trained to self-administer fluids through IOCs by pressing a lever under head-restraint within 3s presentation of an auditory cue (‘expected trials’; a 75 dB pure tone at a frequency of 5 kHz). The interval at which lever pressing delivered water was gradually increased to 40 ± 3 s (inter-trial period). Early presses were discouraged by the addition of a 2s delay of the cue. During training and experimental sessions, additional tastants were automatically delivered through the IOC at random times near the middle of the inter-trial interval and in the absence of the anticipatory cue (‘unexpected’ trials). The following tastants were delivered: 100 mM NaCl, 100 mM sucrose, 100 mM citric acid, and 1 mM quinine HCl. Water (50 μl) was delivered to rinse the mouth clean through a second IOC, 5s after the delivery of each tastant.
Multiple single-unit action potentials were amplified, bandpass filtered, and digitally recorded. Single units were isolated using a template algorithm, clustering techniques, and examination of inter-spike interval plots (Offline Sorter, Plexon). Starting from a pool of 299 single neurons in 37 sessions, neurons with peak firing rate lower than 1 Hz (defined as silent) were excluded from further analysis, as well as neurons with a large peak around the 6-10 Hz in the spike power spectrum, which were classified as somatosensory2–4. Only ensembles with 5 or more simultaneously recorded neurons were included in the rest of the analyses. Ongoing and evoked activity were defined as occurring in the 5 seconds-long interval before or after taste delivery, respectively.
Ensemble states detection
A Hidden Markov Model (HMM) analysis was used to detect ensemble states in both the empirical data and model simulations. Here, we give a brief description of the method used and we refer the reader to Refs. 5–8 for more detailed information.
The HMM assumes that an ensemble of N simultaneously recorded neurons is in one of M hidden states at each given time bin. States are firing rate vectors ri’(m), where i = 1,…, N is the neuron index and m= 1,.., M identifies the state. In each state, neurons were assumed to discharge as stationary Poisson processes (Poisson-HMM) conditional on the state firing rate. Trials were segmented in 2 ms bins, and the value of either 1 (spike) or 0 (no spike) was assigned to each bin for each given neuron; if more than one neuron fired in a given bin (a rare event), a single spike was randomly assigned to one of the firing neurons (Bernoulli approximation). A single HMM was used to fit all trials in each recording session, resulting in the emission probabilities ri’(m) and in a set of transition probabilities between the states. Emission and transition probabilities were calculated with the Baum-Welch algorithm9 with a fixed number of hidden states M, yielding a maximum likelihood estimate of the parameters given the observed spike trains. Since the model log-likelihood LL increases with M, we repeated the HMM fits for increasing values of M until we hit a minimum of the Bayesian Information Criterion (BIC, see below and Ref.9). For each M, the LL used in the BIC was the sum over 10 independent HMM fits with random initial guesses for emission and transition probabilities. This step was needed since the Baum-Welch algorithm only guarantees reaching a local rather than global maximum of the likelihood. The model with the lowest BIC (having M* states) was selected as the winning model, where BIC= −2LL + [M(M − 1) +MN]. In T, T being the number of observations in each session (= number of trials x number of bins per trials). Finally, the winning HMM model was used to “decode” the states from the data according to their posterior probability given the data. During decoding, only those states with probability exceeding 80% in at least 25 consecutive 2ms-bins were retained (henceforth denoted simply as “states”)6,8. This procedure eliminates states that appear only very transiently and with low probability, also reducing the chance of overfitting. A median of 6 states per ensemble was found, varying from 3 to 9 across ensembles.
Coding states
In each condition (i.e., expected vs. unexpected), the frequencies of occurrence of a given state across taste stimuli were compared with a test of proportions (chi-square, p<0.001 with Bonferroni correction to account for multiple states). When a significant difference was found across stimuli, a post-hoc Marascuilo test was performed. A state whose frequency of occurrence was significantly higher in the presence of one taste stimulus compared to all other tastes was deemed a ‘coding state’ for that stimulus (Fig. 4).
Spiking network model
We modeled the local neural circuit as a recurrent network of N leaky-integrate-and-fire (LIF) neurons, with a fraction nE= 80% of excitatory (E) and n1= 20% of inhibitory (I) neurons.10 Connectivity was random with probability pEE =0.2 for E to E connections and PEI = PIE = PII = 0.5 otherwise. Synaptic weights Jij from pre-synaptic neuron j =E,I to post-synaptic neuron i = E,I scaled as , with Jij drawn from normal distributions with mean jαβ (for αβ = E, I) and 1% SD. Networks of different architectures were considered: i) networks with segregated clusters (referred to as “clustered network,” parameters Tables 1 and 2), and ii) networks with overlapping clusters (see Suppl. Table 1 and Suppl. Methods for details), iii)homogeneous networks (Suppl. Table 2). In the clustered network, E neurons were arranged in Q clusters with Nc = 100 neurons per clusters on average (1% SD), the remaining fraction nbg of E neurons belonging to an unstructured “background” population. In the clustered network, neurons belonging to the same cluster had intra-cluster synaptic weights potentiated by a factor J+; synaptic weights between neurons belonging to different clusters were depressed by a factor J- = 1 - γ f(J+ - 1) < 1 with γ = 0.5; f = (1 - nbg)/Q is the average number of neurons in each cluster.10 When changing the network size N, all synaptic weights Jij were scaled by , the intracluster potentiation values were J+=5, 10, 20, 30, 40 for N = 1, 2, 4, 6, 8 ×103 neurons, respectively, and cluster size remained unchanged (see also Table 1); all other parameters were kept fixed. In the homogeneous network, there were no clusters (J+ = J- = 1).
Model neuron dynamics
Below threshold the LIF neuron membrane potential evolved in time as where τm is the membrane time constant and the input currents I are a sum of a recurrent contribution Irec coming from the other network neurons and an external current Iext = I0 + Istim + Icue (units of Volt/s). Here, I0 is a constant term representing the input from other brain areas; Istim’ and Icue represent the incoming stimuli and cue, respectively (see Stimulation protocols below). When V hits threshold Vthr, a spike is emitted and V is then clamped to the rest value Vreset for a refractory period τref. Thresholds were chosen so that the homogeneous network neurons fired at rates & A = 5 spks/s and rI = 7 spks/s. The recurrent contribution to the postsynaptic current to the i- th neuron was a low-pass filter of the incoming spike trains where τsyn is the synaptic time constant; Jij is the recurrent synaptic weights from presynaptic neuron j to postsynaptic neuron i, and is the k-th spike time from the j-th presynaptic neuron. The constant external current was I0 = Next pi0 Ji0vext, with Next = nEN, pi0 = 0.2, with JE0 for excitatory and JI0 for inhibitory neurons (see Table 1), and rext = 7 spks/s. For a detailed mean field theory analysis of the clustered network and a comparison between simulations and mean field theory during ongoing and stimulus-evoked periods we refer the reader to the Suppl. Methods and Refs.8,11.
Stimulation protocols
Stimuli were modeled as time-varying afferent currents targeting 50% of neurons in stimulus-selective clusters Istim’(t) = I0 · rstim’(t), where rstim’(t) was expressed as a fraction of the baseline external current I0. Each cluster had a 50% probability of being selective to a given stimulus, thus different stimuli targeted overlapping sets of clusters. The anticipatory cue, targeting a random 50 μ subset of E neurons, was modeled as a double exponential with rise and decay times of 0.2 s and 1 s, respectively, unless otherwise specified; its peak value for each selective neuron was sampled from a normal distribution with zero mean and standard deviation σ (expressed as fraction of the baseline current I0; σ=20% unless otherwise specified). The cue didn’t change the mean afferent current but only its spatial (quenched) variance across neurons.
In the unexpected condition, stimulus onset at t = 0 was followed by a linear increase rstim(t) (t) in the afferent current to stimulus-selective neurons reaching a value rmax at t = 1 s rmax = 20%, unless otherwise specified). In the expected condition, stimuli were preceded by the anticipatory cue rcue(t) with onset at t = −0.5 s before stimulus presentation.
Network simulations
All data analyses, model simulations and mean field theory calculations were performed using custom software written in MATLAB (MathWorks), and C. Simulation comprised 20 realizations of each network (each one representing a different experimental session), with 20 trials per stimulus in each of the 2 conditions (unexpected and expected); or 40 trials per session in the condition with “cue-on” and no stimuli (Fig. 2). Dynamical equations for the LIF neurons were integrated with the Euler method with 0.1 ms step. All simulation scripts are available from the authors upon request.
Mean field theory
Mean field theory was used in a simplified network with 2 excitatory clusters (parameters in Table 2) using the population density approach12–14: the input to each neuron was completely characterized by the infinitesimal mean μ α and variance of the post-synaptic current (see Supplementary Methods for their expressions). The network fixed points satisfied the Q + 2 self-consistent mean field equations10 where is the population firing rate vector (boldface represents vectors). Fα is the current-to-rate function for population α, which varied depending on the population and the condition. In the absence of the anticipatory cue, the LIF current-to-rate function was used
Where . Here.15,16 In the presence of the anticipatory cue, a modified current-to-rate function was used to capture the cue-induced Gaussian quenched noise in the afferent currents to the cue-selective populations (α = 1, …, Q): where Dz = dz exp is a Gaussian measure with zero mean and unit variance, μext = I0 is the baseline afferent current and σ is the anticipatory cue’s SD as fraction of μext. Fixed points r* of equation (1) were found with Newton’s method, and represented attractors when the stability matrix evaluated at the fixed point r * was negative definite. Stability was defined with respect to an approximate linearized dynamics of the mean mα and SD sα of the input currents17 where μα and are the stationary values given in the Suppl. Methods.
Effective mean field theory for the reduced network
The mean field theory equations (1) for the P=Q+2 populations may be reduced to a set of effective equations governing the dynamics of a smaller subset of q<P of populations, henceforth referred to as populations in focus18. The reduction is achieved by integrating out the remaining P-q out-of-focus populations. This procedure was used to estimate the energy barrier separating the two network attractors in Figg. 2 and 3. Given a fixed set of values for the in-focus populations, one solves the mean field equations for P-q out-of-focus populations for β = q + 1, …, P to obtain the stable fixed point of the out-of-focus populations as functions of the in-focus firing rates . Stability of the solution is computed with respect to the stability matrix (2) of the reduced system of P-q out-of-focus populations. Substituting the values into the fixed-point equations for the q populations in focus yields a new set of equations relating input rates to “output” rates rout: for α = 1, …, q. The input and output rout firing rates of the in-focus populations will be different, except at a fixed point of the full system where they coincide. The correspondence between input and output rates of in-focus populations defines the effective current-to-rate transfer functions for α = 1, …, q. in-focus populations at the point . The fixed points of the in-focus equations (4) are fixed points of the entire system. In case the out-of-focus populations attain multiple attractors for a given value of , the set of effective transfer functions is labeled by the chosen attractor, although in our analysis of the two-clustered network only one attractor was present for a given value of .
Energy potential
In a network with Q=2 clusters, one can integrate out the background and inhibitory (out-of-focus) populations to obtain the effective transfer functions for the two (in-focus) populations representing the two clusters, with firing rates (equation (4) for q=2). Network dynamics can be visualized on a two-dimensional plane . The mismatch between input and output firing rates of the in-focus populations yields an effective force , for α = 1, 2, according to (4). A fixed point of the full system is given by f = [f1, f2] = 0. The two-cluster network has two attractors (‘A’ and ‘B’ in Fig. 2c) and a saddle point C (local maximum in Fig. 2c). We estimated the height δ of the potential energy barrier on the trajectory from A to B through C as the line integral of the force from the first attractor A to C where ds is the line element on the trajectory through points of minimal absolute value of the force, |f|. Other barrier heights were estimated in a similar way.
Population decoding
The amount of stimulus-related information carried by spike trains was assessed through a decoding analysis19. A multiclass classifier was constructed from Q neurons sampled from the population (one neuron from each of the Q clusters for clustered networks, or Q random excitatory neurons for homogeneous networks). Spike counts from all trials of nstim.taste stimuli in each condition (expected vs. unexpected) were split into training and test sets for cross-validation. A “template” was created for each stimulus, condition and time bin (200 ms, sliding over in 50 ms steps) as the population PSTH over the training set, containing the trial-averaged spike counts of each neuron in each bin (the same number of trials across stimuli and conditions were used). Population spike counts for each test trial were classified according to the smallest Euclidean distance from the templates across 10 training sets (‘bagging’ or bootstrap aggregating procedure20). Specifically, from each training set L, we created bootstrapped training sets Lb, for b = 1,.., B = 10, by sampling with replacement from L. In each bin, each test trial was then classified B times using the B classifiers, obtaining B different votes, and the most frequent vote was chosen as the bagged classification of the test trial. Cross-validated decoding accuracy in a given bin was defined as the fraction of correctly classified test trials in that bin.
Significance of decoding accuracy was established via a permutation test: 1000 shuffled datasets were created by randomly permuting stimulus labels among trials, and a ‘shuffled distribution’ of 1000 decoding accuracies was obtained. In each bin, decoding accuracy of the original dataset was deemed significant if it exceeded the upper bound, α0.05.of the 95% confidence interval of the shuffled accuracy distribution in that bin (this included a Bonferroni correction for multiple bins, so that α0.05 = 1 − 0.05/Nb, with Nb the number of bins). Decoding latency (insets in Figs. 1c and 1f) was estimated as the earliest bin with significant decoding accuracy.
Cluster dynamics
For cluster dynamics analyses (lifetime, inter-activation interval, latency; Figg. 2 and 3), cluster spike count vectors r(for i = 1, …, Q) in 5 ms bins were obtained by averaging spike counts of neurons belonging to a given cluster. A cluster was deemed active if its firing rate exceeded 10 spks/s. This threshold was chosen to lie between the inactive and active clusters’ firing rates, which were obtained from a mean field theory solution of the network8.
References
Supplementary Results
Single neuron responses in network models
In the clustered network model of Fig. 1a–c, a large fraction of excitatory neurons was stimulus-responsive (79 ± 6% across 20 simulated networks), and cue responsive (61 ± 7%, among which 49 ± 8% were excited and 51 ± 8% inhibited, mean±SD, see Fig. 1b); 52 ± 8% of neurons responded to both stimulus and cue. Single neurons’ responses thus reflected the large heterogeneity of cue responses observed in the empirical data [1, 2].
In the homogeneous network of Fig. 1d–f, single neurons’ response properties were comparable to the ones observed in the clustered network. A large fraction of neurons were stimulus-responsive (69 ± 3% across 20 simulated networks), or cue responsive (47 ± 2%, among which 45 ± 1% were excited and 55 ± 1% inhibited, see Fig. 1e); 30 ± 2% of neurons responded to both stimulus and cue.
Robustness of anticipatory activity
To test the robustness of anticipatory activity in the clustered network, we systematically varied key parameters related to the sensory and anticipatory inputs, as well as network connectivity and architecture (Fig. S1). Increasing stimulus intensity led to a faster encoding of the stimulus in both conditions (Fig. S1a). Stimuli were always decoded faster when preceded by the cue (Fig. S1a; two–way ANOVA with factors ‘stimulus intensity’ (p< 10-18, F (4) = 30.4) and ‘condition’ (= expected vs. unexpected; p< 10-15, F (1) = 79.8)). The amount of anticipatory activity induced by the cue depended on stimulus intensity only weakly (p(interaction)= 0.05, F (4) = 2.4). Moreover, we found that anticipatory activity was maintained when we increased the number of presented stimuli, while keeping fixed the probability that each cluster was selective to a given stimulus at 50% (Fig. S1b; two-way ANOVA with factors ‘number of stimuli’ (p = 0.57, F (3) = 0.67) and ‘condition’ (p< 10-7, F (1) = 35.3; p(interaction)= 0.66, F (3) = 0.54).
Anticipatory activity was robust to variations in cue parameters. Anticipatory activity was present for values of cue–induced spread CJ in the afferent currents in the range σ > 10% (Fig. S1c, two–way ANOVA with factors ‘cue intensity’ (p = 0.09, F (7) = 1.8) and ‘condition’ (p < 10-7, F (1) = 31); p(interaction)= 0.07, F (7) = 1.9). Anticipatory activity was robust to variations in the time course of cue-evoked currents (Fig. S1e, two–way ANOVA with factors ‘time course’ (p = 0.03, F (4) = 2.8) and ‘condition’ (p< 10-15, F (1) = 72.7; p(interaction)= 0.12, F (4) = 1.8).
We then tested robustness of anticipatory activity to variations in network size N and architecture. We estimated the decoding accuracy in ensembles of equal size (20 neurons) sampled from networks of increasing size. When scaling network size we kept fixed both cluster size and the probability that each cluster was selective to a given stimulus (50%). Network synaptic weights scaled as in Table 1 and 2 in the Main Text. Cue-induced anticipation was always present albeit more pronounced in larger networks (Fig. S1d, two–way ANOVA with factors ‘network size’ (p < 10-20, F (3) = 49.5), ‘condition’ (p < 10-16, F (1) = 90; p(interaction)= 10-10, F (3) = 20).
Finally, we lifted the assumption of segregated clusters, and found that anticipatory activity was present also in networks with overlapping cluster membership (Fig. S1f) which endows the network with a more biologically plausible architecture [8].
We did not find any anticipatory coding in the homogeneous network model as a result of the same manipulations of Fig. S1a-e (not shown).
Acknowledgements
This work was supported by a National Institute of Deafness and Other Communication Disorders Grant K25-DC013557 (LM), by the Swartz Foundation Award 66438 (LM), by National Institute of Deafness and Other Communication Disorders Grants NIDCD R01DC012543 and R01DC015234 (AF), and partly by a National Science Foundation Grant IIS-1161852 (GLC). The authors would like to thank Drs. S. Fusi, A. Maffei, G. Mongillo, and C. van Vreeswijk for useful discussions.
Footnotes
↵* Co-senior authors
a Department of Neurobiology & Behavior, Life Sciences Building 516 State University of New York at Stony Brook, Stony Brook, NY 11794 alfredo.fontanini{at}stonybrook.edu
b Department of Neurobiology & Behavior, Life Sciences Building 513 State University of New York at Stony Brook, Stony Brook, NY 11794 giancarlo.lacamera{at}stonybrook.edu