LOCKS Unlocks LLM Long Context Efficiency

LOCKS revolutionizes long-context LLMs by approximating KV cache with spectral summaries, achieving near full-quality inference while drastically cutting latency and computation.

Abstract representation of data flow and spectral analysis in LLM context
Conceptual diagram illustrating LOCKS' approach to spectral summarization for efficient KV cache attention.
Visual TL;DR
LLM Long Context BottleneckDriver
KV cache memory and computational demands bottleneck extensive context windows
KV Cache Full ReadsDriver
From the article 3 mentionsThis cache requires full reads at every decoding step, creating a significant performance impediment.
LOCKS FrameworkCore
approximates KV cache with spectral summaries for efficient attention selection
From the article 5 mentionsThe LOCKS framework, detailed on arXiv, introduces a paradigm shift by recognizing that attention keys, while globally high-rank, exhibit local low-rank properties.
Spectral SummariesContext
each KV cache 'page' gets a summary, about one-tenth the full cache size
From the articleLOCKS tackles this challenge by providing each KV cache 'page' with its own spectral summary.
Reconstruct LogitsEffect
From the articleThis summary, approximately one-tenth the size of the full cache, allows the system to reconstruct within-page logits and estimate each page's attention mass using a log-sum-exp approach.
Attend Top-Ranked PagesEffect
From the articleCrucially, this enables LOCKS to attend only to the top-ranked pages, drastically reducing the number of keys and values that need to be read without processing candidate keys.
Near Full-QualityOutcome
maintains performance, staying within a small margin of full-quality inference
Cut Latency/ComputationOutcome
drastically cuts latency and computation for long-context LLMs

Serving large language models with extensive context windows has been fundamentally bottlenecked by the memory and computational demands of the Key-Value (KV) cache. This cache requires full reads at every decoding step, creating a significant performance impediment. The LOCKS framework, detailed on arXiv, introduces a paradigm shift by recognizing that attention keys, while globally high-rank, exhibit local low-rank properties.

Spectral Summaries for Efficient Attention Selection

LOCKS tackles this challenge by providing each KV cache 'page' with its own spectral summary. This summary, approximately one-tenth the size of the full cache, allows the system to reconstruct within-page logits and estimate each page's attention mass using a log-sum-exp approach. Crucially, this enables LOCKS to attend only to the top-ranked pages, drastically reducing the number of keys and values that need to be read without processing candidate keys. This approach maintains performance, staying within a point of full-cache quality on long-document QA benchmarks like LongBench-v1 and closely tracking an oracle on retrieval-dense tasks like RULER, even at the smallest computational budgets.

Near Full-Quality Inference at Extreme Context Lengths

The efficacy of the LOCKS KV cache optimization becomes particularly pronounced in demanding long-form reasoning tasks, where baseline selectors often fail. At a practical $2048$-token budget, LOCKS achieves aggregate quality comparable to a full KV cache with over $100$K$+$ context, while only attending to about $2%$ of the tokens. This translates to a halving of per-token decode latency (a $2.0 imes$ improvement at $1$M$ tokens) compared to dense attention mechanisms. The system is engineered as a drop-in plugin for unmodified vLLM, leveraging CUDA graphs for batched decoding and offering a seamless path to deployment.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.