Abstract: A popular theory of perceptual processing holds that the brain learns both a generative model of the world and a paired recognition model using variational Bayesian inference. Most hypotheses of how the brain might learn these models assume that neurons in a population are conditionally independent given their common inputs. This simplification is likely not compatible with the type of local recurrence observed in the brain. Seeking an alternative that is compatible with complex inter-dependencies yet consistent with known biology, we argue here that the cortex may learn with an adversarial algorithm. Many observable symptoms of this approach would resemble known neural phenomena, including wake/sleep cycles and oscillations that vary in magnitude with surprise, and we describe how further predictions could be tested. We illustrate the idea on recurrent neural networks trained to model image and video datasets. This framework for learning brings variational inference closer to neuroscience and yields multiple testable hypotheses.
The Challenge of Recurrence in Variational Inference
Computational neuroscience often models the brain as a "Helmholtz Machine"—a system that simultaneously learns a generative model (how external causes create sensations) and a recognition model (how to infer those causes from sensations). To optimize these models, the brain must minimize the difference between its internal predictions and actual sensory input, typically quantified by Kullback-Leibler (KL) divergence.
However, a significant biological hurdle exists: standard variational methods assume that neurons within a layer are conditionally independent. This assumption allows the log-probability of a population state to be "factorized," meaning the total error can be broken down into local signals that individual synapses can use to learn. In the actual cortex, neurons are densely interconnected with local recurrent loops. This recurrence makes the probability distribution non-factorizable; a single synapse cannot determine how to improve its weight without global knowledge of the entire population's activity, a requirement that is biologically implausible.
Adversarial Learning as a Biological Solution
We propose that the brain bypasses the mathematical complexity of non-factorizable KL divergence by employing an adversarial learning strategy. Instead of calculating a precise error gradient, the brain may utilize specific neural circuits that act as "discriminators." These discriminators are tasked with distinguishing between two distinct phases of neural activity:
- The Wake Phase: Activity driven by bottom-up sensory input from the external world.
- The Sleep Phase: Activity generated internally by the brain’s generative model (top-down).
In this framework, the generative and recognition models act as "generators" in a biological Generative Adversarial Network (GAN). They adjust their synaptic weights to produce activity patterns that are so realistic they "trick" the discriminator into being unable to distinguish between internally generated and externally driven states.
Biological Implementation and Oscillations
This adversarial approach aligns closely with several known neurobiological phenomena. We suggest that brain oscillations (such as gamma or theta waves) function as high-speed switches between these wake and sleep phases. During one phase of an oscillation, the network performs inference on sensory data; during the next, it generates a sample from its internal model.
This leads to a key testable prediction: Surprise = Power. If the brain's internal model is highly accurate, the discriminator will struggle to distinguish between phases, resulting in weak teaching signals and low-amplitude oscillations. Conversely, when faced with surprising or novel stimuli, the discriminator must work harder, leading to the stronger gamma-band oscillations frequently observed in human EEG studies during tasks involving high prediction error.
Furthermore, we identify specific interneurons, such as Somatostatin-positive (SST+) or Layer 1 interneurons, as potential biological candidates for these discriminator circuits. These cells are ideally positioned to monitor broad population activity and provide the necessary plasticity-modulating signals to drive learning.
Empirical Validation
To test the feasibility of this framework, we applied adversarial learning to several recurrent neural network architectures using standard machine learning benchmarks:
- MNIST and CIFAR-10: The model successfully learned to reconstruct complex static images, even when using architectures with heavy local recurrence (e.g., divisive normalization).
- Moving MNIST: The framework proved capable of temporal prediction, learning to track and forecast the trajectories of moving digits in a video stream.
- Distribution Matching: Statistical analysis showed that the adversarial model achieved a high degree of alignment between "wake" and "sleep" activity patterns, mirroring the statistical properties observed in the visual cortex of animal models.
Conclusion and Future Directions
By reframing the brain's learning process as an adversarial game, we provide a mathematically sound way for recurrent networks to perform variational inference. While challenges remain in scaling these discriminators to the massive dimensionality of the human brain, this model offers a bridge between high-level Bayesian theories and the messy, oscillatory reality of biological neural circuits. Future work will focus on experimental verification, specifically testing whether synaptic plasticity rules indeed flip polarity in sync with brain oscillations.
Summary updated