Mark Chen, Guanxi Lu, Yasuyuki Okoshi, Masato Motomura, Hongxiang Fan, Daichi Fujiki, Req Prefix
We have not lifted any functions out of this paper's repositories yet, so there is nothing we have run. The repositories linked to it are listed below.
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Modern large language model (LLM) applications increasingly rely on long conditioning prefixes to control model behavior at inference time. While prefixaugmented inference is effective, it incurs two structural limitations: i) the prefix's influence fades as generation proceeds, and ii) attention computation over the prefix scales linearly with its length. Existing approaches either keep the prefix in attention while compressing it, or internalize it into model parameters through gradient-based training. The former still attends to the prefix at inference, while the latter is training-intensive and ill-suited to prefix updates. To address these issues, we propose attention-state memory, a training-free approach that externalizes the prefix into a lightweight, lookup-based memory of precomputed attention states between prefix and query tokens. On ManyICLBench with LLaMA-3.1-8B, our method improves accuracy over in-context learning at 1K-8K memory budgets while reducing attention latency by 1.36× at 8K, and surpasses full-attention RAG performance on NBA benchmark using only 20% of its memory footprint. Our code is available at https://github.com/yasu0001/AttentionMemory.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2605.18226")
get_code_for_paper("2605.18226")
have("2605.18226")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2605.18226.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2605.18226)
Connect an agent — have() is free.