Clean: Second-order LLM Training at Linear Memory Cost via Nyström Sketching

Beheshteh T. Rakhshan, Sahar Rajabi, Maziar Sargordi Shikai Fang, Guillaume Rabusseau, Sirisha RambhatlaarXiv 2026

TL;DR

Clean is a new second-order optimizer that delivers the fast convergence of full-curvature methods at a fraction of the memory cost. By leveraging randomized Nyström sketching, it reduces optimizer memory complexity from quadratic to linear, enabling the pre-training of a 13B-parameter model on a single 80GB GPU—a feat impossible for standard second-order baselines.

What Problem Does This Paper Address?

Training Large Language Models (LLMs) involves a painful trade-off between memory efficiency and curvature fidelity.

Standard first-order optimizers like AdamW are memory-efficient because they only track diagonal statistics, but they ignore the complex correlations between parameters (cross-parameter curvature). Second-order methods like Shampoo and SOAP capture this curvature to accelerate convergence, but they require storing large covariance matrices. For a layer of size $m \times n$, these methods typically demand $O(m^2 + n^2)$ memory. As models grow wider, this quadratic cost becomes a brick wall, making full-curvature training prohibitive for billion-parameter models.

Methods

The authors introduce Clean, which stands for "Second-order LLM Training at Linear Memory Cost via Nyström Sketching." Its architecture rests on three pillars:

  1. Randomized Nyström Sketching: Instead of explicitly forming and storing massive $m \times m$ and $n \times n$ covariance matrices, Clean uses the Nyström method to maintain low-rank approximations. This shifts the memory complexity to $O((m+n)r)$, where $r$ is a small rank parameter.
  2. Block-wise Decomposition: Clean projects the gradient into four orthogonal blocks: a low-rank "Main" core and three residual blocks (A, B, and C) that capture information outside the primary subspace.
  3. Tailored Moment Estimation: To keep memory linear, Clean applies different update rules to each block. It uses full Adam for the small $r \times r$ Main block, but employs "pooled" Adam (averaging statistics across rows or columns) for the larger residual blocks. This ensures that no $O(mn)$ optimizer state is ever created.

The authors also propose Q-Clean, a quantized variant that uses 8-bit (INT8) precision for first moments and projection matrices, further slashing the memory footprint.

The Clean pipeline: Projecting gradients, performing block-wise Adam, and projecting back to form a full-rank update.

Datasets

The researchers evaluated Clean and Q-Clean by pre-training LLaMA-based architectures (350M and 1.3B parameters) from scratch. They used the C4 (English) dataset, a standard large-scale web crawl corpus.

Key Insights and Ideas

  • Residuals Matter: Most low-rank optimizers simply discard the gradient components that fall outside the low-rank subspace. Clean demonstrates that these "off-subspace" components (Blocks A, B, and C) carry significant training signals, especially as training progresses. Reintegrating them is key to maintaining high performance.
  • Linear Scaling is the "Holy Grail": Because Clean avoids $O(mn)$ states, its per-parameter memory cost actually decreases as the model scales. This makes it uniquely suited for the next generation of ultra-wide models.
  • Quantization Synergy: The authors found that while linear quantization works for most states, the second-moment matrix ($V$) has a highly skewed distribution. Q-Clean succeeds by using a non-linear, dynamic codebook for $V$, preventing the optimization from diverging.
Figure 1: Measured memory consumption for pre- training a LLaMA-13B model on a single 80 GB H100 GPU (maximum sequence length of 1024, batch size of 1). All non-quantized matrices are stored in bfloat16. Activation + Other combines activation memory with an estimated optimizer workspace. Methods marked ∗ran out of memory, so their optimizer state is estimated.

Key Results

  • Wall-Clock Speedup: On a LLaMA-1.3B model, Clean reached AdamW’s final performance 26% faster in total time.
  • Token Efficiency: Clean achieved the same validation loss as AdamW using only 77% of the training tokens.
  • Memory Dominance: Q-Clean reduced optimizer memory consumption by over 50% compared to Muon.
  • Extreme Scaling: Clean uniquely enabled training a 13B parameter model on a single 80GB H100 GPU. For comparison, standard SOAP would require an estimated 244GB for the same setup.

Limitations and Future Work

  • Hyperparameter Sensitivity: The performance of Clean is tied to the choice of rank ($r$) and the preconditioner refresh interval ($T$). While the authors found $r=256$ or $512$ and $T=10$ to be robust, these may need tuning for different architectures.
  • Computational Overhead: While Clean is faster in wall-clock time due to better convergence, the projection and sketching steps do add a small per-step computational cost compared to simple AdamW.
  • Future Directions: The authors suggest exploring even more aggressive quantization and applying Clean to non-Transformer architectures to test its generalizability.

Summary updated

BibTeX
@misc{rakhshan2026clean,
  author = {Beheshteh T. Rakhshan and Sahar Rajabi and Maziar Sargordi Shikai Fang and Guillaume Rabusseau and Sirisha Rambhatla},
  title = {{Clean: Second-order LLM Training at Linear Memory Cost via Nyström Sketching}},
  year = {2026},
  eprint = {2610.04204},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.04204},
}
Figure