Feature Learning as a Virtual Covariance Learning

Taehun Cha, Donghun LeeOPT @ NeurIPS 2025

TL;DR

This paper introduces "virtual covariance learning," a new perspective that explains feature learning in neural networks by analyzing hypothetical "virtual updates" to inputs and hidden states. This leads to a novel training algorithm that achieves state-of-the-art performance in just 1-2 epochs, significantly outperforming standard SGD in terms of speed, robustness, and generalization.

What Problem Does This Paper Address?

Neural networks owe much of their success to "feature learning," the ability to automatically discover useful representations from raw data. However, the underlying mechanisms of this process remain poorly understood. Existing theories, like the Neural Tangent Kernel, often simplify networks to infinite width, which doesn't fully capture how features actually emerge in finite-width networks. While some work has identified correlations between learned features and input gradients, it hasn't fully explained why or how these dynamics occur. This paper aims to bridge this gap by providing a theoretical framework and a practical algorithm for understanding and accelerating feature learning.

Methods

The core innovation is the concept of a "virtual update." Instead of performing a standard Stochastic Gradient Descent (SGD) step on network parameters, the authors consider a hypothetical SGD step applied to the inputs and hidden states of the network. This virtual update is defined as $h \leftarrow h - \gamma \nabla_h \mathcal{L}$ (and similarly for inputs), where $\gamma$ is the learning rate and $\nabla_h \mathcal{L}$ is the gradient of the loss with respect to the hidden state.

The key theoretical insight is that standard SGD training implicitly aligns the network's weight matrices with the covariance structure of these virtual updates. This is formalized in Theorem 2, which shows that the shift in the weight covariance matrix during SGD is approximately equal to the shift in the virtual covariance.

Building on this, the paper proposes virtual covariance learning (VCL), an algorithm that directly optimizes for this desired covariance structure. VCL solves a constrained quadratic optimization problem to find a weight matrix that matches the target virtual covariance, effectively bypassing the iterative updates of SGD.

Datasets

The paper evaluates its proposed algorithm on several standard image datasets:

  • MNIST
  • SVHN
  • CIFAR-10
  • CIFAR-100

Key Insights and Ideas

  • Feature Learning as Covariance Alignment: The most significant insight is that feature learning in neural networks can be understood as the weight matrices learning to align with the covariance structure of hypothetical "virtual updates" to hidden states. This provides a new theoretical lens on a fundamental aspect of deep learning.
  • Virtual Update as a Proxy: The "virtual update" is a powerful conceptual tool. It allows researchers to analyze feature learning dynamics without directly performing parameter updates, revealing underlying principles.
  • Direct Covariance Optimization: The idea of directly optimizing for the desired covariance structure, rather than relying on iterative SGD, is a major algorithmic contribution. This bypasses the slow convergence of traditional methods.
  • Efficiency and Robustness: The virtual covariance learning algorithm demonstrates remarkable efficiency, achieving peak performance in just 1-2 epochs, and exhibits low variance and resistance to overfitting, which are common issues with SGD.

Key Results

  • Speed: The virtual covariance learning algorithm achieves comparable or superior performance to SGD in just 1-2 epochs, whereas SGD requires 10-20 epochs (e.g., ~13 epochs for CIFAR-100, ~18 for SVHN).
  • Performance: On CIFAR-10, VCL achieves performance not achievable by SGD.
  • Robustness: VCL exhibits very small performance variance across experiments and does not overfit with further training.
  • Correlation: The virtual covariance shift is shown to have a high correlation (ρ ≈ 0.98) with the actual weight covariance, significantly higher than the AGOP (Average Gradient Outer Product) approach (ρ ≈ 0.71).

Limitations and Future Work

  • Computational Cost: The paper notes that computing the square root of a matrix is the most time-consuming step in their algorithm, especially for large input dimensions. They suggest that leveraging the low-rank nature of the covariance shift and using secular equations could improve efficiency.
  • Network Architectures: The current investigation is limited to two-layer feed-forward neural networks. The authors suggest extending virtual covariance learning to deeper networks and diverse architectures like CNNs and Transformers as future work.
  • Inductive Biases: The paper acknowledges that current work doesn't explicitly incorporate inductive biases common in specialized architectures.
  • Benign Overfitting: The authors hypothesize that their framework, by directly using input covariance as a training signal, could shed light on the phenomenon of benign overfitting.

Summary updated

BibTeX
@inproceedings{cha2025feature,
  author = {Taehun Cha and Donghun Lee},
  title = {{Feature Learning as a Virtual Covariance Learning}},
  booktitle = {OPT @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=hvw5FJoaWB},
}
Figure