Feature Learning in $L_2$-regularized DNNs: Attraction/Repulsion and Sparsity

Arthur Jacot, Eugene Golikov, Clément Hongler, Franck Gabriel

While deep learning has achieved incredible empirical success, explaining how neural networks select and learn features remains a fundamental challenge. Researchers often distinguish between the "kernel" or "lazy" regime—where features barely change from their initialization—and the "active" regime, where meaningful feature learning occurs.

This paper investigates the active regime through the lens of $L_2$ regularization (weight decay). Because $L_2$ regularization on weights is known to be equivalent to the implicit bias of gradient descent on common losses like cross-entropy, understanding its effect is crucial for explaining why deep learning generalizes so well. By reformulating the standard loss function, the authors reveal that feature learning is driven by a balancing act of attraction and repulsion. This dynamic leads to a surprising "plateau" in performance, suggesting that optimal networks are inherently sparse.

Mathematical Reformulations of the Loss Surface

To understand the optimal hidden representations and how many neurons are necessary to reach them, the authors propose two powerful mathematical reformulations of the $L_2$-regularized loss:

  1. Hidden Representation Reformulation: Instead of analyzing the complex, high-dimensional weight matrices ($W$), the authors express the loss entirely in terms of the layer-wise activations ($Z_\ell$) of the training set. This shifts the optimization perspective to be "local"—the optimal state of any given layer depends only on its immediate neighboring layers.
  2. Covariance Optimization: For networks using "positively homogeneous" activation functions (like ReLU, where $\sigma(ax) = a\sigma(x)$ for $a > 0$), the loss can be further simplified. It can be rewritten to depend only on the covariances of the hidden representations. This transforms the highly non-convex landscape of a standard neural network into a partially convex optimization problem over a convex cone.

The Dynamics of Feature Learning: Attraction vs. Repulsion

The first reformulation reveals a beautiful physical analogy for how features are learned. Each hidden layer's representation, $Z_\ell$, is continuously pulled by two opposing forces:

  • Attraction: An "attractive" force from the preceding layer attempts to compress the representation toward the origin. This minimizes the "cost" or magnitude of the weights.
  • Repulsion: A "repulsive" force from the subsequent layer pushes the representation away from the origin. This ensures the layer retains enough critical information to reconstruct the next layer's activations.
Visualization of input and neuron representations across layers, illustrating alignment and clustering.

This dynamic acts as a natural information bottleneck. The network attempts to discard as much information from the input as possible, retaining only what is strictly necessary to predict the output. Consequently, neurons naturally tend to "align" along specific rays in the representation space. Because a group of perfectly aligned neurons is mathematically redundant, they can be replaced by a single neuron, naturally inducing sparsity in the network.

The Performance Plateau and Sparsity Bounds

A key consequence of this alignment and sparsity is the emergence of a "performance plateau." As you increase the width (number of neurons) of a network, the global minimum of the loss decreases—but only up to a certain point. Once the network reaches a critical width, adding more neurons provides absolutely zero benefit to the training loss.

Training and test loss as a function of network width, demonstrating the performance plateau.

Using their covariance reformulation, the authors prove a rigorous sparsity bound: any local minimum of an $L_2$-regularized homogeneous DNN can be achieved with at most $N(N+1)$ neurons per hidden layer, where $N$ is the number of training samples.

To prove the tightness of this bound, they construct a worst-case scenario (using a custom bipartite graph dataset) that strictly requires $N^2/4$ neurons, demonstrating that the $O(N^2)$ scaling is theoretically necessary. However, empirical observations paint a much more optimistic picture for real-world data. In experiments on datasets like MNIST, the performance plateau begins much earlier—often at a width roughly corresponding to the number of classes (e.g., 10). This suggests that the "right" width for a network in practice is vastly smaller than the theoretical worst-case bound.

Limitations and Future Directions

While these reformulations offer profound theoretical insights, they come with practical limitations:

  • Computational Complexity: Using these reformulated losses for actual training is currently impractical. Calculating the necessary gradients requires solving $N \times N$ linear equations, which scales poorly for large datasets.
  • Numerical Stability: The formulas rely on Moore-Penrose pseudo-inverses, which can introduce numerical instability if the activation matrices are not full-rank.
  • Scope of Activations: The powerful covariance reformulation is currently limited to homogeneous non-linearities (like ReLU). Extending this framework to non-homogeneous functions (like Sigmoid or Tanh) remains an open mathematical challenge.

Finally, while this paper thoroughly explores the loss surface and training minima, the ultimate goal is understanding generalization. The empirical observation that early plateaus occur in real-world data hints at a connection between this natural sparsity and test-set performance. Formalizing the link between the attraction/repulsion dynamic and generalization remains a highly promising direction for future research.

Summary updated

BibTeX
@inproceedings{jacot2022feature,
  author = {Arthur Jacot and Eugene Golikov and Clément Hongler and Franck Gabriel},
  title = {{Feature Learning in $L\_2$-regularized DNNs: Attraction/Repulsion and Sparsity}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=kK200QKfvjB},
}
Figure