Factored One-sided Adam-Moment for Practical and Scalable SOAP

Jaemyung Yu, Byeongho Heo, Sangdoo Yun, Dongyoon Han

TL;DR

FOAM (Factored One-sided Adam-Moment) is a lightweight second-order optimizer that delivers the superior convergence of SOAP at a fraction of the cost. By simplifying preconditioning to the input side and factoring the second-moment buffer, FOAM matches state-of-the-art LLM pre-training quality while using half the memory of SOAP and running at nearly the speed of AdamW.

What Problem Does This Paper Address?

Training Large Language Models (LLMs) is traditionally dominated by first-order optimizers like AdamW. While second-order optimizers—such as Shampoo and its more practical variant, SOAP—promise faster convergence by accounting for the curvature of the loss landscape, they come with a heavy "tax."

SOAP, for instance, requires roughly 4.5x the optimizer state memory of AdamW and incurs significant computational overhead due to frequent eigendecompositions. Because of these costs, many practitioners stick to AdamW or simpler alternatives like Muon. The authors of this paper ask a critical question: Can we retain the optimization benefits of SOAP while approaching the efficiency of AdamW?

Methods

FOAM achieves its efficiency through two primary structural simplifications of the SOAP algorithm:

  1. Input-only Preconditioning: SOAP typically uses two Kronecker factors (one for the input side and one for the output side of a weight matrix). FOAM drops the output-side factor. The authors justify this by showing that the Hessian of transformer layers is naturally near-block-diagonal on the output side, meaning the input-side curvature carries the most critical information. This halves the number of required eigendecompositions and significantly reduces memory.
  2. Factored Adam-Moment: In the rotated "eigenbasis" where SOAP performs its updates, FOAM replaces the dense $m \times n$ second-moment buffer with a factored estimator (row and column statistics). This is similar to the approach used in Adafactor but applied specifically within the rotated coordinate system.

The resulting algorithm, visualized in its approximation of the Hessian in Figure 2, maintains a much leaner profile than its predecessors.

Comparison of Hessian approximations across different optimizers. FOAM (right) maintains a diagonal output side while keeping the full input-side factor.

Datasets

The authors evaluated FOAM across several scales and modalities:

  • LLM Pre-training: GPT-2 architectures ranging from 124M to 1.56B parameters, trained on the FineWeb dataset.
  • Vision: ViT-Tiny trained on Tiny-ImageNet.
  • Post-training: Fine-tuning and distillation tasks using the NuminaMath-CoT dataset.

Key Insights and Ideas

  • The Input-Output Asymmetry: A key "aha" moment is the empirical verification that input-side rotation is far more impactful than output-side rotation for transformers. Dropping the output-side rotation costs very little in terms of alignment with the true Hessian but saves massive amounts of compute.
  • Rank-1 Separability in Eigenbasis: The authors found that while the raw second moment of gradients isn't easily factorable, it becomes nearly rank-1 separable once rotated into the eigenbasis. This explains why FOAM’s factored moment estimator is so effective—it loses almost no information compared to a dense buffer.
  • Pareto Efficiency: FOAM occupies a unique "sweet spot" on the Pareto frontier of optimization. As shown in Figure 1, it reaches the same validation loss as AdamW in roughly the same wall-clock time, whereas bilateral SOAP takes more than twice as long to reach that same point due to its overhead.
Figure 1: FOAM is a Pareto-efficient second-order optimizer. GPT-2 large (760M), 29.55K steps, each optimizer at its tuned learning rate. Curves are 3-seed means smoothed over 1K steps, and grey boxes mark the regions magnified in the insets. (a) Per-step. Validation loss against training step. In the last 4K steps (inset) SOAP ends slightly below FOAM (2.791 vs. 2.796, within about one seed std), both below Muon, while AdamW stays above the inset range. (b) Wall-clock. Same runs vs. wall time, normalized so AdamW finishes at 1.0× (Muon, FOAM, and SOAP finish at 1.15×, 1.17×, and 2.31×). Within AdamW’s own budget, FOAM is already 0.04 nats below AdamW’s final loss (inset), and it reaches SOAP’s quality band at 51% of SOAP’s wall-clock time. (c) Time to AdamW’s final loss (2.847; Table 2). FOAM gets there as fast as AdamW itself (10.53 vs. 10.55 h) and slightly ahead of Muon, while bilateral SOAP needs 2.15× as long.

Key Results

  • Validation Loss: FOAM consistently matches or beats strong baselines like Muon and SOAP across all tested GPT-2 scales.
  • Wall-Clock Speed: At the 760M parameter scale, FOAM reaches AdamW’s final loss in 10.53 hours, virtually identical to AdamW itself (10.55h) and slightly faster than Muon (11.1h). In contrast, SOAP requires 22.7 hours.
  • Memory Footprint: FOAM uses half the optimizer state of SOAP. Its measured peak training memory is only +7.4% higher than AdamW, compared to +12.9% for SOAP.
  • Hyperparameter Robustness: FOAM inherits SOAP's robustness, maintaining stable performance across a three-fold range of learning rates, whereas AdamW can suffer catastrophic collapse at high momentum settings.

Limitations and Future Work

  • Extreme Scale: While the results hold up to 1.56B parameters, the authors note that testing on "frontier-scale" models (e.g., 70B+ parameters) remains an open question.
  • Sharding: The current implementation does not yet shard the optimizer factors ($R$ and $Q_R$) across devices, which becomes necessary for models larger than 7B parameters.
  • Specific Layers: Currently, FOAM is applied to matrix parameters (projections and MLPs). Extending these factored second-order methods to embeddings and attention-specific structures (like the key projection) is a suggested next step.

Summary updated

Abstract

Second-order optimizers (e.g., Shampoo, SOAP) have emerged as compelling alternatives to Adam/AdamW and promise faster per-step convergence than AdamW in transformer training. However, they still remain costly in practice, and even SOAP still pays substantial optimizer-state memory and eigendecomposition overhead. We ask whether the benefits of SOAP can be retained at nearly the efficiency of AdamW. In this paper, we answer yes with a lightweight SOAP variant, Factored One-sided Adam-Moment (FOAM). The path to practical impact is twofold: first, FOAM employs input-only preconditioning, dropping the output-side Kronecker factor to reduce memory and remove one eigendecomposition. The Kronecker structure of the Hessian shows that this is exact for a diagonal output-side curvature and nearly lossless for a near-diagonal one, as we observe empirically. Second, FOAM replaces SOAP's dense rotated second moment with a factored Adam-moment estimator based on row-by-column statistics. Under the K-FAC Fisher assumption with a diagonal output curvature, this estimator exactly recovers SOAP's dense second moment, and we measure only a 15-20% K-FAC violation, with negligible effect on the update. Our empirical results support the claim that FOAM matches strong SOAP and Muon baselines in validation loss across scales of large language model (LLM) pre-training, uses half of SOAP's optimizer state, runs at Muon-class wall-clock time, and retains robustness across a three-fold learning-rate range. The results hold from 124M to 760M parameters, demonstrating that SOAP's gains need not require SOAP's cost. Code: https://github.com/naver-ai/foam
BibTeX
@inproceedings{yu2026factored,
  author = {Jaemyung Yu and Byeongho Heo and Sangdoo Yun and Dongyoon Han},
  title = {{Factored One-sided Adam-Moment for Practical and Scalable SOAP}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=sjGaILUb1z},
}
Figure