paper-with-me

Papers

Optimizing Knowledge Distillation in Transformers: Enabling Multi-Head Attention without Alignment Barriers

2025-02-11 · Zhaodong Bing, Linze Li, Jiajun Liang

Knowledge distillation (KD) in transformers often faces challenges due to misalignment in the number of attention heads between teacher and student models. Existing methods either require identical head counts or introduce projectors to bridge dimensional gaps, limiting flexibility and efficiency. We propose Squeezing-Heads Distillation (SHD), a novel approach that enables seamless knowledge transfer between models with varying head counts by compressing multi-head attention maps via efficient linear approximation. Unlike prior work, SHD eliminates alignment barriers without additional parameters or architectural modifications. Our method dynamically approximates the combined effect of multiple teacher heads into fewer student heads, preserving fine-grained attention patterns while reducing redundancy. Experiments across language (LLaMA, GPT) and vision (DiT, MDT) generative and vision (DeiT) discriminative tasks demonstrate SHD's effectiveness: it outperforms logit-based and feature-alignment KD baselines, achieving state-of-the-art results in image classification, image generation language fine-tuning, and language pre-training. The key innovations of flexible head compression, projector-free design, and linear-time complexity make SHD a versatile and scalable solution for distilling modern transformers. This work bridges a critical gap in KD, enabling efficient deployment of compact models without compromising performance.

📄 PDF Abstract BibTeX arXiv:2502.07436

Code (0)

등록된 구현이 없습니다.

Tasks

image-classificationImage ClassificationImage GenerationKnowledge DistillationTransfer Learning

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Multi-Head Attention 설명 없음

Similar Papers 제목 키워드 기반

Optimizing Vision Transformers with Data-Free Knowledge Transfer

2024-08-12 · Gousia Habib, Damandeep Singh, Ishfaq Ahmad Malik, Brejesh lall

The groundbreaking performance of transformers in Natural Language Processing (NLP) tasks has led to their replacement of traditional Convolutional Neural Networks (CNNs), owing to the efficiency and accuracy achieved th…

Knowledge Distillationobject-detectionObject DetectionTransfer Learning

Data Efficient Any Transformer-to-Mamba Distillation via Attention Bridge

2025-10-22 · Penghao Wang, Yuhao Zhou, Mengxuan Wu, Panpan Zhang 외 arxiv

State-space models (SSMs) have emerged as efficient alternatives to Transformers for sequence modeling, offering superior scalability through recurrent structures. However, their training remains costly and the ecosystem…

Knowledge Distillation

Jaccard Metric Losses: Optimizing the Jaccard Index with Soft Labels

2023-02-11 · NeurIPS 2023 11 · Zifu Wang, Xuefei Ning, Matthew B. Blaschko

Intersection over Union (IoU) losses are surrogates that directly optimize the Jaccard index. Leveraging IoU losses as part of the loss function have demonstrated superior performance in semantic segmentation tasks compa…

Knowledge DistillationSemantic Segmentation

Extracting General-use Transformers for Low-resource Languages via Knowledge Distillation

2025-01-22 · Jan Christian Blaise Cruz, Alham Fikri Aji

In this paper, we propose the use of simple knowledge distillation to produce smaller and more efficient single-language transformers from Massively Multilingual Transformers (MMTs) to alleviate tradeoffs associated with…

Knowledge Distillation

TransKD: Transformer Knowledge Distillation for Efficient Semantic Segmentation

2022-02-27 · Ruiping Liu, Kailun Yang, Alina Roitberg, Jiaming Zhang 외

Semantic segmentation benchmarks in the realm of autonomous driving are dominated by large pre-trained transformers, yet their widespread adoption is impeded by substantial computational costs and prolonged training dura…

Autonomous DrivingKnowledge DistillationScene UnderstandingSemantic Segmentation+1