paper-with-me

Papers

Improving Transformers with Dynamically Composable Multi-Head Attention

2024-05-14 · Da Xiao, Qingye Meng, Shengping Li, Xingyuan Yuan

Multi-Head Attention (MHA) is a key component of Transformer. In MHA, attention heads work independently, causing problems such as low-rank bottleneck of attention score matrices and head redundancy. We propose Dynamically Composable Multi-Head Attention (DCMHA), a parameter and computation efficient attention architecture that tackles the shortcomings of MHA and increases the expressive power of the model by dynamically composing attention heads. At the core of DCMHA is a $\it{Compose}$ function that transforms the attention score and weight matrices in an input-dependent way. DCMHA can be used as a drop-in replacement of MHA in any transformer architecture to obtain the corresponding DCFormer. DCFormer significantly outperforms Transformer on different architectures and model scales in language modeling, matching the performance of models with ~1.7x-2.0x compute. For example, DCPythia-6.9B outperforms open source Pythia-12B on both pretraining perplexity and downstream task evaluation. The code and models are available at https://github.com/Caiyun-AI/DCFormer.

📄 PDF Abstract BibTeX arXiv:2405.08553

Code (2)

caiyun-ai/dcformer 공식 구현 jax
caiyun-ai/gar pytorch

Tasks

Language ModelingLanguage Modelling

Methods 이 논문이 사용한 방법론

Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Position-Wise Feed-Forward Layer 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Residual Connection 설명 없음
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Adam 설명 없음

Similar Papers 제목 키워드 기반

Attention as a Hypernetwork

2024-06-09 · Simon Schug, Seijin Kobayashi, Yassir Akram, João Sacramento 외

Transformers can under some circumstances generalize to novel problem instances whose constituent parts might have been encountered during training but whose compositions have not. What mechanisms underlie this ability f…

SimA: Simple Softmax-free Attention for Vision Transformers

2022-06-17 · Soroush Abbasi Koohpayegani, Hamed Pirsiavash

Recently, vision transformers have become very popular. However, deploying them in many applications is computationally expensive partly due to the Softmax layer in the attention block. We introduce a simple but effectiv…

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 introdu…

image-classificationImage ClassificationImage GenerationKnowledge Distillation+1

Selective Induction Heads: How Transformers Select Causal Structures In Context

2025-09-09 · Francesco D'Angelo, Francesco Croce, Nicolas Flammarion arxiv

Transformers have exhibited exceptional capabilities in sequence modeling tasks, leveraging self-attention and in-context learning. Critical to this success are induction heads, attention circuits that enable copying tok…

Adaptive Head Budgeting for Efficient Multi-Head Attention

2026-04-24 · Bilal Faye, Abdoulaye Mbaye, Hanane Azzag, Mustapha Lebbah arxiv

Multi-head attention enables Transformers to capture diverse representations, but all attention heads are typically activated for every input, regardless of task complexity. For coarse-grained tasks such as text classifi…

Text Classification