Direct Distillation Between Different Domains

Jialiang Tang, Shuo Chen, Gang Niu, Hongyuan Zhu, Joey Tianyi Zhou, Chen Gong, Masashi Sugiyama

Abstract

Knowledge Distillation (KD) typically assumes that teacher and student models operate on the same data domain. However, real-world scenarios often involve a domain gap between the source data used to train the teacher and the target data available for the student. Traditional solutions rely on cumbersome two-stage "adapt-then-distill" or "distill-then-adapt" processes. This paper introduces Direct Distillation between Different Domains (4Ds), a one-stage framework that enables efficient knowledge transfer across domains. By utilizing Fourier transforms to decouple semantic features from domain-specific styles, 4Ds achieves superior performance and computational efficiency without requiring access to source data.

Introduction

Model compression via Knowledge Distillation (KD) is essential for deploying large-scale models on resource-constrained devices. A significant challenge arises when the teacher model is pre-trained on a source domain (e.g., synthetic data) while the student must perform on a target domain (e.g., real-world images). This domain gap hinders direct distillation.

Existing approaches typically follow a two-stage pipeline: either distilling the teacher into a student on source data followed by target adaptation, or adapting the teacher to the target domain before distillation. These methods are computationally expensive, prone to error accumulation, and often require the original source data, which may be unavailable due to privacy or storage constraints.

Comparison of knowledge distillation strategies across domains.

As shown in Figure 1, the proposed 4Ds framework simplifies this into a single stage, allowing for interactive learning between the teacher and student directly on the target domain, even when source data is unavailable.

Methodology

The 4Ds framework introduces three key innovations to bridge the domain gap in a single stage:

1. Fourier-based Knowledge Adapters

The core of 4Ds lies in the observation that the phase of an image's Fourier transform captures semantic structure (shapes, objects), while the amplitude captures style and lighting. The framework inserts lightweight learnable adapters (comprising only ~2% of parameters) into the frozen teacher network. These adapters "refurbish" the teacher's features by mixing target domain amplitudes with the teacher's semantic knowledge, effectively aligning the teacher with the target domain without full retraining.

2. Fusion-Activation Mechanism

To ensure the student learns robust, domain-invariant features, 4Ds employs a fusion-activation step. It extracts features from multiple layers of the teacher and uses an attention-based mechanism to highlight the most relevant semantic information for the student, filtering out domain-specific noise.

3. Interactive Training

Unlike static KD, 4Ds enables the teacher (via its adapters) and the student to be optimized concurrently on the target data. This interactive process ensures the teacher becomes more "student-friendly" and better suited to the target environment.

Detailed architecture of the 4Ds framework and the Fourier-based adapter.

Figure 2 illustrates the detailed architecture, highlighting how the Fourier-based adapters decouple phases and amplitudes to facilitate domain-invariant knowledge transfer.

Experiments and Results

The authors evaluated 4Ds across several domain adaptation benchmarks, including Office-Home, Office-Caltech, PACS, and DomainNet.

  • Superior Accuracy: On the Office-Home dataset, 4Ds achieved an average accuracy of 82.77%, representing a +5.03% improvement over standard training and outperforming state-of-the-art two-stage methods.
  • Efficiency: By training only a small fraction of parameters (the adapters), 4Ds is significantly more efficient than methods requiring full model adaptation.
  • Privacy-Friendly: The framework operates without needing the original source data, making it suitable for data-free distillation scenarios where source data is restricted.

Conclusion and Limitations

The 4Ds framework provides a powerful, one-stage solution for cross-domain knowledge distillation. By leveraging Fourier-based decoupling, it effectively separates "what" an object is from "how" it looks. While highly effective for visual data, the method's reliance on the phase-amplitude separation assumption may limit its applicability to non-visual domains. Future work could explore extending 4Ds to unsupervised domain adaptation where target labels are unavailable.

Summary updated

BibTeX
@inproceedings{tang2024direct,
  author = {Jialiang Tang and Shuo Chen and Gang Niu and Hongyuan Zhu and Joey Tianyi Zhou and Chen Gong and Masashi Sugiyama},
  title = {{Direct Distillation Between Different Domains}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72989-8\_9},
}
Figure