arXiv:2509.04977cs.LG2025-09TPAMI被引 3

解决真实场景下测试时自适应的不稳定问题,提升模型鲁棒性。

Adapt in the Wild: Test-Time Entropy Minimization with Sharpness and Feature Regularization

  • 引入梯度感知的熵最小化方法,剔除异常噪声样本并引导模型收敛到平坦极小值。
  • 提出双正则化策略,防止特征表示崩溃和类别偏倚,提升泛化能力。
  • 适用于分布漂移、小批量、在线不平衡等复杂真实场景,计算高效。

测试时自适应(TTA)在测试数据存在混合分布偏移、小批量、在线标签分布不均衡时可能无法提升甚至损害模型性能,成为实际部署的主要障碍。本文发现批归一化层是导致TTA不稳定的主因;而使用无批依赖的归一化层(如组归一化、层归一化)虽能提升稳定性,仍会因模型坍缩至全相同类别预测而失败。深入分析表明:1)梯度先爆炸后快速衰减,暗示大梯度噪声样本破坏适应过程;2)特征表示呈现高相关性和分类偏倚。为此,提出尖锐度感知且可靠的熵最小化方法SAR:1)去除高梯度噪声样本;2)促使权重进入平坦极小值以增强鲁棒性。基于SAR,进一步设计SAR^2,引入冗余正则化降低特征维度间相关性,以及不平等正则化最大化原型中心预测熵,抑制对特定类别的偏倚。实验表明,该方法在多种真实场景下显著优于现有方法,且计算高效。

原文摘要 · Abstract (English)

Test-time adaptation (TTA) may fail to improve or even harm the model performance when test data have: 1) mixed distribution shifts, 2) small batch sizes, 3) online imbalanced label distribution shifts. This is often a key obstacle preventing existing TTA methods from being deployed in the real world. In this paper, we investigate the unstable reasons and find that the batch norm layer is a crucial factor hindering TTA stability. Conversely, TTA can perform more stably with batch-agnostic norm layers, i.e., group or layer norm. However, we observe that TTA with group and layer norms does not always succeed and still suffers many failure cases, i.e., the model collapses into trivial solutions by assigning the same class label for all samples. By digging into this, we find that, during the collapse process: 1) the model gradients often undergo an initial explosion followed by rapid degradation, suggesting that certain noisy test samples with large gradients may disrupt adaptation; and 2) the model representations tend to exhibit high correlations and classification bias. To address this, we first propose a sharpness-aware and reliable entropy minimization method, called SAR, for stabilizing TTA from two aspects: 1) remove partial noisy samples with large gradients, 2) encourage model weights to go to a flat minimum so that the model is robust to the remaining noisy samples. Based on SAR, we further introduce SAR^2 to prevent representation collapse with two regularizers: 1) a redundancy regularizer to reduce inter-dimensional correlations among centroid-invariant features; and 2) an inequity regularizer to maximize the prediction entropy of a prototype centroid, thereby penalizing biased representations toward any specific class. Promising results demonstrate that our methods perform more stably over prior methods and are computationally efficient under the above wild test scenarios.

测试时自适应模型鲁棒性特征正则化

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