Optimal Scalar Quantization for Matrix Multiplication: Closed-Form Density and Phase Transition
Abstract
We study entrywise scalar quantization of two matrices prior to multiplication. Given A∈ Rm× k and B∈ Rk× n, we quantize entries of A and B independently using scalar quantizers with KX and KY levels per entry, and form C= A\, B. The objective is to minimize the matrix multiplication mean-squared error (MSE) E[\|AB- A B\|F2] under a pair-i.i.d.\ inner-product model. In the high-resolution regime KX,KY∞, we derive a sharp K-2 asymptotic expansion for E, identify the exact optimal leading constants, and characterize asymptotically optimal quantization center densities in terms of conditional second moments. We then specialize to correlated Gaussian multiplicative pairs, obtaining a closed-form optimal point density \[ λ(u)\ \ \!(-u26)((1-2)+2u2)1/3, u=xσX, \] with the same form for y/σY, and prove a correlation-driven phase transition: the density is unimodal at the origin for ||≤ 1/3 and becomes bimodal for ||>1/3 with peaks at upeak=3-1/2. We show our method's applicability in synthetic experiments such as matrix multiplication quantization and least squares optimization, as well as quantization of large language model key and query activations.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.