arXiv Machine Learning

Choosing the Number of Attention Heads from Intrinsic Dimension: A Small-Scale Study

arXiv Machine Learning
Sep 2

Performance-Efficiency Tradeoffs in Transformers: An Approximation Theory Perspective

The paper examines how to allocate attention heads and head dimensions across Transformer layers to balance expressivity and efficiency. It provides a mathematical analysis of early layers’ role in information extraction and characterizes the trade‑off between head count and dimension under a fixed parameter budget. The authors prove a saturation effect of softmax activations, showing that increasing head dimensions yields diminishing returns, especially for long sequences, and propose strategies for efficient parameter allocation across layers.

By Ruoxi Yu, Haotian Jiang, Jingpu Cheng, Penghao Yu, Qianxiao Li, Zhong Li
arXiv Machine Learning
Sep 23

Magnitude Profile Pruning: Calibration-Free Structured Attention Head Removal for Transformer Compression

Magnitude Profile Pruning introduces a training‑free, calibration‑free method for removing attention heads in Transformer models by statistically detecting outliers in weight row norms. Heads whose projection weights fall within the bulk of the distribution are pruned, while outlier heads are retained. Across several models, the MP‑G variant achieves superior perplexity at various sparsity levels and yields significant parameter and FLOP reductions without requiring forward passes, calibration data, or gradient computations.

By Kasun Dewage, Marianna Pensky, Heranga K. Rathnasekara, Suranadi De Silva
arXiv Machine Learning
3d ago

Transformers as Generic Deep Neural Networks: Exact Compilation, the Cost of Removing Activation-Activation Products, and Multi-Agent Attention Clustering

The paper demonstrates that any Transformer block—comprising attention, LayerNorm, and a GELU MLP—can be exactly compiled into a generic deep neural network using only fixed affine maps, routing, and a small set of nonlinear functions (square, sigmoid, inverse square root, and GELU or its sigmoid approximation). It shows that removing activation‑activation products incurs an $N^2$ cost per head for dense scores, but this can be avoided by using element‑wise operations available on most NPUs. Additionally, the authors prove that exact or conditional‑mean tail‑mass estimation provides an unbiased, low‑error approximation of top‑$k$ attention, and that clustering queries or agents into centroids reduces the number of computed scores from $N^2$ to $Nk$ per head, achieving comparable performance to reference models on DeiT‑Tiny, MambaIRv2‑Light, and Pythia‑70M.

By Sergey Salishev, Zeev Volkovich, Oleg Granichin
arXiv AI
Jul 22

A Controlled Study of Attention-Only Transformers

arXiv:2607. 18363v1 Announce Type: cross Abstract: Feed-forward networks hold two thirds of a transformer's non-embedding parameters, yet the architecture has not received a necessity test that controls parameters, compute, and depth at once.

By Henry Ndubuaku, Karen Mosoyan, Jakub Mroz, Noah Cylich, Satyajit Kumar, Parkirat Sandhu, Roman Shemet, Justin H Lee