arXiv:2511.12607cs.CV2025-11

提升模型在未知类别下的测试时适应能力,避免误判导致的性能下降。

Open-World Test-Time Adaptation with Hierarchical Feature Aggregation and Attention Affine

  • 分层网络提取多层特征,识别未见类别
  • 融合原始预测与分层网络输出,提升检测准确率
  • 自适应注意力机制增强对域偏移的鲁棒性

测试时自适应(TTA)旨在测试阶段调整模型以应对样本分布变化,提升对新环境的适应能力。在真实场景中,模型常遇到未见(分布外,OOD)类别的样本,若将其误判为已知(分布内,ID)类别,不仅降低预测精度,还会干扰自适应过程,导致后续ID样本误差加剧。现有多数TTA方法在此条件下性能显著下降。为此,我们提出分层阶梯网络(HLN),通过聚合Transformer所有层的类别令牌提取OOD特征;结合原模型预测与HLN输出,采用加权概率融合提升OOD检测性能。为进一步增强域偏移下的鲁棒性,引入注意力仿射网络(AAN),根据令牌信息自适应优化自注意力机制,改善域偏移数据集上的分类表现。同时,采用加权熵机制动态抑制低置信度样本的影响。在主流分类数据集上的实验表明,本方法显著提升性能。

原文摘要 · Abstract (English)

Test-time adaptation (TTA) refers to adjusting the model during the testing phase to cope with changes in sample distribution and enhance the model's adaptability to new environments. In real-world scenarios, models often encounter samples from unseen (out-of-distribution, OOD) categories. Misclassifying these as known (in-distribution, ID) classes not only degrades predictive accuracy but can also impair the adaptation process, leading to further errors on subsequent ID samples. Many existing TTA methods suffer substantial performance drops under such conditions. To address this challenge, we propose a Hierarchical Ladder Network that extracts OOD features from class tokens aggregated across all Transformer layers. OOD detection performance is enhanced by combining the original model prediction with the output of the Hierarchical Ladder Network (HLN) via weighted probability fusion. To improve robustness under domain shift, we further introduce an Attention Affine Network (AAN) that adaptively refines the self-attention mechanism conditioned on the token information to better adapt to domain drift, thereby improving the classification performance of the model on datasets with domain shift. Additionally, a weighted entropy mechanism is employed to dynamically suppress the influence of low-confidence samples during adaptation. Experimental results on benchmark datasets show that our method significantly improves the performance on the most widely used classification datasets.

测试时自适应域偏移注意力机制未知类别检测

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