cd /news/machine-learning/do-transformers-need-three-projectio… · home topics machine-learning article
[ARTICLE · art-21156] src=arxiv.org pub= topic=machine-learning verified=true sentiment=· neutral

Do Transformers Need Three Projections? Systematic Study of QKV Variants

A systematic study of query, key, and value (QKV) projection variants in Transformers found that sharing the key and value projections (Q-K=V) performs on par with or better than the standard three-projection approach across synthetic tasks, vision, and language modeling. In language models with up to 1.2 billion parameters trained on 10 billion tokens, Q-K=V sharing reduced KV cache by 50% with only 3.1% perplexity degradation, and combining it with grouped-query attention achieved up to 96.9% cache reduction for on-device inference. The findings demonstrate that projection sharing is an underexplored weight-tying strategy with direct memory benefits, particularly valuable for edge deployment.

read1 min publishedJun 4, 2026

arXiv:2606.04032v1 Announce Type: new 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/anushamadan02/Do-Transformers-Need-3-Projections

── more in #machine-learning 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/do-transformers-need…] indexed:0 read:1min 2026-06-04 ·