Scaling General Architectures and Optimizers with Automatic Parameterization

Shikai Qiu, Martin Marek, Zixi Chen, Andres Potapczynski, Andrew Gordon WilsonNeurIPS 2026

TL;DR

Just as automatic differentiation freed us from computing gradients by hand, Automatic Parameterization (AutoP) frees us from manually deriving hyperparameter scaling rules when making neural networks bigger. By enforcing one intuitive principle—that a training program in the infinite-size limit should still behave like the exact same program—AutoP reads your code and automatically calculates how learning rates, initializations, and other hyperparameters must adjust across width, depth, batch size, and context length. Tune a tiny prototype tonight, and scale it up tomorrow without flying blind.

What Problem Does This Paper Address?

If you find the perfect learning rate for a small neural network and apply it directly to a massive one, your training run will likely explode or stall. As models grow in width, depth, or batch size, hyperparameters must scale alongside them.

Researchers have previously solved this piece by piece using bespoke mathematical derivations: $\mu$P for width, Depth-$\mu$P and CompleteP for depth, and stochastic differential equation (SDE) approximations for batch size. The catch? Every time someone invents a shiny new optimizer (like Muon) or an exotic architecture (like looped transformers), theorists have to go back to the chalkboard to re-derive scaling laws for every single axis. Theory has become a bottleneck for architectural experimentation.

Methods

AutoP treats an entire training run—forward pass, backward pass, and optimizer step—as a sequence of primitive code instructions. Instead of analyzing specific architectures, it imposes a universal rule: as scaled dimensions approach infinity, the limit of the training program must still be the same program.

Figure 1: AutoP derives how all hyperparameters scale from a single principle: as the scaled sizes grow, the training program should approach a limit that is still the same program. (Left) A training program runs T steps of a forward pass, a backward pass, and an Adam update over L layers and R recurrences, shown here for the hidden layers of a residual network, with each growing size, and the weights that grow with the width, in its own color. (Middle) AutoP infers how each value in the program scales and requires that, as the sizes grow, no value diverges, no hyperparameter or addend loses its effect on the loss, e.g., at the sums marked in magenta, and no nonlinear instruction, e.g., ϕ, becomes linear in the change that training makes to its input. (Right) Solving these requirements gives the scaling rules, which include µP for width, the multiplier of CompleteP for depth, one end of an interval of valid multipliers (†, Appendix D), and the batch-size rules derived from stochastic differential equation (SDE) models of stochastic gradient training.

For a program to remain "the same," every instruction must satisfy three conditions:

  1. Stability (Nothing Diverges): Losses and inputs to transcendental functions (like softmax or exp) stay bounded at $O(1)$ so they neither explode nor saturate.
  2. Relevance (Nothing Vanishes): Every hyperparameter and branch must retain a leading-order effect on the loss—no residual connection or epsilon term gets washed out to zero.
  3. Nonlinearity (Nothing Linearizes): Nonlinear activations must respond nonlinearly to weight updates, preventing the network from slipping into a "lazy" kernel regime where hidden layers stop learning features.

How does AutoP check this without actually running a massive model? Sizes enter a program through sums—over neurons, layers, batches, or training steps. A sum of $K$ terms grows linearly ($\sim K$) if its terms are correlated (coherent) and like a random walk ($\sim \sqrt{K}$) if they fluctuate independently (incoherent). AutoP inspects a JAX program at two small sizes to see which array axes grow, tracks correlations across instructions, and translates the three conditions into piecewise-linear inequalities on the hyperparameter scaling exponents. Finally, a linear (or mixed-integer) solver finds the exact exponents that balance all competing effects.

Datasets

No new benchmarks are introduced. The authors evaluate AutoP on standard datasets to test hyperparameter transfer:

  • OpenWebText for language modeling (transformers, Monarch transformers, MoE, looped transformers, and linear attention).
  • CIFAR-5M for image classification (ResNets and MLP-Mixers).

