search
HomeTechnology peripheralsAIHow to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

Domain adaptation is an important method to solve transfer learning. The current domain adaptation method relies on the data of the original domain and the target domain for synchronous training. When the source domain data is not available and the target domain data is not completely visible, test-time training becomes a new domain adaptation method. Current research on Test-Time Training (TTT) widely utilizes self-supervised learning, contrastive learning, self-training and other methods. However, how to define TTT in real environments is often ignored, resulting in a lack of comparability between different methods.

Recently, South China University of Technology, the A*STAR team and Pengcheng Laboratory jointly proposed a systematic classification criterion for TTT problems, by distinguishing whether the method has sequential reasoning ability (Sequential Inference) and whether the source domain training objectives need to be modified, the current methods are classified in detail. At the same time, a method based on anchored clustering of target domain data is proposed, which achieves the highest classification accuracy under various TTT classifications. This article points out the right direction for subsequent research on TTT and avoids confusion in experimental settings. The results are not comparable. The research paper has been accepted for NeurIPS 2022.

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

  • ##Paper: https://arxiv.org/abs/2206.02721
  • Code: https://github.com/Gorilla-Lab-SCUT/TTAC
1. Introduction

The success of deep learning is mainly due to the large amount of annotated data and the assumption that the training set and the test set are independent and identically distributed. In general, when it is necessary to train on synthetic data and then test on real data, the above assumptions cannot be met, which is also called domain shift. To alleviate this problem, Domain Adaptation (DA) was born. Existing DA jobs either require access to data from the source and target domains during training, or train on multiple domains simultaneously. The former requires the model to always have access to source domain data during adaptation training, while the latter requires more expensive calculations. In order to reduce the dependence on source domain data, source domain data cannot be accessed due to privacy issues or storage overhead. Source-Free Domain Adaptation (SFDA) without source domain data solves the domain adaptation problem of inaccessible source domain data. The author found that SFDA needs to be trained on the entire target data set for multiple rounds to achieve convergence. SFDA cannot solve such problems when facing streaming data and the need to make timely inference predictions. This more realistic setting that requires timely adaptation to streaming data and making inference predictions is called Test-Time Training (TTT) or Test-Time Adaptation (TTA).

The author noticed that there is confusion in the community about the definition of TTT which leads to unfair comparisons. The paper classifies existing TTT methods based on two key factors:

  • For data that appears in a streaming format and requires timely prediction of the currently occurring data, It is called One-Pass Adaptation; for other protocols that do not meet the above settings, it is called Multi-Pass Adaptation. The model may need to be updated on the entire test set for multiple rounds. , and then make inference predictions from beginning to end.
  • Modify the training loss equation of the source domain according to whether it is necessary, such as introducing additional self-supervised branches to achieve a more effective TTT.

The goal of this paper is to solve the most realistic and challenging TTT protocol, that is, single-round adaptation without modifying the training loss equation. This setting is similar to the TTA proposed by TENT [1], but is not limited to using lightweight information from the source domain, such as statistics of features. Given the goal of TTT to adapt efficiently at test time, this assumption is computationally efficient and greatly improves the performance of TTT. The authors named this new TTT protocol sequential Test Time Training (sTTT).

In addition to the above classification of different TTT methods, the paper also proposes two technologies to make sTTT more effective and accurate:

  • The paper proposes the Test-Time Anchored Clustering (TTAC) method.
  • In order to reduce the impact of erroneous pseudo-labels on cluster updates, the paper filters pseudo-labels based on the network's prediction stability and confidence in the sample.

2. Method introduction

The paper is divided into four parts to explain the proposed method, which are 1) introducing the anchor of test-time training (TTT) fixed clustering module, as shown in the Anchored Clustering part in Figure 1; 2) introduce some strategies for filtering pseudo labels, as shown in the Pseudo Label Filter part in Figure 1; 3) different from the use of L2 distance in TTT [2] To measure the distance between two distributions, the author uses KL divergence to measure the distance between two global feature distributions; 4) Introduce an effective update iteration method for feature statistics in the test-time training (TTT) process. Finally, the fifth section gives the process code of the entire algorithm.

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

In the first part, in anchored clustering, the author first uses a mixture of Gaussians to model the features of the target domain, where each Gaussian component represents A discovered cluster. The authors then use the distribution of each category in the source domain as anchor points for the distribution in the target domain for matching. In this way, test data features can form clusters at the same time, and the clusters are associated with source domain categories, thereby achieving generalization to the target domain. In summary, the features of the source domain and the target domain are modeled according to the category information respectively:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

and then measure the two through KL divergence Mix the distance of Gaussian distribution and achieve the matching of the two domain features by reducing the KL divergence. However, there is no closed-form solution for directly solving the KL divergence on two mixed Gaussian distributions, which prevents the use of effective gradient optimization methods. In this paper, the author allocates the same number of clusters in the source and target domains, and each target domain cluster is assigned to a source domain cluster, so that the KL divergence solution of the entire mixed Gaussian can be turned into each pair Sum of KL divergences between Gaussians. The following formula:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

The closed form solution of the above formula is:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

