On the universality of neural codes in vision

Florentin Guth, Brice MénardUniReps @ NeurIPS 2023

TL;DR

This paper investigates whether neural networks trained on different image classification tasks learn a "universal neural code." By analyzing the learned weights, they found that networks trained on diverse datasets share similar underlying weight statistics, suggesting a common, fundamental way these networks encode natural images. This has implications for simplifying network training and understanding biological vision.

What Problem Does This Paper Address?

Deep neural networks have shown remarkable success in image classification, often exhibiting transferable knowledge between tasks. While studies have shown that the representations (activations) learned by these networks are similar across different initializations and architectures, it's less clear if the underlying weights themselves converge to similar structures. This paper asks: does the similarity in learned representations stem from a more fundamental similarity in the learned weights, implying a universal neural code for natural images?

Methods

The authors build upon the work of Guth et al. [2023] to compare learned weights across different neural networks. Their approach involves:

  1. Separating Space and Channels: For convolutional layers, they focus on the weights that operate across channels (effectively 1x1 convolutions) after assuming spatial operations are fixed (e.g., using learned scattering networks with fixed wavelet filters).
  2. Aligning Hidden Layers: They address the challenge that representations in deeper layers vary across networks. They use representational similarity analysis to find an orthogonal alignment matrix that maps the representations of one network to another. This alignment is crucial for comparing subsequent layers.
  3. Comparing Neuron Distributions: Instead of comparing individual neurons, they compare the global statistics of neuron weights within a layer.
  4. Weight Principal Directions: They specifically analyze the covariance of neuron weights and its leading eigenvectors. They hypothesize that these eigenvectors capture the essential encoding properties and can be used to compare networks.

Datasets

The paper uses the following datasets for training and evaluation:

  • CIFAR-10: A standard dataset for image classification.
  • CIFAR-5: A subset of CIFAR-10 containing the first 5 classes.
  • CIFAR-100: A dataset with 100 classes.
  • ImageNet (downsampled to 32x32): Used for direct comparison with other datasets using the same architecture.
  • ImageNet100a & ImageNet100b: Two subsets of ImageNet, each containing 100 randomly selected classes.

The authors specifically chose these datasets to vary the number and diversity of image classes, allowing them to investigate how task complexity influences the universality of learned weights.

Key Insights and Ideas

  • Universality Beyond Representations: The study extends the observed universality from network representations (activations) to the network weights themselves. This suggests that the underlying "blueprint" for processing natural images might be more consistent than previously thought.
  • Weight Covariance as a Signature: The leading eigenvectors of the weight covariance matrix appear to capture a stable, low-dimensional "informative" subspace that is learned consistently across different training runs and even different datasets.
  • Task Complexity Matters: More challenging datasets (with more classes or greater diversity) lead to a richer encoding, meaning a larger number of universal weight eigenvectors are learned.
  • Implications for Training and Biology: The findings suggest that neural network training could potentially be simplified by pre-setting networks with these generic features. It also opens avenues for quantitatively comparing datasets based on their encoding dimensionality and raises the intriguing possibility that biological brains might encode the visual world in a similarly universal manner across individuals.

Key Results

The paper presents results showing that:

  • Networks trained on different initializations of the same dataset (e.g., CIFAR-10) learn highly similar weight covariance eigenvectors, particularly for the leading ones.
  • When comparing networks trained on different datasets (e.g., CIFAR-10 vs. CIFAR-5, or CIFAR-100 vs. ImageNet100), there is still a significant similarity in the leading weight eigenvectors, especially in earlier layers. This universality diminishes towards the final classifier layer, as expected, since the classifier must become task-specific.
  • The number of universal eigenvectors increases with the number of classes in the dataset.

Limitations and Future Work

  • Focus on Specific Architectures: The primary analysis is conducted on learned scattering networks, which have a specific structure that separates spatial and channel operations. While the authors state their approach is generalizable to any CNN, the empirical results are shown for this architecture.
  • Task-Specific Final Layers: The universality of weight eigenvectors is observed to vanish towards the final classifier layer. This is expected, but it highlights that while the core encoding might be universal, the final task-specific adaptation is still crucial.
  • Future Work: The authors suggest that this universality could simplify network training by allowing networks to be pre-set with generic features. They also propose using this concept to quantitatively compare datasets based on encoding dimensionality or complexity. A significant future direction is to investigate if these findings extend to biological brains, suggesting a universal neural code for vision across individuals.

Summary updated

BibTeX
@inproceedings{guth2023universality,
  author = {Florentin Guth and Brice Ménard},
  title = {{On the universality of neural codes in vision}},
  booktitle = {UniReps @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=3KfD8vShwF},
}
Figure