{"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-2608-07915","title":"SPECTRA: Pushing the KV Cache Beyond the 2-Bit Cliff via Spectral Transform Coding","arxiv_id":"2608.07915","date":"2026-08-08","proceeding":null,"authors":["Jiamu Zhang","Liang Wu","Kelly Wan","Hanjie Chen","Liangjie Hong"],"abstract":"Large language models (LLMs) increasingly read long inputs in the agentic era, from whole documents and codebases to conversations across many turns. Their inference memory is then dominated by the key-value (KV) cache, the stored attention keys and values of every token the model has read and generated. Because the cache grows with context length and is re-read in full at every generated token, a longer context means more GPU memory. To reduce this cost, most existing methods compress the KV cache by lowering every stored value to the same low precision, a technique known as quantization. They can push this to nearly two bits per value, but rarely further, because quality drops sharply at this 2-bit cliff: four levels are too few for the cache's outlier-heavy values, where a few large entries consume the levels and collapse the rest into noise. A natural remedy is to spend more bits on the channels (feature dimensions) that matter and fewer on the rest, but the raw cache offers no handle: its channels are strongly correlated, so none stands out as more important. Our analysis shows that this handle appears once the cache is rotated into a coordinate system computed from its own statistics, removing these correlations. There, a small fraction of channels carries almost all the information, and spending the budget on those few is far more accurate than spreading it evenly. Guided by this analysis, we develop SPECTRA, a training-free, drop-in codec that re-encodes the cache into this coordinate system and concentrates the bit budget on the channels that carry the signal. On Llama-3.1-8B and Qwen2.5-7B over long-context benchmarks, SPECTRA is near-lossless at 4x compression, competitive at 8x where uniform quantization has collapsed, and reaches up to 12x, pushing usable compression past the 2-bit cliff so the same GPU holds longer contexts and larger batches.","url_abs":"https://arxiv.org/abs/2608.07915","url_pdf":"https://arxiv.org/pdf/2608.07915","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":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.07915"}},"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/nokia-applied-research/SPECTRA","reach":null}],"summary":{"ran":2,"ran_draft_wrong":6,"ran_honours":4,"ran_fixture":5,"ran_violates":1,"unverified":5},"by_repo_kind":{"found_in_text":{"samples":23,"ran":18,"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":"f10fa575457d680b","entry":"LatentProjV2","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f10fa575457d680b"}},{"code_sha256_prefix":"f08dd31fac115205","entry":"LatentProjWF","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f08dd31fac115205"}},{"code_sha256_prefix":"d68fb5093bc607d9","entry":"_accumulate_streaming_stats","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d68fb5093bc607d9"}},{"code_sha256_prefix":"87a7396f36c65f6c","entry":"_get_full_rowconv_live","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"87a7396f36c65f6c"}},{"code_sha256_prefix":"5ba4187b2f9e57f5","entry":"_lowrank_gweighted","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5ba4187b2f9e57f5"}},{"code_sha256_prefix":"561284acc1c655c8","entry":"_oproj_module","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"561284acc1c655c8"}},{"code_sha256_prefix":"74476612a931c326","entry":"_robust_eigh","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74476612a931c326"}},{"code_sha256_prefix":"34a1eb25b50e1e67","entry":"_robust_svd","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"34a1eb25b50e1e67"}},{"code_sha256_prefix":"47950f3a69647425","entry":"_rrr_precompute","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"47950f3a69647425"}},{"code_sha256_prefix":"4f2112fc12f264a7","entry":"_sym_sqrt_inv_sqrt","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f2112fc12f264a7"}},{"code_sha256_prefix":"e2b6d05badc72fa2","entry":"_wf_cache_frac","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e2b6d05badc72fa2"}},{"code_sha256_prefix":"16262174c3fa3081","entry":"build_factor","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16262174c3fa3081"}},{"code_sha256_prefix":"0f816d0515686080","entry":"cache_frac","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f816d0515686080"}},{"code_sha256_prefix":"511a5b715ab593ed","entry":"fake_quant","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"511a5b715ab593ed"}},{"code_sha256_prefix":"11f5e4a0c78b5ef8","entry":"group_water_filling_quant","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"11f5e4a0c78b5ef8"}},{"code_sha256_prefix":"32ff5b0f547f6d62","entry":"lowrank_gweighted_factors","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"32ff5b0f547f6d62"}},{"code_sha256_prefix":"815461032a283673","entry":"rand_orthogonal","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"815461032a283673"}},{"code_sha256_prefix":"b443bae5237fbb8a","entry":"water_filling_bits","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b443bae5237fbb8a"}},{"code_sha256_prefix":"ef1dcb3d8ce25357","entry":"_rrr_apply","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ef1dcb3d8ce25357"}},{"code_sha256_prefix":"5c50ff9642f653a0","entry":"_set_full_rowconv_live","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c50ff9642f653a0"}},{"code_sha256_prefix":"1953af0f0ceb8ba3","entry":"build_spectra","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1953af0f0ceb8ba3"}},{"code_sha256_prefix":"5297489e66eb5f90","entry":"build_spectra_wf","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5297489e66eb5f90"}},{"code_sha256_prefix":"d881927b513c4aba","entry":"fit_apply_mla_split","repo":"nokia-applied-research/SPECTRA","repo_kind":"found_in_text","path":"spectra/method.py","file_url":"https://github.com/nokia-applied-research/SPECTRA/blob/HEAD/spectra/method.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d881927b513c4aba"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}