Explore the research collection
3 entries · Follow this search
- Paper
The Best Optimizer Depends on Batch Size
Adaptive optimizers are benchmarked at one batch size, while hyperparameter scaling rules promise that the best optimizer at one batch size stays the best at another. This paper challenges both practices. (1) No principled scaling rule for Muon works consistently across settings: the authors derive and test three competing rules against Muon - linear LR from SDE-matching, square-root LR from minimizing a convergence bound, and fixed LR with scaled weight decay from Power Lines - tuning at a reference batch size for LM and image classification, then growing batch size at fixed token budget across hundreds of rule variants; the best rule depends on task and target batch size. (2) The best optimizer for LM pretraining changes with batch size even after extensive retuning: Adam, Lion, Muon, SOAP, and Shampoo were each retuned at every batch size from 128K to 2M tokens at fixed total budget under both weight decay and HyperBall (fixed hidden-matrix norms). Under HyperBall, Muon beats Shampoo at 128K tokens/update while Shampoo beats Muon at 2M. Theory on a noisy quadratic explains why: Newton's method divides gradients by curvature, cutting bias (remaining initialization error) at the cost of higher variance from noisy gradients; larger batches shrink variance, so rankings can reverse even with optimally tuned learning rates. A SignSGD toy model shows LR scaling shifts from square-root toward linear as the curvature-to-noise ratio (CNR = h^2/c) increases - the right rule depends on landscape and noise, not just the optimizer. A sharp-subspace intervention pins down where the batch-size penalty lives: checkpoint-branching from 128K to 2M with small-batch updates kept only in the sharpest 768 directions (~0.001% of matrix-parameter space) removes up to 59.5% of the local batch-size penalty (a random same-size subspace removes at most 3%); the benefit largely fades late in training.
- Paper
Why Adaptive Optimizers Underestimate Rare Tokens
In the softmax output layer, a rare token gets a small positive logit gradient on most steps and a much larger negative gradient on the few steps when it is the target. SGD simply adds these contributions; coordinate-wise adaptive methods (Adam, RMSProp, sign descent) divide each update by a running magnitude estimate that is largest immediately after the token appears. Two effects: (i) whole output layer — characterizes which optimizers preserve the mean output embedding: every method linear in past gradients does, as do Kronecker-factored/orthogonalized methods (Shampoo, Muon); Adam, Adafactor, Lion, sign descent do not (exact step-by-step expressions given); (ii) individual rare tokens — the normalization shifts the training fixed point below the token's true data frequency. Closed forms: sign descent lowers the logit of every token occurring in fewer than half of minibatches at a constant expected rate; for RMSProp with periodic arrivals, if a token is absent for at least two consecutive minibatches its equilibrium probability is strictly below data frequency for every learning rate, ratio tending to k/(2(e^(k/2)-1)). SGD and AMSGrad retain the unbiased fixed point. Tested in a unigram model and a small LM trained from a known generating distribution: with random arrivals the bias exceeds the periodic formula, and biased-fixed-point optimizers fit the generating distribution worse. Directly relevant to the user's LLM pretraining work — rare-token underestimation from Adam is an optimizer choice, not a data problem.
- Paper
The Loss Does Not See the Basis, but Adam Does
Shows gradient descent on W=UV^T is biased toward low-rank interpolants while Adam is not, tracing the gap to loss gauge symmetry (U,V)->(UQ,VQ). Equivariant methods (GD, momentum, shared-scalar Adam, Muon, Shampoo) can inherit gradient-flow low-rank bias; coordinate-wise Adam/RMSProp/Lion/Adafactor cannot. Sorts nine update rules on underdetermined matrix sensing; a p-dial from coordinate-wise to shared-scalar Adam restores the bias monotonically. In transformers, Adam splits two gauge-equivalent inits at step 1 (per-head W_Q^T W_K 56% apart). On two hyperspectral datasets at matched train loss, GD cuts held-out error 43-44% vs Adam at lowest sampling density.