Abstract
Semantic segmentation models often suffer from performance degradation when applied to domains different from their training data. This paper introduces Memory Regularization in vivo, a simple yet effective technique for unsupervised domain adaptation (UDA). Unlike existing methods that rely on external memory modules or complex teacher-student architectures, the proposed approach leverages the model's internal auxiliary classifier to identify and mitigate prediction uncertainty on unlabeled target data. By enforcing consistency between primary and auxiliary classifiers, the model achieves significant performance gains across multiple benchmarks, including GTA5 to Cityscapes, with zero additional parameters during inference.
Introduction
Deep learning models for semantic segmentation require massive amounts of annotated data, which is prohibitively expensive to produce for every new environment. Unsupervised Domain Adaptation (UDA) addresses this by training models on labeled "source" data—often synthetic, such as GTA5—and adapting them to unlabeled "target" data from the real world.
Traditional UDA methods primarily focus on inter-domain alignment, attempting to make features from the source and target domains indistinguishable. However, these methods often overlook intra-domain knowledge: the inherent uncertainty the model experiences when processing the novel target domain. The authors observed that while a model may be confident on source data, its primary and auxiliary classifiers frequently disagree on target data. This "prediction inconsistency" serves as a valuable signal for poor adaptation that can be exploited without external labels.
Methods
The core innovation, Memory Regularization in vivo ("within the living"), regularizes the model internally without adding extra parameters or external memory banks.
The Model as Memory
Many modern segmentation architectures (e.g., DeepLabv2, PSPNet) utilize an "auxiliary classifier" during training to facilitate gradient flow. The authors conceptualize the entire network as a memory module where the input image serves as the "key" and the resulting classifier outputs are the "values."
Minimizing Inconsistency
On unlabeled target images, the model calculates the discrepancy between the primary and auxiliary classifiers using Kullback–Leibler (KL) divergence. By minimizing this loss ($L_{mr}$), the model is forced to reach an internal consensus, effectively regularizing itself against uncertainty.
Two-Stage Training
The adaptation process follows a two-stage pipeline:
- Stage-I: The model undergoes inter-domain alignment using standard adversarial losses while simultaneously applying the new memory regularization.
- Stage-II: The model generates "pseudo-labels" for the target data. It then fine-tunes itself using these labels while continuing to use memory regularization to prevent overfitting to noisy or incorrect pseudo-labels.
Experimental Results
The method was evaluated on three challenging benchmarks: GTA5 → Cityscapes, SYNTHIA → Cityscapes, and Cityscapes → Oxford RobotCar.
- Performance Gains: On the GTA5 → Cityscapes task, the method improved the Mean Intersection over Union (mIoU) by +11.1% over the baseline. Similar gains (+11.3%) were observed on SYNTHIA.
- Efficiency: Since the method utilizes existing architectural components, it provides these improvements with zero additional parameters during inference.
- Robustness: Hyperparameter analysis indicates that the model is robust to the weight of the regularization term ($λ_{mr}$), making it versatile for various deployment scenarios.
Discussion
A key insight of this work is that the "second opinion" provided by the auxiliary branch is essentially free. Consistency acts as a powerful proxy for accuracy in the absence of labels. Furthermore, this method is "orthogonal" to existing alignment techniques; it complements adversarial training by focusing on internal model stability rather than just external domain gaps. In the self-training stage, memory regularization acts as a smoothing term, preventing the model from "hallucinating" and locking into errors present in noisy pseudo-labels.
Limitations
The method's primary limitation is its dependence on architectures that include auxiliary classifiers. While common in segmentation, applying this to other tasks might require architectural modifications. Additionally, if the model is "consistently wrong" across both branches, the regularization might reinforce incorrect predictions.
Conclusion
Memory Regularization in vivo offers a robust and efficient path for unsupervised scene adaptation. By leveraging internal consistency, it bridges the domain gap more effectively than alignment alone, setting a new standard for parameter-efficient UDA.
Summary updated