Test-time adaptation (TTA) is crucial for deploying deep learning models in dynamic environments where domain shifts, such as changing weather conditions, are common. While visual prompting has emerged as a lightweight adaptation technique, existing "dense" prompts often occlude critical spatial information, hindering performance in dense prediction tasks like semantic segmentation. This paper introduces Sparse Visual Domain Prompts (SVDP), a method that utilizes minimal trainable parameters placed strategically based on model uncertainty.
The Challenge of Dense Prompting
Deep learning models frequently encounter performance degradation when deployed in environments different from their training data. Test-Time Adaptation (TTA) addresses this by updating models using unlabeled data encountered during deployment. Recent research has explored Visual Prompts—small, learnable patterns added to input images—to bridge the domain gap.
However, traditional dense prompts, which often take the form of solid blocks or borders, create significant challenges for dense prediction tasks like semantic segmentation or depth estimation. In these tasks, every pixel matters. Dense prompts can inadvertently mask essential environmental cues, such as road signs or lane markings, leading to "spatial blackouts" where the model loses the local context required for pixel-perfect accuracy.
Proposed Method: Sparse Visual Domain Prompts (SVDP)
To overcome the limitations of dense prompting, the authors propose the Sparse Visual Domain Prompts (SVDP) framework. This system consists of three key components designed to adapt models efficiently without needing original training data:
- Sparse Visual Domain Prompts (SVDP): Instead of dense blocks, SVDP utilizes a sparse set of trainable parameters, affecting only approximately 0.1% of the total pixels. This sparsity ensures that the underlying image structure remains visible to the model.
- Domain Prompt Placement (DPP): Rather than uniform distribution, prompts are placed strategically. The system uses Monte Carlo (MC) Dropout to estimate pixel-wise uncertainty. Prompts are then allocated to the areas where the model is most "confused," effectively patching the most vulnerable parts of the input.
- Domain Prompt Updating (DPU): To handle varying difficulty across a test stream, DPU adaptively adjusts the update speed using an Exponential Moving Average (EMA) based on image-level uncertainty.
The architecture employs a Teacher-Student setup. A student model learns the prompts via consistency loss, while a teacher model—an ensemble of previous student states—provides stable pseudo-labels for training.
Experimental Results
The SVDP method was evaluated on major cross-domain benchmarks, including Cityscapes to ACDC (segmentation) and KITTI to DrivingStereo (depth).
In semantic segmentation on the ACDC dataset (fog, night, rain, snow), SVDP achieved a Mean mIoU of 60.1%, outperforming previous state-of-the-art methods like CoTTA and dense prompting (VDP). In the more challenging Continual TTA (CTTA) setting, where domains shift sequentially, SVDP demonstrated superior robustness, gaining +4.4% mIoU over the non-adapted source model, whereas some competing methods suffered from catastrophic forgetting.
For depth estimation, SVDP significantly reduced outliers, showing a 65.9% improvement in the "$\\delta > 1.25$" metric compared to the baseline.
Discussion and Limitations
The success of SVDP hinges on finding a "Goldilocks zone" of sparsity. If prompts are too sparse, they lack the capacity to encode domain knowledge; if too dense, they begin to occlude the scene and degrade performance. Additionally, while the prompts themselves are computationally efficient, the use of MC Dropout for uncertainty estimation introduces a computational overhead that may require optimization for real-time robotics or automotive applications.
Conclusion
Sparse Visual Domain Prompts offer a compelling solution for adapting dense prediction models at test time. By prioritizing sparsity and uncertainty-guided placement, SVDP maintains the integrity of spatial information while effectively bridging domain gaps, paving the way for more robust computer vision systems in unpredictable real-world environments.
Summary updated