UHKD: A Unified Framework for Heterogeneous Knowledge Distillation via Frequency-Domain Representations

Fengming Yu, Haiwei Pan, Kejia Zhang, Jian Guan, Haiying JiangarXiv 2025 · DOI

Introduction

Knowledge Distillation (KD) is a cornerstone technique for model compression, enabling the transfer of knowledge from a large, high-performance "teacher" model to a compact "student" model. While KD is highly effective when the teacher and student share the same architecture (homogeneous KD), it faces significant challenges in heterogeneous scenarios—such as distilling knowledge from a Vision Transformer (ViT) into a MobileNet (CNN).

The primary obstacle is the structural "language barrier": CNNs rely on local receptive fields, while Transformers utilize global self-attention. Consequently, their intermediate feature maps are spatially incompatible, leading many existing methods to ignore internal semantic information and rely solely on final output logits. UHKD (Unified Heterogeneous Knowledge Distillation) addresses this by proposing the frequency domain as a universal translator for neural network features.

The UHKD Framework

UHKD aligns intermediate features in the frequency domain rather than the spatial domain. Frequency representations capture global semantic relationships that remain consistent across different architectural biases. The framework is built around two core modules designed to process and align these representations.

Feature Transformation Module (FTM)

The FTM processes the teacher's features to extract a pure semantic signal. It utilizes a Fast Fourier Transform (FFT) to convert spatial features into the frequency domain, specifically focusing on the magnitude spectrum. By discarding phase information, the module removes positional biases tied to the teacher's specific architecture. A Gaussian-smoothed filter is then applied to suppress noise and prioritize low-frequency components, which typically contain the most critical semantic information.

The Feature Transformation Module (FTM) extracts magnitude spectra from the teacher's features, applying spectral reconstruction and transformation to create a unified representation.

Feature Alignment Module (FAM)

To bridge the gap between the student's internal representations and the teacher's transformed features, the FAM employs learnable adapters. These adapters, typically implemented as 1x1 convolutions, project the student's frequency-domain features into the same channel and resolution "shape" as the teacher’s. This ensures that the student can directly mimic the global structure captured by the teacher.

The Feature Alignment Module (FAM) uses spectral channel and resolution alignment to project student features into the teacher's frequency-domain space.

Key Insights and Methodology

  • Global Perspective: Unlike spatial pixels, every point in a frequency map aggregates information from the entire image. This allows local-biased models like CNNs to learn global relationships from Transformers.
  • Magnitude over Phase: Magnitude spectra capture the "energy" and global structure of an image, whereas phase is often too sensitive to internal architectural logic. Focusing on magnitude provides a more stable target for distillation.
  • Efficiency: UHKD is remarkably lightweight. By simplifying the alignment process in the frequency domain, it can reduce the number of extra parameters required for distillation by over 70% compared to previous state-of-the-art methods like OFA.

Experimental Results

The researchers evaluated UHKD across 12 diverse teacher-student pairs, including ResNet, MobileNetV2, ConvNeXt, DeiT, Swin Transformer, and ResMLP.

  • CIFAR-100: UHKD achieved a maximum gain of 5.59% over previous methods when distilling from a ConvNeXt-T teacher to a ResMLP-S12 student.
  • ImageNet-1K: The framework showed an average improvement of 0.83% over state-of-the-art (SOTA) techniques. Notably, a MobileNetV2 student distilled from a Swin-T teacher reached 72.80% accuracy, setting a new benchmark for heterogeneous distillation.

Conclusion and Future Work

UHKD demonstrates that frequency-domain alignment is a powerful tool for overcoming architectural disparities in knowledge distillation. While the current framework prioritizes magnitude and low-frequency components, future work may explore the selective inclusion of phase information to capture finer structural details. Additionally, while the training overhead of FFT is manageable, optimizing the stage-wise dependency of the alignment could further enhance the framework's flexibility for non-standard architectures.

Summary updated

BibTeX
@misc{yu2025uhkd,
  author = {Fengming Yu and Haiwei Pan and Kejia Zhang and Jian Guan and Haiying Jiang},
  title = {{UHKD: A Unified Framework for Heterogeneous Knowledge Distillation via Frequency-Domain Representations}},
  year = {2025},
  eprint = {2510.24116},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.24116},
}
Figure