arXiv:2602.01459cs.CVcs.AI2026-02中稿 · JCVIS 2025

研究视觉模型在低精度下的鲁棒性,发现大模型预训练反而更脆弱。

Understanding vision transformer robustness through the lens of out-of-distribution detection

  • 通过分析分布外检测表现,揭示量化对模型的影响机制。
  • 4比特量化使大模型在分布外检测上性能下降15%-19%,远超小模型。
  • 建议用数据增强替代扩大预训练数据来提升量化鲁棒性。

视觉变换器在视觉任务中表现优异,但实现高效实时部署仍具挑战。量化可降低内存与推理开销,但可能导致性能下降。现有研究多关注分布内(ID)任务表现,而本文通过探索分布外(OOD)场景,揭示注意力机制对量化属性的洞察。我们评估了小型主流视觉变换器(DeiT、DeiT3 和 ViT)在常见 OOD 数据集上的表现。ID 分析显示,4比特模型初始不稳定,尤其是基于 ImageNet-22k 训练的模型——最强的全精度模型 DeiT3 在量化后性能骤降 17%,成为最弱的 4 比特模型。尽管 ViT 在 ID 校准上表现出良好量化鲁棒性,但在 OOD 检测中却暴露问题:在图像规模为 22k 的预训练模型中,其在 4 比特下平均 AUPR-out 损失达 15.0% 和 19.2%,而仅在 ImageNet-1k 上预训练的版本损失分别为 9.5% 和 12.0%。结果表明,大规模预训练可能削弱低比特量化在分布外检测中的鲁棒性,数据增强或为更优方案。

原文摘要 · Abstract (English)

Vision transformers have shown remarkable performance in vision tasks, but enabling them for accessible and real-time use is still challenging. Quantization reduces memory and inference costs at the risk of performance loss. Strides have been made to mitigate low precision issues mainly by understanding in-distribution (ID) task behaviour, but the attention mechanism may provide insight on quantization attributes by exploring out-of-distribution (OOD) situations. We investigate the behaviour of quantized small-variant popular vision transformers (DeiT, DeiT3, and ViT) on common OOD datasets. ID analyses show the initial instabilities of 4-bit models, particularly of those trained on the larger ImageNet-22k, as the strongest FP32 model, DeiT3, sharply drop 17% from quantization error to be one of the weakest 4-bit models. While ViT shows reasonable quantization robustness for ID calibration, OOD detection reveals more: ViT and DeiT3 pretrained on ImageNet-22k respectively experienced a 15.0% and 19.2% average quantization delta in AUPR-out between full precision to 4-bit while their ImageNet-1k-only counterparts experienced a 9.5% and 12.0% delta. Overall, our results suggest pretraining on large scale datasets may hinder low-bit quantization robustness in OOD detection and that data augmentation may be a more beneficial option.

视觉变换器量化分布外检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。