Key Moments

µP & Muon: Scaling Optimizers to Infinite Width | Stanford CS312 Lecture 4 with Tatsunori Hashimoto

Stanford OnlineStanford Online
Education5 min read69 min video
Nov 27, 2026|3,711 views|27|3
Save to Pod
TL;DR

Infinite-width neural networks can be stable yet fail to learn features, and a new optimization approach called "Muon" offers a way to achieve both stability and feature learning by manipulating singular values.

Key Insights

1

The Neural Tangent Kernel (NTK) limit, while stable, results in models that do not learn features, performing at chance levels on tasks like word embeddings.

2

The 'muP' (width mu parameterization) framework allows optimal learning rates to transfer across different model widths by adjusting scaling parameters A, B, and C.

3

The proposed ABC parameterization involves three knobs: scaling output per layer (A), scaling initialization (B), and scaling learning rate per layer (C), aiming for stable and non-trivial limits.

4

The Muon optimizer is derived from the idea of optimizing within a spectral norm ball, which effectively removes small singular values and promotes feature learning.

5

The Newton-Schulz method is used in Muon to efficiently approximate the singular value decomposition (SVD) needed for updates, making it computationally viable.

6

Empirical studies show that Muon, particularly in large language model training (e.g., Kimi K2), offers significant speedups and improved performance compared to standard optimizers like Adam.

The challenge of scaling neural networks and the limitations of the NTK regime

The lecture begins by addressing the critical importance of scaling in deep learning, particularly focusing on how optimizers should behave as models approach infinite width. A key question is whether existing optimization algorithms remain effective in these extreme limits. The discussion highlights that while simple scaling laws (like FLOPs vs. optimal learning rate) exist, a first-principles understanding of optimizer behavior is desired. A simplified model, akin to NQMs, is proposed to analyze this. The infinite-width limit is explored, leading to the Neural Tangent Kernel (NTK) regime. While the NTK limit ensures stability, it critically fails to learn any meaningful features, performing at chance levels and not capturing semantic structures in data, rendering neural networks useless for tasks like learning word embeddings.

Introducing muP: Parameterization for stable scaling

To address the shortcomings of the NTK regime, the lecture introduces the concept of 'muP' (width mu parameterization). The goal is to find parameterizations that allow for stable scaling without sacrificing feature learning. Instead of scaling all hyperparameters arbitrarily, muP focuses on understanding how specific parameterization choices affect optimization dynamics as width increases. The core idea is to scale the model's width to infinity while keeping other dimensions (like depth, steps, input size) fixed. This requires carefully chosen scaling rules for activations, initializations, and learning rates. The ABC parameterization is introduced as a formalization, with three 'knobs' (A, B, C) controlling the scaling of per-layer output, initialization variance, and per-layer learning rate, respectively. Finding the right values for A, B, and C is key to achieving stable and non-trivial (feature-learning) limits.

Deriving stability conditions using dimensional analysis and induction

The lecture then delves into the mathematical derivation of stability conditions. Using dimensional analysis and an inductive approach, the speaker analyzes the scaling of activations and gradients layer by layer. The base case (first layer) involves understanding the scaling of inputs, weights, and the output activation's norm. For subsequent layers, an inductive hypothesis is made about the incoming activation's norm, and the analysis extends to the output activation's norm, considering that intermediate layers involve square matrices (n x n) as width (n) goes to infinity. This process reveals constraints on the parameters A, B, and C for stable activations and gradients. For instance, for intermediate layers, the sum of exponents related to scaling parameters (AL + BL) needs to be approximately 1/2 for activation stability, while gradient stability imposes related but slightly different constraints. The analysis initially ignores non-linearities for simplicity, focusing on the 'big O' behavior.

The transition to non-trivial learning and the emergence of Muon

