Understanding the Physics of Key-Value Cache Compression for LLMs through Attention Dynamics
Organizations: IIT Delhi, India
Abstract
As context windows in LLMs scale to 100K+ tokens, the key-value (KV) cache becomes the dominant memory bottleneck, with recent methods claiming 80-90% savings and minimal benchmark degradation. We argue these evaluations miss a structural issue: attention is not just storage but routing, and retaining KV pairs does not guarantee semantic accessibility. We propose a physics-inspired view of KV compression as a controlled perturbation of token-level routing, distinguishing retention, accessibility, and utilization. Using synthetic tasks probing multi-entity tracking, disambiguation, coreference, and multi-hop reasoning, we find that moderate compression degrades internal representations with little accuracy loss, revealing redundancy; all models exhibit a sharp hallucination safety cliff near 90% compression, correlated with spikes in Global Eviction Ratio (GER), suggesting a phase transition in semantic reachability; and architectures differ in routing dynamics, with LLaMA showing early consensus and late diversification, and Qwen showing funnel-like late convergence, leading to distinct resilience profiles. Beyond erasure, we identify representational rigidity, where excessive head-level consensus collapses routing flexibility despite token survival. These results suggest sparse token-route structures govern compression tolerance, reframing KV compression as a structural probe of attention geometry and linking long-context scalability to sparsity and the lottery ticket hypothesis in self-attention.
Figures & tables
| Name | Passage Length (words) | # Queries | Total Passages | Total Queries | LLM Generated |
|---|---|---|---|---|---|
| Base task | 175 25 | 6 | 200 | 1199 | Yes |
| Knowledge manipulation | 32 | 13 | 4000 | 52000 | No |
| Multi presence | 500 100 | 10 | 100 | 1000 | Yes |
| Multi entity | 500 100 | 10 | 100 | 1000 | Yes |
| Long context | 1100 200 | 10 | 100 | 1000 | Yes |
| Coreference | 44 | 9 | 8000 | 72000 | No |
| Model | Setup | Base | Know | Multi-P | Multi-E | Long | Coref | Hops |
|---|---|---|---|---|---|---|---|---|
| LLaMA-3 8B | AGN | 70.05 | 91.28 | 79.64 | 80.33 | 45.93 | 75.63 | 31.54 |
| AWR | 69.86 | 92.09 | 77.66 | 81.93 | 45.54 | 60.90 | 31.25 | |
| Qwen-2.5 7B | AGN | 68.80 | 92.20 | 73.63 | 77.46 | 38.68 | 78.89 | 27.13 |
| AWR | 69.63 | 90.93 | 71.88 | 79.38 | 40.20 | 52.00 | 26.35 |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Context | Question | Response |
| Base task | Gonzalo Batistuta, an Argentine forward, is widely regarded as one of the greatest football players of all time… | What is Gonzalo Batistuta’s nationality? | Argentine |
| Knowledge man. | Cora Delaine was born on December 11, 1954. They studied in Daegu Global Science University… | What is Cora Delaine’s first name? | Cora |
| Multi presence | The Astralis Spire stands tall as one of the most remarkable achievements of modern architecture and engineering. Rising high above the skyline of its bustling city… | What was the main reason for constructing Astralis Spire? | To improve television and radio broadcasting disrupted by urban development |
| Multi entity | Harland Kane is one of the most influential authors of contemporary horror, suspense, and supernatural fiction. Over a career spanning decades, Kane has… | Which novel by Kane is set in a haunted hotel? | The Shadow of the Pines |
| Long context | During the mid-Cretaceous period, the Riverback Sailbacks were formidable semi-aquatic predators, inhabiting river systems, floodplains, and coastal wetlands. Known for their elongated jaws, conical teeth, and large… | Where was Kaelin Vireo from? | The riverine fossil station of Thaloris |
| Coreference | Julian Foster was born on September 7, 1962 in Aleppo, Aleppo Governorate, Syria. He is male. He studied in Tianjin Harbor University in Podgorica, Podgorica, Montenegro… | What does he work as? | Tour Guide |
| Tag | Context | Question | Response |
|---|---|---|---|
| Person | Joao Fernandes, widely considered one of the greatest footballers of all time… | What is the name of the person described in the passage? | Joao Fernandes |
| Thing | Gonzalo Batistuta, an Argentine forward, is widely regarded as one of the greatest… | What is Gonzalo Batistuta’s nationality? | Argentine |
| Organization | Mookie Blaylock, a rock band from Northport formed in Riverbend in 1990… | What is the subject of the given passage? | Mookie Blaylock |
| Creature | The Void Stalker is a fictional endoparasitoid extraterrestrial species that serves as the main… | What kind of species is the Void Stalker? | An endoparasitoid extraterrestrial species |
| Location | The Stones of Pharaohs are a complex of monumental structures located on the Giza Plateau… | In which city are The Stones of Pharaohs located? | Cairo |
| Numerals | The Thistlewood Vale Witch Trials represent a chilling episode in early American history… | How many individuals were convicted and executed during the trials? | 20 |
| Tag | Context | Question | Response |
|---|---|---|---|
| Standard | The Basalt Bloom is an immense igneous province, covering a vast expanse of central India. It formed through a series of massive volcanic eruptions… | Where is the Basalt Bloom located? | Central India |
| Manipulated | Xena Bell was born on November 20, 1968. They studied in Shanghai Maritime University… | What is Xena Bell’s last name? | Bell |
| Part | Breezeflare is characterized by unusual sounds during breathing caused by airflow obstruction in the airways. The condition is commonly observed… | Nyla Soren is recognized for leading what type of initiatives? | Community workshops, public education |
| Task | Direction | Context | Question | Response |
|---|---|---|---|---|
| Mutli presence | FWD | The series known as Chrono Nexus is widely regarded as one of the most compelling science fiction narratives in Japanese animation. Created by Itsuki Aoyama… | Who created Chrono Nexus? | Itsuki Aoyama |
| REV | Few creatures in Earth’s history capture the imagination quite like the Thunderfang Predator, one of the largest and most fearsome carnivorous dinosaurs to have ever lived… | Which predator had serrated teeth as long as a human hand? | Thunderfang Predator | |
| Multi entity | FWD | In the distant waters of the Andaman Islands lies the infamous Iron Shadows Prison. Constructed by the British in the late 19th century, this prison became a… | Who was the nationalist imprisoned in Iron Shadows and known as Veer? | Vinayak Damodar Savarkar |
| REV | Shinroku is a popular Japanese manga and anime series known for its unique blend of comedy, action, and science fiction. Set in an alternate Edo period where… | Hana Tanaka appears as a companion in which story? | Shinroku |