Manuscript Offprint

arXiv:2608.13365

When Local Variance Optimality Is Not Enough: RoPE-Aligned Q/K Rotations for Dynamic 4-Bit Quantisation

Shuhan Wang, Yilin Luo, Nan Xu, Chi Wang Cheung

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Rotation-based post-training quantisation commonly applies an orthogonal transform across an entire attention head to reduce outlier-induced error. RoPE instead partitions each head into two-dimensional frequency pairs, raising a specific design question: can a transform that respects this decomposition improve on full-head mixing? Prior work has established the per-pair rotations that commute with RoPE. We state the converse result that, for distinct frequencies, no other single-head orthogonal map commutes with RoPE. For the head-shared parameterisation used in our experiments, we then derive the rotation angle that minimises the larger channel variance under a pooled-covariance, position-averaged surrogate and verify that the implementation attains its analytic minimum.

The evaluated head-shared pairwise configuration does not improve accuracy in the tested dynamic W4A4KV4 setting. Across four checkpoints, replacing the full-head Hadamard with this configuration increases perplexity at both short and long context lengths. Composing the pairwise rotation with the Hadamard satisfies the selected ±0.05\pm 0.05-PPL interval criterion under the default estimator. Estimating the shared angle from K alone improves pairwise-only on every checkpoint without eliminating its gap relative to full-head mixing. The analytic objective controls a position-averaged second moment of a covariance reconstructed from concatenated calibration observations, whereas the dynamic quantiser determines its step from a tokenwise group range. The pairwise transform also provides only two-channel support for redistributing a peak. Along a controlled interpolation from two-channel to full-head mixing, K range, relative quantisation error, and perplexity degradation decrease as support increases. These results show that optimality for a structured surrogate need not reduce quantisation error when the surrogate and mixing support are misaligned with the quantiser’s scale-setting statistic.

1 Introduction

Low-bit post-training quantisation depends strongly on how activation outliers are presented to the quantiser (Dettmers et al., 2022). Rotation-based methods insert orthogonal transforms that redistribute activation energy while preserving the unquantised network function (Ashkboos et al., 2024b; Liu et al., 2025; Shao et al., 2025). These methods build on weight-side incoherence and transformer invariance results (Chee et al., 2023; Tseng et al., 2024; Ashkboos et al., 2024a); §8 reviews this development. For the online transform R3R_{3} applied to post-RoPE queries and keys, the relevant design choice is the mixing support: should the transform mix all channels in an attention head, or only the two channels in each RoPE frequency pair? We study this question under dynamic W4A4KV4 quantisation.

RoPE (Su et al., 2024) provides a natural motivation for pairwise mixing because it partitions every head into fixed two-dimensional subspaces. A rotation within these subspaces respects the frequency-pair decomposition and can be commuted through RoPE. Applying the same post-RoPE orthogonal map to Q and K already preserves their inner products, so commutativity is a structural constraint rather than a correctness requirement. We test whether imposing this constraint improves quantisation accuracy.

For a single head with distinct RoPE frequencies, the commuting orthogonal maps are exactly the independent planar rotations within the frequency pairs. FPTQuant (van Breugel et al., 2025) previously used this family by folding the transform into WQW_{Q} and WKW_{K}; our theoretical contribution is the converse characterisation that excludes other single-head commuting orthogonal maps. The evaluated implementation further restricts the family by sharing one angle for each layer and frequency pair across attention heads. For this head-shared parameterisation, we derive the closed-form angle ϕk∗\phi_{k}^{\ast} that minimises the larger channel variance under a pooled-covariance, position-averaged surrogate. On Llama-3.2-3B, the implementation uses the checkpoint’s deployed RoPE frequencies and attains the analytic minimum of that surrogate. This construction distinguishes failure to optimise the stated local objective from failure of the optimised surrogate to improve quantisation accuracy.

The experiments exhibit the second outcome. Across the evaluated Llama and Mistral checkpoints, replacing the full-head Hadamard with the head-shared pairwise configuration increases perplexity in every short-context comparison. The same ordering holds at every evaluated long-context point, including 128K where available. Composing the pairwise rotation with the Hadamard satisfies the selected interval criterion under the default estimator. These observations establish that the optimised local surrogate does not provide the range reduction achieved by full-head mixing in the evaluated setting.

We examine two factors associated with this discrepancy. First, the default angle estimator pools Q and K calibration statistics even though K is the only stream quantised after R3R_{3}. Estimating the shared angle from K alone improves the pairwise-only configuration on all four checkpoints, although its perplexity remains higher than that of the full-head Hadamard. Second, the analytic surrogate and the quantiser operate on different statistics: the closed-form rotation minimises a position-averaged second moment within each pair, while the dynamic INT4 quantiser determines its step from a tokenwise range over a larger group. Pairwise rotations also have two-channel mixing support. In an interpolation that expands block-Hadamard support from one pair to a full head, K range, relative quantisation error, and perplexity degradation decrease with support size.

These findings support three contributions.

References (51)