We demonstrate that self-learning techniques like entropy minimization and pseudo-labeling are simple and effective at improving performance of a deployed computer vision model under systematic domain shifts. We conduct a wide range of large-scale experiments and show consistent improvements irrespective of the model architecture, the pre-training technique or the type of distribution shift. At the same time, self-learning is simple to use in practice because it does not require knowledge or access to the original training data or scheme, is robust to hyperparameter choices, is straight-forward to implement and requires only a few adaptation epochs. This makes self-learning techniques highly attractive for any practitioner who applies machine learning algorithms in the real world. We present state-of-the-art adaptation results on CIFAR10-C (8.5% error), ImageNet-C (22.0% mCE), ImageNet-R (17.4% error) and ImageNet-A (14.8% error), theoretically study the dynamics of self-supervised adaptation methods and propose a new classification dataset (ImageNet-D) which is challenging even with adaptation.
translated by 谷歌翻译
Test-time adaptation is the problem of adapting a source pre-trained model using test inputs from a target domain without access to source domain data. Most of the existing approaches address the setting in which the target domain is stationary. Moreover, these approaches are prone to making erroneous predictions with unreliable uncertainty estimates when distribution shifts occur. Hence, test-time adaptation in the face of non-stationary target domain shift becomes a problem of significant interest. To address these issues, we propose a principled approach, PETAL (Probabilistic lifElong Test-time Adaptation with seLf-training prior), which looks into this problem from a probabilistic perspective using a partly data-dependent prior. A student-teacher framework, where the teacher model is an exponential moving average of the student model naturally emerges from this probabilistic perspective. In addition, the knowledge from the posterior distribution obtained for the source task acts as a regularizer. To handle catastrophic forgetting in the long term, we also propose a data-driven model parameter resetting mechanism based on the Fisher information matrix (FIM). Moreover, improvements in experimental results suggest that FIM based data-driven parameter restoration contributes to reducing the error accumulation and maintaining the knowledge of recent domain by restoring only the irrelevant parameters. In terms of predictive error rate as well as uncertainty based metrics such as Brier score and negative log-likelihood, our method achieves better results than the current state-of-the-art for online lifelong test time adaptation across various benchmarks, such as CIFAR-10C, CIFAR-100C, ImageNetC, and ImageNet3DCC datasets.
translated by 谷歌翻译
测试时间适应(TTA)是指适应神经网络以进行分配变化,仅在测试时间内从新域中访问未标记的测试样本。先前的TTA方法优化了无监督的目标,例如帐篷中的模型预测的熵[Wang等,2021],但目前尚不清楚到底是什么使TTA损失良好。在本文中,我们首先提出一个令人惊讶的现象:如果我们尝试在广泛的功能上衡量最佳的TTA损失,那么我们恢复了与(温度缩放版本的)非常相似的函数帐篷采用的软磁性 - 凝集。但是,只有在我们正在适应的分类器通过跨凝结训练的情况下,这才能保持;如果通过平方损失训练,则会出现不同的最佳TTA损失。为了解释这一现象,我们通过训练损失的凸结合物分析了TTA。我们表明,在自然条件下,这种(无监督的)共轭功能可以看作是对原始监督损失的局部近似值,实际上,它恢复了元学习发现的最佳损失。这导致了一种通用食谱,可用于为通用类的任何给定监督培训损失功能找到良好的TTA损失。从经验上讲,我们的方法始终在广泛的基准测试中统治其他基线。当应用于新型损失功能的分类器时,我们的方法尤其令人感兴趣,例如,最近所传播的polyloss与基于熵的损失有很大的不同。此外,我们表明我们的方法也可以用非常特定的软标签解释为一种自我训练,我们将其称为共轭伪标记。总体而言,我们的方法为更好地理解和改善测试时间适应提供了广泛的框架。代码可在https://github.com/locuslab/tta_conjugate上找到。
translated by 谷歌翻译
In this paper, we propose Test-Time Training, a general approach for improving the performance of predictive models when training and test data come from different distributions. We turn a single unlabeled test sample into a self-supervised learning problem, on which we update the model parameters before making a prediction. This also extends naturally to data in an online stream. Our simple approach leads to improvements on diverse image classification benchmarks aimed at evaluating robustness to distribution shifts.
translated by 谷歌翻译
部署的ML模型的基本要求是从与培训不同的测试分布中汲取的数据概括。解决此问题的一个流行解决方案是,仅使用未标记的数据将预训练的模型调整为新的域。在本文中,我们关注该问题的挑战性变体,其中访问原始源数据受到限制。虽然完全测试时间适应(FTTA)和无监督的域适应性(UDA)密切相关,但由于大多数UDA方法需要访问源数据,因此UDA的进展不容易适用于TTA。因此,我们提出了一种新方法,即Cattan,它通过放松了通过新颖的深层子空间对准策略来放松访问整个源数据的需求,从而弥合了UDA和FTTA。通过为源数据存储的子空间基础设置的最小开销,Cattan在适应过程中可以在源数据和目标数据之间进行无监督的对齐。通过对多个2D和3D Vision基准测试(Imagenet-C,Office-31,OfficeHome,Domainnet,PointDa-10)和模型体系结构进行广泛的实验评估,我们在FTTA性能方面表现出显着提高。此外,即使使用固有健壮的模型,预训练的VIT表示以及目标域中的样本可用性低,我们也会对对齐目标的实用性做出许多关键发现。
translated by 谷歌翻译
Models should be able to adapt to unseen data during test-time to avoid performance drops caused by inevitable distribution shifts in real-world deployment scenarios. In this work, we tackle the practical yet challenging test-time adaptation (TTA) problem, where a model adapts to the target domain without accessing the source data. We propose a simple recipe called \textit{Data-efficient Prompt Tuning} (DePT) with two key ingredients. First, DePT plugs visual prompts into the vision Transformer and only tunes these source-initialized prompts during adaptation. We find such parameter-efficient finetuning can efficiently adapt the model representation to the target domain without overfitting to the noise in the learning objective. Second, DePT bootstraps the source representation to the target domain by memory bank-based online pseudo-labeling. A hierarchical self-supervised regularization specially designed for prompts is jointly optimized to alleviate error accumulation during self-training. With much fewer tunable parameters, DePT demonstrates not only state-of-the-art performance on major adaptation benchmarks VisDA-C, ImageNet-C, and DomainNet-126, but also superior data efficiency, i.e., adaptation with only 1\% or 10\% data without much performance degradation compared to 100\% data. In addition, DePT is also versatile to be extended to online or multi-source TTA settings.
translated by 谷歌翻译
Vision Transformer(VIT)在图像处理中变得越来越流行。具体而言,我们研究了测试时间适应(TTA)对VIT的有效性,VIT是一种已经出现的技术,可以自行纠正其在测试时间期间的预测。首先,我们在VIT-B16和VIT-L16上基准了各种测试时间适应方法。结果表明,使用适当的损耗函数时,TTA对VIT有效,并且先前的投入(明智地选择调制参数)是不需要的。基于观察结果,我们提出了一种称为类条件特征对齐(CFA)的新的测试时间适应方法,该方法将类别条件分布的差异和在线源中隐藏表示的整个分布差异最小化,在线中的整个分布差异方式。图像分类任务(CIFAR-10-C,CIFAR-100-C和Imagenet-C)和域适应性(Digits DataSet和Imagenet-Sketch)的实验表明,CFA稳定地超过了各种数据集中的现有基础。我们还通过在RESNET,MLP混合和几种VIT变体(Vit-augreg,Deit和Beit)上实验来验证CFA是模型不可知论。使用BEIT主链,CFA在Imagenet-C上达到了19.8%的TOP-1错误率,表现优于现有的测试时间适应基线44.0%。这是不需要改变训练阶段的TTA方法中的最新结果。
translated by 谷歌翻译
测试时间适应(TTA)是一个新兴范式,可解决培训和测试阶段之间的分布变化,而无需其他数据采集或标签成本;仅使用未标记的测试数据流进行连续模型适应。以前的TTA方案假设测试样本是独立的,并且分布相同(i.i.d.),即使它们在应用程序方案中通常在时间上相关(non-i.i.d。),例如自动驾驶。我们发现,在这种情况下,大多数现有的TTA方法急剧失败。由此激励,我们提出了一种新的测试时间适应方案,该方案对非I.I.D具有强大的态度。测试数据流。我们的新颖性主要是两倍:(a)纠正分布样本的归一化的实例感知批归归量表(IABN),以及(b)模拟I.I.D.的预测均衡储层采样(PBRS)。来自非i.i.d的数据流。以班级平衡的方式流式传输。我们对各种数据集的评估,包括现实世界非i.i.d。流,表明所提出的强大TTA不仅优于非i.i.d的最先进的TTA算法。设置,但也可以实现与I.I.D.下的这些算法相当的性能。假设。
translated by 谷歌翻译
测试时间的域变化在实践中是不可避免的。测试时间适应性通过在部署过程中调整模型来解决此问题。从理论上讲,最近的工作表明,自我训练可能是逐渐域移动的强大方法。在这项工作中,我们显示了渐进域适应与测试时间适应之间的自然联系。我们发布了一个名为Carlatta的新合成数据集,该数据集允许在测试时间期间探索渐进的域移动,并评估无监督域适应和测试时间适应的几种方法。我们提出了一种基于自我训练和样式转移的新方法GTTA。GTTA明确利用渐进域移动并在该区域设置新标准。我们进一步证明了我们的方法对连续和逐渐的CIFAR10C,CIFAR100C和Imagenet-C基准的有效性。
translated by 谷歌翻译
大多数机器学习算法的基本假设是培训和测试数据是从相同的底层分布中汲取的。然而,在几乎所有实际应用中违反了这种假设:由于不断变化的时间相关,非典型最终用户或其他因素,机器学习系统经常测试。在这项工作中,我们考虑域泛化的问题设置,其中训练数据被构造成域,并且可能有多个测试时间偏移,对应于新域或域分布。大多数事先方法旨在学习在所有域上执行良好的单一强大模型或不变的功能空间。相比之下,我们的目标是使用未标记的测试点学习适应域转移到域移的模型。我们的主要贡献是介绍自适应风险最小化(ARM)的框架,其中模型被直接优化,以便通过学习来转移以适应培训域来改编。与稳健性,不变性和适应性的先前方法相比,ARM方法提供了在表现域移位的多个图像分类问题上的性能增益为1-4%的测试精度。
translated by 谷歌翻译
尽管进行了多年的研究,但跨域的概括仍然是深层网络的语义分割的关键弱点。先前的研究取决于静态模型的假设,即训练过程完成后,模型参数在测试时间保持固定。在这项工作中,我们通过一种自适应方法来挑战这一前提,用于语义分割,将推理过程调整为每个输入样本。自我适应在两个级别上运行。首先,它采用了自我监督的损失,该损失将网络中卷积层的参数定制为输入图像。其次,在批准层中,自适应近似于整个测试数据的平均值和方差,这是不可用的。它通过在训练和从单个测试样本得出的参考分布之间进行插值来实现这一目标。为了凭经验分析我们的自适应推理策略,我们制定并遵循严格的评估协议,以解决先前工作的严重局限性。我们的广泛分析得出了一个令人惊讶的结论:使用标准训练程序,自我适应大大优于强大的基准,并在多域基准测试方面设定了新的最先进的准确性。我们的研究表明,自适应推断可以补充培训时间的既定模型正规化实践,以改善深度网络的概括到异域数据。
translated by 谷歌翻译
部署在野外的机器学习系统通常在源分布上培训,但部署在不同的目标分布上。未标记的数据可以是用于缓解这些分布班次的强大的利用点,因为它通常比标记数据更具可用。然而,未标记数据的现有分配转换基准不反映现实世界应用中出现的方案的广度。在这项工作中,我们介绍了Wilds 2.0更新,该更新在分发转移的野外基准中扩展了10个数据集中的8个,以包括将在部署中逼真获得的策划未标记数据。为了保持一致性,标记的培训,验证和测试集以及评估度量与原始野外基准中的标记与评估度量完全相同。这些数据集涵盖了广泛的应用程序(从组织学到野生动物保护),任务(分类,回归和检测)和方式(照片,卫星图像,显微镜载玻片,文本,分子图)。我们系统地基准测试最先进的方法,可以利用未标记的数据,包括域不变,自我培训和自我监督方法,并表明他们在野外的成功2.0是有限的。为了方便方法开发和评估,我们提供了一个自动化数据加载的开源包,并包含本文中使用的所有模型架构和方法。代码和排行榜可在https://wilds.stanford.edu获得。
translated by 谷歌翻译
尽管最近通过剩余网络的代表学习中的自我监督方法取得了进展,但它们仍然对ImageNet分类基准进行了高度的监督学习,限制了它们在性能关键设置中的适用性。在MITROVIC等人的现有理论上洞察中建立2021年,我们提出了RELICV2,其结合了明确的不变性损失,在各种适当构造的数据视图上具有对比的目标。 Relicv2在ImageNet上实现了77.1%的前1个分类准确性,使用线性评估使用Reset50架构和80.6%,具有较大的Reset型号,优于宽边缘以前的最先进的自我监督方法。最值得注意的是,RelicV2是使用一系列标准Reset架构始终如一地始终优先于类似的对比较中的监督基线的第一个表示学习方法。最后,我们表明,尽管使用Reset编码器,Relicv2可与最先进的自我监控视觉变压器相媲美。
translated by 谷歌翻译
State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories. This restricted form of supervision limits their generality and usability since additional labeled data is needed to specify any other visual concept. Learning directly from raw text about images is a promising alternative which leverages a much broader source of supervision. We demonstrate that the simple pre-training task of predicting which caption goes with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400 million (image, text) pairs collected from the internet. After pre-training, natural language is used to reference learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks. We study the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification. The model transfers non-trivially to most tasks and is often competitive with a fully supervised baseline without the need for any dataset specific training. For instance, we match the accuracy of the original ResNet-50 on ImageNet zero-shot without needing to use any of the 1.28 million training examples it was trained on. We release our code and pre-trained model weights at https://github.com/OpenAI/CLIP.
translated by 谷歌翻译
This work tackles the problem of semi-supervised learning of image classifiers. Our main insight is that the field of semi-supervised learning can benefit from the quickly advancing field of self-supervised visual representation learning. Unifying these two approaches, we propose the framework of self-supervised semi-supervised learning (S 4 L) and use it to derive two novel semi-supervised image classification methods. We demonstrate the effectiveness of these methods in comparison to both carefully tuned baselines, and existing semi-supervised learning methods. We then show that S 4 L and existing semi-supervised methods can be jointly trained, yielding a new state-of-the-art result on semi-supervised ILSVRC-2012 with 10% of labels.
translated by 谷歌翻译
Image classification with small datasets has been an active research area in the recent past. However, as research in this scope is still in its infancy, two key ingredients are missing for ensuring reliable and truthful progress: a systematic and extensive overview of the state of the art, and a common benchmark to allow for objective comparisons between published methods. This article addresses both issues. First, we systematically organize and connect past studies to consolidate a community that is currently fragmented and scattered. Second, we propose a common benchmark that allows for an objective comparison of approaches. It consists of five datasets spanning various domains (e.g., natural images, medical imagery, satellite data) and data types (RGB, grayscale, multispectral). We use this benchmark to re-evaluate the standard cross-entropy baseline and ten existing methods published between 2017 and 2021 at renowned venues. Surprisingly, we find that thorough hyper-parameter tuning on held-out validation data results in a highly competitive baseline and highlights a stunted growth of performance over the years. Indeed, only a single specialized method dating back to 2019 clearly wins our benchmark and outperforms the baseline classifier.
translated by 谷歌翻译
域适应对于将学习模型调整到新方案,例如域移位或更改数据分布,这是至关重要的。目前的方法通常需要来自移位域的大量标记或未标记的数据。这可以是在需要连续动态适应或遭受数据稀缺的领域的障碍,例如,自动驾驶在挑战天气条件下。为了解决持续适应分配班的问题,我们提出了动态无监督的适应(DUA)。我们通过持续调整批量归一化层的统计来修改模型的特征表示。我们表明,通过从移位域中仅访问一小部分未标记的数据并按顺序调整,可以实现强大的性能增益。甚至从目标领域的未标记数据的少于1%,Dua已经实现了强大的基线的竞争结果。此外,与先前的方法相比,计算开销最小。我们的方法很简单,但有效,可以应用于任何使用批量归一化作为其组件之一的架构。我们通过在各种域适应数据集和任务中评估DUA的效用,包括对象识别,数字识别和对象检测。
translated by 谷歌翻译
分批归一化(BN)是一种无处不在的技术,用于训练深层神经网络,可加速其收敛以达到更高的准确性。但是,我们证明了BN具有根本的缺点:它激励该模型依赖于训练(内域)数据高度特定的低变义特征,从而损害了室外示例的概括性能。在这项工作中,我们首先表明在各种架构上删除BN层会导致较低的域外和腐败错误,而造成较高的内域错误,因此我们首先研究了这种现象。然后,我们提出了反平衡老师(CT),该方法利用与老师的老师一起利用同一模型的冷冻副本,通过通过一致性损失功能实质上调整其权重来实现学生网络对强大表示的学习。该正则化信号有助于CT在不可预见的数据变化中表现良好,即使没有从目标域中的信息如先前的工作中。从理论上讲,我们在过度参数化的线性回归设置中显示了为什么归一化导致模型对这种内域特征的依赖,并通过验证CT的功效来证明CT的功效,从而在稳健性基准(例如CIFAR-10-C,CIFAR-10-C,CIFAR-100-C,CIFAR-100-C,CIFAR-100-C,CIFAR-100-C,CIFAR-100-C,CIFAR-100-C,CIFAR-100-C,CIFAR-100)上表现出了疗效。和VLCS。
translated by 谷歌翻译
We present Noisy Student Training, a semi-supervised learning approach that works well even when labeled data is abundant. Noisy Student Training achieves 88.4% top-1 accuracy on ImageNet, which is 2.0% better than the state-of-the-art model that requires 3.5B weakly labeled Instagram images. On robustness test sets, it improves ImageNet-A top-1 accuracy from 61.0% to 83.7%, reduces ImageNet-C mean corruption error from 45.7 to 28.3, and reduces ImageNet-P mean flip rate from 27.8 to 12.2.Noisy Student Training extends the idea of self-training and distillation with the use of equal-or-larger student models and noise added to the student during learning. On Im-ageNet, we first train an EfficientNet model on labeled images and use it as a teacher to generate pseudo labels for 300M unlabeled images. We then train a larger Efficient-Net as a student model on the combination of labeled and pseudo labeled images. We iterate this process by putting back the student as the teacher. During the learning of the student, we inject noise such as dropout, stochastic depth, and data augmentation via RandAugment to the student so that the student generalizes better than the teacher. 1 * This work was conducted at Google.
translated by 谷歌翻译
我们提出了自适应培训 - 一种统一的培训算法,通过模型预测动态校准并增强训练过程,而不会产生额外的计算成本 - 以推进深度神经网络的监督和自我监督的学习。我们分析了培训数据的深网络培训动态,例如随机噪声和对抗例。我们的分析表明,模型预测能够在数据中放大有用的基础信息,即使在没有任何标签信息的情况下,这种现象也会发生,突出显示模型预测可能会产生培训过程:自适应培训改善了深网络的概括在噪音下,增强自我监督的代表学习。分析还阐明了解深度学习,例如,在经验风险最小化和最新的自我监督学习算法的折叠问题中对最近发现的双重现象的潜在解释。在CIFAR,STL和Imagenet数据集上的实验验证了我们在三种应用中的方法的有效性:用标签噪声,选择性分类和线性评估进行分类。为了促进未来的研究,该代码已在HTTPS://github.com/layneh/Self-Aveptive-训练中公开提供。
translated by 谷歌翻译