HaRP-ViT: Hadamard Rotation for Low-Bit Vision Transformer Post-Training Quantization
2026 11th International Conference on Computer Science and Engineering, UBMK 2026, İstanbul, Türkiye, 16 - 18 Eylül 2026, ss.770-775, (Tam Metin Bildiri)
- Yayın Türü: Bildiri / Tam Metin Bildiri
- Doi Numarası: 10.1109/ubmk71847.2026.11745287
- Basıldığı Şehir: İstanbul
- Basıldığı Ülke: Türkiye
- Sayfa Sayıları: ss.770-775
- Anahtar Kelimeler: Hadamard rotation, low-bit quantization, model compression, post-training quantization, Vision transformer
- Ankara Yıldırım Beyazıt Üniversitesi Adresli: Evet
Özet
Vision Transformers (ViTs) demonstrate state-of-the-art performance on computer vision tasks such as image classification, object detection and semantic segmentation. However, their large number of parameters and high memory requirements make them difficult to deploy on edge devices. Post-training quantization (PTQ) addresses this issue by efficiently compressing pretrained models using only a small set of calibration images, without retraining. While PTQ performs well on ViTs at higher bit-widths, low-bit quantization remains challenging. In this work, we investigate a calibration-only baseline to identify the dominant source of residual quantization error. Through a component-wise sensitivity analysis on RepQ-ViT, we find that post-GELU activations exhibit the highest sensitivity at W4A4 across both DeiT and ViT model variants. Our experiments show that restoring this component to 8-bit precision yields more than twice the top-1 accuracy recovery obtained by restoring any other component. Motivated by this finding, we propose HaRP-ViT (Hadamard Rotation for Post-Training Quantization of Vision Transformers), a training-free randomized Hadamard transform applied exclusively after the GELU activation. This output-preserving rotation spreads channel-wise outliers, making the post-GELU tensor better suited to standard per-tensor uniform quantization. Experiments on five ViT/DeiT models evaluated on ImageNet-1k, averaged over five runs with different calibration samples, show that HaRP-ViT improves the W4A4 RepQ-ViT baseline by approximately 2.5 to 6.7 percentage points in top-1 accuracy.