TL;DR
EnergyCal is a lightweight, "one-sided" update attenuation rule designed to stabilize sparse Mixture-of-Experts (MoE) training when using Muon-family optimizers. By scaling expert updates based on their post-orthogonalization "energy," it reduces loss-spike burden by over 95% and improves final model quality with negligible computational overhead.
What Problem Does This Paper Address?
Sparse Mixture-of-Experts (MoE) models are efficient because they only activate a small fraction of their parameters (the "experts") for any given input token. However, this sparsity creates a headache for optimizers. Standard optimizers like Adam can struggle, but newer "Muon-family" optimizers—which use Newton-Schulz (NS) iterations to orthogonalize updates—often trigger massive, training-destabilizing loss spikes in MoE settings.
The core issue is that experts accumulate momentum even during steps when they receive zero tokens. When they are finally "routed" to, this stale momentum can lead to oversized, poorly-conditioned updates. The authors set out to find a simple way to tame these excursions without adding complex optimizer states or changing the fundamental spectral properties of the Muon optimizer.
Methods
The authors introduce EnergyCal, a rule that scales the update of each routed expert by a coefficient $q_e$.
- Calculate Energy: After the Newton-Schulz orthogonalization step, they compute the "post-NS energy" ($\rho_e$) of the update direction $D_e$. This is defined as the normalized squared Frobenius norm: $\rho_e = \|D_e\|_F^2 / d_e$.
- Compute Scaling Factor: They derive a scaling coefficient $q_e = \text{clip}[(\rho_e / \rho_{\text{ref}})^p, 0, 1]$.
- Attenuate: This $q_e$ is applied to the update. Crucially, it is "one-sided"—it only shrinks updates that have low energy relative to a reference, and never grows them.
EnergyCal is "lightweight" because it requires no persistent optimizer state (like moving averages of token counts) and leaves the underlying spectral transform of the Muon optimizer unchanged. It was tested on both MuonH (which uses Hyperball constraints) and plain Muon.
Datasets
The researchers trained a custom 4B-parameter DeepSeekMoE-style model from scratch using the FineWeb sample-10BT dataset. Evaluation was performed on a fixed 524,288-token validation bank from the same corpus.
Key Insights and Ideas
- Energy as a Proxy for Reliability: The "energy" statistic (Frobenius norm of the orthogonalized direction) acts as a signal for update reliability. Low energy can reflect either a highly concentrated spectral distribution or a small direction amplitude—both of which correlate with instability in the sparse MoE setting.
- Momentum is the Hidden Driver: Experts can retain non-zero momentum even when idle. EnergyCal effectively "reins in" these experts when they are re-activated, preventing stale momentum from causing a blow-up.
- Stability Leads to Quality: Interestingly, EnergyCal doesn't just make the loss curves look prettier; it actually leads to better final model performance (lower perplexity). This suggests that the "micro-spikes" suppressed by EnergyCal were actively harming the model's learning trajectory.
- Causality is Complex: Through "single-update interventions" (manually freezing weights during a spike), the authors found that spikes aren't caused by a single "bad" update. Instead, they seem to be the result of accumulated history or routing dynamics, which EnergyCal manages through continuous calibration.
Key Results
The results across multiple initialization seeds were dramatic:
- Massive Spike Reduction: For the MuonH variant, EnergyCal reduced the mean thresholded loss-spike burden by 99.51%. For plain Muon, the reduction was 95.98%.
- Improved Final Quality: The EnergyCal–MuonH recipe achieved a 4.06% lower geometric-mean perplexity compared to a carefully tuned baseline.
- Minimal Overhead: The throughput cost was modest, with only a 1.62% to 3.63% reduction in tokens per second, making it highly practical for production-scale training.
Limitations and Future Work
While highly effective, the authors acknowledge several boundaries to their findings:
- The "Uniform Scaling" Question: The study lacks a control group that uses a fixed, uniform reduction in expert update magnitudes. It remains possible that simply making all expert updates smaller would provide similar benefits, though the energy-dependent approach is more principled.
- Scope: The experiments were limited to a 4B-parameter model and a specific MoE architecture. Whether these benefits hold at the 100B+ parameter scale or with different routing strategies (like Expert Choice routing) is an open question.
- Mechanistic Gap: The failure of single-step interventions to stop spikes means we still don't have a perfect "smoking gun" for why these spikes happen in the first place—only a very effective way to prevent them.
Summary updated