Vector quantization via random projection followed by scalar quantization is a fundamental primitive in machine learning, with applications ranging from similarity search to federated learning and KV cache compression. While dense random rotations yield clean theoretical guarantees, they require $Θ(d^2)$ time. The randomized Hadamard transform $HD$ reduces this cost to $O(d \log d)$, but its discrete structure complicates analysis and leads to weaker or purely empirical compression guarantees. In this work, we study a variant of this approach: dithered quantization with a single randomized Hadamard transform. Specifically, the quantizer applies $HD$ to the input vector and subtracts a random scalar offset before quantizing, injecting additional randomness at negligible cost. We prove that this approach is unbiased and provides mean squared error bounds that asymptotically match those achievable with truly random rotation matrices. In particular, we prove that a dithered version of TurboQuant achieves mean squared error $\bigl(π\sqrt{3}/2 + o(1)\bigr) \cdot 4^{-b}$ at $b$ bits per coordinate, where the $o(1)$ term vanishes uniformly over all unit vectors and all dimensions as the number of quantization levels grows.
翻译:基于随机投影后接标量量化的向量量化是机器学习中的基本原语,其应用涵盖相似性搜索、联邦学习和KV缓存压缩。虽然稠密随机旋转具有清晰的理论保证,但需要 $Θ(d^2)$ 的计算时间。随机化哈达玛变换 $HD$ 可将该开销降至 $O(d \log d)$,但其离散结构导致分析复杂化,并产生较弱的或纯经验的压缩保证。本研究探讨该方法的变体:基于单次随机化哈达玛变换的抖动量化。具体地,量化器对输入向量应用 $HD$ 变换后,在量化前减去随机标量偏移量,从而以极小代价注入额外随机性。我们证明该方法无偏,且其均方误差界渐近匹配真正随机旋转矩阵所能达到的界。特别地,我们证明TurboQuant的抖动版本在每坐标$b$比特时,均方误差为 $\bigl(π\sqrt{3}/2 + o(1)\bigr) \cdot 4^{-b}$,其中当量化级数增大时,$o(1)$项在所有单位向量和所有维度上一致消失。