Fantastic Pretraining Optimizers and Where to Find Them II: Hyperball Optimization

Kaiyue Wen, Xingyu Dang, Kaifeng Lyu, Tengyu Ma, Percy LiangarXiv 2026

TL;DR

Hyperball is a simple optimizer wrapper that fixes the Frobenius norms of weight matrices and their updates to constants during language model pretraining. By replacing the implicit norm control of weight decay with an explicit geometric constraint, Hyperball sustains a 20–30% training speedup for advanced optimizers at scale and significantly stabilizes hyperparameter transfer across different model dimensions.

What Problem Does This Paper Address?

Advanced matrix-based optimizers, such as Muon, have recently demonstrated massive speedups (up to 30%) over standard AdamW for training large language models. However, researchers noticed a frustrating trend: as models scale up in parameter size and data volume, these performance gains shrink down to around 10%.

The culprit lies in how standard decoupled weight decay interacts with scale-invariant layers (like those using LayerNorm or RMSNorm). In modern Transformers, rescaling a weight matrix doesn't actually change the loss, making weight decay's traditional role as a regularizer puzzling. Instead, weight decay implicitly controls the weight norm, which indirectly dictates the angular learning rate—the speed at which the direction of the weight matrix changes. As models scale, this indirect calibration breaks down, causing optimization efficiency to drift and making hyperparameter tuning across different model sizes highly unpredictable.

Methods

The authors introduce Hyperball, an optimizer wrapper that turns implicit norm control into an explicit geometric constraint. Instead of letting weight decay softly pull weights toward zero, Hyperball constrains the optimization trajectory directly to the surface of a hypersphere.

Given a base optimizer (like Adam or Muon) providing an update $u_t$ for a weight matrix $W_t$, Hyperball fixes the Frobenius norm of both the weights and the updates to constants. The update rule projects the step directly back onto the sphere:

$$W_{t+1} = R \cdot \text{Normalize}(W_t - \eta_t R \cdot \text{Normalize}(u_t))$$

where $R$ is the initial Frobenius norm of the weight matrix and $\eta_t$ is the learning rate. This completely decouples the magnitude of the weights from the direction of the update, forcing the optimizer to navigate purely through weight directions. Hyperball is applied specifically to attention and MLP weight matrices in Transformers, while standard Adam is retained for embeddings and normalization gains where scale carries semantic meaning.

Geometric view of the Hyperball update constraint

Datasets

Models were pretrained on a large-scale token mixture consisting of:

  • DCLM-baseline
  • StarCoder
  • ProofPile 2
  • FineWeb-Edu (for specific benchmark runs)

Evaluation and scaling verification were performed using the Marin speedrun benchmark, Marin Ferries (scaling up to an 8B parameter model), and the public modded-nanogpt Track 3 optimization benchmark.

Key Insights and Ideas

  • Weight Decay as an Angular Controller: For scale-invariant layers, weight decay isn't regularizing capacity; it's acting as an indirect controller of the angular step size. A larger weight radius means a smaller angular change per step.
  • Bypassing Equilibrium: Standard weight decay forces the network to find a noisy "rotational equilibrium" radius. Hyperball bypasses this process entirely by explicitly pinning the radius, replacing indirect calibration with a direct, predictable angular learning rate schedule.
  • Robust Hyperparameter Transfer: Because Hyperball fixes the relative update length explicitly, the optimal learning rate becomes highly scale-invariant. This solves a major headache in LLM scaling, where optimal hyperparameters typically drift significantly as models grow wider or deeper.

Key Results

  • Sustained Scaling Speedups: On 1.2B parameter Qwen3-style models, Muon with the Hyperball wrapper (MuonH) maintained a 20–30% token-equivalent speedup over AdamW baselines, whereas standard Muon with weight decay (MuonW) dropped to a ~10% gain.
Token-equivalent speedup over AdamW scaling law at 1.2B parameters
  • Benchmark Dominance: On the modded-nanogpt Track 3 benchmark, Hyperball variants consistently outperformed their weight decay counterparts. When paired with the state-of-the-art KL-SOAP optimizer, KL-SOAP-H reached the target validation loss faster than any other entry (3125 steps).
Figure 4: The modded-nanogpt Track 3 optimization benchmark. Curves show average validation loss from the public Track 3 logs versus training step. Lower and further left is better. Left: full trajectories. Right: zoom near the 3.27–3.28 validation loss band for entries reaching this band within 3400 steps. Hyperball variants improve the matched weight decay baselines in this comparison, and KL-SOAP-H, which denotes KL-SOAP [Lin et al., 2026] combined with Hyperball, reaches average validation loss 3.2780 in 3125 steps.
  • Flatter Learning Rate Windows: Across extensive depth and width sweeps, Hyperball reduced the optimal learning rate drift to just 1.4×, compared to a massive 2–4× drift seen in standard AdamW and MuonW baselines.

Limitations and Future Work

  • Frobenius vs. Spectral Constraints: Hyperball relies on the Frobenius norm because it is computationally cheap ($O(N^2)$). However, a spectral norm constraint (fixing the operator norm) might offer tighter control over layerwise scaling factors, though it requires an expensive SVD ($O(N^3)$).
  • Granularity of Constraints: The current implementation applies a single constraint per matrix block. Future work could explore rowwise, columnwise, or architecture-dependent constraints to better match specific layer dynamics.
  • Theoretical Completeness: While the paper provides a stationary model analysis under idealized isotropic gradients, a sharper theory is needed to fully map out how removing the radial degree of freedom alters the global training trajectory.

Summary updated

BibTeX
@misc{wen2026fantastic,
  author = {Kaiyue Wen and Xingyu Dang and Kaifeng Lyu and Tengyu Ma and Percy Liang},
  title = {{Fantastic Pretraining Optimizers and Where to Find Them II: Hyperball Optimization}},
  year = {2026},
  eprint = {2606.16899},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.16899},
}
Figure