Test-time Adaptation in the Dynamic World with Compound Domain Knowledge Management

Junha Song, Kwanyong Park, InKyu Shin, Sanghyun Woo, Chaoning Zhang, In So Kweon · DOI

Abstract: Prior to the deployment of robotic systems, pre-training the deep-recognition models on all potential visual cases is infeasible in practice. Hence, test-time adaptation (TTA) allows the model to adapt itself to novel environments and improve its performance during test time (i.e., lifelong adaptation). Several works for TTA have shown promising adaptation performances in continuously changing environments. However, our investigation reveals that existing methods are vulnerable to dynamic distributional changes and often lead to overfitting of TTA models. To address this problem, this paper first presents a robust TTA framework with compound domain knowledge management. Our framework helps the TTA model to harvest the knowledge of multiple representative domains (i.e., compound domain) and conduct the TTA based on the compound domain knowledge. In addition, to prevent overfitting of the TTA model, we devise novel regularization which modulates the adaptation rates using domain-similarity between the source and the current target domain. With the synergy of the proposed framework and regularization, we achieve consistent performance improvements in diverse TTA scenarios, especially on dynamic domain shifts. We demonstrate the generality of proposals via extensive experiments including image classification on ImageNet-C and semantic segmentation on GTA5, C-driving, and corrupted Cityscapes datasets.

Introduction

Deep recognition models deployed in real-world robotic systems frequently encounter environmental conditions that differ significantly from their training data. While Test-Time Adaptation (TTA) offers a path for models to adjust to these novel environments on-the-fly, existing methods often struggle with the rapid, non-monotonic distributional changes characteristic of the "dynamic world." Standard TTA approaches typically assume slow or static domain shifts, leading to overfitting on immediate noisy data and the "catastrophic forgetting" of previously learned environmental knowledge. This paper introduces a robust TTA framework designed to manage compound domain knowledge, ensuring stability and performance across diverse and fluctuating conditions.

Proposed Methodology

The proposed framework addresses the limitations of current TTA by introducing two core components: Compound Domain Knowledge Management and Domain Similarity-based Regularization.

Compound Domain Knowledge Management

Rather than maintaining a single global model state, the framework utilizes $K$ sets of specialized Batch Normalization (BN) layers. This allows the model to partition knowledge across different representative domains.

  • Domain Discriminative Features (ddf): The system identifies the current environment by extracting "style" features (mean and variance) from the network's shallow layers, which have been found to be more sensitive to domain shifts than semantic content.
  • Continual Domain-Matching: A momentum-based algorithm efficiently matches incoming images to the most relevant specialized BN module. This enables the model to "remember" and quickly switch back to optimal parameters for a previously encountered domain (e.g., returning to "sunny" settings after a tunnel).
TTA framework with BN layer management and domain matching.

Domain Similarity-based Regularization

To prevent overfitting to unreliable or noisy target data (such as heavy fog or night scenes), the authors introduce a regularization term $\omega$. This term modulates the adaptation rate based on the cosine similarity between the current image's statistics and the original source statistics. If a domain is too dissimilar from the source, the adaptation pace is slowed to mitigate error accumulation.

Experimental Evaluation

The framework was rigorously tested across three primary benchmarks:

  1. ImageNet-C: Evaluates classification robustness against 15 types of digital and environmental corruptions.
  2. GTA5 to C-driving: A synthetic-to-real semantic segmentation task involving transitions between various weather conditions (cloudy, rainy, snowy).
  3. Cityscapes-C: A corrupted version of the Cityscapes dataset used to simulate cyclical environmental changes, such as repeated tunnel entries.

Results and Discussion

The proposed method consistently outperformed state-of-the-art TTA techniques like CoTTA and EATA, particularly in scenarios with random or cyclical domain shifts.

Performance comparison and knowledge management in dynamic environments.

Key findings include:

  • Stability: On ImageNet-C, the model achieved a lower average error rate of 53.5%, maintaining stability even when corruptions appeared in random sequences.
  • Segmentation Accuracy: In the GTA5 to C-driving task, the model reached a Mean Intersection over Union (mIoU) of 33.7%, significantly higher than the Source baseline (29.1%) and TENT (21.1%).
  • Efficiency: The momentum-based prototype update allows the system to operate at 156 FPS, making it suitable for real-time robotics applications where traditional clustering methods (3 FPS) fail.

Conclusion

By separating environmental knowledge into specialized modules and controlling adaptation rates through similarity-based regularization, this framework provides a robust solution for lifelong adaptation in dynamic worlds. Future work will explore dynamic module generation and integration with more complex unsupervised loss functions.

Summary updated

BibTeX
@article{song2023test,
  author = {Junha Song and Kwanyong Park and InKyu Shin and Sanghyun Woo and Chaoning Zhang and In So Kweon},
  title = {{Test-time Adaptation in the Dynamic World with Compound Domain Knowledge Management}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2023},
  doi = {10.1109/lra.2023.3308063},
}
Figure