# Do Transformers Need Three Projections? Systematic Study of QKV Variants

- **ID:** 496
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2606.04032
- **Authors:** Ali Kayyam, Anusha Madan Gopal, M Anthony Lewis
- **Venue:** arXiv / BrainChip
- **Published:** 2026
- **Tags:** qkv, projection-sharing, kv-cache, gqa, mqa, brainchip, icml, slimpajama
- **Topics:** transformer architecture, attention, KV cache
- **Added:** 2026-10-01
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/496

## Summary

Evaluates Q=K≠V, Q≠K=V, and Q=K=V (plus 2D-PE + variants for non-causal tasks) against standard QKV. On language modeling, Q≠K=V cuts KV cache 50% at +3.1% val PPL (300M) and +2.48% (1.2B) vs QKV; Q=K≠V has no cache benefit, Q=K=V degrades ~25%. Combining Q≠K=V with GQA-4/MQA reaches 87.5%/96.9% cache reduction. K and V projections are highly similar (cosine 0.73) while Q stays distinct, so K=V preserves directional QK^T. Code https://github.com/Brainchip-Inc/Do-Transformers-Need-3-Projections.

## Attributes

- **Purpose:** Test whether Q, K, and V need three separate projections, and whether sharing them stacks with GQA/MQA
- **Scale:** 300M (20L, d=1024, 16 heads) and 1.2B (22L, d=2048, 32 heads) on ~10B SlimPajama tokens, 8xA100; 5 synthetic list tasks; MNIST/FashionMNIST/CIFAR-10/100/TinyImageNet/anomaly; 5-shot ARC/HellaSwag/PIQA/WinoGrande
- **Time period:** 2026-06-01 (arXiv 2606.04032 v1); last revised 2026-08-12 (v3). ICML 2026 (PMLR vol. 306). HF paper publishedAt 2026-06-04.

## From the source (fetched 2026-10-03)

- **Published:** Jun 1, 2026 (arXiv)
- **Last revised:** Aug 12, 2026 (arXiv)
- **arXiv categories:** cs.LG, cs.AI, cs.CL, cs.PF (arXiv)
- **Author comment:** Accepted at ICML 2026 (PMLR vol. 306). 26 pages, 12 figures, 16 tables. Code: https://github.com/Brainchip-Inc/Do-Transformers-Need-3-Projections (arXiv)
- **Citations:** 3 (2 influential) (Semantic Scholar)
- **References:** 63 (Semantic Scholar)

## 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

## Research notes

- Primary: arxiv abs. ICML 2026. BrainChip Inc.; correspondence akayyam@brainchip.com (Kayyam previously published as Ali Borji). Code MIT https://github.com/Brainchip-Inc/Do-Transformers-Need-3-Projections (46 stars at check). HF paper page 2 upvotes; no linked models/datasets. Discord posted abs. Trains on SlimPajama and standard vision sets; no new corpus, so no datasets_local row. ArXiv license widget not visible in converted abs HTML, so paper license left blank.

## Similar entries

- [KV cache as GPU-memory bottleneck in Transformer serving (GQA/MQA, quantization, sliding window)](https://papers.projxon.ai/entries/1066) (idea, #1066)
- [The Surprising Effectiveness of Shared Memory in Looped Transformers](https://papers.projxon.ai/entries/1255) (paper, #1255)
- [Cross-Model KV Cache Transfer in LLM Families: A Closed-Form Linear Mapping for Prefill Reuse](https://papers.projxon.ai/entries/450) (paper, #450)
- [Still: Amortized KV Cache Compaction in a Single Forward Pass](https://papers.projxon.ai/entries/492) (paper, #492)
- [Scaling KV Cache Compression to Frontier Models (X thread by @RampLabs)](https://papers.projxon.ai/entries/740) (thread, #740)
- [VBR: Variable Bit-Rate KV Cache for llama.cpp](https://papers.projxon.ai/entries/631) (code, #631)
