[论文解读] SITA: Single Image Test-time Adaptation
本文提出SITA(单图像测试时自适应)框架,一种仅通过一次推理过程即可将预训练模型适配到分布外测试图像的新型方法。该方法引入了AugBN,通过测试图像及其增强图像估计目标域归一化统计量,无需反向传播,实现了在分类和分割任务上的最先进性能,同时延迟极低且无需超参数调优。
In Test-time Adaptation (TTA), given a source model, the goal is to adapt it to make better predictions for test instances from a different distribution than the source. Crucially, TTA assumes no access to the source data or even any additional labeled/unlabeled samples from the target distribution to finetune the source model. In this work, we consider TTA in a more pragmatic setting which we refer to as SITA (Single Image Test-time Adaptation). Here, when making a prediction, the model has access only to the given single test instance, rather than a batch of instances, as typically been considered in the literature. This is motivated by the realistic scenarios where inference is needed on-demand instead of delaying for an incoming batch or the inference is happening on an edge device (like mobile phone) where there is no scope for batching. The entire adaptation process in SITA should be extremely fast as it happens at inference time. To address this, we propose a novel approach AugBN that requires only a single forward pass. It can be used on any off-the-shelf trained model to test single instances for both classification and segmentation tasks. AugBN estimates normalization statistics of the unseen test distribution from the given test image using only one forward pass with label-preserving transformations. Since AugBN does not involve any back-propagation, it is significantly faster compared to recent test time adaptation methods. We further extend AugBN to make the algorithm hyperparameter-free. Rigorous experimentation show that our simple algorithm is able to achieve significant performance gains for a variety of datasets, tasks, and network architectures.
研究动机与目标
- 解决在无源数据或标注目标数据的情况下,将预训练模型适配到分布外测试样本的挑战。
- 实现在边缘设备或按需推理系统中实时、低延迟的自适应,这些场景下批量处理不切实际。
- 开发一种可独立适配每个测试图像的方法,避免混合批次带来的分布偏移问题。
- 消除推理过程中手动调优超参数的需求,尤其是批量归一化校准的超参数。
- 确保在源分布和目标分布输入下均具备鲁棒性,且无需事先了解测试数据分布。
提出的方法
- AugBN通过在输入图像及其标签保持不变的增强图像上进行一次前向传播,估计目标域批量归一化统计量。
- 通过一个可学习的先验因子λ,将源模型统计量与从测试图像及其增强图像中估计的统计量相结合。
- 先验因子λ通过基于熵的优化策略(OPS)自动为每个样本选择,使方法完全无需超参数。
- 该方法兼容任何现成的分类或分割模型,无需架构修改。
- OPS通过最小化增强视图上的预测熵,动态选择最优λ,确保稳定且自适应的校准。
- 该方法完全避免反向传播,推理速度与原始模型相当。
实验结果
研究问题
- RQ1一种测试时自适应方法是否能在无源数据或标注目标数据的情况下,仅基于单个测试图像实现高性能?
- RQ2如何从单个图像有效估计批量归一化统计量以提升模型鲁棒性?
- RQ3能否设计一种无需超参数的方法,自动为每个测试实例选择最优校准权重λ?
- RQ4所提出的方法在单图像和批量推理设置下是否均优于现有TTA方法?
- RQ5当测试图像来自源分布与未知目标分布时,该方法的鲁棒性如何?
主要发现
- 在ImageNet-C上,AugBN在DenseNet121上实现了25.8%的top-1准确率,较源模型(22.7%)提升了25.8个百分点。
- 在InceptionV3上,AugBN+OPS在ImageNet-C上达到36.2%的准确率,较源模型(30.4%)提升了5.8个百分点。
- 在SYNTHIA→Cityscapes分割任务中,该方法将mIoU提升了28%,在密集预测任务中表现出显著增益。
- 即使在大批次设置下,AugBN也优于TENT和基于BN的方法,而TENT因内存限制无法扩展至批次大小3以上。
- OPS方法可自动为每个样本选择λ,消除了手动调优的需要,并确保在源分布和目标分布下均具备鲁棒性。
- 性能在不同λ值下保持稳定,20%的参数范围内即可获得与最佳性能相差不超过1 mIoU的结果,表明对超参数选择的敏感度极低。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。