atlas

Research map / Architectures and efficiency / RNNs and normalization

Normalization Layer Per-Example Gradients are Sufficient to Predict Gradient Noise Scale in Transformers

NeurIPS 2024 · Architectures and efficiency › RNNs and normalization · approach: Weight normalization and decay interplay · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes computing per-example gradient norms simultaneously with parameter gradients for linear, embedding and LayerNorm layers, finds LayerNorm GNS tracks total GNS in transformers, and uses a zero-overhead LayerNorm CUDA kernel to guide a batch size schedule that cuts training time 18%.

Problem

Gradient noise scale (GNS) estimation needs per-example gradient norms, which are costly to obtain in 3D tensor regimes (transformers) without affecting training throughput, and the GNS estimate is noisy.

Approach

Compute per-example gradient norms in the same einsum contraction that produces the weight gradient, avoiding the O(T^2) intermediate of prior tricks; observe that LayerNorm-only GNS predicts total model GNS, so a fused LayerNorm kernel can track GNS with zero throughput overhead.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use a GNS-guided linear batch size schedule instead of a fixed batch size111M language model · OpenWebTexttraining time: 18%Helped
Use a linear batch size schedule instead of a fixed batch size111M language model · OpenWebTextloss at matched tokens processedHelped
Compute per-example gradient norms during the LayerNorm backward pass with a custom kernelLayerNorm · LayerNorm forward and backward passthroughput overhead: zeroHelped
Estimate total GNS using LayerNorm GNS111M language model · OpenWebTexttotal GNS prediction: approximately 1.4Helped
Increase the learning rate (ablation)111M language model · OpenWebText, temperature experimentGNSMixed
Change the batch size (ablation)111M language model · OpenWebText, temperature experimentGNSNo clear effect
Use Flash attention instead of the pure PyTorch attention implementation (ablation)111M language model in bfloat16 AMP · OpenWebTexttraining stabilityHurt
Use cosine attention in place of Flash attention (ablation)Student model · Teacher-student stability simulationtraining stabilityHelped
Use float32 precision in block 1 (the second block) (ablation)111M language model · OpenWebTexttraining stabilityHelped
Apply spectral normalization to the QKV projection in block 1 (the second block) (ablation)111M language model · OpenWebTexttraining stabilityHelped
Vary model size among 70M, 111M, and 161M parameters at constant FLOPs (ablation)Cerebras-GPT training recipe · OpenWebTextloss: 70M, 111M and 161MMixed
Use only LayerNorm layers for GNS estimation instead of collecting all layer norms (ablation)1.3B GPT · OpenWebTextMFU: 40% -> 57%Helped

Surprising findings

Limitations

Experimental setup

Datasets: OpenWebText

Benchmarks: OpenWebText

Metrics: gradient noise scale correlation coefficient regression slope tokens saved throughput (MFU) kernel time overhead

Baselines: Backpack per-example gradient method DDP-based GNS estimation PyTorch LayerNorm

Builds on: gradient noise scale Backpack per-example gradient trick Cerebras-GPT nanoGPT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy