SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.19662 · 2026

ReCache: Efficient KV Cache Reuse and Compression for Tool-Augmented LLM Agents

Xiaoyu Shen, Sitong Wei, Yichu Fang, Haozhe Hu

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 3 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2608.19662.json · badge: /api/ran/2608.19662.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
EIT-NLP/ReCache canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
compact_masked_sdpa Ran
ran; our contract draft was wrong, not the code
EIT-NLP/ReCache/capsule/src/compact_attention.py
pointer only (licence: NONE) · get_code("a6bb3295cd92cb08")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_shifted_labels Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EIT-NLP/ReCache/capsule/src/modeling_utils.py
pointer only (licence: NONE) · get_code("5e960b1ca7bef007")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

makedirs Ran
ran; our contract draft was wrong, not the code
EIT-NLP/ReCache/capsule/src/utils.py
pointer only (licence: NONE) · get_code("df02a4d06d5ad0f2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mask_nested_lists Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EIT-NLP/ReCache/capsule/src/chat.py
pointer only (licence: NONE) · get_code("141f4c8b387bca52")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

move_to_device Ran
ran; our contract draft was wrong, not the code
EIT-NLP/ReCache/capsule/src/modeling_utils.py
pointer only (licence: NONE) · get_code("b8a81a4b39c05cff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

optional_grad_ctx Ran
ran; our contract draft was wrong, not the code
EIT-NLP/ReCache/capsule/src/modeling_utils.py
pointer only (licence: NONE) · get_code("7598dbd722b803a3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

optional_grad_ctx Ran
ran; our contract draft was wrong, not the code
EIT-NLP/ReCache/capsule/src/utils.py
pointer only (licence: NONE) · get_code("6e49393a385cd311")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_resource_sdpa Ran
ran; our contract draft was wrong, not the code
EIT-NLP/ReCache/capsule/src/compact_attention.py
pointer only (licence: NONE) · get_code("401295e921e431be")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

apply_chat_template Not yet run
unverified (harvested, no recorded run)
EIT-NLP/ReCache/capsule/src/chat.py
pointer only (licence: NONE) · get_code("561fab9ba99c10a9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_conv_template Not yet run
unverified (harvested, no recorded run)
EIT-NLP/ReCache/capsule/src/chat.py
pointer only (licence: NONE) · get_code("63d36f1757a0760e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

split_file_dir_name_ext Not yet run
unverified (harvested, no recorded run)
EIT-NLP/ReCache/capsule/src/utils.py
pointer only (licence: NONE) · get_code("eea85b841e68681d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EIT-NLP/ReCache when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_conv_template 69 other papers
67 dated earlier, 1 the same month, 1 undated
1911.03705 (2019-11)
CommonGen: A Constrained Text Generation Challenge for Generative Commonsense Reasoning
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2204.07705 (2022-04)
SUPER-NATURALINSTRUCTIONS: Generalization via Declarative Instructions on 1600+ NLP Tasks
and 66 more not named here
apply_chat_template 1 other paper
1 dated earlier
2409.05591 (2024-09)
MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
get_shifted_labels 1 other paper
1 dated earlier
2409.05591 (2024-09)
MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
makedirs 1 other paper
1 dated earlier
2401.06532 (2024-01)
INTERS: Unlocking the Power of Large Language Models in Search with Instruction Tuning
mask_nested_lists 1 other paper
1 dated earlier
2409.05591 (2024-09)
MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
move_to_device 1 other paper
1 dated earlier
2409.05591 (2024-09)
MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
optional_grad_ctx 1 other paper
1 dated earlier
2409.05591 (2024-09)
MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Agentic language models repeatedly encode tool and skill schemas that recur across requests in different combinations and orders, preventing standard prefix caching from reusing their key-value (KV) states. We introduce ReCache, a framework for independently caching resource representations while reducing their inference-time computational and memory overhead. Resource-wise attention removes cross-resource interactions and assigns resource-local positions, producing composition-invariant KV blocks. ReCache then restricts resource visibility to contributionselected layer-KV-head-group routes and retains only invocation-critical fields through structural and semantic pruning. We evaluate ReCache on a benchmark assembled from seven public tool-and skill-use datasets, including resource-disjoint tests. Resource-wise attention matches dense invocation performance (82.3% versus 82.4% Inv-F1) while providing a 3.655× time-to-first-token speedup. The complete framework reduces allocated KVtensor memory by 92.43% and accelerates attention by 1.423×. These results show that separating reusable schema encoding from selective resource access substantially reduces agentic inference costs with limited effectiveness loss. The code is available at https: //github.com/EIT-NLP/ReCache. * Corresponding author R1 R2 R3 R4 Key resource / relative token position R1 R2 R3 R4 Query resource / relative token position Cross-resource region 0.00 0.05 0.10 0.15 0.20 Mean attention mass (a) Causal attention among resources (relative-position bins). Orange boxes mark cross-resource blocks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2608.19662")
get_code_for_paper("2608.19662")
have("2608.19662")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2608.19662.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2608.19662.svg)](https://syntology.ai/paper/2608.19662)

Connect an agent — have() is free.