Source-linked AI summary
LAM: Efficient Lossy Agent Memory Framework With A Retrieval-Score Error Bound
Baixi Sun, Le Chen, Anjir Ahmed Chowdhury, Xiaolong Ma, Chih-Hsuan Yang, Mingze Xia, Syed Zawad, Sheng Di, Rajkumar Kettimuthu, Huihuo Zheng, Rajeev Thakur, Venkatram Vishwanath, Feng Yan
TL;DR
Growing agent histories raise inference cost and can exceed context windows, while existing deletion controls lack a retrieval-score-loss bound. LAM combines deterministic, distance-bounded deduplication with prefix-preserving compaction. It removes 22.47% of observation tokens while retaining 99.984% of measured evidence, and its modeled scheduling benefit is 71.4×–91.6× at a fixed deletion set.
Problem
Agent histories raise inference cost and can exceed context windows, while existing deletion parameters do not bound retrieval-score loss.
Source: §1 · pp. 1–2Method
Results
22.47% of observation tokens are removed while retaining 99.984% of measured evidence; at a fixed deletion set, prefill-first removal has a modeled 71.4×–91.6× speedup over in-context deletion.
Source: §3.2 · p. 7, §5 · p. 9Takeaways & Limitations
The modeled scheduling benefit comes from preserving the prefix and applies to any prefix-preserving test, not only LAM’s rule.
Source: §5 · p. 9The scheduling benefit depends on the cost of rebuilding invalidated cache entries, while removal benefit depends on observation-stream near-duplicates and adequate retention.
Source: §4 · p. 9
Abstract
from arXiv · showhide
Agent memory grows as agents read inputs, reason, and call tools. Longer histories increase inference cost and eventually exceed the context window. LLM-based summarization reduces this history but adds latency and provides no explicit bound on information loss. We propose LAM, a Lossy Agent Memory system with three components: a deterministic deduplication rule with a substitution bound on retrieval scores - a bound on score perturbation, not a certificate of unchanged ranking; a memory manager that preserves the cached prefix and overlaps compaction with inference; and a performance model that estimates compaction costs before deployment. On 600 agent trajectories, LAM removes 22.47% of observation tokens while retaining 99.984% of the measured gold-patch evidence. At a fixed deletion set, the performance model predicts a 71.4x-91.6x end-to-end speedup from removing records before prefill instead of deleting them from a prefilled context. That benefit comes from the schedule rather than the rule and applies to any prefix-preserving test.
1 INTRODUCTION
LAM addresses growing agent histories with a deterministic deduplication rule that bounds retrieval-score loss, alongside a compaction schedule that preserves the prefilled prefix. Its evaluation reports evidence retention and token removal, while the cost model attributes large speedups to removing records before prefill.
1 INTRODUCTION
- Agent histories support task completion but raise inference cost and latency, and eventually exceed the context window.Compaction runs repeatedly during long tasks and can block inference for tens of seconds per event.Source: §1 · p. 1
- Existing summarizers and learned compressors add inference cost, while available token budgets, cluster counts, and window sizes do not bound retrieval-score loss from deletion.The cited approaches also have reproducibility dependencies on the model and execution configuration.Source: §1 · pp. 1–2
- LAM’s query-free near-duplicate rule bounds the retrieval-score deficit by δ for every unit query, but does not guarantee unchanged rankings or task outcomes.With fixed embeddings and arrival order, the rule is reproducible and reports its maximum observed substitution distance.Source: §1 · p. 2
- 22.47% of observation tokens are removed while retaining 99.984% of measured evidence at the default threshold.The evaluation counts lines accessible only through reference stubs as lost.Source: §1 · p. 3
- At a fixed deletion set, removing records before prefill yields a modeled 71.4×–91.6× speedup over deleting them from a prefilled context.The schedule tests each arriving record first, avoiding prefill of that record and a second prefill of the invalidated suffix.Source: Figure 1 · p. 2, §1 · p. 3
2 DESIGN
LAM combines bounded deduplication, a memory manager that overlaps compaction with inference, and a deployment-cost model. The design uses proximity-based matching and prefix-preserving scheduling, with a score-deficit guarantee rather than a ranking guarantee.
2 DESIGN
- LAM combines bounded deduplication, a memory manager that overlaps compaction with inference, and a model of deployment cost.The design is organized around these three components.Source: §2 · p. 3
2.1 THE PROXIMITY RELATION
- For unit-normalized records, the merge threshold t determines a distance radius δ; the proximity relation is not transitive.The paper uses ℓ2 distance, equivalent to a cosine-threshold test, to define candidate merges.Source: §2.1 · p. 3
2.2 THREE LAYERS
- LAM layers exact line hashing, band-hash candidate generation with full-precision distance checks, and bounded-error compression of retained embeddings.The compression reduces embedding storage, not the text kept in context.Source: §2.2 · p. 3
2.3 THE ε ERROR-BOUNDED TEST
- The online test checks each arriving record against retained candidates and emits a reference stub only when a representative lies within δ.It embeds each arriving chunk once, preserves prefilled tokens, and reports the maximum substitution distance used.Source: §2.3 · pp. 3–4
2.4 THE SUBSTITUTION BOUND
- A δ-substitution limits the decrease in maximum retrieval score to δ for every unit query, but does not guarantee unchanged rankings or task outcomes.The substitution map selects a retained representative within δ; the bound applies to score perturbation, not rank invariance.Source: §2.4 · p. 4
2.5 SYSTEM DESIGN
- The system runs the CPU test concurrently with GPU inference, uses a band index to search retained candidates, and keeps text available for reference lookup.Figure 2 contrasts a schedule that invalidates a cached suffix with one that leaves the prefilled prefix intact.Source: §2.5 · p. 5, Figure 2 · p. 5
2.6 PERFORMANCE MODEL
- The cost model separates context-dependent work from weight streaming and uses device measurements and run-specific inputs to estimate deployment costs.The context-dependent share varies with batch size, context length, and architecture; candidate filtering preserves the substitution bound when verification is full precision.Source: §2.6 · pp. 5–6, Table 1 · p. 6
3 EXPERIMENTS
The experiments measure observation-token removal against gold-patch evidence retention and modeled latency across LAM configurations and baselines. LAM removes 22.47% of observation tokens while retaining 99.984% of evidence, while the modeled benefit of removing records before prefill comes from the schedule rather than the deduplication rule.
3.1 EXPERIMENTAL SETUP: BENCHMARKS AND BASELINES
- The primary corpus has 6,026 SWE-smith trajectories, with main measurements on a fixed 600-trajectory subset; LHTB adds 1,459 trajectories from 28 models.Evidence retention is assessed by searching residual text for gold-patch lines; the relaxed variant also covers token dropping, while paraphrases and latent representations are assessed separately.Source: §3.1 · p. 6
- The modeled end-to-end latency table compares methods under “wall” and “admit” schedules, with ratios to LAM in parentheses.“Wall” defers compaction to the context budget; “admit” removes records before prefill.Source: Table 2 · p. 7
3.2 MAIN RESULTS
- 22.47% of observation tokens are removed with 99.984% evidence retention at LAM’s default threshold, versus 19.60% removal for SemDeDup and no qualifying masking setting at τ = 0.999.At τ = 0.99, SemDeDup removes more than LAM; these are static evidence metrics, not task-success measurements.Source: §3.2 · p. 7, Figure 3 · p. 7
- 71.4× at batch 1 and 91.6× at batch 32 are the modeled speedups from removing records before prefill rather than deleting them from a prefilled context.The benefit comes from scheduling, not the rule, and applies to any prefix-preserving test; four non-prefix-stable methods separate from LAM by 9.4×–69.1× at batch 1.Source: §3.2 · pp. 7–8
3.3 ABLATION STUDY
- At cos ≥0.95, the shipped rule has 0.9846 recall@10, 99.984% evidence retention, and a 75.67% resolve-rate ceiling, while no substitution exceeds its configured bound.The layers overlap: assuming independent removal overstates their joint rate by 4.0–11.7 points, and running L0 first costs 2.45 points at cos ≥0.95, so L1 runs first.Source: §3.3 · p. 8, Table 3 · p. 8
- With CPU compaction co-located on a serving node and the load generator on a second node, output throughput stays at 0.9999× baseline; restricting compaction to two distant NUMA domains yields 0.9966× server throughput and 0.540 of standalone compactor throughput.The restricted placement costs the compactor more bandwidth than it saves the server, so the authors ship unrestricted placement (Appendix E.3).Source: §3.3 · pp. 8–9
4 RELATED WORK
Related work includes model-based compression, model-free deduplication, agent-memory systems, and serving systems that preserve prefixes. LAM is positioned as arrival-time substitution with an explicit error bound and a compaction schedule that preserves prefixes.
4 RELATED WORK
- Model-based methods summarize, encode, project, or select context [Mu et al., 2023; Ge et al., 2024; Cheng et al., 2024; Pan et al., 2024], but require inference and lack a substitution bound.LAM records explicit deletions and representatives; its reproducibility depends less on model weights and execution settings.Source: §4 · p. 9
- LAM uses banded hashing for candidate generation and substitutes near-duplicates as records arrive, unlike SemDeDup’s offline clustering [Abbas et al., 2023].Across five seeds, only 50.9% of SemDeDup’s deleted chunks are common to all runs, while LAM’s deletions are identical.Source: §4 · p. 9
- Mem0, observation masking, LightMem, MemAgent, and Omri et al. (2026) use different memory operations but do not provide a substitution bound.The cited approaches include LLM operations, recency-based retention, intake filtering, learned rewriting, and characterization of memory growth.Source: §4 · p. 9
- Slipstream and Parallel Context Compaction overlap LLM summarization with serving [Chen et al., 2026; Cim et al., 2026], whereas LAM removes records before prefill to preserve the prefix and run its test on CPU.Rewriting a prefix forces re-prefill of affected entries and competes for GPU resources.Source: §4 · p. 9
- LAM complements prefix-reuse systems by preserving prefixes during compaction, and extends performance models with error threshold, compaction cost, and re-prefill cost.Its comparison scope depends on cache-rebuild costs and observation-stream near-duplicates; cheap repair, low redundancy, or poor retention would limit the benefit.Source: §4 · p. 9
5 CONCLUSION
LAM deduplicates agent observations with a query-independent distance test and bounds retrieval-score deficit. Its prefix-preserving schedule is modeled to reduce end-to-end latency, while evidence loss is measured separately from live task success.
5 CONCLUSION
- The distance test bounds retrieval-score deficit, while removing records before prefill preserves the prefix and yields a modeled 71.4×–91.6× speedup over deletion from an existing context.The scheduling benefit applies to any prefix-preserving rule, including LAM’s exact-hashing floor.Source: §5 · p. 9
- The near-duplicate layer costs 2,883× more per event than the exact-hashing floor, yet the two remove more together at 99.984% retention.The conclusion describes every deletion as auditable.Source: §5 · p. 9
- Deduplication can remove information an agent later needs, and the paper measures evidence loss but leaves live task success unmeasured.The work studies public research datasets and involves no human subjects or personal data.Source: ETHICS STATEMENT · p. 10
A IMPLEMENTATION DETAILS
The batch implementation processes trajectory records in order, selecting a retained representative when an eligible match exists. The reported rule is reproducible across tested configurations and also removes observation tokens in a second agent scaffold.
A IMPLEMENTATION DETAILS
- The batch form processes chunks in trajectory order, selects the lowest-indexed eligible representative, and retains unmatched chunks.For fixed embeddings and candidate settings with no eviction, it agrees with the online algorithm; tested residuals matched on 600/600 trajectories.Source: A IMPLEMENTATION DETAILS · p. 14
- The deletion set is byte-identical across six batch sizes and two machines, while SemDeDup agrees with itself on only 50.9% of its drop set across five seeds.On LHTB, LAM removes 33.39% of observation tokens, compared with 13.81% on the primary setting.Source: A IMPLEMENTATION DETAILS · p. 14
B REDUNDANCY IN AGENT TRAJECTORIES
- The redundancy analysis covers 361,802 records across 6,026 SWE-smith trajectories and tokenizes tool observations with cl100k base.All matches are within a trajectory.Source: B REDUNDANCY IN AGENT TRAJECTORIES · p. 14
B.1 L0 GRANULARITY: BYTE-EXACT DUPLICATION
LAM combines byte-exact line hashing with near-duplicate matching, whose composition depends on layer order and encoder choice. Its substitution bound limits retrieval-score loss, but does not by itself guarantee unchanged top-k rankings.
B.1 L0 GRANULARITY: BYTE-EXACT DUPLICATION
- 18.14% of tokens are removed by line hashing, compared with 2.61% for fixed chunks; line hashing is used for L0.Paragraph and whole-record hashing give nearly the same rate because blank lines rarely divide observations into useful units.Source: §B.1 · p. 14, Table 5 · p. 15
B.2 NEAR-DUPLICATE HEADROOM
- 13.81% of tokens are removed by near-duplicate matching at cos ≥0.95; on LoCoMo, only 2 of 17,296,021 records form near-duplicate pairs.The LoCoMo result is presented as evidence that this redundancy is characteristic of agent trajectories, not memory benchmarks generally.Source: §B.2 · p. 15
B.3 COMPOSITION OF THE TWO LAYERS AND THE EFFECT OF THEIR ORDER
- 4.47 percentage points is the joint-removal gain over L0 alone at cos ≥0.95, and LAM runs L1 before L0.L0 followed by L1 removes 20.52%, versus 22.97% in reverse order; removing repeated lines first fragments chunks matched by L1, and an independence estimate overstates joint removal by 4.0–11.7 points.Source: §B.3 · p. 15, Figure 4 · p. 15
B.4 ENCODER SENSITIVITY
- 11.26%–30.57% is the removal range across encoders at t = 0.95, a 2.7× spread compared with 13.79% for bge.Merge thresholds are not directly comparable across embedding spaces; each encoder requires its own threshold calibration.Source: §B.4 · p. 16
C.1 RANKING MARGINS
- 0.0056 is the median k = 3 ranking margin on LoCoMo, below useful merge-threshold substitution bounds, so score-deficit control does not certify top-k invariance.Retrieval quality is evaluated separately.Source: §C.1 · p. 16
C.2 THE BOUND
- A δ-substitution bounds each unit query’s retrieval-score deficit by δ, without assumptions about score distributions or ranking margins.An expected-distortion bound alone would not guarantee each query’s score on a finite record set; the two greedy passes bracket rate and metric entropy but do not establish equality.Source: §C.2 · pp. 16–17
C.3 A METRIC-ENTROPY CEILING ON REMOVAL
The removal ceiling is determined by the observed records’ geometry: a packing-derived bound limits what any δ-bounded compactor can remove. Greedy first-occurrence provides an online cover-and-packing construction, while measured removal remains below the ceiling.
C.3 A METRIC-ENTROPY CEILING ON REMOVAL
- A 2δ-packing gives a one-extra-pass ceiling: no δ-bounded compactor can remove more than 1 − |P|/|S|.The ceiling follows from the intrinsic geometry of the observed records; ambient-volume bounds are too weak to be useful here.Source: §C.3 · pp. 17–18
- 25.92% of the removal ceiling is attained by the near-duplicate layer at the default threshold, with 15.86% of chunks removed against a 61.19% ceiling.This is a lower bound on the fraction of optimal removal achieved because the ceiling may be loose; token columns report observed removal, not upper bounds on token removal.Source: §C.3 · p. 18, Table 6 · p. 18
C.4 REPRESENTATIVE SELECTION
- Greedy first-occurrence retains an arriving chunk only when it is more than δ from every retained chunk, ensuring each dropped chunk has a representative within δ.Unlike connected-component grouping, this direct representative test ensures a δ-substitution even though the merge relation is not transitive.Source: §C.4 · p. 18, Figure 5 · p. 19
C.5 THE MEASURED BOUND
- 0.268 is the realized maximum substitution distance on 600 trajectories, below the configured bound of 0.316.The realized distance bounds embedding substitution and score loss; evidence retention is evaluated separately.Source: §C.5 · p. 19
D DETERMINISM
LAM’s pipeline and deletion sets are reproducible across tested runs, encoder batch sizes, and hardware, while LLM memory-manager repeatability depends on pinned execution settings. The cost model shows that context length and scheduling affect compaction’s end-to-end cost.
D DETERMINISM
- Online and batch execution produce byte-identical deletion sets on 600/600 trajectories despite measured cosine jitter of 2.4 × 10^-7.The jitter corresponds to a 4.9 × 10^-4 spread in the measured substitution bound.Source: D DETERMINISM · p. 19
- Every tested threshold yields the same deletion-set digest across six encoder batch sizes, with Jaccard 1.000000 and symmetric difference 0 on GB10.This holds despite coordinate variation up to 1.1 × 10^-6 and pairwise-cosine variation up to 1.8 × 10^-7.Source: D DETERMINISM · p. 19
- 28.0% removal at cos ≥0.99 has only 0.686 pairwise deletion-set Jaccard across five SemDeDup seeds.Similar removal rates therefore need not imply identical memories.Source: D DETERMINISM · pp. 19–20
- 7,678 chunks at cos ≥0.99 and 11,727 at cos ≥0.95 yield byte-identical deletion sets across the tested hardware and PyTorch builds.Both machines used the same checksum-verified shard, tokenizer, fp32 CLS pooling, and greedy rule.Source: D DETERMINISM · p. 20
- LLM memory-manager outputs are reproducible in the tested setup, but that reproducibility rests on greedy decoding, a fixed seed, and a pinned model version.Across twelve LHTB trajectories, all ten repeats per trajectory returned identical deletion sets.Source: D DETERMINISM · p. 20
E.1 THE φ DECOMPOSITION (P1)
- At 32K context, the context-scaling share φ is 21.6% at batch 1 and 76.6% at batch 32, setting speedup ceilings of 1.28× and 4.28×.Batch size, context length, and model architecture change the ceiling before any compactor acts.Source: §E.1 · p. 20, Table 7 · p. 20
- Without compaction, the modeled run exhausts the KV cache at turn 1,341 of 1,453; method ordering depends on forced re-prefill frequency, not removal amount.The accounting charges each method its own measured removal and least expensive permitted schedule; compaction latency is a separate, smaller axis.Source: §E.1 · pp. 20–21
E.2 WHERE THE LATENCY IS: PREFIX-STABILITY (S1)
Testing deletions before prefill preserves the cached prefix, avoiding the cost of rebuilding invalidated KV entries. The evaluated operator also supports CPU/GPU overlap and retains measured retrieval and gold-patch evidence at the reported settings.
E.2 WHERE THE LATENCY IS: PREFIX-STABILITY (S1)
- 71.4× at batch 1 and 91.6× at batch 32: testing records before prefill preserves the cache and cuts modeled compaction and re-prefill time from 98.6% to 0.1% of runtime.Deleting in place invalidates later KV entries; rebuilding a 360K-token cache costs ≈538 s in the model against ≈12 s for a turn’s inference.Source: §E.2 · p. 21
E.3 WHERE THE COMPACTOR RUNS
- At 16 compactor threads, output throughput remains 0.9999× baseline, while 32 threads raise median TTFT to 192.5 ms and inter-token latency to 1.1585×.Unrestricted placement outperforms pinning to the two NUMA domains furthest from the GPUs; the reported cost-model conclusion assumes spare CPU capacity and excludes GPU encoding when embeddings must be generated.Source: §E.3 · p. 22
F.1 THE ONLINE OPERATOR, MEASURED (A1)
- Online and batch residuals are byte-identical on 600/600 trajectories; L0-before-L1 costs 2.45 percentage points of joint removal, and encoding accounts for nearly all compaction time.Reusing available embeddings is therefore more valuable than optimizing the remaining stages.Source: §F.1 · p. 22, Table 10 · p. 23, Table 12 · p. 23
F.2 RETRIEVAL QUALITY AND THE MEASURED BOUND
- At cos ≥0.95, mean substitution distance is 0.350 of the configured bound at cos ≥0.99, while the default cos ≥0.95 setting has recall@10 of 0.9846.The retrieval-quality passage also reports recall@1 0.9606 and recall@20 0.9928 at the default setting; at cos ≥0.90, recall@10 is 0.9518.Source: §F.2 · p. 23, Table 11 · p. 23
F.3 EVIDENCE SURVIVAL (A4)
- 22.47% of observation tokens are removed while 99.984% of measured gold-patch evidence is retained; keeping the last 50 observations removes 5.1× fewer tokens and loses 54× more evidence.Evidence counts only witnessed lines that remain findable in the residual; a reference stub does not itself count as readable evidence.Source: §F.3 · p. 24, Table 14 · p. 24
F.4 WHAT THE EVIDENCE AXIS INCLUDES
- The evidence criterion covers deletion and token dropping, but not paraphrases or latent representations, which require semantic evaluation of their own.The evaluated LightMem configuration is the bert-base-multilingual-cased-meetingbank checkpoint, not its XLM-R-large checkpoint or full consolidation system.Source: §F.4 · p. 25
F.5 THE BALANCE: ONE METRIC FOR EVIDENCE AND TOKENS (A5)
The section measures removal against evidence retention, then examines outcome ceilings, index compression, baselines, another corpus, candidate-search settings, and exact-search cost. The results show how these trade-offs vary by retention floor, corpus, and operating point.
F.5 THE BALANCE: ONE METRIC FOR EVIDENCE AND TOKENS (A5)
- At τ = 0.999, LAM removes the most among evaluated settings: SemDeDup reaches 19.60% and no masking setting qualifies; at perfect retention, LAM removes 21.49%.At lower floors SemDeDup removes more; which family is preferable depends on the required retention, and only LAM carries a substitution bound and supports testing before prefill.Source: §F.5 · p. 25, Table 17 · p. 26
F.6 RATE, TOKENS, AND THE OUTCOME CEILING
- 22.50% token removal corresponds to an RSC decrease of 0.17 percentage points, from 75.83% to 75.67%; RSC bounds live task success only under stated evidence-necessity and reacquisition assumptions.Otherwise, it is an evidence-based proxy rather than a bound on live task success.Source: §F.6 · p. 27, Figure 6 · p. 27
F.7 COMPOSITE REDUCTION: DEDUPLICATION × BYTE CODEC
- 4.63× composite storage reduction at the selected codec setting has recall@10 0.6543 and retrieved-set Jaccard 0.990; the substitution bound does not cover byte-codec error.The codec compresses the embedding index, not the text carried in context.Source: §F.7 · p. 27, Table 20 · p. 28
F.8 SEMDEDUP MATCHED ON REACH
- At matched scope, SemDeDup removes 13.69% and retains 99.939% of evidence, while LAM’s L1 alone removes 13.81% and retains 99.984%.LAM reaches 22.47% removal when L1 is composed with L0; equal removal rates do not imply equal deletion sets.Source: §F.8 · pp. 27–28, Figure 7 · p. 28
F.9 A SECOND CORPUS: LONG-HORIZON TERMINAL AGENTS
- On LHTB, LAM removes 33.39% of observation tokens at cos t = 0.95, compared with 13.81% on SWE-smith, a 2.4× difference; this experiment measures redundancy, not task success under compaction.The evaluation used 400 trajectories from a different scaffold and model set.Source: §F.9 · pp. 28–29, Table 21 · p. 28
F.10 BAND WIDTH AND QUANTIZER STEP: THE FULL GRID
- At cos ≥0.95, full recall requires r = 4 and rel = 0.2, examining 31.6% of pairs for a 3.2× reduction; accepting recall 0.979 at r = 8 and rel = 0.3 gives 26×.Each threshold requires its own setting because a band match requires agreement in all coordinates.Source: §F.10 · p. 29
F.11 BRUTE-FORCE SCAN CROSSOVER
- Exact search takes 44 µs of a 16.4 ms call (0.46% of elapsed time) on replayed trajectories; the synthetic crossover with encoding occurs only at 1.2M survivors.That crossover is 10,000× the largest observed index, so the authors conclude these workloads remain clear of approximate search.Source: §F.11 · p. 29
G MEASURED HARDWARE CONSTANTS
- On an NVIDIA A100-SXM4-40GB, compaction-latency ordering and crossovers match the Figure 9(a) comparison, supporting the reported structural rather than device-specific gap.Dotted verticals mark where the KV cache no longer fits at batch 1.Source: G MEASURED HARDWARE CONSTANTS · p. 29, Table 22 · p. 29, Figure 8 · p. 30
I DEFERRED PROOFS
The deferred proofs establish rate–distortion bounds for deterministic substitutions and explain how the dense δ sweep brackets rates across sources while reporting empirical outcomes separately.
I DEFERRED PROOFS
- A deterministic δ-substitution has entropy at most log2 |R| and yields a feasible rate–distortion coupling at distortion δ.The bound holds for every source distribution supported on S, but does not claim tightness.Source: I DEFERRED PROOFS · p. 30
- The rate–distortion bracket uses a 2δ-packing for its lower bound and a δ-covering for its upper bound, with M(S, 2δ) ≤ N(S, δ) ≤ M(S, δ).Two greedy passes provide computable bounds.Source: I DEFERRED PROOFS · pp. 30–31
J THE DENSE δ SWEEP
- Table 23’s outer bit columns give the Corollary 3 bracket, while its middle H(π(X)) column is the empirical-source rate bounded above by log2 |R(δ)|.Masking is not a δ-substitution, and RSC is a conditional ceiling rather than measured task success.Source: J THE DENSE δ SWEEP · p. 31, Table 23 · p. 31
K.1 RANK INVARIANCE, IN FULL
The appendix measures when score-error bounds can guarantee ranking invariance, studies candidate-search trade-offs, and situates those guarantees within design and compaction-cost choices.
K.1 RANK INVARIANCE, IN FULL
- At the default cos ≥0.95, no tested k is guaranteed invariant; median adjacent-rank margins are 0.0185, 0.0056, and 0.0010 at k = 1, 3, 20 against bounds 0.1414 and 0.3162.The guarantee bounds retrieval-score loss, not ranking, because rank invariance depends on margins.Source: §K.1 · p. 31, Table 24 · p. 32, Table 25 · p. 32
K.2 BAND-WIDTH STUDY
- At r = 8 and ε/σ = 0.2, the banded index examines 1.46% of pairs with full recall at cos ≥0.99, a 68× reduction in comparisons.The best 0.99 configuration reaches only 0.651 recall at cos ≥0.95.Source: §K.2 · p. 32, Table 26 · p. 33
L DESIGN CHOICES AND THE SCOPE
- The query-independent substitution bound limits maximum retrieval-score loss without a ranking-margin assumption, while ranking quality and evidence retention are measured separately.Direct ℓ2 verification decides merges; quantization only proposes candidates, and retained representatives do not require a transitive merge relation.Source: L DESIGN CHOICES AND THE SCOPE · p. 32
M.1 THREE COST CLASSES
- Figure 9 reports observation-token removal rising from 0.80% at T = 1K to 25.58% at T = 33K, with a whole-trajectory mean of 22.50%.LLMLingua-2 is the cheaper LLM baseline; all modeled stages are bandwidth-bound, and near-peak efficiency assumptions favor the baselines.Source: §M.1 · pp. 33–34, Figure 9 · p. 34
M.2 COMPACTION LATENCY AND ITS LIMITS AS AN ARGUMENT
The cost model compares compaction methods under explicit deployment assumptions and distinguishes trajectory-scale savings from the effects of removal under a hard context budget.
M.2 COMPACTION LATENCY AND ITS LIMITS AS AN ARGUMENT
- At T = 1K, modeled compaction speedups are 4,957× over summarization, 1.33× over LLMLingua-2, and 1.00× over SemDeDup.Encoding accounts for 99.989% of LAM’s cost at T = 1K; with embeddings already stored, LAM costs 1.49 ms against 0.0963 ms for L0 alone.Source: §M.2 · pp. 34–35, Table 27 · p. 35
M.3 PER-ARRIVAL REMOVAL AND CONTEXT GROWTH
- In the growth regime, LAM supports 1,727 turns before the KV-capacity limit versus 1,615 for L0 alone, a modeled 1.07× speedup.Under a hard budget, additional removal gives 1.00× latency benefit and instead buys delayed eviction of nonredundant content, a quality effect the model does not capture.Source: §M.3 · p. 35