In Formula 2, the parameters of the source domain cluster can be collected offline, and because only lightweight statistical data is used, it will not cause privacy leakage problems and only uses a small amount of computing and storage overhead. For variables in the target domain, the use of pseudo-labels is involved. For this purpose, the author designed an effective and lightweight pseudo-label filtering strategy.

The second part of the pseudo label filtering strategy is mainly divided into two parts:

1) Filtering of consistency prediction in time series:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

2) Filtering based on posterior probability:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

Finally , use the filtered samples to solve for the statistics of the target domain cluster:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

Part 3: In anchored clustering, some of the filtered samples do not participate in the estimation of the target domain. The author also performs global feature alignment on all test samples, similar to the approach to clusters in anchored clustering. Here all samples are regarded as an overall cluster, and

is defined in the source domain and target domain respectively. How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

Then again align the global feature distribution with the goal of minimizing KL divergence:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

Fourth The above three parts all introduce some domain alignment methods, but in the TTT process, it is not simple to estimate the distribution of a target domain because we cannot observe the data of the entire target domain. In cutting-edge work, TTT [2] uses a feature queue to store past partial samples to calculate a local distribution to estimate the overall distribution. But this not only brings memory overhead, but also leads to a trade off between accuracy and memory. In this paper, the author proposes an iterative update of statistics to alleviate memory overhead. The specific iterative update formula is as follows:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

In general, the entire algorithm is as shown in Algorithm 1:

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

3. Experimental results

As mentioned in the introduction, the author in this paper attaches great importance to the fair comparison of different methods under different TTT strategies. The author classifies all TTT methods according to the following two key factors: 1) whether one-pass adaptation protocol (One-Pass Adaptation) and 2) modifying the training loss equation of the source domain, respectively recorded as Y/N to indicate the need or no need to modify Source domain training equation, O/M represents single-round adaptation or multi-round adaptation. In addition, the author conducted sufficient comparative experiments and some further analysis on 6 benchmark data sets.

As shown in Table 1, TTT [2] appears under both N-O and Y-O protocols because TTT [2] has an additional self-supervised branch. We use N-O The loss of the self-supervised branch will not be added under the protocol, while the loss of this molecule can be used normally under Y-O. TTAC also uses the same self-supervised branch as TTT [2] under Y-O. As can be seen from the table, TTAC has achieved optimal results under all TTT protocols and all data sets; on both CIFAR10-C and CIFAR100-C data sets, TTAC has achieved an improvement of more than 3%. Table 2 - Table 5 show the data on ImageNet-C, CIFAR10.1, and VisDA respectively. TTAC has achieved the best results.

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

also, The author conducted rigorous ablation experiments under multiple TTT protocols at the same time, and clearly saw the role of each component, as shown in Table 6. First of all, from the comparison between L2 Dist and KLD, it can be seen that using KL divergence to measure the two distributions has a better effect; secondly, it is found that if Anchored Clustering or pseudo-label supervision is used alone, the improvement is only 14%, but if combined With Anchored Cluster and Pseudo Label Filter, you can see a significant performance improvement of 29.15% -> 11.33%. This also shows the necessity and effective combination of each component.

How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods

Наконец, автор полностью анализирует TTAC по пяти измерениям в конце текста, а именно совокупную производительность при sTTT (Н-О) и TSNE-визуализацию функций TTAC. , анализ TTT, независимый от исходного домена, анализ очередей тестовых образцов и раундов обновления, вычислительные затраты, измеряемые во времени настенных часов. Более интересные доказательства и анализ приведены в приложении к статье.

4.Резюме

В этой статье лишь кратко представлены основные моменты этой работы TTAC: классификация и сравнение существующих методов TTT, предлагаемых методов и различных экспериментов в рамках Классификация протоколов ТТТ. Более подробное обсуждение и анализ будут представлены в статье и приложении. Мы надеемся, что эта работа может стать справедливым эталоном для методов ТТТ и что будущие исследования будут сравниваться в рамках соответствующих протоколов.

The above is the detailed content of How to correctly define test phase training? Sequential inference and domain-adaptive clustering methods. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
从VAE到扩散模型:一文解读以文生图新范式从VAE到扩散模型:一文解读以文生图新范式Apr 08, 2023 pm 08:41 PM

1 前言在发布DALL·E的15个月后,OpenAI在今年春天带了续作DALL·E 2,以其更加惊艳的效果和丰富的可玩性迅速占领了各大AI社区的头条。近年来,随着生成对抗网络(GAN)、变分自编码器(VAE)、扩散模型(Diffusion models)的出现,深度学习已向世人展现其强大的图像生成能力;加上GPT-3、BERT等NLP模型的成功,人类正逐步打破文本和图像的信息界限。在DALL·E 2中,只需输入简单的文本(prompt),它就可以生成多张1024*1024的高清图像。这些图像甚至

找不到中文语音预训练模型?中文版 Wav2vec 2.0和HuBERT来了找不到中文语音预训练模型?中文版 Wav2vec 2.0和HuBERT来了Apr 08, 2023 pm 06:21 PM

