Abstract
The ability to generalize to new environments is critical for deep neural networks. Most existing works presume that the training and test data share an identical label set, overlooking the potential presence of new classes in test data. In this paper, we tackle a practical and challenging problem: Open-Set Model Adaptation (OSMA). OSMA aims to train a model on the source domain, which contains only known class data, and then adapt the trained model to the distribution-shifted target domain to classify known class data while identifying new class data. We propose a novel and universal two-stage framework named Activate and Adapt (ADA). In the training stage, we extract potential new class information hidden within the rich semantics of the source domain data to enable the model to identify new class data. Additionally, to retain source domain information while preserving data privacy, we condense the source domain data into a small dataset, facilitating the subsequent adaptation phase. In the test stage, we adaptively adjust the source-trained model to the target domain with new classes by infusing the style of target data into the condensed dataset and decoupling domain alignment for known and new classes. Experiments across three standard benchmarks demonstrate that ADA surpasses previous methods in both online and offline settings.
Introduction
Most machine learning models operate under a "closed-set" assumption, where the classes encountered during training are the only ones expected at test time. However, real-world applications often involve "Open-Set Model Adaptation" (OSMA), where a model must handle both a change in environment (domain shift) and the appearance of entirely new categories (open-set) at test time. For instance, a self-driving car trained in a city might encounter a horse in the countryside—an object it hasn't been trained to recognize in an environment with different lighting and textures.
Existing solutions like Domain Generalization (DG) or Test-Time Adaptation (TTA) usually struggle with this "adaptivity gap." They either assume the label set never changes or fail to adjust the model's internal representations effectively when the environment shifts. Furthermore, many adaptation methods require access to the original training data, which raises significant data privacy concerns.
The ADA Framework
To address these challenges, we propose the Activate and Adapt (ADA) framework, which consists of two distinct stages: Unknown Activation and Source Condensation (UASC), followed by Open Model Adaptation (OMA).
Stage 1: Unknown Activation and Source Condensation (UASC)
Unknown Activation: Instead of generating synthetic "fake" unknown data, ADA leverages the "rich semantics" already present in source images. For example, a photo of a "bed" might contain a "lamp" or "curtain" in the background. By decomposing image features into fine-grained "granular features," the model learns to treat these background elements as a proxy for the "unknown" class. This allows the model to develop a sensitivity to novelty without requiring external out-of-distribution datasets.
Source Condensation: To protect privacy and reduce storage requirements, the source dataset is condensed into a tiny set of "synthetic" images. These images, which often appear as colorful noise to humans, retain the essential mathematical style and class information needed for later adaptation without exposing the original raw data.
Stage 2: Open Model Adaptation (OMA)
Style Injection: During the adaptation phase, the model captures the "style" (statistical distribution) of the new target environment and injects it into the condensed source data. This creates "virtual" target samples that the model can use for supervised fine-tuning, effectively "re-dressing" its knowledge of known objects in the style of the new environment.
Decoupled Domain Alignment: The framework uses lightweight classifiers to ensure the model's features are domain-invariant. Crucially, it aligns known and unknown classes separately to prevent the mismatched label sets from confusing the model's internal representations.
Experimental Evaluation
The ADA framework was evaluated on four standard computer vision benchmarks modified for open-set scenarios: Office-Home, Office-31, PACS, and VisDA. The primary metric used was the h-score (the harmonic mean of accuracy for known and unknown classes), which rewards models that maintain high performance on both tasks.
Key Results
- Superior Performance: ADA outperformed the best baselines (such as SHOT and AaD) by 4.9% on Office-Home, 7.3% on PACS, and 4.6% on Office-31.
- Balanced Recognition: Unlike many previous methods that were either too conservative (misclassifying unknown as known) or too paranoid (misclassifying known as unknown), ADA maintained a high and balanced accuracy across both categories.
- Versatility: The model demonstrated effectiveness in both offline (batch processing) and online (one-by-one) adaptation settings.
Conclusion
ADA introduces a novel way to handle open-set adaptation by treating background semantics as a "goldmine" for unknown class information. By separating low-level style from high-level content and using dataset condensation as a privacy shield, the framework provides a robust solution for deploying models in dynamic, real-world environments. Future work may focus on "Open-Set Discovery," where the model not only identifies unknown objects but also begins to cluster them into new, distinct categories.
Summary updated