[Paper Review] Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data
This paper proposes MosaicKD, a novel knowledge distillation framework that enables effective knowledge transfer from a pre-trained teacher model to a student model using only out-of-domain (OOD) data, by synthesizing in-domain-like samples through adversarial mosaicking of local patterns from OOD data. The method achieves state-of-the-art performance on classification and semantic segmentation benchmarks, significantly outperforming existing OOD-KD approaches.
Knowledge distillation~(KD) aims to craft a compact student model that imitates the behavior of a pre-trained teacher in a target domain. Prior KD approaches, despite their gratifying results, have largely relied on the premise that \emph{in-domain} data is available to carry out the knowledge transfer. Such an assumption, unfortunately, in many cases violates the practical setting, since the original training data or even the data domain is often unreachable due to privacy or copyright reasons. In this paper, we attempt to tackle an ambitious task, termed as \emph{out-of-domain} knowledge distillation~(OOD-KD), which allows us to conduct KD using only OOD data that can be readily obtained at a very low cost. Admittedly, OOD-KD is by nature a highly challenging task due to the agnostic domain gap. To this end, we introduce a handy yet surprisingly efficacious approach, dubbed as~ extit{MosaicKD}. The key insight behind MosaicKD lies in that, samples from various domains share common local patterns, even though their global semantic may vary significantly; these shared local patterns, in turn, can be re-assembled analogous to mosaic tiling, to approximate the in-domain data and to further alleviating the domain discrepancy. In MosaicKD, this is achieved through a four-player min-max game, in which a generator, a discriminator, a student network, are collectively trained in an adversarial manner, partially under the guidance of a pre-trained teacher. We validate MosaicKD over {classification and semantic segmentation tasks} across various benchmarks, and demonstrate that it yields results much superior to the state-of-the-art counterparts on OOD data. Our code is available at \url{https://github.com/zju-vipa/MosaicKD}.
Motivation & Objective
- To address the practical limitation of conventional knowledge distillation, which requires access to in-domain data for knowledge transfer.
- To enable knowledge distillation when only out-of-domain (OOD) data is available, due to privacy or copyright constraints.
- To overcome the severe domain gap between OOD data and the target domain by leveraging shared local patterns across domains.
- To develop a data synthesis method that preserves local realism while achieving global semantic coherence suitable for distillation.
- To demonstrate that synthetic data generated via adversarial mosaicking can effectively transfer knowledge from a pre-trained teacher to a student model.
Proposed method
- MosaicKD frames knowledge distillation as a four-player min-max game involving a generator, discriminator, student network, and a pre-trained teacher.
- The generator synthesizes in-domain-like images by reassembling local patches extracted from OOD data, mimicking mosaic tiling.
- Local patches are disassembled from OOD data and reassembled to form synthetic samples with realistic local textures and coherent global semantics.
- The discriminator distinguishes between real OOD patches and synthetic patches, enforcing local realism.
- The student network is trained to mimic the teacher’s predictions on synthetic samples, while the teacher provides soft labels for distillation.
- Adversarial training with the discriminator and knowledge distillation loss jointly optimize the generator and student for improved generalization.
Experimental results
Research questions
- RQ1Can knowledge distillation be effectively performed when only out-of-domain (OOD) data is available, without access to in-domain data or the original training data?
- RQ2Can shared local patterns across different domains be leveraged to synthesize realistic in-domain-like data for distillation?
- RQ3How does adversarial training with a discriminator that operates on local patches improve the quality of synthetic data for knowledge distillation?
- RQ4What is the impact of patch size on the performance of OOD knowledge distillation, especially under high domain discrepancy?
- RQ5How does the proposed MosaicKD framework compare to existing data-free and unlabeled knowledge distillation methods in terms of performance and robustness?
Key findings
- MosaicKD achieves state-of-the-art performance on image classification and semantic segmentation tasks using only OOD data, significantly outperforming existing methods.
- On CIFAR-100, MosaicKD achieves 70.41% accuracy with a ResNet-16-2 student, surpassing the next best method by over 5 percentage points.
- On Places365, MosaicKD achieves 69.41% accuracy with a Wide ResNet-40-2, demonstrating strong generalization under high domain shift.
- The ablation study shows that removing patch learning leads to failure in generating correct semantic categories, while removing the discriminator or adversarial training degrades performance.
- Smaller patch sizes are more effective for highly divergent OOD data (e.g., SVHN), indicating that local similarity is more critical when domain discrepancy is large.
- Training efficiency analysis shows MosaicKD converges faster than DFQ and vanilla KD, indicating improved optimization dynamics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.