Wav2vec 2.0 [1],HuBERT [2] 和 WavLM [3] 等语音预训练模型,通过在多达上万小时的无标注语音数据(如 Libri-light )上的自监督学习,显著提升了自动语音识别(Automatic Speech Recognition, ASR),语音合成(Text-to-speech, TTS)和语音转换(Voice Conversation,VC)等语音下游任务的性能。然而这些模型都没有公开的中文版本,不便于应用在中文语音研究场景。 WenetSpeech [4] 是

普林斯顿陈丹琦:如何让「大模型」变小普林斯顿陈丹琦:如何让「大模型」变小Apr 08, 2023 pm 04:01 PM

“Making large models smaller”这是很多语言模型研究人员的学术追求,针对大模型昂贵的环境和训练成本,陈丹琦在智源大会青源学术年会上做了题为“Making large models smaller”的特邀报告。报告中重点提及了基于记忆增强的TRIME算法和基于粗细粒度联合剪枝和逐层蒸馏的CofiPruning算法。前者能够在不改变模型结构的基础上兼顾语言模型困惑度和检索速度方面的优势;而后者可以在保证下游任务准确度的同时实现更快的处理速度,具有更小的模型结构。陈丹琦 普

解锁CNN和Transformer正确结合方法,字节跳动提出有效的下一代视觉Transformer解锁CNN和Transformer正确结合方法,字节跳动提出有效的下一代视觉TransformerApr 09, 2023 pm 02:01 PM

由于复杂的注意力机制和模型设计,大多数现有的视觉 Transformer(ViT)在现实的工业部署场景中不能像卷积神经网络(CNN)那样高效地执行。这就带来了一个问题:视觉神经网络能否像 CNN 一样快速推断并像 ViT 一样强大?近期一些工作试图设计 CNN-Transformer 混合架构来解决这个问题,但这些工作的整体性能远不能令人满意。基于此,来自字节跳动的研究者提出了一种能在现实工业场景中有效部署的下一代视觉 Transformer——Next-ViT。从延迟 / 准确性权衡的角度看,

Stable Diffusion XL 现已推出—有什么新功能,你知道吗?Stable Diffusion XL 现已推出—有什么新功能,你知道吗?Apr 07, 2023 pm 11:21 PM

3月27号,Stability AI的创始人兼首席执行官Emad Mostaque在一条推文中宣布,Stable Diffusion XL 现已可用于公开测试。以下是一些事项:“XL”不是这个新的AI模型的官方名称。一旦发布稳定性AI公司的官方公告,名称将会更改。与先前版本相比,图像质量有所提高与先前版本相比,图像生成速度大大加快。示例图像让我们看看新旧AI模型在结果上的差异。Prompt: Luxury sports car with aerodynamic curves, shot in a

五年后AI所需算力超100万倍!十二家机构联合发表88页长文:「智能计算」是解药五年后AI所需算力超100万倍!十二家机构联合发表88页长文:「智能计算」是解药Apr 09, 2023 pm 07:01 PM

人工智能就是一个「拼财力」的行业,如果没有高性能计算设备,别说开发基础模型,就连微调模型都做不到。但如果只靠拼硬件,单靠当前计算性能的发展速度,迟早有一天无法满足日益膨胀的需求,所以还需要配套的软件来协调统筹计算能力,这时候就需要用到「智能计算」技术。最近,来自之江实验室、中国工程院、国防科技大学、浙江大学等多达十二个国内外研究机构共同发表了一篇论文,首次对智能计算领域进行了全面的调研,涵盖了理论基础、智能与计算的技术融合、重要应用、挑战和未来前景。论文链接:​https://spj.scien

​什么是Transformer机器学习模型?​什么是Transformer机器学习模型?Apr 08, 2023 pm 06:31 PM

译者 | 李睿审校 | 孙淑娟​近年来, Transformer 机器学习模型已经成为深度学习和深度神经网络技术进步的主要亮点之一。它主要用于自然语言处理中的高级应用。谷歌正在使用它来增强其搜索引擎结果。OpenAI 使用 Transformer 创建了著名的 GPT-2和 GPT-3模型。自从2017年首次亮相以来,Transformer 架构不断发展并扩展到多种不同的变体,从语言任务扩展到其他领域。它们已被用于时间序列预测。它们是 DeepMind 的蛋白质结构预测模型 AlphaFold

AI模型告诉你,为啥巴西最可能在今年夺冠!曾精准预测前两届冠军AI模型告诉你,为啥巴西最可能在今年夺冠!曾精准预测前两届冠军Apr 09, 2023 pm 01:51 PM

说起2010年南非世界杯的最大网红,一定非「章鱼保罗」莫属!这只位于德国海洋生物中心的神奇章鱼,不仅成功预测了德国队全部七场比赛的结果,还顺利地选出了最终的总冠军西班牙队。不幸的是,保罗已经永远地离开了我们,但它的「遗产」却在人们预测足球比赛结果的尝试中持续存在。在艾伦图灵研究所(The Alan Turing Institute),随着2022年卡塔尔世界杯的持续进行,三位研究员Nick Barlow、Jack Roberts和Ryan Chan决定用一种AI算法预测今年的冠军归属。预测模型图

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor