COMET: Contrastive Mean Teacher for Online Source-Free Universal Domain Adaptation

Read original: arXiv:2401.17728 - Published 5/3/2024 by Pascal Schlachter, Bin Yang
Total Score

0

📶

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • Real-world applications often face a domain shift from training to test data, leading to the development of test-time adaptation (TTA) to adapt pre-trained models to test data without access to source data.
  • Existing TTA methods are limited to the closed-set assumption, where there is no category shift between source and target domains.
  • In realistic open-world settings, a category shift can occur, where source classes may not appear in the target domain, new classes may be present, or both.
  • Furthermore, test data often arrives sequentially in a stream of batches, requiring online TTA.
  • This combination of aspects, online source-free universal domain adaptation (online SF-UniDA), has not been studied before.

Plain English Explanation

When machine learning models are trained on data from one setting or domain, they may not perform well when applied to data from a different domain. For example, a model trained on images of dogs and cats may struggle with images of horses and sheep. This issue, known as domain shift, has led to the development of test-time adaptation (TTA), which aims to adapt a pre-trained model to the new data without access to the original training data.

However, most existing TTA methods assume that the categories or classes of objects in the new data are the same as the ones the model was trained on, a condition known as the closed-set assumption. In the real world, this is often not the case - the new data may contain new classes that the model has never seen before, or some of the original classes may be missing. This is known as a category shift.

Additionally, in many real-world scenarios, the new data doesn't arrive all at once but rather in a continuous stream of small batches, requiring the model to adapt and make predictions in an online fashion.

The combination of these challenges - category shift, domain shift, and the need for online adaptation - has not been well-studied before. This paper introduces a new approach, called Contrastive Mean Teacher (COMET), that aims to address this novel scenario of online source-free universal domain adaptation (online SF-UniDA).

Technical Explanation

The paper proposes a method called Contrastive Mean Teacher (COMET) to address the challenge of online source-free universal domain adaptation (online SF-UniDA). COMET applies a contrastive loss to rebuild a feature space where samples of known classes form distinct clusters, and samples of new classes are well-separated from them. This is complemented by an entropy loss that encourages the classifier to output low entropy (i.e., confident) predictions for known classes and high entropy (i.e., uncertain) predictions for new classes, allowing them to be easily detected and rejected as unknown.

To provide reliable pseudo-labels for these losses, COMET is embedded within a mean teacher (MT) framework, where a student model is trained to match the predictions of a more stable teacher model.

The paper evaluates COMET across two datasets and various category shift scenarios, setting an initial benchmark for online SF-UniDA. COMET is shown to yield state-of-the-art performance and demonstrate consistency and robustness across different settings.

Critical Analysis

The paper presents a novel and relevant approach to the challenging problem of online SF-UniDA, which has not been well-studied before. The use of contrastive learning and entropy-based losses to address the category shift and online adaptation requirements is a promising direction.

However, the paper does not provide a detailed analysis of the limitations of the proposed approach. For example, it would be valuable to understand how COMET performs in scenarios with a more significant category shift, or how it scales to a larger number of classes and domains.

Additionally, the paper does not discuss potential issues with the mean teacher framework, such as the stability of the teacher model or the impact of noisy pseudo-labels on the student's performance.

Further research could explore ways to enhance COMET's robustness, such as incorporating additional techniques like self-training via metric learning, unified entropy optimization, domain-specific block selection, or out-of-domain test-time adaptation. Exploring the application of noise-contrastive approaches to the online SF-UniDA setting could also be a promising direction.

Conclusion

This paper introduces a novel approach called Contrastive Mean Teacher (COMET) to address the challenging problem of online source-free universal domain adaptation (online SF-UniDA). COMET combines contrastive learning and entropy-based losses within a mean teacher framework to adapt pre-trained models to new data with category shifts, without access to the original training data.

The paper sets an initial benchmark for online SF-UniDA and demonstrates the effectiveness and robustness of COMET across various datasets and category shift scenarios. This work represents an important step forward in addressing the practical challenges of domain adaptation in real-world applications, where both domain and category shifts can occur, and the test data arrives sequentially.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

📶

Total Score

0

COMET: Contrastive Mean Teacher for Online Source-Free Universal Domain Adaptation

Pascal Schlachter, Bin Yang

In real-world applications, there is often a domain shift from training to test data. This observation resulted in the development of test-time adaptation (TTA). It aims to adapt a pre-trained source model to the test data without requiring access to the source data. Thereby, most existing works are limited to the closed-set assumption, i.e. there is no category shift between source and target domain. We argue that in a realistic open-world setting a category shift can appear in addition to a domain shift. This means, individual source classes may not appear in the target domain anymore, samples of new classes may be part of the target domain or even both at the same time. Moreover, in many real-world scenarios the test data is not accessible all at once but arrives sequentially as a stream of batches demanding an immediate prediction. Hence, TTA must be applied in an online manner. To the best of our knowledge, the combination of these aspects, i.e. online source-free universal domain adaptation (online SF-UniDA), has not been studied yet. In this paper, we introduce a Contrastive Mean Teacher (COMET) tailored to this novel scenario. It applies a contrastive loss to rebuild a feature space where the samples of known classes build distinct clusters and the samples of new classes separate well from them. It is complemented by an entropy loss which ensures that the classifier output has a small entropy for samples of known classes and a large entropy for samples of new classes to be easily detected and rejected as unknown. To provide the losses with reliable pseudo labels, they are embedded into a mean teacher (MT) framework. We evaluate our method across two datasets and all category shifts to set an initial benchmark for online SF-UniDA. Thereby, COMET yields state-of-the-art performance and proves to be consistent and robust across a variety of different scenarios.

Read more

5/3/2024

Total Score

0

Enhanced Online Test-time Adaptation with Feature-Weight Cosine Alignment

WeiQin Chuah, Ruwan Tennakoon, Alireza Bab-Hadiashar

Online Test-Time Adaptation (OTTA) has emerged as an effective strategy to handle distributional shifts, allowing on-the-fly adaptation of pre-trained models to new target domains during inference, without the need for source data. We uncovered that the widely studied entropy minimization (EM) method for OTTA, suffers from noisy gradients due to ambiguity near decision boundaries and incorrect low-entropy predictions. To overcome these limitations, this paper introduces a novel cosine alignment optimization approach with a dual-objective loss function that refines the precision of class predictions and adaptability to novel domains. Specifically, our method optimizes the cosine similarity between feature vectors and class weight vectors, enhancing the precision of class predictions and the model's adaptability to novel domains. Our method outperforms state-of-the-art techniques and sets a new benchmark in multiple datasets, including CIFAR-10-C, CIFAR-100-C, ImageNet-C, Office-Home, and DomainNet datasets, demonstrating high accuracy and robustness against diverse corruptions and domain shifts.

Read more

5/14/2024

🔎

Total Score

0

Multi-Source Domain Adaptation for Object Detection with Prototype-based Mean-teacher

Atif Belal, Akhil Meethal, Francisco Perdigon Romero, Marco Pedersoli, Eric Granger

Adapting visual object detectors to operational target domains is a challenging task, commonly achieved using unsupervised domain adaptation (UDA) methods. Recent studies have shown that when the labeled dataset comes from multiple source domains, treating them as separate domains and performing a multi-source domain adaptation (MSDA) improves the accuracy and robustness over blending these source domains and performing a UDA. For adaptation, existing MSDA methods learn domain-invariant and domain-specific parameters (for each source domain). However, unlike single-source UDA methods, learning domain-specific parameters makes them grow significantly in proportion to the number of source domains. This paper proposes a novel MSDA method called Prototype-based Mean Teacher (PMT), which uses class prototypes instead of domain-specific subnets to encode domain-specific information. These prototypes are learned using a contrastive loss, aligning the same categories across domains and separating different categories far apart. Given the use of prototypes, the number of parameters required for our PMT method does not increase significantly with the number of source domains, thus reducing memory issues and possible overfitting. Empirical studies indicate that PMT outperforms state-of-the-art MSDA methods on several challenging object detection datasets. Our code is available at https://github.com/imatif17/Prototype-Mean-Teacher.

Read more

8/2/2024

Learning Domain-Invariant Features for Out-of-Context News Detection
Total Score

0

Learning Domain-Invariant Features for Out-of-Context News Detection

Yimeng Gu, Mengqi Zhang, Ignacio Castro, Shu Wu, Gareth Tyson

Multimodal out-of-context news is a common type of misinformation on online media platforms. This involves posting a caption, alongside an invalid out-of-context news image. Reflecting its importance, researchers have developed models to detect such misinformation. However, a common limitation of these models is that they only consider the scenario where pre-labeled data is available for each domain, failing to address the out-of-context news detection on unlabeled domains (e.g., unverified news on new topics or agencies). In this work, we therefore focus on domain adaptive out-of-context news detection. In order to effectively adapt the detection model to unlabeled news topics or agencies, we propose ConDA-TTA (Contrastive Domain Adaptation with Test-Time Adaptation) which applies contrastive learning and maximum mean discrepancy (MMD) to learn the domain-invariant feature. In addition, it leverages target domain statistics during test-time to further assist domain adaptation. Experimental results show that our approach outperforms baselines in 5 out of 7 domain adaptation settings on two public datasets, by as much as 2.93% in F1 and 2.08% in accuracy.

Read more

6/12/2024