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

TTAQ:面向连续域自适应中稳定的训练后量化

TTAQ: Towards Stable Post-training Quantization in Continuous Domain Adaptation

Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Inspur Yunzhou Industrial Internet Co., Ltd.(浪潮云洲工业互联网有限公司)

Junrui Xiao, Zhikai Li, Lianwei Yang, Yiduo Mei, Qingyi Gu

AI总结:

针对传统训练后量化在动态域偏移场景下性能下降的问题,提出TTAQ方法,通过扰动误差缓解、一致性重构及自适应平衡损失,提升低位量化模型在持续变化测试域中的准确率。

摘要:

训练后量化(PTQ)通过在小型校准集上将全精度模型量化为低位表示来降低过高的硬件成本,且无需重新训练。尽管近期研究已取得显著进展,但传统PTQ方法在动态且不断变化的现实场景中通常会失效,这类场景涉及不可预测的数据流和持续的域偏移,带来了更大的挑战。本文提出了一种新颖且稳定的测试时自适应(TTA)量化流程,名为TTAQ,以解决传统PTQ在动态演化的测试域中的性能下降问题。为应对量化器中的域偏移,TTAQ提出了扰动误差缓解(PEM)和扰动一致性重构(PCR)。具体而言,PEM分析了误差传播,并设计了一种权重正则化方案以减轻输入扰动的影响。另一方面,PCR引入了一致性学习,以确保量化模型对同一样本提供稳定的预测。此外,我们引入了自适应平衡损失(ABL),利用类别的频率和复杂度调整logits,可有效解决优化过程中不可预测的数据流导致的类别不平衡问题。我们在多个数据集上结合通用TTA方法开展了大量实验,证明TTAQ性能优于现有基线,且能令人鼓舞地提升低位PTQ模型在持续变化的测试域中的准确率。例如,TTAQ将2位模型在ImageNet-C数据集上的平均误差降低了10.1%,效果显著。

英文摘要:

Post-training quantization (PTQ) reduces excessive hardware cost by quantizing full-precision models into lower bit representations on a tiny calibration set, without retraining. Despite the remarkable progress made through recent efforts, traditional PTQ methods typically encounter failure in dynamic and ever-changing real-world scenarios, involving unpredictable data streams and continual domain shifts, which poses greater challenges. In this paper, we propose a novel and stable quantization process for test-time adaptation (TTA), dubbed TTAQ, to address the performance degradation of traditional PTQ in dynamically evolving test domains. To tackle domain shifts in quantizer, TTAQ proposes the Perturbation Error Mitigation (PEM) and Perturbation Consistency Reconstruction (PCR). Specifically, PEM analyzes the error propagation and devises a weight regularization scheme to mitigate the impact of input perturbations. On the other hand, PCR introduces consistency learning to ensure that quantized models provide stable predictions for same sample. Furthermore, we introduce Adaptive Balanced Loss (ABL) to adjust the logits by taking advantage of the frequency and complexity of the class, which can effectively address the class imbalance caused by unpredictable data streams during optimization. Extensive experiments are conducted on multiple datasets with generic TTA methods, proving that TTAQ can outperform existing baselines and encouragingly improve the accuracy of low bit PTQ models in continually changing test domains. For instance, TTAQ decreases the mean error of 2-bit models on ImageNet-C dataset by an impressive 10.1\%.

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

↑