Key Insights and Ideas

  • Unification under one roof: Width ($\mu$P), depth (CompleteP), and batch-size (SDE) scaling rules aren't separate phenomena—they are all special cases of keeping program instructions stable, relevant, and nonlinear, differing only in how sums correlate along each axis.
  • Inspecting the code, not just the output: You cannot derive scaling rules just by looking at the final loss function. For instance, softmax outputs stay bounded even if attention logits diverge, and lazy networks still achieve finite loss. AutoP succeeds because it polices the internal instructions of the program.
  • Why depth scaling has multiple right answers: Prior literature disagreed on depth multipliers ($\gamma \propto L^{-1/2}$ in Depth-$\mu$P vs. $L^{-1}$ in CompleteP). AutoP reveals that any exponent in $[-1, -1/2]$ satisfies the core principle, returning the whole valid interval rather than an arbitrary single point.

Key Results

Across four architectures, four optimizers, and five scaling axes, one unmodified AutoP procedure keeps optimal hyperparameters locked in place while standard parameterization (SP) drifts or diverges:

  • New territory conquered: AutoP discovers effective, previously unestablished scaling rules—such as scaling residual multipliers as $R^{-1}$ across looped transformer recurrences (from $R=3$ to $48$), treating context length $S$ like width in MLP-Mixers ($\eta \propto S^{-1}$), and finding a linear batch-size learning rate rule ($\eta \propto B$) for the matrix-orthogonalizing Muon optimizer.
  • Broad width & depth transfer: Optimal learning rates transfer cleanly across widths up to $D = 2^{12}$ (across Adam, SignSGD, Muon, and AdaMuon) and transformer depths from $L = 3$ to $192$.
AutoP keeps the optimal learning rate stable across widths for four different optimizers, whereas Standard Parameterization drifts.
  • An honest miss on Adam's momentum: When scaling batch size from $B = 16$ to $512$ at fixed token budgets, AutoP transfers learning rates, weight decay, and Muon's momentum well. However, for Adam's momentum ($1 - \beta_1$), AutoP recovers the classical SDE rule ($1 - \beta_1 \propto B$), whereas empirically the optimal $1 - \beta_1$ stays nearly constant—causing the scaled rule to overshoot and diverge at large $B$.

Limitations and Future Work

  • Fixed data budgets: AutoP scales dimensions that leave the dataset unchanged (width, depth, or batch size at a fixed token count). It cannot yet prescribe how hyperparameters should shift as total training tokens grow.
  • Infinite-limit blind spots: Because it analyzes asymptotic limits, AutoP misses finite-size corrections and breaks down when minibatch noise no longer dominates single gradient steps (explaining the Adam $\beta_1$ mismatch).
  • Selecting within intervals: When the principle admits a range of valid exponents (like in depth scaling), AutoP needs extra user-defined criteria to pick a single point automatically.

Summary updated

Abstract

How should the initialization, learning rate, and other hyperparameters of a neural network scale with its width, depth, context length, or batch size? Each answer has so far been derived by hand for a particular architecture, optimizer, and scaling axis, as in μP for width, Depth-μP and CompleteP for depth, and stochastic differential equation (SDE) models of stochastic gradient training for batch size. We show that these rules follow from a single principle: as the scaled sizes grow, the training program should approach a limit that is still the same program. In this limit, no value diverges, no hyperparameter or computed value loses its effect on the loss, and no nonlinear instruction responds only linearly to the change that training makes to its input. Since the principle is a statement about the instructions of a program, and every size enters a program through sums that grow either coherently or incoherently, it can be applied to any training program automatically. We develop automatic parameterization (AutoP), a general formulation that turns the principle into inequalities on the exponents of all hyperparameters and solves them. AutoP recovers μP, the depth scalings, and the SDE batch-size rules across architectures and optimizers, and finds rules that transfer hyperparameters in settings without an accepted scaling rule, such as the recurrences of looped transformers and the batch size under Muon. Much as automatic differentiation made derivatives of any program automatic, AutoP lets practitioners scale up new architectures and optimizers without rederiving the theory behind them.
BibTeX
@inproceedings{qiu2026scaling,
  author = {Shikai Qiu and Martin Marek and Zixi Chen and Andres Potapczynski and Andrew Gordon Wilson},
  title = {{Scaling General Architectures and Optimizers with Automatic Parameterization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=N6J19VlnAM},
}
Figure