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

A Variant of Anderson Mixing with Minimal Memory Size

Fuchao Wei, Chenglong Bao, Yang Liu, Guangwen YangNeurIPS 2022

Introduction

Anderson Mixing (AM) is a highly effective technique for accelerating optimization, particularly in the context of fixed-point iterations. However, its standard implementation requires storing a substantial history of previous iterations, which creates a severe memory bottleneck. This paper introduces Min-AM, an innovative variant that operates with the absolute minimum memory possible—just one vector pair. Despite this constraint, Min-AM achieves performance comparable to full-memory methods and even matches the efficiency of the Conjugate Gradient (CG) method for quadratic problems.

The Memory Bottleneck in Optimization

In optimization and scientific computing, algorithms frequently rely on fixed-point iterations, where a function is repeatedly applied to find a stable, optimal point. Anderson Mixing accelerates this process by analyzing a "window" of $m$ previous steps to extrapolate a more accurate next move.

However, this introduces a critical trade-off. To achieve meaningful acceleration, the window size ($m$) typically needs to be large. For massive machine learning models or hardware with strict resource constraints, storing 20 to 50 previous versions of a multi-million-parameter model is computationally prohibitive. Conversely, setting $m$ too small (e.g., $m=1$) usually causes performance to plummet. The authors of this paper set out to bridge this gap: achieving "big window" performance using only "small window" memory.

The Min-AM Approach

The proposed Min-AM algorithm operates with a minimal memory size of $m=1$. To make this possible without sacrificing performance, the authors rely on several key technical innovations:

  1. Recursive Vector Modification: Instead of merely storing the single most recent step, Min-AM maintains a "recursively modified" vector pair. This mechanism effectively compresses historical gradient information from the entire optimization trajectory into a single pair of vectors.
  2. Two-Step Projection: Drawing inspiration from multigrid methods, the authors incorporate an additional projection step into the standard mixing scheme. This ensures that the search direction remains robust and effective, even with a truncated history.
  3. Restarting & Adaptive Parameters: For general, non-quadratic optimization problems, Min-AM employs a restarting strategy to discard outdated and potentially inaccurate historical data. Furthermore, the algorithm leverages its internal computations to cheaply estimate the eigenvalues of the Hessian matrix, allowing it to dynamically select the optimal step size (mixing parameter).
  4. Stochastic Extension (sMin-AM): To adapt the method for deep learning applications, the authors introduce regularization and damping techniques to manage the noise inherent in mini-batch stochastic gradients.

Key Insights and Theoretical Connections

One of the most striking theoretical insights of this work is the connection between Min-AM and the Conjugate Gradient method.

Min-AM matches the convergence of the Conjugate Gradient (CG) method.

For strongly convex quadratic problems, Min-AM (with $m=1$) is mathematically equivalent to both the full-memory Type-I Anderson Mixing and the Conjugate Gradient method. This equivalence explains why Min-AM punches so far above its weight class in terms of convergence speed.

Additionally, standard AM often produces non-symmetric approximations of the Hessian matrix. Min-AM's construction inherently ensures a symmetric approximation, which is more natural for optimization tasks and leads to improved numerical stability. Because Min-AM builds a tridiagonal matrix during its iterations, it can also estimate the condition number (stiffness) of the loss surface almost for free—a metric that is usually prohibitively expensive to compute but vital for setting optimal learning rates.

Empirical Results and Efficiency

The researchers evaluated Min-AM across several standard benchmarks, including Logistic Regression (madelon, a9a datasets) and Image Classification (training VGG and ResNet architectures on CIFAR and ImageNet).

Convergence comparison showing Min-AM matching the performance of full-memory AM(20).
  • Deterministic Efficiency: In standard tests, Min-AM converged significantly faster than standard Gradient Descent (GD) and outperformed other limited-memory methods like ST-AM. Remarkably, it matched the performance of AM(20) while using 20 times less history memory.
  • Deep Learning Performance: On the CIFAR-100 dataset, the stochastic variant (sMin-AM) achieved a top-1 accuracy of 78.26% on ResNet18, outperforming both SGDM (77.27%) and Adam (72.41%).
  • Minimal Overhead: When scaling up to train ResNet50 on ImageNet, the memory cost of sMin-AM was only 1.04x that of standard SGD, and the per-epoch training time was nearly identical (1.01x). This demonstrates that Min-AM provides "second-order" style acceleration with "first-order" resource requirements.

Limitations and Future Directions

While the empirical results are strong and the proofs for convex settings are rigorous, the authors note that the general theory of Anderson Mixing remains somewhat incomplete in the broader research community, particularly regarding global convergence in non-convex settings.

Furthermore, the stochastic version (sMin-AM) introduces new hyperparameters, such as damping and regularization terms. While the paper provides tuning guidelines, these may require adjustment when applied to entirely novel network architectures. Looking forward, the authors suggest that the "free" eigenvalue estimation technique developed for Min-AM could potentially be exported to help other first-order optimizers (like Adam or SGD) automatically tune their own learning rates.

Summary updated

BibTeX
@inproceedings{wei2022variant,
  author = {Fuchao Wei and Chenglong Bao and Yang Liu and Guangwen Yang},
  title = {{A Variant of Anderson Mixing with Minimal Memory Size}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ob8tk9Q_2tN},
}
Figure