On the special role of class-selective neurons in early training

Omkar Ranadive, Nikhil Thakurdesai, Ari S. Morcos, Matthew L Leavitt, Stephane Deny

Abstract

It is commonly observed that deep networks trained for classification exhibit class-selective neurons in their early and intermediate layers. Intriguingly, recent studies have shown that these class-selective neurons can be ablated without deteriorating network function. But if class-selective neurons are not necessary, why do they exist? We attempt to answer this question in a series of experiments on ResNet-50s trained on ImageNet. We first show that class-selective neurons emerge during the first few epochs of training, before receding rapidly but not completely; this suggests that class-selective neurons found in trained networks are in fact vestigial remains of early training. With single-neuron ablation experiments, we then show that class-selective neurons are important for network function in this early phase of training. We also observe that the network is close to a linear regime in this early phase; we thus speculate that class-selective neurons appear early in training as quasi-linear shortcut solutions to the classification task. Finally, in causal experiments where we regularize against class selectivity at different points in training, we show that the presence of class-selective neurons early in training is critical to the successful training of the network; in contrast, class-selective neurons can be suppressed later in training with little effect on final accuracy. It remains to be understood by which mechanism the presence of class-selective neurons in the early phase of training contributes to the successful training of networks.

Introduction

In the quest to understand how deep neural networks "think," researchers have long been fascinated by class-selective neurons—individual units that fire specifically in response to certain categories, like "dogs" or "cars." However, a puzzling paradox emerged in recent years: while these neurons are common, you can often delete (ablate) them from a fully trained network with almost no loss in accuracy. This led many to wonder if they were merely "vestigial" structures—accidental byproducts of training rather than essential components.

A new paper published in Transactions on Machine Learning Research (08/2023) by Ranadive et al. offers a compelling answer. It turns out we were looking at the wrong time. These neurons aren't useless; they are the "training wheels" of the network, essential during the first few moments of learning but redundant once the "bicycle" is balanced.

Methods

The researchers conducted their experiments using ResNet-50 architectures trained on the massive ImageNet-1k dataset. Their approach combined several analytical and causal techniques:

  1. Class Selectivity Index (SI): A metric to quantify how much a specific neuron (or channel) favors one class over all others.
  2. Single-Neuron Ablation: Systematically "turning off" neurons at different points in the training process (from Epoch 1 to Epoch 90) to observe the impact on accuracy.
  3. Causal Regularization: A specialized "selectivity regularizer" was used to actively suppress the emergence of these neurons. Crucially, the authors varied when this suppression started—either from the very first batch or after the first few epochs.
  4. Centered Kernel Alignment (CKA): This method measured the representational similarity between different modules of the network.
Methodology overview: (b) Class Selectivity Index calculation and ablation; (c) Regularization and Representational Similarity analysis.

Key Insights and Results

The Transient Spike and the Scaffolding Hypothesis

Selectivity does not grow steadily throughout training. Instead, it spikes dramatically during the very first epoch and then rapidly recedes in the early and intermediate layers. The class-selective neurons observed in a finished model are merely the "vestigial" remains of this early explosion.

In these early stages, the network operates in a "quasi-linear" regime. CKA analysis revealed that early and late layers are representational "twins" at the start. Class-selective neurons in early layers act as a shortcut, allowing the network to start making correct guesses before it has learned complex, non-linear features.

The Critical Period and the Regularization Gap

There appears to be a "critical period" for learning. If selectivity is suppressed from the very beginning (Epoch 0), the model's final validation accuracy is significantly impaired. However, if the neurons are allowed to form and are only suppressed after Epoch 5, the model reaches near-optimal accuracy. This suggests that while these neurons become redundant later, their presence at the start is critical for "finding" the right path in the loss landscape.

Dynamics of class selectivity and the impact of early suppression on validation accuracy.

Ablation Sensitivity

The importance of these neurons is further evidenced by ablation experiments. Deleting selective neurons at Epoch 1 is significantly more damaging to accuracy than deleting them at Epoch 90. In early training, the network relies heavily on these specific units; by the end, the information is distributed more robustly, rendering individual selective neurons less critical.

Conclusion

This study demonstrates that class-selective neurons serve as essential "scaffolding" during the early phase of training. While they may appear vestigial in a fully trained model, preventing their emergence during the critical period of learning leads to permanent performance deficits.

Future work remains to determine if these findings extend to other architectures like Transformers or Large Language Models. Additionally, the exact mathematical mechanism by which these quasi-linear shortcuts facilitate the transition to a non-linear regime warrants further investigation. Understanding these "training wheels" could potentially lead to new regularization techniques or more interpretable training curricula.

Summary updated

BibTeX
@article{ranadive2023special,
  author = {Omkar Ranadive and Nikhil Thakurdesai and Ari S. Morcos and Matthew L Leavitt and Stephane Deny},
  title = {{On the special role of class-selective neurons in early training}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=JaNlH6dZYk},
}
Figure