Selectivity considered harmful: evaluating the causal impact of class selectivity in DNNs

Matthew L Leavitt, Ari S. Morcos

In the quest to peer inside the "black box" of deep learning, researchers have long been enamored with the idea of the "grandmother cell"—a single neuron that fires only when it sees a specific concept, like a cat or a family member. In deep neural networks (DNNs), this phenomenon is known as class selectivity. We’ve often assumed that these highly specialized neurons are the fundamental building blocks of a network's intelligence and represent a model's understanding of the world.

However, a provocative paper from ICLR 2021 titled "Selectivity Considered Harmful" suggests we might have it backward. By turning selectivity into a tunable hyperparameter, the authors demonstrate that these specialized neurons aren't just unnecessary—they might actually be detrimental to overall performance.

TL;DR

Contrary to popular belief, forcing individual neurons to specialize in specific classes (high selectivity) significantly hurts model accuracy. In fact, deliberately reducing a network's natural selectivity can actually improve performance, suggesting that distributed, non-selective representations are more robust and computationally efficient than relying on single-unit "expert" neurons.

The Problem: Correlation vs. Causation

For years, the interpretability community has used single-unit selectivity as a proxy for understanding what a network "knows." If we find a neuron that only activates for "dogs," we feel we’ve explained a piece of the puzzle.

But most of this evidence is purely correlational. Previous studies usually relied on ablation (cutting out selective neurons to see if the network breaks). The problem with this approach is that DNNs are highly redundant. If you cut one "dog neuron," others might pick up the slack, leading to the false conclusion that selectivity doesn't matter. Conversely, if the network breaks, it might simply be because you removed a vital computational component, not necessarily because its selectivity was the secret sauce.

The authors set out to answer a causal question: Does a network need to be class-selective to function well, or is selectivity just an accidental byproduct of the training process?

Methods: Tuning Selectivity

The researchers moved beyond simple correlation by introducing a selectivity regularizer directly into the loss function.

  1. The Metric: They used a "Selectivity Index" ($SI$), which measures how much more a neuron responds to its favorite class compared to all other classes.
  2. The Regularizer: They added a term to the standard cross-entropy loss: $Loss_{total} = Loss_{CE} - \alpha \mu_{SI}$.
  3. By changing the "knob" ($\alpha$), they could either penalize selectivity (forcing neurons to respond to many classes) or promote it (forcing neurons to specialize).
Test Accuracy vs. Regularization Scale (α)
  1. The "Off-Axis" Check: To ensure the network wasn't just "hiding" its selectivity by rotating it across multiple neurons (making it invisible to single-unit metrics), they used Canonical Correlation Analysis (CCA). This confirmed that when they penalized selectivity, the class-specific information was truly being suppressed at the single-unit level, not just rearranged.

Key Insights and Results

The experiments, conducted on standard image recognition benchmarks like Tiny ImageNet (ResNet18/50) and CIFAR10 (ResNet20), yielded surprising results that challenge conventional wisdom.

  • Selectivity is a constraint, not a feature: When the authors forced networks to be more selective, performance tanked. This suggests that forcing a neuron to "ignore" 99% of classes limits the features it can learn, making the overall representation brittle.
  • The "Performance Cliff": Networks naturally learn a certain level of selectivity. The authors found that models are perched precariously at a cliff; any increase in selectivity beyond the natural baseline leads to a catastrophic drop in accuracy.
  • Distributed is Better: The fact that accuracy actually increased when selectivity was reduced suggests that "polysemantic" neurons—those that respond to multiple different features across different classes—are more computationally efficient.
Test Accuracy vs. Mean Class Selectivity

Specifically, the authors observed the following quantitative results:

  • Accuracy Gains: Reducing selectivity improved test accuracy by over 2% in ResNet18 and 1% in ResNet50 on Tiny ImageNet.
  • Extreme Robustness: For ResNet20 on CIFAR10, they were able to reduce selectivity by a factor of 2.5x with zero impact on test accuracy, and reduce it nearly to zero with only a small (~2%) drop.
  • The Harm of Specialization: Regularizing to increase selectivity caused immediate and severe performance degradation across all models. In some extreme cases, accuracy dropped from ~50% to ~25% just by forcing neurons to be more specialized.
  • Sparsity isn't the Culprit: They ruled out the idea that high selectivity was just causing "dead neurons" (sparsity). Even when most neurons were active, high selectivity still killed performance.

Limitations and Future Work

While the results are striking, the authors note a few caveats:

  • Domain Specificity: The study focused entirely on image classification with CNNs. It remains to be seen if these findings hold for Transformers in Natural Language Processing or for Reinforcement Learning agents.
  • The "Why" remains: If selectivity is harmful or unnecessary, why does the training process naturally produce it at all? The authors speculate it might be a path of least resistance during gradient descent, but clearly not the optimal one.
  • Interpretability Trade-off: This creates a dilemma for the field. If the most accurate networks are the ones with the least selective (and thus least "human-readable") neurons, we may have to choose between models we can easily explain and models that actually work best.

Summary updated

BibTeX
@inproceedings{leavitt2021selectivity,
  author = {Matthew L Leavitt and Ari S. Morcos},
  title = {{Selectivity considered harmful: evaluating the causal impact of class selectivity in DNNs}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=8nl0k08uMi},
}
Figure