GLF-Q: Global-Local Feature-based Quantization for Vision Transformers

Peilin Sun, Guang Liang, Jin Tong, Jianxin WuarXiv 2026

TL;DR

GLF-Q is a new post-training quantization (PTQ) framework that enables Vision Transformers (ViTs) to maintain high accuracy even at ultra-low 3-bit and 4-bit widths. By aligning features through the downstream full-precision network and using offline Hadamard transforms to "tame" activation outliers, it achieves state-of-the-art results with significantly faster convergence and better hardware efficiency than existing methods.

What Problem Does This Paper Address?

Vision Transformers (ViTs) are powerful but computationally heavy, making them difficult to deploy on edge devices. Quantization—converting weights and activations to low-bit integers—is the standard solution, but it usually comes in two flavors: Quantization-Aware Training (QAT), which is expensive and requires full datasets, and Post-Training Quantization (PTQ), which is fast but often fails at low bit-widths (like 3-bit).

Existing PTQ methods for ViTs typically rely on "block-wise reconstruction." They try to optimize a quantized block to mimic a full-precision one using either:

  1. Logit supervision: Matching the final output of the model, which often leads to overfitting on the small calibration dataset.
  2. Hessian proxies: Using second-order mathematical approximations to weight errors. These approximations are complex to compute and often become inaccurate when quantization noise is high (i.e., at low bit-widths).

Furthermore, ViTs suffer from extreme "activation outliers"—specific channels with massive values—that make standard uniform quantization very inefficient.

Methods

The authors introduce GLF-Q, which stands for Global-Local Feature-based Quantization. The framework consists of three main pillars:

  • Global-Local Feature (GLF) Loss: Instead of approximating the Hessian, GLF-Q propagates the output of a quantized block through the remaining full-precision downstream layers of the model. It then aligns the resulting penultimate-layer features with those of the original teacher model. This provides "global" guidance without the structural errors of Hessian approximations. A "local" MSE term is added to ensure the block's output doesn't drift too far.
  • Offline Hadamard Transformations: To handle activation outliers, the authors apply a randomized Hadamard transform. This mathematical rotation spreads the energy of outlier channels across all dimensions, making the distribution much easier to quantize. Crucially, these transformations are fused into the weights offline, meaning they add zero runtime overhead.
  • Efficient Optimization via STE: Unlike previous methods that use complex "AdaRound" formulations requiring 20,000 iterations, GLF-Q uses a simple Straight-Through Estimator (STE). This allows the model to converge in just 3,000 iterations, making the quantization process much faster.
Figure 1: Overview of the proposed GLF-Q framework. (a) Global-local feature reconstruction. For block l, the quantized block output ˆyl is propagated through the frozen downstream full-precision network Fl to match the precomputed full-precision reference feature f, under local reconstruction regularization. Gradients are backpropagated directly to update the quantized block via STE. (b) Offline Hadamard transformation. Orthogonal transformations are fused offline into adjacent linear weights to suppress activation outliers and balance channel distributions with zero runtime overhead.

Datasets

The researchers evaluated GLF-Q across several standard benchmarks:

  • ImageNet-1K: For image classification across various architectures (ViT, DeiT, Swin).
  • COCO: For object detection and instance segmentation using Mask R-CNN and Cascade Mask R-CNN.
  • SUN397: Used specifically to test out-of-domain calibration robustness (e.g., calibrating on one type of data and testing on another).

Key Insights and Ideas

  • The Downstream Network is the Best Evaluator: The core "aha moment" is that we don't need to guess how a block's error affects the final output using math (Hessians). We can just run the data through the rest of the frozen model to see the actual impact.
  • Penultimate Features > Logits: Supervising at the penultimate layer (just before the final classification head) provides a richer signal that is less prone to the overfitting seen in logit-based methods.
  • Outlier Dispersion: The Hadamard transform effectively "flattens" the spiky activation distributions of ViTs. This allows standard uniform quantizers—which are very hardware-friendly—to perform as well as or better than specialized, complex non-uniform quantizers.

Key Results

GLF-Q sets new benchmarks for ViT quantization:

  • 3-bit Superiority: On ImageNet, GLF-Q achieves 67.40% top-1 accuracy on ViT-S, outperforming the previous state-of-the-art (LS-ViT) by 3.3%.
  • Training Speed: It is 2.0x to 2.6x faster to train than FIMA-Q, thanks to the STE optimization.
  • Inference Speedup: In 8-bit GPU deployment (TensorRT), GLF-Q reduces latency by 15% on average. This is partly because GLF-Q replaces complex GELU activations with simpler ReLUs during the reconstruction process.
  • Robustness: When calibrated on the out-of-domain SUN397 dataset, GLF-Q maintained significantly higher accuracy than competitors, proving it doesn't just "memorize" the calibration images.
Table 1: Top-1 accuracy comparison across representative Vision Transformers on ImageNet. “*” denotes results reimplemented using the FIMA-Q framework, as QDrop and PD-Quant were orig- inally designed for CNNs. “Opt.” indicates whether a PTQ method is optimization-based (✓) or calibration-only (×). “Spec.” indicates reliance on a specialized non-uniform quantizer (✓) versus a standard uniform quantizer (×). The best results within each bit-width setting are highlighted in boldface.

Limitations and Future Work

While GLF-Q is highly effective, the authors note a few areas for further exploration:

  • Activation Replacement: The method involves replacing GELU with ReLU to expand the dynamic range. While they reconstruct the MLP to compensate for this, it is a structural change to the model.
  • Uniform Quantization Focus: The paper focuses on standard uniform quantizers for hardware friendliness. While they beat methods using specialized quantizers, combining GLF-Q with non-uniform quantization might push accuracy even higher for specific hardware targets.
  • Scaling: Future work could investigate how these global-local alignments scale to even larger models like ViT-Huge or multi-modal transformers.

Summary updated

BibTeX
@misc{sun2026glf,
  author = {Peilin Sun and Guang Liang and Jin Tong and Jianxin Wu},
  title = {{GLF-Q: Global-Local Feature-based Quantization for Vision Transformers}},
  year = {2026},
  eprint = {2609.34564},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.34564},
}
Figure