Increasing neural network robustness improves match to macaque V1 eigenspectrum, spatial frequency preference and predictivity

Nathan C. L. Kong, Eshed Margalit, Justin L. Gardner, Anthony M. NorciaPLOS Computational Biology 2022

TL;DR

This paper investigates why deep neural networks (CNNs) are brittle to adversarial perturbations, unlike human vision. They find that making CNNs more robust to these perturbations aligns their internal representations more closely with those of macaque visual cortex (V1), particularly in terms of their eigenspectrum and spatial frequency tuning. This suggests that robustness and biological plausibility are linked, and that optimizing CNNs for robustness might lead to better models of visual processing.

What Problem Does This Paper Address?

Convolutional Neural Networks (CNNs) have become incredibly powerful tools, achieving human-level performance on many visual tasks. They also share striking similarities with the primate ventral visual stream in terms of their internal representations. However, a critical difference emerges when these networks encounter adversarial examples: human-imperceptible image perturbations can cause CNNs to make drastically incorrect predictions, a phenomenon known as brittleness or poor adversarial robustness. This is a significant concern for safety-critical applications. The authors aim to understand the underlying reasons for this brittleness by comparing the internal representations of robust and non-robust CNNs with those of biological vision, specifically macaque primary visual cortex (V1). They hypothesize that differences in how these systems represent information, particularly concerning the dimensionality of their neural responses and their sensitivity to spatial frequencies, might explain this discrepancy.

Methods

The study employs a multi-pronged approach:

  • Eigenspectrum Analysis: They compute the eigenspectrum of neural responses from both macaque V1 and various CNN layers. This involves using Principal Component Analysis (PCA) to understand how variance in neural activity is distributed across different dimensions. A key theoretical link is made to the power-law exponent of this eigenspectrum, which is hypothesized to relate to a system's vulnerability to perturbations.
  • In-silico Electrophysiology: To understand the types of features CNNs learn, they perform simulated electrophysiology experiments. This involves presenting CNNs with Gabor patches of varying spatial frequencies and analyzing the resulting activations to determine each artificial neuron's preferred spatial frequency.
  • Neural Response Prediction: They use linear mapping (specifically, partial least squares regression) to predict macaque V1 neural responses based on the activations of CNN layers. This allows them to quantify how well CNNs model biological vision.
  • Adversarial Robustness Evaluation: Models are tested for their accuracy on adversarially perturbed images, providing a measure of their robustness.

Datasets

  • Macaque V1 Neural Responses: Data from Cadena et al. [13] was used, consisting of neural responses from macaque V1 to natural scenes and synthetic images.
  • ImageNet: This large-scale image dataset was used for training and evaluating CNN models. Specifically, a subset of ImageNet validation images was used for computing eigenspectra and for adversarial attack generation.

Key Insights and Ideas

  • Eigenspectrum as a Robustness Indicator: The theory linking the power-law exponent of the eigenspectrum to robustness is supported. Systems with higher exponents (closer to 1) are predicted to be less susceptible to small perturbations.
  • Biological Vision is More Robust: Macaque V1 neural responses exhibit eigenspectra with power-law exponents of at least one, aligning with the theory of robustness.
  • Non-Robust CNNs are "Over-Representing" Fine Details: CNNs that are not robust to perturbations tend to have eigenspectra that decay more slowly than biological vision. This suggests they dedicate more representational variance to fine stimulus features, potentially making them more sensitive to small, high-frequency changes.
  • Robust CNNs are More "V1-like": Robust CNNs show eigenspectra that decay faster (higher power-law exponent) and have preferred spatial frequency distributions more aligned with macaque V1 cells.
  • High Spatial Frequencies are a Key Difference: Non-robust CNNs disproportionately favor high spatial frequencies, unlike V1 neurons. Robust CNNs show a better balance, with a greater proportion of neurons tuned to mid-range spatial frequencies, similar to V1.
  • Robustness and Biological Plausibility are Linked: Models that are more robust to adversarial attacks also tend to be better predictors of macaque V1 neural responses.

Key Results

  • Macaque V1 neural responses exhibit eigenspectra with a power-law exponent close to one (α ≈ 1.14 ± 0.03), consistent with theoretical predictions for robust systems.
  • Non-robust CNN models have eigenspectra that decay more slowly than those of robust models and biological V1. Robust models have higher power-law exponents (e.g., α ≈ 0.66 for ResNet-50, α ≈ 0.52 for ResNet-18) compared to their non-robust counterparts (α ≈ 0.59 and α ≈ 0.43, respectively).
  • Robust CNN models show a spatial frequency tuning distribution more similar to macaque V1 cells, with a greater proportion of neurons tuned to mid-range spatial frequencies.
  • Robust models are quantitatively better at predicting macaque V1 neural responses than non-robust models (p < 0.01).
  • Adversarial accuracy of a model is strongly correlated with its V1 neural predictivity (R = 0.772).

Limitations and Future Work

  • Eigenspectrum Convergence: The power-law exponent in the macaque V1 dataset might not have fully converged due to a limited number of neurons (166). More recordings with more neurons are needed to further verify this phenomenon.
  • Model Depth and Robustness: While robust models generally show higher power-law exponents, the relationship between adversarial accuracy and power-law exponent across a wide range of models was only weakly correlated.
  • Developing "V1-like" Models: The authors suggest that explicitly penalizing slow-decaying eigenspectra or biasing models to extract lower spatial frequencies during training could improve robustness and V1 predictivity. They also propose that incorporating known properties of V1, like spatial frequency tuning distributions, into model architectures could be beneficial.
  • Developmental Sequences: The paper hints that mimicking the developmental trajectory of visual acuity (starting with lower spatial frequencies and progressing to higher ones) might be a strategy to improve CNN robustness. This is left as future work.

Summary updated

BibTeX
@article{kong2022increasing,
  author = {Nathan C. L. Kong and Eshed Margalit and Justin L. Gardner and Anthony M. Norcia},
  title = {{Increasing neural network robustness improves match to macaque V1 eigenspectrum, spatial frequency preference and predictivity}},
  journal = {PLOS Computational Biology},
  year = {2022},
  url = {https://openreview.net/forum?id=J0IwIguwc2},
}
Figure