NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DFRot: Achieving Outlier-Free and Massive Activation-Free for Rotated LLMs with Refined Rotation

Jingyang Xiang, Sai Qian Zhang

TL;DR

DFRot identifies that the performance gap in rotated LLM quantization stems from rare "massive activation" tokens that standard orthogonal transforms fail to handle. By introducing a weighted loss function and an efficient alternating optimization strategy based on the Orthogonal Procrustes problem, DFRot achieves significant perplexity improvements for 4-bit (W4A4) models like LLaMA3-70B with minimal computational overhead.

What Problem Does This Paper Address?

Deploying Large Language Models (LLMs) on edge devices requires aggressive compression, typically through Post-Training Quantization (PTQ). However, quantizing activations to 4-bits (W4A4) is notoriously difficult because LLM activations contain extreme outliers—values in specific channels that are orders of magnitude larger than others.

Recent techniques like QuaRot use "rotational invariance" to spread this outlier energy across all channels, making the distribution easier to quantize. A lingering mystery in this field was why Randomized Hadamard transforms (RH) consistently outperformed Randomized Orthogonal transforms (RO). Furthermore, even with rotation, "massive activations"—rare tokens with exceptionally high magnitudes—remained a primary source of accuracy degradation in low-precision models.

Methods

The authors propose DFRot (Dual Free Rotation), a method designed to be both "Outlier-Free" and "Massive Activation-Free." Their approach consists of two main components:

  1. Weighted Long-Tail Optimization: The authors treat massive activations as a long-tail distribution problem. They introduce a weighted loss function that prioritizes reducing quantization error for these rare but critical tokens: $$\mathcal{L}(R_1, g_x) = \mathbb{E}_{x \in X^{cal} \setminus X^m} [\|xR_1 - Q(xR_1, g_x)\|_2^2] + \gamma^2 \mathbb{E}_{x \in X^m} [\|xR_1 - Q(xR_1, g_x)\|_2^2]$$ Here, $X^m$ represents the set of tokens with massive activations, and $\gamma$ is a weighting hyperparameter.

  2. Refined Rotation via Orthogonal Procrustes: Instead of expensive backpropagation, DFRot uses an alternating optimization strategy. It fixes the quantization parameters to solve for the rotation matrix, and vice versa. The rotation update is formulated as an Orthogonal Procrustes problem, which has a closed-form solution via Singular Value Decomposition (SVD): $$R_1 = UV^T, \text{ where } U, \Sigma, V^T = \text{SVD}(X^T Q(X, g_x))$$ This allows for rapid refinement of the rotation matrix $R_1$ (illustrated in the architecture below) using just a single calibration sample.

An illustration of rotational invariance in the LLaMA architecture. The rotation matrix R1 can be integrated into the residual connection and weights.

Datasets

  • Calibration: A single sample of 2048 tokens from the WikiText-2 training set is used to optimize the rotation matrix. For weight quantization (GPTQ), 128 samples are used.
  • Evaluation:
    • Language Generation: WikiText-2 (Perplexity).
  • Zero-Shot Reasoning: BoolQ, PIQA, WinoGrande, OpenBookQA, SIQA, HellaSwag, ARC-e, ARC-c, and LAMBADA.
  • Knowledge Benchmarks: MMLU.

Key Insights and Ideas

  • The "Why" of Hadamard: The authors discovered that for common tokens, RO and RH perform similarly. The difference lies entirely in massive activations: RO actually increases quantization error for these tokens, while RH manages to maintain or slightly reduce it.
  • Massive Activations are Critical: By simply keeping the top 0.1% of tokens (massive activations) in FP16, the performance gap between RO and RH completely disappears. This proves that these rare tokens are the primary bottleneck.
  • Efficiency: Because the rotation refinement relies on SVD rather than gradient descent through the whole model, it is extremely fast. Tuning a 70B model takes less than 90 minutes on a single A100 GPU.
Figure 2: Comparison of 4-bit activation quantization error E(·) for each token with NR, RO and RH for (a) LLaMA-7B, (b) LLaMA2-7B, (c) LLaMA2-13B and (d) LLaMA3-8B. The tokens are from model.layers.6.post attention layernorm. Best viewed in color.

Key Results

DFRot consistently outperforms the previous state-of-the-art (QuaRot) across various LLaMA models:

  • LLaMA3-70B: Achieved a perplexity improvement of 0.98 on W4A4KV4 and 0.95 on W4A4KV16.
  • LLaMA3-8B: Showed a 1.56% average accuracy improvement across nine zero-shot tasks compared to QuaRot.
  • Visual Impact: As shown in Figure 3, DFRot significantly collapses the quantization error for massive activations compared to both RO and RH baselines.
Figure 3: Comparison of 2D 4-bit quantization errors for tokens with NR, RO, RH and DFRot for LLaMA3-8B from Figure 2.

Limitations and Future Work

  • Local Minima: Due to the discontinuous nature of the quantization function, the alternating optimization can occasionally get stuck in local minima.
  • Initialization Sensitivity: The final performance still depends on the starting point; initializing with a Hadamard matrix (RH) yields better results than a random orthogonal matrix (RO).
  • Future Directions: The authors suggest exploring more robust quantization algorithms specifically tailored for downstream tasks where perplexity might not be the perfect proxy for performance.

Summary updated

BibTeX
@inproceedings{xiang2025dfrot,
  author = {Jingyang Xiang and Sai Qian Zhang},
  title = {{DFRot: Achieving Outlier-Free and Massive Activation-Free for Rotated LLMs with Refined Rotation}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=WzGypILLDb},
}
Figure