{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2609-03430","title":"Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning","arxiv_id":"2609.03430","date":"2026-09-03","proceeding":null,"authors":["Heng Wang","Jielin Qiu","Wenting Zhao","Cheng Qian","Liangwei Yang","Jiawei Han","Heng Ji","Silvio Savarese","Shelby Heinecke","Huan Wang"],"abstract":"Large language models achieve superior performance on tasks that require extended reasoning, but long chains of thought make the KV cache a severe memory bottleneck. Existing KV cache compression methods share one paradigm: score each cached token by some estimate of how much it will matter later, and keep the top-scoring ones. We show that the selection signal contributes almost nothing. Random Attention keeps the prompt and evicts uniformly at random within each attention head, computing no score at all; across four models and six reasoning tasks it matches the strongest prior evictor while serving 32-43% higher throughput than it in vLLM deployment. Controlled experiments explain this by showing that 1) the prompt is the fragile part of the cache, and most of the gap between selectors is just whether their selection signal happened to keep it; 2) the reasoning trace protects itself against eviction with redundancy at two levels, in the text (the model restates what it still needs as it works) and across attention heads (each keeps its own copy of the trace), so once the prompt is safe, a random draw retains enough copies of what the model still needs, and no score is required to pick them. Our code is publicly available at https://github.com/SalesforceAIResearch/Random-Attention.","url_abs":"https://arxiv.org/abs/2609.03430","url_pdf":"https://arxiv.org/pdf/2609.03430","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2609.03430","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2609.03430"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/SalesforceAIResearch/Random-Attention","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":12},"by_repo_kind":{"found_in_text":{"samples":12,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"12845c22f83668e7","entry":"R_ci","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"kvcompress/synth/scoreboard.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/kvcompress/synth/scoreboard.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"12845c22f83668e7"}},{"code_sha256_prefix":"37e3428250b62925","entry":"acc_ci","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"kvcompress/synth/scoreboard.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/kvcompress/synth/scoreboard.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"37e3428250b62925"}},{"code_sha256_prefix":"eabe13fdd2b77b60","entry":"boot_ci","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"kvcompress/analysis/bootstrap_ci.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/kvcompress/analysis/bootstrap_ci.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eabe13fdd2b77b60"}},{"code_sha256_prefix":"e1ef7f39b6437aaa","entry":"lens","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"figures/effective_throughput.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/figures/effective_throughput.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e1ef7f39b6437aaa"}},{"code_sha256_prefix":"43cf494e4b88f000","entry":"load","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"kvcompress/synth/scoreboard.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/kvcompress/synth/scoreboard.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"43cf494e4b88f000"}},{"code_sha256_prefix":"c4d00d07ba83a46f","entry":"load_scoreboard","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"figures/plot_mechanism.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/figures/plot_mechanism.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c4d00d07ba83a46f"}},{"code_sha256_prefix":"2971e9e45e0853ea","entry":"mean","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"kvcompress/analysis/analyze_union.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/kvcompress/analysis/analyze_union.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2971e9e45e0853ea"}},{"code_sha256_prefix":"23bc5857a725e7d4","entry":"meta","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"figures/plot_mechanism.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/figures/plot_mechanism.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23bc5857a725e7d4"}},{"code_sha256_prefix":"a373a8dca3e8e8bf","entry":"parse_grid","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"figures/plot_overview.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/figures/plot_overview.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a373a8dca3e8e8bf"}},{"code_sha256_prefix":"94c268f7736d16d7","entry":"read","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"figures/plot_throughput.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/figures/plot_throughput.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"94c268f7736d16d7"}},{"code_sha256_prefix":"506d001c8f961eac","entry":"table","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"kvcompress/analysis/carrier_mass.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/kvcompress/analysis/carrier_mass.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"506d001c8f961eac"}},{"code_sha256_prefix":"f252f988d00d9459","entry":"yerr","repo":"SalesforceAIResearch/Random-Attention","repo_kind":"found_in_text","path":"figures/plot_mechanism.py","file_url":"https://github.com/SalesforceAIResearch/Random-Attention/blob/HEAD/figures/plot_mechanism.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f252f988d00d9459"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_daily_20260904.json"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":1,"rejected_by_independent_check":0,"refused_by_a_rule":1,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}