Abstract
Domain Generalization (DG) aims to build models that perform well on unseen target domains. While Dynamic Domain Generalization (DDG) improves upon static methods by adapting weights per input, it often fails to properly disentangle domain-invariant features from domain-specific ones. We present Parameter Exchange (PE), a simple training strategy that swaps adaptive components during training. This forces the static network to capture robust, universal features while the dynamic component focuses on instance-specific adaptation. PE achieves state-of-the-art results across major benchmarks like PACS and DomainNet without increasing inference costs.
Introduction
Deep learning models frequently encounter performance degradation when testing data follows a different distribution than training data, a phenomenon known as agnostic domain shift. Domain Generalization (DG) seeks to address this by learning representations that generalize across domains. Traditional static DG methods learn a fixed set of parameters, often overlooking valuable domain-specific information. Dynamic Domain Generalization (DDG) addresses this by utilizing networks that adapt their weights $f_{\Theta(x)}$ for each input $x$.
The Disentanglement Challenge
A core issue in DDG is the "disentanglement" of features. A dynamic network typically consists of a static base $\Theta_s$ and a dynamic adjustment $\Delta\Theta(x)$. Ideally, $\Theta_s$ should learn universal, domain-invariant features, while $\Delta\Theta(x)$ handles domain-specific nuances. Without explicit constraints, these components often become entangled, limiting the model's ability to generalize to entirely new domains.
Methodology: Parameter Exchange (PE)
Parameter Exchange (PE) is a "plug-and-play" optimization strategy designed to enforce this disentanglement. During training, the relationship between the static and dynamic components is intentionally perturbed. The authors propose two variants:
- Cross-instance PE: Swapping dynamic coefficients between different images in a batch.
- Cross-kernel PE: Shuffling coefficients across different kernel templates for a single image.
The training process involves two forward passes: a standard pass and a perturbed pass using PE. By optimizing both simultaneously, the static component is forced to remain robust even when paired with "incorrect" dynamic parameters, effectively pushing it to learn domain-invariant features.
Results and Discussion
The effectiveness of PE was validated on benchmarks including PACS, Office-Home, and DomainNet. On PACS, PE improved a standard DDG model's accuracy from 86.21% to 87.46%. On the large-scale DomainNet dataset, it achieved a state-of-the-art 48.38% average accuracy. Qualitative analysis via t-SNE visualizations (as seen in Figure 5b) demonstrates that PE leads to tighter, more distinct category clusters in unseen domains, confirming that the model effectively learns to separate class identity from domain style.
Conclusion
Parameter Exchange offers a computationally efficient way to improve the robustness of dynamic networks for domain generalization. By leveraging simple architectural perturbations during training, it achieves superior feature disentanglement and state-of-the-art performance across diverse datasets without adding overhead to the final inference phase.
Summary updated