arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01459cs.CVcs.AIcs.LG
收藏

通过分布外检测视角理解视觉变换器的鲁棒性

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

Vision and Image Processing Research Group, Department of Systems Design Engineering University of Waterloo(图像与图像处理研究组,系统设计工程系,滑铁卢大学)

Joey Kuang, Alexander Wong

AI总结:

研究通过分析不同视觉变换器在分布外检测中的表现,发现大规模预训练可能降低低比特量化鲁棒性,数据增强更具优势。

摘要:

视觉变换器在视觉任务中表现出显著的性能,但使它们具备可访问性和实时使用仍具挑战性。量化会降低内存和推理成本,但会带来性能损失。为缓解低精度问题,主要通过理解分布内(ID)任务行为进行了改进,但注意力机制可能通过探索分布外(OOD)情况提供对量化属性的见解。我们研究了量化的小变体流行视觉变换器(DeiT、DeiT3和ViT)在常见OOD数据集上的行为。ID分析显示,4位模型在初始阶段存在不稳定性,特别是那些在更大ImageNet-22k上训练的模型,作为最强的FP32模型DeiT3在量化误差中骤降17%,成为最弱的4位模型之一。虽然ViT在ID校准中表现出合理的量化鲁棒性,但OOD检测揭示了更多:ViT和DeiT3在ImageNet-22k上预训练的模型在AUPR-out之间从全精度到4位的平均量化delta分别为15.0%和19.2%,而它们在ImageNet-1k-only上的对应模型则分别为9.5%和12.0%。总体而言,我们的结果表明在大规模数据集上预训练可能阻碍低比特量化鲁棒性在OOD检测中的表现,而数据增强可能是一个更有益的选择。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