Towards Data-Free Domain Generalization

Ahmed Frikha, Haokun Chen, Denis Krompaß, Thomas A. Runkler, Volker Tresp

Abstract

In this work, we investigate the unexplored intersection of domain generalization (DG) and data-free learning. In particular, we address the question: How can knowledge contained in models trained on different source domains be merged into a single model that generalizes well to unseen target domains, in the absence of source and target domain data? Machine learning models that can cope with domain shift are essential for real-world scenarios with often changing data distributions. Prior DG methods typically rely on using source domain data, making them unsuitable for private decentralized data. We define the novel problem of Data-Free Domain Generalization (DFDG), a practical setting where models trained on the source domains separately are available instead of the original datasets, and investigate how to effectively solve the domain generalization problem in that case. We propose DEKAN, an approach that extracts and fuses domain-specific knowledge from the available teacher models into a student model robust to domain shift. Our empirical evaluation demonstrates the effectiveness of our method which achieves first state-of-the-art results in DFDG by significantly outperforming data-free knowledge distillation and ensemble baselines.

Introduction

In real-world applications, machine learning models frequently encounter "domain shift"—a phenomenon where the data distribution at deployment time differs from the training distribution. For instance, an AI trained on medical images from one hospital might fail when deployed at another using different scanning equipment. Domain Generalization (DG) aims to solve this by training on multiple source domains to learn universal, invariant features.

However, standard DG assumes centralized access to all raw source data. In practice, privacy regulations (like GDPR) or commercial interests often create data silos. This paper addresses the challenge of performing domain generalization when the original data is inaccessible, a setting termed Data-Free Domain Generalization (DFDG).

Problem Formulation

In DFDG, we are provided with pre-trained models (teachers) from various source domains but no access to the original datasets. The goal is to "amalgamate" the knowledge from these isolated experts into a single student model capable of handling a totally new, unseen target domain. This setting is significantly more restrictive than standard DG or multi-source domain adaptation, as it requires learning without seeing a single original pixel.

Comparison of different domain-related learning paradigms.

Methodology: The DEKAN Approach

The authors propose DEKAN (Domain Entanglement via Knowledge Amalgamation from Domain-Specific Networks), a three-stage framework designed to bridge the gap between isolated models:

  1. Intra-Domain Knowledge Extraction: Using data-free inversion techniques, the system generates synthetic images that trigger the internal neurons of teacher models. These images represent the specific characteristics of individual source domains.
  2. Cross-Domain Knowledge Fusion: This is the core innovation. DEKAN generates "cross-domain" synthetic images optimized to be recognized by multiple teachers simultaneously. By forcing an image to satisfy different domain experts, the model is pressured to capture domain-agnostic features—the universal essence of an object (like "dog-ness") rather than domain-specific styles like brushstrokes or lighting.
  3. Multi-Domain Knowledge Distillation: A student model is trained using the synthetic data pool to mimic the combined predictions of the teachers, effectively absorbing their collective expertise into a robust architecture.
The DEKAN framework for cross-domain knowledge fusion.

Experimental Results

DEKAN was evaluated on two standard benchmarks for domain shift: PACS (Art, Cartoon, Photo, Sketch) and Digits (MNIST, MNIST-M, SVHN, USPS). The results established the first state-of-the-art benchmarks for DFDG:

  • PACS: DEKAN achieved an average accuracy of 83.9%, significantly outperforming standard data-free distillation (80.9%) and simple model ensembles (80.4%).
  • Digits: It reached 71.6% accuracy, notably improving performance on the difficult SVHN (Street View House Numbers) domain by 2.4% over other data-free baselines.

While DEKAN still trails slightly behind models trained on original raw data (~86% on PACS), it significantly narrows the gap, proving that data-free methods can achieve high performance.

Discussion and Future Work

DEKAN demonstrates that synthetic "bridge" images can effectively organize a student model's internal embedding space to ignore domain-specific noise. However, limitations remain, including the computational cost of generating high-quality synthetic images and the need for formal privacy guarantees. Future research will focus on integrating Differential Privacy to ensure that synthetic images do not inadvertently leak sensitive information from the original training sets.

Summary updated

BibTeX
@inproceedings{frikha2022towards,
  author = {Ahmed Frikha and Haokun Chen and Denis Krompaß and Thomas A. Runkler and Volker Tresp},
  title = {{Towards Data-Free Domain Generalization}},
  booktitle = {ACML},
  year = {2022},
  url = {https://openreview.net/forum?id=vN08g2_5w6H},
}
Figure