TL;DR
RegCache is a training-free, "plug-and-play" algorithm that solves the activation outlier problem in vision encoders, enabling high-performance 4-bit and 8-bit quantization. By prefixing "universal" register tokens and deleting residual outliers, it dramatically recovers accuracy in low-precision models (e.g., boosting CLIP 4-bit accuracy from near-zero to over 60%) with less than 1.5% latency overhead.
What Problem Does This Paper Address?
To deploy massive vision models like CLIP or DINOv2 on edge devices (phones, drones, or cameras), we need to make them smaller and faster. Post-Training Quantization (PTQ) is the standard tool for this, converting 32-bit floating-point weights and activations into 8-bit or 4-bit integers.
However, Vision Transformers (ViTs) suffer from activation outliers: a tiny fraction of "channels" in the model produce values that are orders of magnitude larger than the rest. When you quantize, these outliers force the "scale" of the integers to be so wide that the normal, informative data gets squashed into a tiny range, leading to massive accuracy drops.
While researchers have fixed this for Large Language Models (LLMs), vision encoders are trickier. In LLMs, outliers usually happen at specific, predictable tokens (like the first token). In vision encoders, outliers appear to emerge randomly in middle layers, making them much harder to "catch" and mitigate.
Methods
The authors introduce RegCache (Register Caching), which treats outliers as "attention sinks"—semantically meaningless tokens that the model uses to "dump" excessive attention scores.
The algorithm works in three training-free steps:
- Curating: The authors found that outlier tokens are surprisingly "universal" across different images. They identify the most "quantization-sensitive" layer and extract the top-performing "sink tokens" from a small pool of reference images.
- Caching: These universal sink tokens are averaged and pre-computed into a Key-Value (KV) cache. During inference, this "Register" is prefixed to the model's attention layers. This gives the model a dedicated place to dump its "excess" attention, preventing other informative tokens from becoming outliers.
- Deleting: Even with prefixing, some image patches might still become outliers. Since these are almost always uninformative background patches (like a blurry sky or a white wall), RegCache simply identifies and deletes the top-$k$ highest-norm tokens at inference time.
Datasets
The researchers evaluated RegCache across a wide variety of models and tasks:
- Models: CLIP, OpenCLIP, SigLIP, SigLIP2, and DINOv2.
- Classification: Zero-shot ImageNet-1k (and 7 other datasets like CIFAR-100 and Food-101 for generalizability).
- Retrieval: MS-COCO (image-to-text and text-to-image).
- Vision-Language Models (VLMs): Qwen3-VL (2B and 8B) and the LLaVA family, tested on benchmarks like GQA, VQAv2, and Video-MME.
Key Insights and Ideas
- The "Middle Layer" Mystery: Unlike LLMs, where outliers appear immediately, ViT outliers emerge in the middle layers. The authors hypothesize this is due to continuous tokenization. It takes the model a few layers to "figure out" which raw image patches are semantically useless background before it can turn them into attention sinks.
- Universality: Outlier tokens from one image are 89% similar to those from a completely different image. This "universality" is what allows a pre-computed cache to work for any input image at test time.
- Structural vs. Numerical: Most PTQ methods try to fix outliers by changing the math (rounding or scaling). RegCache fixes them by changing the structure of the data flow—giving the model a "trash can" (the register) for its numerical noise.
Key Results
- Massive Accuracy Recovery: In the extreme 4-bit (W4A4) regime, standard quantization often fails completely (e.g., 0.1% accuracy). RegCache combined with existing methods (like FIMA-Q) brings CLIP-B/16 back to 62.08% accuracy.
- VLM Boost: For the Qwen3-VL-2B model, RegCache improved VQAv2 scores by 10.69 points in a 4-bit setting.
- Negligible Overhead: Because the registers are pre-computed and the deletion process is simple, the latency increase is tiny—typically between 0.8% and 1.5%.
- Efficiency: In video pipelines, where the vision encoder can be 45% of the total latency, RegCache enables a 2.79x speedup by allowing stable 8-bit quantization of the encoder.
Limitations and Future Work
- Hyperparameter Tuning: Currently, the number of tokens to prefix ($\tau$) and delete ($\tilde{k}$) must be tuned heuristically for each specific model architecture and quantization bit-width.
- Heuristic Selection: The process of identifying the "quantization-sensitive" layer relies on a search process that, while fast (~1 hour on one GPU), is still a manual step.
- Continuous Tokenization Theory: While the paper provides strong evidence that continuous tokenization causes the "middle layer" outlier shift, a deeper theoretical understanding could lead to even better architectural designs for future vision models.
Summary updated