Class Interference of Deep Networks

Dongcui Diao, Hengshuai Yao, Bei Jiang

TL;DR

Deep neural network classification errors are not distributed uniformly; they are heavily dominated by "class interference," where semantically or visually similar classes actively compete against each other. By analyzing loss landscapes along class-specific gradient directions ("class ego directions") and tracking training dynamics ("label dancing"), the authors demonstrate that minima flatness is highly anisotropic and that learning rate annealing works by carving out vast "lowland minima" across interfering classes.

What Problem Does This Paper Address?

Understanding why deep neural networks generalize well—and where they fail—remains an active debate in machine learning. Standard explanations often attribute good generalization to "flat minima" in the loss landscape. However, common visualization techniques rely on random directional cuts or linear interpolation between initial and final weights, both of which introduce stochastic artifacts and obscure class-specific trade-offs.

Furthermore, overall test accuracy hides the localized nature of classification failures. The paper tackles this gap by examining class interference: the structural difficulty networks encounter when learning to distinguish similar classes (e.g., distinguishing cats from dogs), identifying how this interference distorts the underlying loss geometry and training dynamics.

Methods

The authors introduce a deterministic, class-centric framework to analyze interference:

  • Cross-Class Test Matrix (CCTM): A normalized, probabilistic formulation of the confusion matrix where each cell represents $CCTM(c_1, c_2) = \frac{\# \text{ predicted as } c_2}{\text{total } c_1 \text{ samples}}$. Heatmaps of the CCTM highlight pairwise interference at test time.
  • Class Ego Directions & Ego Models: Instead of picking random vectors in parameter space, the authors compute class-specific gradient vectors $\nabla f^{(c)}(w^*)$ over samples of a single class $c$. Stepping along this "ego direction" produces an ego model that aggressively minimizes the loss for class $c$, often at the expense of others.
  • Interference Spaces: 2D parameter slices spanned by the ego directions of two classes $(\theta_1 \nabla f^{(c_1)}, \theta_2 \nabla f^{(c_2)})$. This isolates the loss landscape specifically along directions where two classes directly compete.
  • Label Dancing & Dancing Notes: To monitor interference during training, the authors track epoch-by-epoch class recall oscillations ("label dancing") and plot the dominant misclassified class over time ("dancing notes").

Datasets

  • CIFAR-10: Used as the evaluation benchmark across four standard architectures (VGG-19, ResNet-18, GoogleNet, and DLA). No new dataset benchmarks were introduced.

Key Insights and Ideas

  • Flatness is direction- and class-dependent: A trained model does not occupy a universally flat or sharp minimum. In non-competing directions (e.g., CAR vs. TRUCK or HORSE vs. SHIP), the loss basin can appear broad and flat. Yet in strongly interfering directions (CAT vs. DOG), the exact same model resides in an extremely narrow, steep valley reminiscent of the Rosenbrock "banana" function.
  • Annealing creates "lowland minima": While small constant learning rates yield spiky, fragile minima and large constant learning rates lead to sharp plateaus, cosine learning rate annealing expands the flat region by two orders of magnitude in parameter space—forming an ultra-wide "lowland minimum."
  • Interference symmetry: If class $A$ is frequently misclassified as class $B$, class $B$ exhibits a corresponding difficulty ruling out class $A$.
  • Surprising training interference: Tracking "dancing notes" uncovers unexpected interference patterns. For instance, FROG frequently interferes with CAT during training. Visual inspection revealed that cropped, close-up CIFAR-10 images of cats feature prominent pointy ears situated where a frog’s bulging eyes appear, causing persistent feature confusion.

Key Results

  • Interference dominates error: On CIFAR-10, CAT and DOG exhibit the lowest recall across all evaluated models (VGG-19: 84.5% CAT / 89.0% DOG; ResNet-18: 86.5% CAT / 92.6% DOG), while less-interfered classes such as CAR achieve recall above 96.6% across models.
  • Optimizer impact on generalization:
  • VGG-19 test accuracy: Small LR (0.0001) = 84.99%; Big LR (0.01) = 88.76%; Cosine Annealing = 93.87%.
  • ResNet-18 test accuracy: Small LR = 86.88%; Big LR = 91.31%; Cosine Annealing = 95.15%.
  • Diffuse vs. focused interference: Appendix analysis of GoogleNet shows that while CAR suffers high interference concentrated almost entirely in TRUCK (2.1% error, achieving 96.7% recall), classes like BIRD and PLANE have lower single-class peak interference but suffer smaller, diffuse interference across three to five separate classes, leading to lower overall recall (93.8% for BIRD).

Limitations and Future Work

  • Benchmark scale: Empirical verification is restricted to CIFAR-10. Validating class ego spaces on large-scale datasets (such as ImageNet) with hundreds or thousands of classes remains unexplored.
  • Diagnostic rather than algorithmic: The paper primarily introduces visualization and diagnostic tools (CCTM, interference spaces, dancing notes) rather than proposing an algorithmic objective or regularizer designed to mitigate class interference during optimization.
  • Future directions: The authors suggest utilizing class ego dynamics to design targeted training interventions, class-aware loss regularizers, and more discriminative neural architectures.

Summary updated

Abstract

Recognizing and telling similar objects apart is even hard for human beings. In this paper, we show that there is a phenomenon of class interference with all deep neural networks. Class interference represents the learning difficulty in data and it constitutes the largest percentage of generalization errors by deep networks. To understand class interference, we propose cross-class tests, class ego directions and interference models. We show how to use these definitions to study minima flatness and class interference of a trained model. We also show how to detect class interference during training through label dancing pattern and class dancing notes.
BibTeX
@inproceedings{diao2023class,
  author = {Dongcui Diao and Hengshuai Yao and Bei Jiang},
  title = {{Class Interference of Deep Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=tkvyCt1PzpvP},
}

Loading related content...

Figure