[Paper Review] Contrastive Model Inversion for Data-Free Knowledge Distillation
Introduces Contrastive Model Inversion (CMI) to mitigate mode collapse in data-free knowledge distillation by explicitly modeling data diversity via a contrastive objective, improving downstream KD performance.
Model inversion, whose goal is to recover training data from a pre-trained model, has been recently proved feasible. However, existing inversion methods usually suffer from the mode collapse problem, where the synthesized instances are highly similar to each other and thus show limited effectiveness for downstream tasks, such as knowledge distillation. In this paper, we propose Contrastive Model Inversion~(CMI), where the data diversity is explicitly modeled as an optimizable objective, to alleviate the mode collapse issue. Our main observation is that, under the constraint of the same amount of data, higher data diversity usually indicates stronger instance discrimination. To this end, we introduce in CMI a contrastive learning objective that encourages the synthesizing instances to be distinguishable from the already synthesized ones in previous batches. Experiments of pre-trained models on CIFAR-10, CIFAR-100, and Tiny-ImageNet demonstrate that CMI not only generates more visually plausible instances than the state of the arts, but also achieves significantly superior performance when the generated data are used for knowledge distillation. Code is available at \url{https://github.com/zju-vipa/DataFree}.
Motivation & Objective
- Motivate data-free knowledge distillation when original training data is unavailable.
- Define data diversity in an instance-discrimination framework.
- Develop a contrastive learning objective to encourage diversity among synthesized samples.
- Integrate a generator, memory bank, and instance discriminator for case-by-case data inversion.
- Demonstrate improved synthetic data quality and KD performance on standard benchmarks.
Proposed method
- Define data diversity as the expected instance-discrimination distance between data pairs.
- Use a learnable instance discriminator h on top of a fixed teacher f_t to compute a cosine similarity between representations.
- Adopt a contrastive loss L_cr to maximize distinctiveness among synthesized and memory-bank samples.
- Incorporate a traditional inversion loss L_inv to maintain realism and distributional similarity to real data.
- Implement a case-by-case synthesis: per timestamp, reinitialize a generator g and optimize its latent code z and parameters, leveraging a memory bank B for diversity.
- Combine L_cr with L_inv in a joint objective, and optionally include a decision adversarial distillation term L_d-adv to emphasize boundary samples.
Experimental results
Research questions
- RQ1Can a contrastive objective mitigate mode collapse in data-free KD by promoting diversity among synthesized samples?
- RQ2Does explicitly modeling data diversity via instance discrimination improve KD performance using synthetic data?
- RQ3How does CMI balance realism and diversity to produce useful data for KD across different datasets and architectures?
- RQ4What is the impact of design choices (generator role, memory bank, instance discriminator) on data diversity and KD outcomes?
Key findings
- CMI yields more visually plausible and diverse synthetic data than strong baselines.
- On CIFAR-10, CIFAR-100, and Tiny-ImageNet, CMI achieves superior KD performance compared to several data-free methods.
- Ablation shows removing the contrastive loss or the generator degrades performance, highlighting the importance of instance discrimination and pixel regularization.
- Higher values of the contrast weight alpha_cr improve KD performance and data distribution quality (lower FID scores, especially in shallow features).
- Non-linear instance discriminators outperform linear or no discriminators in supporting KD with synthetic data.
- CMI with a memory bank and case-by-case generator synthesis outperforms several baselines across multiple teacher-student pairs.
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.