Z-Loss Backward Geometry in Dense Output Heads and Sparse Routers
On the map: Mixture-of-experts → Expert routing strategies
Abstract (arXiv)
Z-loss has been widely applied to the logits of language-model output heads and sparse mixture-of-experts routers. Z-loss constrains the softmax log-normalizers of these output heads and routers, thereby limiting large-logit excursions, reducing finite-precision roundoff exposure, and avoiding training-loss divergence. These use cases arise in modern Transformer settings where large-vocabulary softmax heads, top-k routing, fused losses, and mixed-precision optimizers interact. Z-loss has typically been understood only as a scalar penalty on the log-normalizer. This paper instead analyzes Z-loss from a backward-pass perspective, focusing on the gradients produced by the Z-loss penalty. The logit-space gradient, which we call the backward source, is injected at the logit boundary of the Z-loss branch of backpropagation; consequently, the backward source's effect depends on the architecture and implementation through which the gradient is transported. We develop a backward-transport view for Z-loss that separates the source's scalar amplitude and softmax shape from the transport factors. These factors include common-shift coordinates, tied-embedding pathways, output-to-hidden gain, fused-loss source consistency, optimizer-facing updates, and top-k router reduction scale. These diagnostics show that nearly identical forward Z-loss values can coexist with distinct logit-space Z-loss gradients and, after architectural and optimizer transport, distinct parameter updates. The transport diagnostics also explain why raw-logit Z-loss can reduce scalar tails without changing output-to-hidden gain and why active-route reductions alter the effective router coefficient. Across evaluations of models in the GPT-2 and Pythia families on WikiText-103 and FineWeb-Edu, architecture-aware variants reduce backward-geometry tails while maintaining comparable validation perplexity in low-coefficient regimes.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Expert routing strategies, one of 12 directions in Mixture-of-experts. Builds on 33 of its 43 references that are in the map. First posted on arXiv 31 Jul 2026.
Builds on
33 of 43 references.
Closest ancestors · 2
Same direction, newest first
- 2024Auxiliary-Loss-Free Load Balancing Strategy for Mixture-of-Experts28 Aug
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity11 Jan
Other references · 31
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2015Rethinking the Inception Architecture for Computer Visioncited by 5,475
- 2017On Calibration of Modern Neural Networkscited by 4,960
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2022Training Compute-Optimal Large Language Modelscited by 3,019
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,631
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
19 more
- 2017Mixed Precision Trainingcited by 1,156
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 784
- 2021Scaling Vision with Sparse Mixture of Expertscited by 747
- 2017Regularizing Neural Networks by Penalizing Confident Output Distributionscited by 464
- 2021BASE Layers: Simplifying Training of Large, Sparse Modelscited by 320
- 2016Using the Output Embedding to Improve Language Modelscited by 272
- 2019Representation Degeneration Problem in Training Natural Language Generation Modelscited by 255
- 2022Mitigating Neural Network Overconfidence with Logit Normalizationcited by 252
- 2022MegaBlocks: Efficient Sparse Training with Mixture-of-Expertscited by 209
- 2018Mesh-TensorFlow: Deep Learning for Supercomputerscited by 169
- 2018Online normalizer calculation for softmaxcited by 162
- 2019Transformers without Tears: Improving the Normalization of Self-Attentioncited by 153
- 2017Breaking the Softmax Bottleneck: A High-Rank RNN Language Modelcited by 152
- 2016Tying Word Vectors and Word Classifiers: A Loss Framework for Language Modelingcited by 92
- 2021NormFormer: Improved Transformer Pretraining with Extra Normalizationcited by 83
- 2016Efficient softmax approximation for GPUscited by 67
- 2024Cut Your Losses in Large-Vocabulary Language Modelscited by 40
- 2016The Z-loss: a shift and scale invariant classification loss belonging to the Spherical Familycited by 12
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026How Sparse Probability Maps Shape Mixture-of-Experts Routing
- 2026IG-Lens: Exact Additive Probability Attribution Across Transformer Layers via Telescoping Integrated Gradients
- 2026X-MoD: Practical Scaling Laws for Sparse-Depth Routing Beyond Mixture-of-Depths
- 2026MoRE: Scaling mixture of experts with hardware-aware low-rank routing
- 2026Variable-Width Transformers
- 2026Gated Normalization Removal and Scale Anchoring in Pre-Norm Transformers
- 2026Router Prior Bias: Preserving Base Routing Structure in MoE Post-Training
- 2026Complete-muE: Optimal Hyperparameter Transfer and Scaling for MoE Models