Introduction
Convolutional Neural Networks (CNNs) are the current gold standard for modeling visual cortical neurons. However, they have a significant blind spot: contextual modulation. In the brain, a primary visual cortex (V1) neuron doesn't just care about the tiny patch of the world it sees directly (its "receptive field"). It is also heavily influenced by the surrounding context via complex horizontal and feedback connections.
Standard CNNs attempt to mimic this using successive convolutional layers and fully connected readouts, but these mechanisms are often too rigid to capture the dynamic, image-dependent way the surround affects the center. Furthermore, standard evaluation metrics like Pearson correlation can be misleading. They are dominated by the vast majority of images that a neuron doesn't care about, masking the model's failure to predict rare "peak" responses to the neuron's favorite stimuli.
This paper demonstrates that adding a self-attention layer to a CNN significantly improves its ability to predict these crucial peak responses in macaque V1 neurons.
Methods and Architectures
To dissect how different architectural components contribute to neural prediction, the authors developed a suite of models:
- ff-CNN (Baseline): A standard feedforward CNN.
- ff+sa-CNN: The baseline augmented with a Self-Attention (SA) layer. This allows the model to perform "non-local" computations, letting any part of the image influence another based on feature similarity.
- Incremental Learning: A novel training strategy where the model first learns the local receptive field (RF) and then "unfreezes" to learn the self-attention and readout layers. This mimics biological development, where RFs mature before horizontal connections.
To better evaluate these models, the authors introduced the Peak Tuning Index (PT), a new metric specifically designed to measure a model's accuracy in predicting the top 1% of a neuron's responses.
Datasets
The study utilized a massive, high-quality dataset of macaque V1 responses recorded via Two-Photon Calcium Imaging. Data was collected from 1,689 neurons across 6 sites in three awake monkeys. The stimuli consisted of 30,000 to 50,000 natural images from the ImageNet dataset. A separate validation set of 1,000 images, each repeated 10 times, was used to establish a reliable ground truth for neural variability.
Key Insights and Results
The addition of self-attention yielded several key insights into how neural networks can better model biological vision:
- The "Correlation vs. Peak" Trade-off: Surprisingly, a model restricted to only looking at the local receptive field (
rf-CNN) can achieve the highest overall Pearson correlation. However, it fails miserably at predicting peak responses. This suggests that the "surround" context isn't just noise—it's essential for defining a neuron's top feature preferences. - Performance Boost: The
ff+sa-CNNimproved Pearson correlation by up to 6.6% over the baseline CNN. More importantly, the improvement in the Peak Tuning Index (PT) was dramatic, nearly doubling in some cases (e.g., from 5.6% to 10.5% in one monkey). - Self-Attention as a Gating Mechanism: Self-attention acts as a flexible gate, allowing the model to perform "pattern completion" or "association." The surrounding context reinforces the center response only when the features are relevant.
The authors also found that training the entire network at once often leads to poor results because complex self-attention gradients can overwhelm the learning of the basic receptive field. Learning the RF first (incremental learning) proved much more robust. Furthermore, self-attention and fully connected readout layers serve complementary roles: the readout provides a global summation, while self-attention provides image-specific nuance.
Finally, self-attention models proved significantly more data-efficient. When trained on only 25% of the available data, the SA-augmented models maintained a much higher performance lead over standard CNNs.
Limitations and Future Work
While promising, the current models are feedforward. In the real brain, contextual modulation involves recurrent loops and feedback that unfold over time. Future work could integrate self-attention into recurrent architectures. Additionally, the study used single-headed attention to maintain interpretability; exploring multi-head attention might yield higher accuracy but at the cost of making the model harder to decipher. Finally, while the function of self-attention mimics V1, its physical implementation in biological neurons remains an open question for neuroscientists.
Summary updated