TL;DR
Shrinking Vision Transformers (ViTs) down to ultra-low bit precision (like 3-bit) usually crashes their accuracy because standard compression tricks ignore how rounding errors ripple across interconnected features. This paper introduces GPFA-Q, a clever mathematical sidestep that captures these complex cross-feature interactions without building or inverting massive, numerically unstable matrices. The result is faster, rock-solid quantization that sets a new state-of-the-art for low-bit ViTs.
What Problem Does This Paper Address?
Vision Transformers are brilliant at understanding images, but they are memory hogs. To squeeze them onto edge devices without expensive retraining, engineers use Post-Training Quantization (PTQ)—converting 32-bit floating-point numbers into compact 3- or 4-bit integers using just a tiny calibration set of unlabeled images.
To prevent accuracy from cratering, state-of-the-art PTQ methods adjust weights block-by-block so the quantized block's output mimics the original. To know which output errors actually hurt final task performance, they measure the loss landscape's curvature using an approximation of the Fisher Information Matrix (FIM).
Here’s the catch: the exact FIM is way too big to compute. Standard methods cheat by only looking at the matrix's main diagonal—assuming rounding errors in different channels and tokens act independently. That works fine at 8-bit, where errors are tiny random noise. At 3-bit, however, ViT self-attention causes quantization errors to correlate heavily across dimensions, meaning those ignored off-diagonal interactions suddenly dominate. Recent methods (like FIMA-Q) tried recovering off-diagonal terms using low-rank approximations, but this requires inverting matrices that become nearly singular during optimization, leading to severe numerical instability.
Methods
Instead of building an approximate curvature matrix and praying its inverse doesn't blow up, the authors propose GPFA-Q (Gradient-Projected Fisher Approximation for Quantization), built on two core innovations alongside a standard diagonal baseline:
- Gradient-Projected Reconstruction (GPR): Rather than explicitly constructing the $D \times D$ Fisher matrix $\mathbf{F}$ to compute the error penalty ($\Delta \mathbf{z}^\top \mathbf{F} \Delta \mathbf{z}$), the authors rearrange the algebra. Because $\mathbf{F}$ is just the average outer product of task-loss gradients, multiplying an error vector by $\mathbf{F}$ is mathematically identical to taking the dot product of the error vector with individual task-loss gradients ($\mathbf{g}^\top \Delta \mathbf{z}$) and squaring the result. By projecting block quantization errors onto a small subset of just $\alpha = 32$ sampled gradients, GPR implicitly captures rich cross-dimensional (off-diagonal) interactions with zero matrix inversions.
- Soft Grid Rounding (SGR): Standard block reconstruction optimizes smooth, continuous "soft" weights to keep gradients flowing, creating a mismatch when weights are snapped to hard discrete integers at test time. SGR bridges this gap using a Straight-Through Estimator trick: it evaluates the forward-pass GPR loss on hard-rounded discrete outputs while backpropagating gradients through the soft representations, gradually ramping up this penalty during optimization.
Datasets
No new benchmarks are introduced. Following standard PTQ protocols, the authors evaluate using small unlabeled calibration sets:
- ImageNet: 1,024 randomly sampled unlabeled images for calibration, evaluating image classification across ViT, DeiT, and Swin Transformer backbones.
- COCO: 256 randomly sampled unlabeled images for calibration, evaluating object detection and instance segmentation (using Mask R-CNN and Cascade Mask R-CNN with Swin backbones, detailed in the appendix).
Key Insights and Ideas
- Why 3-bit breaks the diagonal assumption: At 8-bit, quantization steps are tiny and errors across dimensions cancel out. At 3-bit, the authors show the ratio of off-diagonal error covariance to diagonal variance explodes (by roughly 8x to 19x across models), proving cross-dimensional interactions cannot be ignored at ultra-low precision.
- Optimization causes matrix-inversion traps: In prior low-rank methods, as reconstruction succeeds and quantization errors shrink, successive error vectors align in the same direction. This collinearity causes the condition number of the matrix being inverted to skyrocket—meaning the better the optimization goes, the less numerically stable the curvature estimate becomes!
- A tiny subspace is enough: You don't need thousands of samples to map sensitive directions. Projecting errors onto just 32 sampled gradients captures the dominant task-sensitive directions; scaling up to 1,024 gradients increases runtime without meaningfully improving accuracy.
Key Results
GPFA-Q consistently outperforms existing PTQ methods across all tested ViT architectures, with the largest gains appearing in the challenging 3-bit weight / 3-bit activation (W3A3) regime on ImageNet:
- Consistent 3-bit SOTA: GPFA-Q beats the strongest baseline (FIMA-Q) across the board—boosting DeiT-Tiny from 55.81% to 56.92%, ViT-Small from 63.17% to 64.68%, Swin-Small from 76.68% to 77.74%, and Swin-Base from 78.75% to 79.77%.
- Massive jump over diagonal baselines: Adding GPR alone lifts 3-bit ViT-Small accuracy from 44.26% (diagonal baseline) to 63.99%, with SGR pushing it to 64.68%.
- 4-bit preservation: Under W4A4, GPFA-Q retains near full-precision accuracy (e.g., 83.81% on Swin-Base vs. 85.27% full-precision).
- Competitive speed: On a single RTX 4090 GPU, GPFA-Q finishes reconstructing DeiT-Small in 50 minutes—faster than FIMA-Q (55 min) and APHQ-ViT (60 min) while delivering superior accuracy.
Limitations and Future Work
- Simulated ("Fake") Quantization: Like most academic PTQ frameworks, GPFA-Q simulates quantization in floating-point rather than executing pure integer arithmetic on hardware, which can leave a small discrepancy during real-world deployment.
- Architecture Scope: The study focuses strictly on ViT-style backbones for standard vision tasks. Testing whether gradient-projected curvature scales effectively to non-ViT architectures and massive multimodal Vision-Language Models (VLMs) is left for future work.
Summary updated