InRank: Incremental Low-Rank Learning

Jiawei Zhao, Yifei Zhang, Beidi Chen, Florian Schäfer, Anima AnandkumararXiv 2023

Abstract

The theory of greedy low-rank learning (GLRL) aims to explain the impressive generalization capabilities of deep learning. It proves that stochastic gradient-based training implicitly regularizes neural networks towards low-rank solutions through a gradual increase of the rank during training. However, there is a gap between theory and practice since GLRL requires an infinitesimal initialization of the weights, which is not practical due to the fact that it is a saddle point. In this work, we remove the assumption of infinitesimal initialization by focusing on cumulative weight updates. We prove the cumulative weight updates follow an incremental low-rank trajectory for arbitrary orthogonal initialization of weights in a three-layer linear network. Empirically, we demonstrate that our theory holds on a broad range of neural networks (e.g., transformers) and standard training algorithms (e.g., SGD, Adam). However, existing training algorithms do not exploit the low-rank property to improve computational efficiency as the networks are not parameterized in low-rank. To remedy this, we design a new training algorithm Incremental Low-Rank Learning (InRank), which explicitly expresses cumulative weight updates as low-rank matrices while incrementally augmenting their ranks during training. We evaluate InRank on GPT-2, and our results indicate that InRank achieves comparable prediction performance as the full-rank counterpart while requiring at most 33% of the total ranks throughout training. We also propose an efficient version of InRank that achieves a reduction of 37% in total training time and 36% in model size when training GPT-medium on WikiText-103 from scratch.

Introduction

Deep learning theory often suggests that neural networks possess an implicit bias toward "simple" or low-rank solutions, which facilitates their remarkable generalization capabilities. A prominent theory, Greedy Low-Rank Learning (GLRL), posits that networks increase their rank incrementally during training. However, GLRL traditionally assumes "infinitesimal initialization"—starting weights near zero—which is impractical as it constitutes a mathematical saddle point that gradient descent struggles to escape. Practical networks use high-rank initializations (e.g., Kaiming or Orthogonal), creating a significant disconnect between theory and practice.

Theoretical Foundation: Cumulative Weight Updates

The authors resolve this contradiction by shifting the focus from the total weight matrix ($W_t$) to the cumulative weight update ($d_t = W_t - W_0$). They prove that for arbitrary orthogonal initializations in a three-layer linear network, these cumulative updates follow an incremental low-rank trajectory. This insight allows GLRL theory to be applied to practical settings: while the total weight matrix appears high-rank due to its initialization, the learning process itself is low-rank.

Incremental low-rank trajectories for different initialization scales.

The InRank Algorithm

To exploit this low-rank property for computational efficiency, the authors propose InRank, a training algorithm that explicitly parameterizes weights as $W = W_0 + UV$, where $W_0$ is the fixed initial weight matrix and $U, V$ are low-rank trainable factors.

Dynamic Rank Augmentation

Unlike methods like LoRA that use a fixed rank, InRank starts with a minimal rank and dynamically adds new "modes" (singular vectors) during training. This occurs when the explained ratio—a metric measuring how much of the gradient's information is captured by the current rank—exceeds a threshold ($\alpha$).

Dynamic rank augmentation process in InRank.

InRank-Efficient

To avoid the computational overhead of frequent Singular Value Decompositions (SVD), the "InRank-Efficient" variant runs the dynamic rank discovery only during the first epoch to find the "intrinsic rank" of each layer, then freezes the rank for the remainder of training. This variant automatically identifies ranks that align with optimal values found through expensive manual grid searches.

Experimental Results

The researchers evaluated InRank across various scales, from Fashion MNIST simulations to training GPT-2 (Small, Medium, and Large) from scratch on WikiText-103. The results demonstrate that efficiency can be achieved without performance loss:

  • Performance: InRank-Efficient achieved comparable (and sometimes superior) perplexity to full-rank baselines. For GPT-medium, it reached a perplexity of 20.2 versus the 20.6 baseline.
  • Efficiency: For GPT-medium, the algorithm reduced total training time by 37%, model size by 36%, and memory usage by 10%.
  • Rank Reduction: Across all GPT-2 models, InRank required at most 33% of the total possible ranks to reach peak performance.

Conclusion and Future Work

InRank successfully bridges the gap between low-rank theory and practical deep learning by isolating cumulative updates. While the algorithm significantly improves efficiency, future work is needed to optimize SVD operations for extremely large models (100B+ parameters) and to extend the evaluation to convolutional and self-attention layers.

Summary updated

BibTeX
@misc{zhao2023inrank,
  author = {Jiawei Zhao and Yifei Zhang and Beidi Chen and Florian Schäfer and Anima Anandkumar},
  title = {{InRank: Incremental Low-Rank Learning}},
  year = {2023},
  eprint = {2306.11250},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.11250},
}
Figure