Abstract
Deep neural networks (DNNs) exhibit a remarkable ability to automatically learn data representations, finding appropriate features without human input. Here we present a method for analysing feature learning by decomposing DNNs into 1) a forward feature-map $\Phi$ that maps the input dataspace to the post-activations of the penultimate layer, and 2) a final linear layer that classifies the data. We diagonalize $\Phi$ with respect to the gradient descent operator and track feature learning by measuring how the eigenfunctions and eigenvalues of $\Phi$ change during training. Across many popular architectures and classification datasets, we find that DNNs converge, after just a few epochs, to a minimal feature (MF) regime dominated by a number of eigenfunctions equal to the number of classes. This behaviour resembles the neural collapse phenomenon studied at longer training times. For other DNN-data combinations, such as a fully connected network on CIFAR10, we find an extended feature (EF) regime where significantly more features are used. Optimal generalisation performance upon hyperparameter tuning typically coincides with the MF regime, but we also find examples of poor performance within the MF regime. Finally, we recast the phenomenon of neural collapse into a kernel picture which can be extended to broader tasks such as regression.
Introduction
A central challenge in deep learning is distinguishing between representation quality—how effective features are for a specific task—and dynamical richness—the extent to which internal features evolve during training. While accuracy is often used as a proxy for both, "rich" dynamics (where a network learns a low-rank structure tailored to the data) do not always guarantee superior generalization. In some scenarios, a "lazy" model, behaving similarly to a linear model, may outperform its richer counterpart.
Existing metrics for richness, such as those derived from the Neural Tangent Kernel (NTK), are computationally expensive and often fail to scale to modern deep architectures. This work introduces a "thermometer" for neural network dynamics: a metric that is computationally efficient, task-agnostic, and capable of diagnosing how a network learns rather than just if it is accurate.
Measuring Dynamical Richness: The $D_{LR}$ Metric
The authors propose the Minimum Projection Alignment ($D_{LR}$) metric to quantify the transition between lazy and rich learning regimes. This metric essentially measures how closely a network's learned features align with the "minimal feature" (MF) regime.
Intuition and Definition
In a "rich" regime, networks exhibit a "low-rank bias," attempting to compress complex input data into the minimum number of features required for the task (e.g., 10 dimensions for a 10-class problem). The $D_{LR}$ metric is defined by:
- Minimum Projection Operator ($\mathcal{T}_{MP}$): Representing the ideal, maximally compressed version of learned features.
- Comparison: The actual feature kernel ($\mathcal{T}$) is compared to this ideal using Centered Kernel Alignment (CKA).
Computational Efficiency
Unlike NTK-based methods that scale with total parameters, $D_{LR}$ focuses solely on the activations of the penultimate layer. This makes it orders of magnitude faster, allowing for real-time monitoring during training on standard hardware.
Experimental Validation
The metric was validated across diverse setups, revealing that richness and generalization are often decoupled.
MNIST with Label Encoding
A key experiment involved MNIST digits with artificial label encodings added to the input. As shown in Figure 3, a "rich" model (full backprop) can achieve 100% training accuracy by overfitting to these encodings, resulting in a low $D_{LR}$ (0.0087) but abysmal test accuracy (10.0%). In contrast, a "lazy" model (last layer only) ignores the encodings, maintaining a higher $D_{LR}$ (0.63) but achieving much better generalization (74.4%).
Key Insights
- Batch Normalization as a Richness Booster: Batch Normalization (BN) fundamentally shifts architectures like VGG-16 from lazy to rich regimes. Without BN, models utilize thousands of features; with BN, they collapse onto a small, task-relevant set.
- Grokking as a Phase Transition: In modular arithmetic tasks, $D_{LR}$ captures the "grokking" phenomenon as a sharp drop in the metric, signaling a transition to rich dynamics before accuracy improvements become visible.
- Generalization of Neural Collapse: The $D_{LR}$ metric mathematically recovers "Neural Collapse" as a special case but extends its utility to regression and non-classification tasks.
Conclusion and Future Work
The $D_{LR}$ metric provides a robust, efficient tool for diagnosing the internal dynamics of DNNs. While currently focused on the penultimate layer and assuming isotropic target functions, future work aims to extend this framework to intermediate layers and imbalanced datasets. Applying these insights to Large Language Models (LLMs) and generative tasks remains a promising frontier for understanding the "internal life" of AI.
Summary updated