Do Transformers Need Three Projections? Systematic Study of QKV Variants
2026/06/01 by Ali Kayyam, Anusha Madan Gopal, M Anthony Lewis · 20 voices · 2 citations
#cs.LG #cs.AI #cs.CL #cs.PF
paper · pdf
Abstract
Transformers have become the standard solution for various AI tasks, with the query, key, and value (QKV) attention formulation playing a central role. However, the individual contribution of these three projections and the impact of omitting some remain poorly understood. We systematically evaluate three projection sharing constraints: a) Q-K=V (shared key-value), b) Q=K-V (shared query-key), and c) Q=K=V (single projection). The last two variants produce symmetric attention maps; to address this, we also explore asymmetric attention via 2D positional encodings. Through experiments spanning synthetic tasks, vision (MNIST, CIFAR, TinyImageNet, anomaly), and language modeling (300M and 1.2B parameter models on 10B tokens), we discovered that our transformers perform on par or occasionally better than the QKV transformer. In language modeling, Q-K=V projection sharing achieves 50% KV cache reduction with only 3.1% perplexity degradation. Crucially, projection sharing is complementary to head sharing (GQA/MQA): combining Q-K=V with GQA-4 yields 87.5% cache reduction, while Q-K=V + MQA achieves 96.9%, enabling practical on-device inference. We show that Q-K=V preserves quality because keys and values can occupy similar representational spaces and attention operates in a low-rank regime, whereas Q=K-V breaks attention directionality. Our results systematically characterize projection sharing as an underexplored instance of weight tying in attention, with direct, quantifiable inference memory benefits, particularly valuable for edge deployment. The code is publicly available at https://github.com/Brainchip-Inc/Do-Transformers-Need-3-Projections
Citations
Cited by
Discussions
- Do transformers need three projections? Systematic study of QKV variants [hn, 225 points, 47 comments]
- neat [bsky, 3 points, 1 comments]
- 📰 A systematic study of QKV variants in Transformers reveals that three projections are sufficient for optimal performance, contrary to previous assumptions. 🔗 https://arxiv.org/abs/2606.04032 #Tech [bsky, 1 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants https://arxiv.org/abs/2606.04032 (https://news.ycombinator.com/item?id=48405931) [bsky, 1 points, 0 comments]
- Imagine an AI that can learn from a single, unified projection, potentially reducing complexity by nearly 2/3 - could this be the key to unlocking more efficient, scalable transformers?. Do transforme [bsky, 1 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants #HackerNews https://arxiv.org/abs/2606.04032 [bsky, 0 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants https://arxiv.org/abs/2606.04032 https://news.ycombinator.com/item?id=48405931 [bsky, 0 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants https://arxiv.org/abs/2606.04032 https://news.ycombinator.com/item?id=48405931 [bsky, 0 points, 0 comments]
- Do Transformers Need Three Projections? Systematic Study of QKV Variants https://arxiv.org/abs/2606.04032 [bsky, 0 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants https://arxiv.org/abs/2606.04032 [comments] [201 points] [bsky, 0 points, 0 comments]
- A study assesses the need for three projections in transformer models, examining QKV sharing constraints. Results indicate that certain projection-sharing configurations significantly reduce cache siz [bsky, 0 points, 0 comments]
- [21/30] 226 Upvotes, 46 Comments, 2 Posts, arXiv:2606.04032 🆕Do Transformers Need Three Projections? Systematic Study of QKV Variants Ali Kayyam, Anusha Madan Gopal, M Anthony Lewis [bsky, 0 points, 2 comments]
- Do transformers need three projections? Systematic study of QKV variants https://arxiv.org/abs/2606.04032 (http://news.ycombinator.com/item?id=48405931) [bsky, 0 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants view on hacker news [bsky, 0 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants https:// arxiv.org/abs/2606.04032 # arxiv [mastodon, 0 points, 0 comments]
- 📰 Do transformers need three projections? Systematic study of QKV variants 🔗 https://arxiv.org/abs/2606.04032 💬 Discuss on HN [bsky, 0 points, 0 comments]
- Do Transformers Need Three Projections? Systematic Study of QKV Variants https://arxiv.org/abs/2606.04032 (https://news.ycombinator.com/item?id=48405931) [bsky, 0 points, 0 comments]
- We’re covering “Do transformers need three projections?” arxiv.org/pdf/2606.04032 [bsky, 0 points, 1 comments]
- [2606.04032] Do Transformers Need Three Projections? Systematic Study of QKV Variants — Useful systematic look at whether separate Q/K/V projections are actually necessary in Transformers, with concre [bsky, 0 points, 0 comments]
- Do transformers need three projections? Systematic study of QKV variants [bsky, 0 points, 0 comments]
Related