Test-time adaptation & Unsupervised Domain Adaptation

文章探讨了无监督域自适应方法,如特征匹配和预测调整在模型泛化中的应用。介绍了Test-TimeAdaptation(T3A)通过调整类原型来提升模型表现,以及TENT通过最小化预测熵来适应新域。此外,还提到了使用拉普拉斯最大似然估计的在线测试时间适应方法,以及ContrastiveTest-TimeAdaptation结合伪标签和对比学习优化特征表示。最后,文章讨论了部分标签学习中的对比学习和标签歧义消除策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

学习笔记,参考有风险

无监督域自适应(test-time adaptation)方法:

(1)特征匹配(特征提取时):熵最小化,原型调整,信息最大化,批归一化统计对齐。
(2)预测调整(分类时)
(3)test-time training:训练数据可得
(4)test-time adaptation:训练数据不可得
在这里插入图片描述

2021-NIPS-Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization(T3A)

通过构建支持集来调整类原型,使其具有更统一的表示:把在不同域上训练好的模型当作一个特征提取器,然后在测试数据上采用一个最近邻分类。因为采用了最近邻,所以需要给每个类维持一个类别原型,这个类别原型会随着测试数据的变化而动态变化。只调整顶部的线性分类器,将在源域上训练的线性分类器的输出层替换为一个伪原型分类器:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

2021-ICLR-TENT: fully test-time adaption by entropy minimization

提出fully test-time adaptation,通过修改特征来最小化预测熵,以调节BN参数。
在这里插入图片描述
在测试阶段,目标函数从CE变为Entropy,并且更新参数时,只更新BN层中的β\betaβγ\gammaγ

2022-CVPR-Parameter-free Online Test-time Adaptation

使用拉普拉斯最大似然估计鼓励相邻样本在特征空间中具有相似预测(分类结果)。 test-time adaptation methods只在有限的实验设置下表现良好,错误的超参数选择会导致性能下降。受测试时条件的不确定性启发,提出:
(1)用拉普拉斯调整最大似然估计(LAME)解决域自适应问题,调整模型的输出(而不是它的参数)
Alt
(2)使用concave-convex procedure优化整体损失:在每次迭代中,将当前解Z~(n){\tilde Z^{(n)}}Z~(n)作为目标的紧上界的最小值。
在这里插入图片描述
在这里插入图片描述

2022-CVPR-Contrastive Test-Time Adaptation

(1)伪标签增强:使用弱增强数据,利用记忆队列得到软近邻,实现软近邻投票,得到精细伪标签
(2)自监督对比学习:使用强增强数据进行自监督对比学习,优化特征。
(3)正则化:通过强弱一致性,使聚类得到的标签、模型的预测值一致。

2022-CVPR-Self-Taught Metric Learning without Labels

(1)基于教师网络,预测数据间的class-equivalence relation,并将预测的关系作为伪标签,优化学生网络。
(2)基于学生网络,计算其基于动量的移动平均,用于优化教师网络。
(3)将近邻的重叠程度作为衡量语义相似的指标。语境化的语义相似度精确地近似于类等价性。

2023-CVPR-Feature Alignment and Uniformity for Test Time Adaptation

将Test Time Adaptation作为特征修订问题,通过实现对齐和一致性来完成特征修正。其中,对齐指相似的图像应该具有相似的表示,一致性指不同类别的图像在空间中尽可能均匀地分布:
(1)特征一致性:
提出了自蒸馏策略,在不同层间传递信息,保证当前batch和以往batch内表征的一致性。
在这里插入图片描述
(2)特征对齐:
提出记忆化的空间局部聚类,对齐未来batch内的邻域样本之间的表示。
在这里插入图片描述
(3)解决噪声标签
为了解决常见的噪声标签问题,提出熵和一致性滤波器来选择和删除可能的噪声标签。在计算原型时,过滤具有高熵的噪声特征,因为不可靠的样本通常较高的熵。
在这里插入图片描述

2022-ICLR-CONTRASTIVE LABEL DISAMBIGUATION FOR PARTIAL LABEL LEARNING(PICO)

部分标签学习:使每个样本具有一个粗糙的标签候选集

