Cortical-Like Dynamics Emerge as a Result of Sampling-Based Inference
Post by Cody Walters
What’s the science?
The brain’s cortical dynamics are characterized by a variety of motifs such as stimulus-dependent oscillations, transients, and changes in variability. The functional role of these phenomena are unclear, and to date there is no unifying framework to account for these distinct features of cortical activity. This week in Nature Neuroscience, Echeveste et al. provide evidence that these dynamics might emerge as a result of how the brain represents uncertainty.
How did they do it?
The authors optimized a recurrent neural network (a form of machine learning) with biological constraints to perform sampling-based probabilistic inference. In order to train the network, they employed a known generative model (a Gaussian scale mixture model) to capture the statistics of small segments of natural images. A generative model is a probabilistic model of the world that describes how sensory observations were likely generated. Specifically, a well-calibrated generative model allows you to infer the state of latent (i.e., unobserved) variables that most likely caused a given stimulus. The authors used a generative model that describes each image patch as a weighted sum of gabor filters (which are commonly used to approximate the receptive fields found in visual cortex) with varying orientations and intensities. Using Bayes rule, they ‘inverted’ their generative model in order to probabilistically infer the configuration of latent variables (in this case, the set of gabor filter intensities) that were the most likely cause of a given image patch. This method is referred to as the ‘ideal observer’ because it performs the task optimally (from a Bayesian perspective). The distribution of inferred latent variable values (i.e., gabor filter intensities) given a specific stimulus (i.e., image segment) are known as the posterior in Bayesian modeling, and the weights in the recurrent network were trained in order to mimic the posterior distributions produced by the generative model.
The architecture of the recurrent network mirrored the structure of the generative model such that each excitatory neuron in the network corresponded to a specific latent variable (i.e., gabor filter intensity). Thus, as the firing rate patterns between neurons evolved over time, they traced out regions in membrane potential space that reflected a probability distribution (with each point in that region of neural activity representing a ‘sample’ from the posterior). Under this assumption, the mean of the neural activity is related to the estimated peak of the posterior (i.e., the most likely configuration of latent variables given an image segment), while variability in the neural activity is related to the uncertainty of that estimate (i.e., the width of the posterior).
What did they find?
The authors first confirmed that the mean, variance, and covariance of the posterior distributions obtained by the ideal observer for five different stimulus (i.e., gabor filter) contrast levels of varying orientation were closely matched by the distribution of network activity profiles, thus demonstrating that the network had been successfully optimized to perform sampling-based inference. In order to determine whether their network could generalize to stimuli it hadn’t been trained on, the authors tested its performance on novel image patches. Once again, they found that the network activity profiles were able to closely match the ideal observer posterior distributions.
The authors then examined how the neural responses in the optimized network compared to actual neural data obtained from macaques and mice on a similar visual task. Interestingly, they found that the network replicated four fundamental properties of cortical dynamics: (1) the tuning curves of individual neurons in the network closely matched experimental data, (2) network activity exhibited variability quenching (i.e., a reduction in firing rate variability at stimulus onset), (3) the network exhibited gamma oscillations, and the peak of those gamma oscillations shifted to higher frequencies as stimulus contrast levels increased, and (4) the network displayed stimulus-dependent inhibitory transients that scaled with stimulus contrast. Furthermore, they found that these cortical-like features of the network disappeared when it was only trained to match the mean (and not the variance and covariance) of the ideal observer posterior distributions. This suggests that the cortical-like dynamics they observed were not an inevitable consequence of the structure of the network, but rather that these dynamical features arose due to the network being optimized for a specific computational objective (i.e., to match the mean, variance, and covariance of the ideal observer posterior distributions).
Next, the authors examined the potential functional role of oscillations in the network, finding that gamma oscillations allowed the network to more rapidly converge with the target distribution that it was attempting to match through sampling. Indeed, gamma oscillations appeared to allow the network to more quickly traverse terrain in neural state space (and thus get a more accurate estimate of the target distribution) as evidenced by the fact that the first principle component of the neural activity contained much of the gamma power. This result suggests that the network uses gamma oscillations to speed-up neural state space sampling in the direction that captures most of the variance of the target distribution.
Finally, the authors explored the potential functional role of transients. They found that overshoots seen at stimulus onset (when the network has to suddenly switch from representing one target mean to a different target mean) allowed neurons in the network to more accurately approximate the new target distribution (as compared to approaching the new target mean exponentially). The reason for this is that the transient overshoots seen during the first ~100 milliseconds after stimulus onset average out to match the target mean, thus conferring the ability to perform more rapid inference. This form of averaging-out made specific predictions about overshoots, namely (1) that they should scale with the magnitude of the difference between the pre-stimulus onset mean and the post-stimulus onset mean, and (2) that they should be orientation-tuned (i.e., larger for a given neuron’s preferred stimulus orientation). The authors then provided experimental confirmation for both of these predictions through a novel analysis of awake macaque data.
What’s the impact?
Echeveste et al. showed that a recurrent network with biological constraints exhibited various dynamical features commonly seen in cortical structures such as gamma oscillation peak-shifting, variability quenching, and transients. Importantly, none of these dynamics were directly encoded into the network; rather, they emerged indirectly as a consequence of the computational goal the network was optimized to perform: sampling-based inference. These results highlight sampling-based inference as a candidate unifying framework that parsimoniously explains a suite of dynamical features exhibited by sensory cortices.
Cortical-like dynamics in recurrent circuits optimized for sampling-based probabilistic inference, (2020). Access the publication here.