While stability is crucial, it's insufficient for learning. The concept of 'non-triviality' – meaning the model's outputs change over time rather than remaining static – is introduced. The failure of the NTK regime highlights the need for optimizers that enable feature learning. This leads to the development of a new optimization approach called 'Muon'. Muon is motivated by the idea of optimizing not just the standard gradient descent steps but by considering the spectral norm of the parameter updates. The core idea is to transform the update step to effectively 'whiten' or remove small singular values from the gradients, ensuring that updates are more robust and contribute to meaningful feature learning. This is achieved by performing an update within a ball defined by the operator norm, rather than the L2 norm used in standard gradient descent.

Muon's mechanics: Spectral norm optimization and Newton-Schulz

Muon's update rule involves decomposing the parameter updates using singular value decomposition (SVD) and then manipulating these singular values. Specifically, it aims to remove small singular values, effectively forcing the updates to be full-rank and promoting feature learning. However, performing SVD at each step is computationally prohibitive. To overcome this, Muon uses the Newton-Schulz method, an iterative fixed-point method that efficiently approximates the required matrix inverse square root, which is equivalent to the desired spectral manipulation without explicit SVD. This allows Muon to operate efficiently, making it practical for large-scale training.

Empirical evidence and practical considerations for Muon

Empirical studies, notably from researchers like Jordan Keller and papers from Kimi (K2), demonstrate Muon's effectiveness. Muon has been shown to significantly speed up training and improve performance on large language models. Practical implementations, like in Kimi's work, involve modifications such as using AdamW for scalar parameters, incorporating momentum, and carefully tuning learning rates to match the update sizes derived from Muon's spectral optimization. The alignment variables (alpha, omega, U) that govern the update structure are crucial, and while theoretical values exist, empirical measurement suggests they evolve during training. The core principle remains: by controlling the spectral properties of the updates, Muon achieves stable and effective feature learning, even at extreme scales.

The underlying theory and the art of optimization

The lecture concludes by emphasizing that while the mathematical derivations provide a framework, there's an element of 'alchemy' and empirical insight in deep learning optimization. The effectiveness of techniques like Muon suggests that simply ensuring stability isn't enough; the way updates interact with the network's spectrum is critical. The use of a quintic (fifth-order) fixed-point iteration in Muon, rather than a cubic or precise fixed point, highlights this empirical aspect, where deviations from perfect spectral whitening can sometimes yield better practical results. This points to a balance between rigorous mathematical theory and empirical discovery in advancing optimization techniques.

Key Takeaways for Stable and Non-Trivial Neural Network Training

Practical takeaways from this episode

Do This

Scale model width to infinity while keeping depth and steps constant.
Aim for stable activations and logits that do not explode with width.
Ensure non-triviality: model outputs should change over time, not remain static.
Consider ABC parameterization (output scale, initialization, learning rate) for controlled scaling.
Utilize Kaiming initialization for activation stability in the base case.
Analyze gradients to ensure stable training across layers.
Simplify optimizers like Adam to SGD-like behavior for theoretical analysis.
Incorporate momentum and use AdamW for scalar parameters in practical Muon implementations.
Use Newton-Schultz method for efficient spectral norm optimization instead of SVD.
Focus on controlling the operator norm and using polar decomposition for updates.
Prioritize stabilizing small singular values to enable larger, more effective updates.

Avoid This

Do not expect full characterization of complex systems; focus on two fundamental properties (stability, non-triviality).
Do not rely solely on stability (non-explosion); ensure the model is actively learning (non-triviality).
Avoid the Neural Tangent Kernel (NTK) limit, as it leads to non-functional models with no feature learning.
Do not assume standard parameterizations lead to stable learning rates at infinite width.
Avoid catastrophic cancellation in calculations, which can lead to parameters not learning.
Do not over-rely on perfect spectral whitening; focus on amplifying small singular values.
Do not assume that theoretical analysis perfectly captures all practical training scenarios; empirical insights are also crucial.

Common Questions

The primary challenge is ensuring that optimizers remain effective and that the training process is stable and efficient. Without proper scaling, activations and outputs can explode, making the model unusable.

Topics

Mentioned in this video

More from Stanford Online

View all 199 summaries

Ask anything from this episode.

Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.

Get Started Free