


How 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.
- ##Paper: https://arxiv.org/abs/2206.02721
- Code: https://github.com/Gorilla-Lab-SCUT/TTAC
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.
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:
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:
The closed form solution of the above formula is:
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:
2) Filtering based on posterior probability:
Finally , use the filtered samples to solve for the statistics of the target domain cluster:
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.
Then again align the global feature distribution with the goal of minimizing KL divergence:
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:
In general, the entire algorithm is as shown in Algorithm 1:
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.
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.
Наконец, автор полностью анализирует 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!
![[Ghibli-style images with AI] Introducing how to create free images with ChatGPT and copyright](https://img.php.cn/upload/article/001/242/473/174707263295098.jpg?x-oss-process=image/resize,p_40)
The latest model GPT-4o released by OpenAI not only can generate text, but also has image generation functions, which has attracted widespread attention. The most eye-catching feature is the generation of "Ghibli-style illustrations". Simply upload the photo to ChatGPT and give simple instructions to generate a dreamy image like a work in Studio Ghibli. This article will explain in detail the actual operation process, the effect experience, as well as the errors and copyright issues that need to be paid attention to. For details of the latest model "o3" released by OpenAI, please click here⬇️ Detailed explanation of OpenAI o3 (ChatGPT o3): Features, pricing system and o4-mini introduction Please click here for the English version of Ghibli-style article⬇️ Create Ji with ChatGPT

As a new communication method, the use and introduction of ChatGPT in local governments is attracting attention. While this trend is progressing in a wide range of areas, some local governments have declined to use ChatGPT. In this article, we will introduce examples of ChatGPT implementation in local governments. We will explore how we are achieving quality and efficiency improvements in local government services through a variety of reform examples, including supporting document creation and dialogue with citizens. Not only local government officials who aim to reduce staff workload and improve convenience for citizens, but also all interested in advanced use cases.

Have you heard of a framework called the "Fukatsu Prompt System"? Language models such as ChatGPT are extremely excellent, but appropriate prompts are essential to maximize their potential. Fukatsu prompts are one of the most popular prompt techniques designed to improve output accuracy. This article explains the principles and characteristics of Fukatsu-style prompts, including specific usage methods and examples. Furthermore, we have introduced other well-known prompt templates and useful techniques for prompt design, so based on these, we will introduce C.

ChatGPT Search: Get the latest information efficiently with an innovative AI search engine! In this article, we will thoroughly explain the new ChatGPT feature "ChatGPT Search," provided by OpenAI. Let's take a closer look at the features, usage, and how this tool can help you improve your information collection efficiency with reliable answers based on real-time web information and intuitive ease of use. ChatGPT Search provides a conversational interactive search experience that answers user questions in a comfortable, hidden environment that hides advertisements

In a modern society with information explosion, it is not easy to create compelling articles. How to use creativity to write articles that attract readers within a limited time and energy requires superb skills and rich experience. At this time, as a revolutionary writing aid, ChatGPT attracted much attention. ChatGPT uses huge data to train language generation models to generate natural, smooth and refined articles. This article will introduce how to effectively use ChatGPT and efficiently create high-quality articles. We will gradually explain the writing process of using ChatGPT, and combine specific cases to elaborate on its advantages and disadvantages, applicable scenarios, and safe use precautions. ChatGPT will be a writer to overcome various obstacles,

An efficient guide to creating charts using AI Visual materials are essential to effectively conveying information, but creating it takes a lot of time and effort. However, the chart creation process is changing dramatically due to the rise of AI technologies such as ChatGPT and DALL-E 3. This article provides detailed explanations on efficient and attractive diagram creation methods using these cutting-edge tools. It covers everything from ideas to completion, and includes a wealth of information useful for creating diagrams, from specific steps, tips, plugins and APIs that can be used, and how to use the image generation AI "DALL-E 3."

Unlock ChatGPT Plus: Fees, Payment Methods and Upgrade Guide ChatGPT, a world-renowned generative AI, has been widely used in daily life and business fields. Although ChatGPT is basically free, the paid version of ChatGPT Plus provides a variety of value-added services, such as plug-ins, image recognition, etc., which significantly improves work efficiency. This article will explain in detail the charging standards, payment methods and upgrade processes of ChatGPT Plus. For details of OpenAI's latest image generation technology "GPT-4o image generation" please click: Detailed explanation of GPT-4o image generation: usage methods, prompt word examples, commercial applications and differences from other AIs Table of contents ChatGPT Plus Fees Ch

How to use ChatGPT to streamline your design work and increase creativity This article will explain in detail how to create a design using ChatGPT. We will introduce examples of using ChatGPT in various design fields, such as ideas, text generation, and web design. We will also introduce points that will help you improve the efficiency and quality of a variety of creative work, such as graphic design, illustration, and logo design. Please take a look at how AI can greatly expand your design possibilities. table of contents ChatGPT: A powerful tool for design creation


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
