NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Tensor-GaLore: Memory-Efficient Training via Gradient Tensor Decomposition

Robert Joseph George, David Pitt, Jiawei Zhao, Jean Kossaifi, Cheng Luo, Yuandong Tian, Anima Anandkumar

TL;DR

This paper introduces Tensor-GaLore, a novel method for training neural networks with high-dimensional tensor weights, which are common in scientific computing and computer vision. By leveraging Tucker decomposition to project gradients into a low-rank subspace, Tensor-GaLore significantly reduces memory usage (up to 76%) while improving model performance (up to 50%) on tasks like solving partial differential equations.

What Problem Does This Paper Address?

Training large neural networks, especially those with complex, high-dimensional tensor weights, demands substantial memory. This is particularly true for models used in scientific computing, such as Fourier Neural Operators (FNOs) for solving partial differential equations (PDEs). While existing methods like GaLore offer memory efficiency by projecting gradients into low-rank subspaces, they are limited to matrix-based weights and struggle to handle the inherent multi-dimensional structure of tensor weights, potentially losing crucial information. This paper addresses the challenge of memory-intensive training for tensor-based models by proposing a tensor-native approach to gradient low-rank projection.

Methods

The core innovation is Tensor-GaLore, an extension of the GaLore (Gradient Low-Rank Projection) method. Instead of reshaping tensor gradients into matrices and applying Singular Value Decomposition (SVD), Tensor-GaLore directly applies Tucker decomposition to the tensor gradients. This allows for low-rank projection while explicitly preserving the multi-dimensional structure of the tensor.

Here's a breakdown of the process:

  1. Tucker Decomposition: The gradient tensor $G$ is decomposed into a core tensor $C$ and a set of factor matrices $U^{(n)}$ for each mode $n$. This effectively finds a low-rank representation of the gradient.
  2. Low-Rank Projection: The gradient is projected onto this low-rank subspace, resulting in a compressed representation $G_{proj}$.
  3. Optimizer Update: Standard optimizers (like Adam) are then applied to this projected gradient.
  4. Projection Back: The projected gradient is then "projected back" to the original tensor space for model updates.

This tensor-native approach avoids the information loss associated with flattening tensors into matrices and leverages the orthogonality of the factor matrices for efficient projection and inversion.

Datasets

The paper evaluates Tensor-GaLore on three datasets representing different Partial Differential Equations (PDEs):

  • Burgers' Equation: A one-dimensional equation used for fluid dynamics.
  • Darcy Flow: An elliptic PDE used to model fluid flow in porous media.
  • Electromagnetic Wave Propagation: A dataset involving complex-valued data, governed by the nonlinear Schrödinger equation (NLSE).

These datasets are standard benchmarks for evaluating neural operators.

Key Insights and Ideas

  • Tensor Structure is Crucial: Flattening tensor weights into matrices for existing low-rank projection methods (like GaLore) can discard essential multi-dimensional information, hindering performance and convergence, especially for models like FNOs where dimensions represent distinct physical properties (e.g., spatial, temporal).
  • Tucker Decomposition Preserves Structure: Tensor-GaLore's use of Tucker decomposition directly on gradients allows it to maintain and leverage the inherent tensor structure, leading to more effective memory reduction and performance gains.
  • Implicit Regularization: The low-rank projection acts as an implicit regularizer, preventing overfitting and promoting smoother optimization trajectories, which contributes to better generalization.
  • Optimizer State Dominates Memory: The paper highlights that a significant portion of memory overhead during training comes from optimizer states (momentum, variance estimates), not just model parameters or activations. Tensor-GaLore directly targets this by compressing gradients before they are used by the optimizer.

Key Results

Tensor-GaLore demonstrated significant improvements across various tasks:

  • Memory Reduction: Up to 76% reduction in optimizer memory usage on the Darcy flow dataset.
  • Performance Gains:
    • Darcy Flow: Up to 50% gain in test loss at a rank ratio of 0.25.
  • Electromagnetic Wave Propagation: Up to 11% gain in test loss.
  • Burgers' Equation: Up to 5% gain in test loss.
  • Generalization: Consistent improvements in convergence and generalization across datasets, leading to better solutions.

Limitations and Future Work

The authors acknowledge a few limitations and suggest future directions:

  • Overhead of Tensor Decomposition: While effective, Tucker decomposition itself introduces some computational overhead.
  • Optimal Rank Selection: Determining the optimal rank for the decomposition remains a challenge. The paper notes that a rank of around 25% of the full rank often provides a good balance.
  • Automating Rank Selection: Future work could focus on automating the process of selecting the optimal rank.
  • Broader Applications: Expanding the application of Tensor-GaLore to a wider range of scientific computing tasks and other domains where tensor-based models are prevalent.
  • Larger Scale Datasets: Testing on even larger-scale PDE datasets, such as those involving Navier-Stokes equations with high Reynolds numbers, to further assess performance gains.

Summary updated

BibTeX
@inproceedings{george2024tensor,
  author = {Robert Joseph George and David Pitt and Jiawei Zhao and Jean Kossaifi and Cheng Luo and Yuandong Tian and Anima Anandkumar},
  title = {{Tensor-GaLore: Memory-Efficient Training via Gradient Tensor Decomposition}},
  booktitle = {OPT @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=sBaUZzZXJN},
}
Figure