MultiMatch: Multi-task Learning for Semi-supervised Domain Generalization

Lei Qi, Hongpeng Yang, Yinghuan Shi, Xin Geng

Introduction

Deep learning models are notoriously brittle when faced with domain shift—the discrepancy in data distribution between training (source) and testing (target) environments. While Domain Generalization (DG) aims to build models that perform well on unseen domains, standard DG methods typically require large amounts of labeled data from multiple source domains. In real-world scenarios, labeling data across diverse environments is prohibitively expensive.

MultiMatch addresses this by focusing on Semi-supervised Domain Generalization (SSDG), a challenging setting where a model must generalize to unseen environments using only a small fraction of labeled data from multiple source domains alongside a larger pool of unlabeled data.

The Challenge of Semi-supervised Domain Generalization

Existing semi-supervised learning (SSL) methods, such as FixMatch, generally assume that all data (labeled and unlabeled) originates from the same distribution. In the SSDG setting, this assumption is violated because data comes from multiple distinct source domains. Standard SSL methods often suffer from "domain interference," where the differences between source domains create noise that degrades the quality of the pseudo-labels used to train the model on unlabeled data.

Comparison of standard Semi-Supervised Learning (SSL) and Semi-Supervised Domain Generalization (SSDG).

As illustrated in the figure above, while traditional SSL deals with a single domain, SSDG requires managing multiple labeled and unlabeled domains simultaneously. MultiMatch reframes this problem as a multi-task learning challenge, introducing domain-specific "local" tasks and a "global" task to produce more accurate pseudo-labels.

The MultiMatch Framework

MultiMatch extends the popular FixMatch algorithm into a multi-task learning framework built on two theoretical pillars: exploiting all samples through shared parameters and mitigating the domain gap through domain-specific components.

Architecture and Components

  • Local Tasks: For $N$ source domains, the model maintains $N$ independent Batch Normalization (BN) layers and $N$ separate classifiers. Each local task focuses on the specific nuances and statistics of its own domain, preventing cross-domain interference.
  • Global Task: An additional $(N+1)$-th task combines data from all domains to learn domain-invariant features. This task prepares the model for the unseen target domain by focusing on features that are consistent across all training environments.
  • Prediction Fusion: During training, the model generates pseudo-labels by fusing the predictions of the local task and the global task. This ensemble approach acts as a robust regularizer; a pseudo-label is only accepted if both the domain-specific and domain-agnostic views agree, filtering out domain-specific noise.

Inference on Unseen Domains

During testing on an unseen target domain, the model cannot rely on a pre-existing local classifier. Instead, it fuses the global task's prediction with the prediction from the most "similar" local task, which is determined dynamically based on prediction confidence.

Experimental Results

The authors evaluated MultiMatch on three widely recognized DG benchmarks: PACS (Photo, Art, Cartoon, Sketch), Office-Home, and the large-scale miniDomainNet.

MultiMatch consistently outperformed both standard semi-supervised methods and specialized SSDG methods:

  • PACS (10 labels/class): Achieved 81.57% accuracy, significantly outperforming the FixMatch baseline (77.83%) and the previous state-of-the-art, StyleMatch (80.41%).
  • Office-Home (10 labels/class): Reached 62.57%, a substantial improvement over FixMatch (57.86%).
  • Large Scale Performance: On the challenging miniDomainNet, MultiMatch improved upon StyleMatch by +3.66% (58.79% vs 55.13%).

Key Insights

A critical finding of the paper is the Batch Normalization (BN) Bottleneck. Standard BN layers calculate statistics across an entire batch. If a batch contains multiple domains, these statistics become noisy, leading to poor pseudo-labels. MultiMatch demonstrates that using Independent BN for each task is essential for high-quality semi-supervised learning in multi-domain settings. Furthermore, the authors provide theoretical grounding, using the upper bound of generalization error to prove that sharing the backbone while separating BN and classifiers is mathematically sound for reducing error in multi-domain settings.

Conclusion and Future Work

MultiMatch provides a robust framework for SSDG by effectively balancing domain-specific and domain-invariant learning. While the architecture currently scales linearly with the number of source domains—which could lead to bloat in scenarios with hundreds of domains—it sets a new state-of-the-art for generalization with limited labels. Future research may explore more sophisticated task-weighting mechanisms or extend this multi-task approach to other computer vision challenges like object detection.

Summary updated

BibTeX
@article{qi2022multimatch,
  author = {Lei Qi and Hongpeng Yang and Yinghuan Shi and Xin Geng},
  title = {{MultiMatch: Multi-task Learning for Semi-supervised Domain Generalization}},
  journal = {ACM Trans. Multim. Comput. Commun. Appl.},
  year = {2022},
}
Figure