Source-linked AI summary
Rethinking Shrinkage Bias in LLM FP4 Pretraining: Geometric Origin, Systemic Impact, and UFP4 Recipe
Qian Zhao, Kunlong Chen, Changxin Tian, Zhonghui Jiang, Haitao Zhang, Chaofan Yu, Peijie Jiang, Mingliang Gong, Jia Liu, Ziqi Liu, Zhiqiang Zhang, Jun Zhou
TL;DR
Existing E2M1-centered FP4 training can suffer geometric Shrinkage Bias, particularly under RHT. This paper proposes UFP4, a uniform-grid recipe, and reports consistently lower BF16-relative loss degradation than E2M1 baselines in long-run dense and MoE pretraining.
Problem
Existing FP4 training methods largely retain E2M1, whose geometric rounding bias under RHT and implications for long-run training require examination.
Method
UFP4 uses a uniform E1M2/INT4-style grid, applies RHT to all three training GEMMs, and restricts stochastic rounding to dY.
Results
UFP4 consistently reduces BF16-relative FP4 loss error versus the E2M1 reference recipe across long-run dense and MoE training.
Takeaways & Limitations
Future training accelerators should support E1M2/INT4-style uniform 4-bit grids as first-class training data elements alongside E2M1.
Takeaways & Limitations
The geometric analysis assumes no clipping, with normalized magnitudes constrained by the format’s maximum level.
Abstract
from arXiv · showhide
FP4 training promises substantial reductions in memory and computation cost for LLM pretraining, yet current FP4 hardware paths and recipes, including NVIDIA Blackwell/Rubin-class systems and AMD MI350-series GPUs, remain centered on E2M1 data elements. In this study, we identify a fundamental limitation of that choice: non-uniform formats such as E2M1 inherently suffer from Shrinkage Bias, a systematic negative rounding error caused by the geometric asymmetry of their representable bins. We show that this bias accumulates multiplicatively across layers and is amplified by the Random Hadamard Transform (RHT), providing a unified explanation for the training instability observed in existing E2M1-based FP4 recipes. In contrast, uniform grids (E1M2/INT4) bypass this grid-geometry error and better convert the improved bucket utilization from RHT into higher quantization quality. Based on this finding, we propose UFP4, a uniform 4-bit training recipe that applies RHT to all three training GEMMs while restricting stochastic rounding to dY alone. On Dense 1.5B, MoE 7.9B, and MoE 124B long-run pretraining, UFP4 consistently achieves lower BF16-relative loss degradation than strong E2M1-based baselines, supported by scaling-law analysis and ablation studies. Our results suggest that future accelerators should support E1M2/INT4-style uniform 4-bit grids as first-class training primitives alongside E2M1.
1 Introduction
The paper identifies Shrinkage Bias in E2M1 as a geometric source of multiplicative signal decay and RHT-amplified instability, then proposes UFP4, a uniform E1M2/INT4-style recipe that enables full-RHT training. UFP4 is validated across Dense and MoE long-run pretraining at multiple model scales.
- Shrinkage Bias: E2M1’s geometrically asymmetric RTNE bins cause Shrinkage Bias, a systematic negative expected rounding error.The paper formalizes this bias as inherent to non-uniform grids such as E2M1.
- UFP4 recipe: UFP4 uses uniform E1M2/INT4-style grids, applies RHT to FPROP, DGRAD, and WGRAD, and restricts stochastic rounding to dY.This recipe shows that full-RHT training is not inherently harmful when the grid matches post-RHT tensors.
- Systemic impact: Shrinkage Bias accumulates multiplicatively across layers and is amplified by RHT, explaining instability in existing E2M1-based FP4 recipes.The paper cites the NVFP4 recipe as an example of this instability.
- Validation: UFP4 is evaluated on Dense 1.5B, MoE 7.9B, and MoE 124B long-run pretraining with scaling-law analysis, ablations, and fused-kernel benchmarks.These results support uniform grids as practical first-class FP4 training formats at industrial scale.
2 Preliminaries
The preliminaries define the FP4 formats, blockwise quantization and rounding rules used throughout, then introduce RHT as a norm-preserving rotation that spreads outliers and improves codebook utilization before quantization.
- FP4 formats: FP4 formats use one sign bit plus exponent and mantissa fields, with this study considering E2M1, E1M2, and INT4 codebooks.Formats are denoted ExMy.
- Blockwise quantization: Blockwise quantization partitions tensor T into contiguous blocks and maps elements to codebook levels using a shared per-block scale.The normalized codebook is G, its largest magnitude is gmax, and ρG denotes the rounding rule.
- Rounding rules: The rounding rule is either RTNE, which selects the nearest codebook level deterministically, or SR, which samples between adjacent levels.SR preserves the normalized value in expectation, whereas RTNE uses deterministic tie-breaking and is adopted by NVFP4 Recipe.
- Random Hadamard transforms: RHT applies a norm-preserving rotation that disperses outlier energy across coordinates, reducing outlier dominance and improving codebook utilization.The randomized transform uses a diagonal random sign matrix followed by a Sylvester Hadamard transform; its net quantization effect depends on the FP4 grid.
- Random Hadamard transforms: For the three training GEMMs, RHT acts along the shared reduction dimension: input channels for fwd_y, output channels for bwd_dx, and batch tokens for bwd_dw.The corresponding low-precision GEMM quantizes the rotated operands.
3 Shrinkage Bias in 4-bit Format Grids
Non-uniform E2M1 grids inherently produce Shrinkage Bias because asymmetric rounding bins yield negative expected errors, while uniform grids avoid this geometric error. The bias accumulates multiplicatively across layers, and RHT can worsen E2M1 instability by shifting tensor mass into highly biased bins.
- 3.1 Geometric Origin: Shrinkage Bias from Asymmetric RTNE Bins: An asymmetric RTNE bin with ri > ℓi yields negative expected error under locally uniform density, establishing a geometric source of magnitude shrinkage.This mechanism is distinct from distribution-induced quantization error within a symmetric bin.
- 3.1 Geometric Origin: Shrinkage Bias from Asymmetric RTNE Bins: For E2M1 magnitudes, the level qi = 2 has conditional bias −0.125 because its rounding bin is asymmetric.The bin around qi = 2 has left width 0.25 and right width 0.5.
- 3.1 Geometric Origin: Shrinkage Bias from Asymmetric RTNE Bins: E2M1’s asymmetric rounding bins inherently cause Shrinkage Bias, whereas uniform E1M2 grids bypass this grid-geometry error.Shrinkage Bias is defined as a negative expected RTNE error in normalized magnitude space.
- 3.2 Systemic Impact: Propagation and RHT Exacerbation: Across K quantized GEMMs, systematic shrinkage accumulates multiplicatively rather than canceling like zero-mean noise.Errors in non-leaf outputs fwd_y and bwd_dx cascade through subsequent layers, while bwd_dw errors are directly consumed by the optimizer.
- 3.2 Systemic Impact: Propagation and RHT Exacerbation: RHT shifts tensors from dynamic-range-limited to local-resolution-limited by spreading outlier energy across coordinates and concentrating mass at typical magnitudes.This changes the bottleneck from representing extreme outliers to preserving dense probability mass at ordinary magnitudes.
- 3.2 Systemic Impact: Propagation and RHT Exacerbation: Although RHT increases effective bucket utilization for outlier-heavy training tensors, E2M1 can incur worse fidelity when shifted mass enters its biased mid-magnitude bins.The reported tensors include fwd_w, fwd_x, and bwd_dy from MLP blocks.
- 3.2 Systemic Impact: Propagation and RHT Exacerbation: Thus, E2M1 Shrinkage Bias causes systematic signal decay across layers, while RHT exacerbates the decay by moving tensor mass into its most biased asymmetric bins.The combined effect degrades deep training stability.
4 UFP4: 4-bit Training Recipe with Uniform Grids
UFP4 proposes an E1M2/INT4-style uniform 4-bit training recipe that applies RHT across all three linear-layer GEMMs. Its design prioritizes local magnitude preservation after RHT and eliminates geometric Shrinkage Bias through a uniform grid.
- Motivation: Existing E2M1 recipes leave the format-level source of Shrinkage Bias unchanged despite specialized rounding, scaling, or tensor preprocessing.These mitigation techniques address symptoms rather than the underlying E2M1 grid geometry.
- UFP4 Recipe: UFP4 uses an E1M2/INT4-style uniform grid and applies RHT before quantizing operands for every linear-layer GEMM.The design follows the principle that, after RHT, 4-bit quantization should prioritize local magnitude preservation over extreme dynamic range.
- Comparison with E2M1-based Recipe: The uniform grid eliminates geometric Shrinkage Bias and enables RHT coverage across fwd_y, bwd_dx, and bwd_dw.This extends RHT from the single bwd_dw path used in the comparison to all three training GEMMs.
5 Experiments
Experiments show that RHT changes which FP4 grid is preferable, with E1M2 benefiting more consistently than E2M1 in outlier-heavy tensors and GEMM outputs. UFP4 consequently stays closer to BF16 across model scales, while full RHT, stochastic rounding on dY, native uniform grids, and fused implementation each address distinct recipe or systems considerations.
- Q1: Grid geometry and RHT: RHT reverses the SQNR ranking on outlier-heavy tensors: E2M1 leads before rotation, whereas E1M2 leads after rotation.For well-behaved linear_fc1/fwd_x, RHT is nearly neutral; for outlier-heavy linear_fc2/fwd_x, it shifts tensors from a dynamic-range-limited to a local-resolution-limited regime.
- Q1: Grid geometry and RHT: Across single-GEMM outputs, E1M2 preserves or improves SQNR after RHT, whereas E2M1 can lose SQNR, especially on backward and post-RHT concentrated paths.The format-dependent inversion is stronger for linear_fc2 than linear_fc1, where RHT improves E1M2 output SQNR on dominant paths.
- Q2–Q3: Long-run training and scaling: 0.9673% latest-1000-step relative error is achieved by UFP4 versus 1.2570% for the E2M1 reference on Dense 1.5B.The corresponding UFP4 versus E2M1 values are 1.8469% versus 2.3596% on MoE 7.9B and 1.3863% versus 1.7308% on MoE 124B.
- Q3: Long-run training and scaling: Across the measured scaling range and fitted extrapolation, the E1M2 curve remains below the E2M1 reference, while a residual gap to BF16 remains.The fitted FP4-to-BF16 gap decreases with compute, indicating that the FP4 penalty does not grow over the scaling sweep.
- Q4: Recipe ablations: Full RHT reduces loss by 0.01123 relative to no RHT, and stochastic rounding on dY adds another 0.00456 reduction on Dense 1.5B E1M2 training.The ablation trains beyond 100B tokens; bwd_dw-only RHT reduces loss by 0.00481, fwd_y+bwd_dw by 0.00644, and bwd_dx+bwd_dw by 0.00290.
- Q4: Recipe ablations: All tested range-restricted E2M1 variants underperform the E2M1 reference, making range restriction an unsatisfactory substitute for native E1M2/INT4 support.The tested full-RHT variant with max_fpx = 2.0 retains only {0, 0.5, 1.0, 1.5, 2.0} and sacrifices dynamic range and bucket utilization.
6 Related Work
Related work improves FP4 training through format and scaling design, quantizer-side estimators, or tensor-side preprocessing. The paper argues that tensor preprocessing can remain limited by Shrinkage Bias when quantization uses non-uniform E2M1 grids.
- FP4 formats, block scaling, and scale hierarchy: FP4 training work refines data formats, block sizes, and scale hierarchies to improve quantization quality and E2M1 training accuracy.MXFP4 and NVFP4 use fine-grained block scaling; NVFP4 additionally uses smaller blocks and a two-level scale hierarchy.
- Quantizer-side and training-aware methods: Quantizer-side methods improve FP4 stability through differentiable estimation, outlier clamping or compensation, unbiased gradient estimation, and format-aware adaptive rounding.The cited approaches include Microsoft FP4, Quartet II, and FAAR.
- Tensor-side preprocessing: Tensor-side preprocessing disperses outlier energy or reduces low-bit error before quantization through rotations, tensor decompositions, outlier-channel separation, and smoothing.Rotation-based methods include RHT, QuaRot, SpinQuant, and FlatQuant.
- Tensor-side preprocessing: Post-RHT tensors may still suffer Shrinkage Bias under non-uniform E2M1 because the limitation is imposed by the format grid itself.The paper proposes that E1M2/INT4-style uniform formats may better translate tensor-side preprocessing into quantization benefits.
7 Conclusion
The conclusion attributes E2M1-based FP4 training limitations to RHT-exposed Shrinkage Bias from asymmetric bins and presents UFP4 as a uniform-grid alternative. It recommends supporting E1M2/INT4-style grids as first-class FP4 training formats while retaining E2M1 for range-limited workloads.
- Conclusion: RHT shifts FP4 quantization from dynamic-range-limited to local-resolution-limited, exposing Shrinkage Bias from E2M1’s asymmetric RTNE bins.The format-dependent effect appears in tensor and GEMM diagnostics and persists during long-run dense and MoE training.
- Conclusion: UFP4 uses an E1M2/INT4-style uniform grid, applies RHT to all three training GEMMs, and restricts stochastic rounding to dY.This recipe consistently reduces BF16-relative FP4 loss degradation.
- Conclusion: E2M1 should remain available for range-limited workloads but should not be the only first-class FP4 training format.Future accelerators should support E1M2/INT4-style uniform 4-bit data elements for post-RHT numerical stability and native 4-bit matrix throughput.
Appendix · A RHT-Induced SQNR Changes in Tensors and GEMM Outputs
The appendix aggregates RHT-induced SQNR changes across MLP and attention tensors and GEMM outputs. It finds that E1M2 benefits rotation-sensitive paths, while E2M1 degradation is concentrated there rather than reflecting a blanket failure of RHT.
- Appendix: The appendix evaluates ΔSQNR across MLP and attention layer families for single-tensor quantization and single-GEMM outputs.The diagnostic aggregates layerwise traces across both tensor and GEMM-output settings.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: E1M2 produces large gains on rotation-sensitive tensors such as linear_fc2/fwd_x and remains near-neutral on well-behaved tensors such as linear_fc1/fwd_x.The pattern indicates that RHT effects depend on the FP4 format and tensor characteristics.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: E2M1 often loses SQNR on rotation-sensitive tensors, where RHT makes local resolution more important than excess dynamic range.This behavior is identified as the empirical signature expected from the shrinkage-bias mechanism.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: The format-ranking inversion also appears in several GEMM outputs and extends to attention modules.Thus, the tensor-level contrast between E1M2 and E2M1 recurs in output quantization across module families.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: E2M1 is not uniformly harmed by RHT, since some FPROP outputs, including linear_fc1 and linear_qkv, show small SQNR gains.The appendix distinguishes these gains from degradation on rotation-sensitive paths.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: E2M1 degradation concentrates on rotation-sensitive paths, including linear_fc2 FPROP (fwd_y) and attention backward GEMMs.By contrast, E1M2 yields positive ΔSQNR on the main rotation-sensitive paths.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: Positive ΔSQNR from E1M2 on the main rotation-sensitive paths supports full-RHT coverage in UFP4.The appendix links these SQNR outcomes to the recipe’s use of RHT coverage.
- A RHT-Induced SQNR Changes in Tensors and GEMM Outputs: Figure 12 averages RHT-induced ΔSQNR over 23 layers, with positive and negative values denoting SQNR gain and loss.The figure reports mean changes after RHT for tensor quantization and GEMM outputs.
B Controlled E2M1 Reference Selection
The E2M1 reference is selected through controlled one-factor ablations on Dense 1.5B, with the best settings frozen for subsequent experiments. The resulting recipe uses WGRAD-only RHT and dY-only stochastic rounding.
- Reference selection: Controlled one-factor ablations train Dense 1.5B for 200B tokens and select each setting by average LM loss over the final 1,000-step window.Data, architecture, optimizer, learning-rate schedule, and non-ablated recipe settings remain identical across candidates.
- Reference selection: The selected E2M1 configuration applies RHT only to WGRAD (bwd_dw) and stochastic rounding only to dY.This configuration is frozen for long-run, scaling, and component experiments.
- RHT scope: Under E2M1, FPROP RHT (fwd_y) is harmful, while DGRAD RHT (bwd_dx) becomes detrimental later in training.DGRAD RHT is initially neutral but yields higher LM loss at later training stages.
- Stochastic rounding: Adding stochastic rounding to XWGRAD and WDGRAD slightly increases LM loss relative to dY-only SR in the E2M1 setting.The selected dY-only SR configuration achieves the lowest LM loss among the tested stochastic-rounding choices.
C Exponential Approximation of Multiplicative Accumulation
The section derives an exponential approximation for cumulative multiplicative loss by taking logarithms and expanding for small per-GEMM losses. It shows that consistently positive losses accumulate in the exponent and can cause visible long-path decay.
- Derivation: Per-GEMM multiplicative loss is defined as δ_k = 1 − η_k, with cumulative loss represented by a product of per-GEMM factors.The cumulative multiplicative factor is introduced before the logarithmic derivation.
- Derivation: Taking logarithms of the cumulative product and applying a Taylor expansion for small per-GEMM loss yields an exponential approximation.The approximation follows by substituting the logarithmic expansion into the cumulative expression.
- Implication: Even small per-GEMM multiplicative losses add in the exponent, so weak but consistently positive δ_k can produce visible cumulative decay over long computation paths.The conclusion concerns accumulation across long computation paths rather than a single GEMM.