解决问题:
(1)表示学习
(2)标签歧义消除:在标签集中识别真实标签,依赖良好的特征表示,且假设距离较近的样本具有相同标签。但是标签不确定使得特征学习困难。

PICO:通过对比标签歧义消除,实现部分标签学习。为来自相同类别的样本产生紧密对齐的表示,并促进标签歧义消除。
(1)构造伪正对完成对比学习,实现部分标签学习。
(2)基于类原型的标签歧义消除算法

### Self-Ensemble Concept In the realm of machine learning, self-ensemble refers to a technique where multiple models are created from variations or augmentations of training data points. These models collectively contribute towards making predictions that can be more robust than those made by any single model alone[^1]. The ensemble is built using different snapshots of the same neural network at various stages during its training process. The core idea behind this approach lies in leveraging diverse perspectives provided by these varied instances of the model trained on slightly altered datasets derived through transformations like noise addition or dropout regularization techniques applied over original inputs. This diversity helps improve generalization capabilities while reducing variance across predictions. #### Applications in Machine Learning One prominent application area for self-ensembles involves semi-supervised learning scenarios wherein only limited labeled examples exist alongside abundant unlabeled ones available for use during training phases. By applying consistency regularization methods such as Mean Teacher (MT), Temporal Ensembling (TE), Virtual Adversarial Training (VAT), etc., one ensures stable performance even when dealing with scarce supervision signals. Another significant utilization pertains to unsupervised domain adaptation tasks aiming to transfer knowledge acquired within source domains characterized by ample annotated samples into target environments lacking sufficient labeling but sharing similar characteristics otherwise unobserved directly due to distributional shifts between them both spatially and temporally speaking. Additionally, self-ensemble has been successfully employed in improving adversarial robustness against carefully crafted attacks designed specifically targeting deep networks' vulnerabilities exposed under certain conditions leading potentially catastrophic failures unless properly mitigated beforehand via defensive mechanisms embedded throughout architecture design choices including preprocessing steps taken prior feeding raw input features into subsequent layers responsible ultimately producing final outputs after passing several intermediate computations along pathways connecting neurons together forming complex webs capable performing intricate pattern recognition feats beyond human comprehension levels achievable today thanks largely advances brought forth recent years particularly around computational power availability coupled efficient algorithms development enabling faster experimentation cycles yielding better results overall time frame considered historically relevant benchmarks established previously before current era commenced officially ushering new age artificial intelligence research endeavors worldwide spanning numerous disciplines ranging natural sciences social studies humanities arts culture technology engineering mathematics statistics physics chemistry biology medicine health care environmental sustainability energy resources management policy governance ethics law regulation compliance security privacy protection safety assurance quality control standards setting benchmark creation measurement evaluation assessment feedback improvement innovation disruption transformation evolution revolution renaissance enlightenment awakening consciousness expansion awareness elevation transcendence ascension liberation freedom empowerment autonomy sovereignty independence interdependence cooperation collaboration coordination synchronization harmonization integration synthesis analysis decomposition reconstruction deconstruction construction building designing creating imagining envisioning conceptualizing theorizing hypothesizing experimenting validating verifying falsifying refuting rebutting arguing debating discussing communicating collaborating cooperating coordinating synchronizing harmonizing integrating synthesizing analyzing decomposing reconstructing deconstructing constructing building designing creating imagining envisioning conceptualizing theorizing hypothesizing experimenting validating verifying falsifying refuting rebutting arguing debating discussing communicating. ```python import numpy as np def create_self_ensemble(model, X_train, y_train=None): ensembles = [] # Create multiple versions of the dataset with slight modifications. for i in range(5): modified_X = apply_transformation(X_train.copy()) if y_train is not None: ensemble_model = train_model(model, modified_X, y_train) else: ensemble_model = train_unsupervised_model(model, modified_X) ensembles.append(ensemble_model) return ensembles def predict_with_self_ensemble(ensembles, X_test): all_predictions = [] for model in ensembles: prediction = model.predict(X_test) all_predictions.append(prediction) averaged_prediction = np.mean(all_predictions, axis=0) return averaged_prediction ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

二苏旧局吖

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值