Introduction
Unsupervised Domain Adaptation (UDA) is a critical task in semantic segmentation, aiming to bridge the "sim-to-real" gap. While Vision Transformers (ViTs) have set new benchmarks in supervised learning, they have historically struggled with UDA compared to traditional Convolutional Neural Networks (CNNs). This paper identifies the root cause as the "high-frequency component problem"—a phenomenon where ViT predictions and internal features fluctuate wildly during training, leading to unstable self-training.
The High-Frequency Component Problem
Standard UDA techniques, such as self-training with pseudo-labels, rely on the model acting as a stable teacher for itself. However, the authors observe that ViTs exhibit significant "zig-zag" learning dynamics. As shown in Figure 1, the predictions and features of a Swin-Transformer (green lines) vibrate drastically iteration-to-iteration compared to a ResNet-101 (blue lines). This high-frequency noise prevents the model from converging on a reliable target domain representation.
The TransDA Framework
To address this instability, the authors propose TransDA, a framework designed to smooth the learning signal for Transformers. TransDA introduces two core innovations: the Momentum Transformer and Dynamic Discrepancy Measurement.
1. Momentum Transformer as a Low-Pass Filter
Instead of generating pseudo-labels from the current, jittery model, TransDA maintains a "Momentum Network"—a temporal moving average of the main model's weights. This network acts as a low-pass filter, suppressing high-frequency fluctuations and providing a stable, "smoothed" supervision signal for both labels and features. The red lines in Figure 1 demonstrate how this mechanism effectively stabilizes the learning process.
2. Dynamic Discrepancy Measurement
TransDA further refines the alignment process by weighting target samples based on their quality. The weighting function ($w$) considers:
- Uncertainty: Samples with high entropy (where the model is confused) are down-weighted.
- Domain Similarity: A dedicated similarity network identifies target samples that most closely resemble the source domain, prioritizing them for initial alignment.
Experimental Results
The researchers evaluated TransDA on standard benchmarks, including GTA5 $\to$ Cityscapes and SYNTHIA $\to$ Cityscapes.
- State-of-the-Art Performance: TransDA-S (using a Swin-S backbone) achieved 60.6 mIoU on GTA5 $\to$ Cityscapes, significantly outperforming previous state-of-the-art methods like ProDA.
- Ablation Insights: The momentum mechanism alone improved the baseline Swin-Transformer from 53.9 mIoU to 59.3 mIoU. Interestingly, while dynamic weighting significantly boosted ViT performance, it had negligible impact on CNNs, suggesting that ViTs are uniquely sensitive to the quality of the alignment signal.
Conclusion and Future Work
TransDA demonstrates that "smoothing" is a non-negotiable requirement for successfully applying Vision Transformers to unsupervised domain adaptation. By filtering out high-frequency noise through a momentum-based approach, TransDA enables ViTs to surpass CNN-based methods in sim-to-real transitions.
While momentum networks are more memory-efficient than maintaining massive lookup tables for pseudo-labels, they still require maintaining a second set of weights, which increases the training footprint. Future research may explore applying this smoothing philosophy to other unstable Transformer training paradigms, such as GANs, or investigating more complex domain discrepancy metrics.
Summary updated