Layered Spatial Latent Caching (LSLC): In-Place Editable Compressed Context Memory vs. Raw-Text RAG with Volatility-Ordered Prefix Caching

Retrieval-Augmented Generation (RAG) over raw text chunks avoids quadratic Full-KV prefill (O(N · d_kv)) by retrieving top-k pages per query, yet remains fundamentally unsuited for multi-turn in-place revisions: immutable chunks serve stale constraints (0.0% override EM), appending errata leaves conflicting history in the prompt (46.7%–55.6% EM), and LLM-based chunk rewrites incur 790.9–14,630.9 ms/edit autoregressive decode latency. Conversely, recent latent context compressors (LCLMs, Memorilla) compress history into read-only continuous slots that lose exact verbatim identifiers, while editable KV methods (Models Take Notes at Prefill) operate over uncompressed standard KV caches. We propose Layered Spatial Latent Caching (LSLC), representing context as a modular, multi-layer 2D latent book Z ∈ R^(B × P × L × C × H × W) (12 KiB/page) paired with a 128 byte/page Sparse Exact-Recall Footnote Bank. LSLC introduces three core mechanisms: Volatility-Ordered Prefix Caching (1-level TOC at ≤32K and 2-level Chapter→Page hierarchy above ~100K), guaranteeing zero TOC prefix drift (max |Δ_TOC| = 0.0); In-Place Convex Sticky-Note Delta-Updates on dynamic layer l=2; and Hybrid Continuous-Discrete Page Memory pairing FactorizedRoPE3D latents with an 8 byte/token SparseExactBank resolved via the frozen LLM embedding table. Across frozen Qwen3-1.7B, Qwen3-4B, and 4-bit Qwen3-8B backbones: Against Constant-k=2 Raw-Text Chunk RAG (57.89–58.88 MiB live), 2-level hierarchical LSLC cuts live CUDA net VRAM by 1.70×–3.25× across 32K–256K (17.81 MiB at 32K, 24.98 MiB at 128K, 34.55 MiB at 256K — up to 829.9× below Full BF16 KV). Under a shared non-oracle Okapi BM25 retriever across N=180 32K NIAH episodes, 2-level LSLC achieves 91.1% Semantic EM (vs. 94.4% RAG) and 71.1% Exact EM (93.0% content-token accuracy). Across 3-seed state overrides (N=198), LSLC executes edits in 8.42–8.59 ms/edit (92×–1,738× faster than LLM chunk rewrites), reaching 100.0% EM on k=3 numeric overrides and 70.0%–91.7% EM on k=5 symbolic overrides. Code & Reproduction: https://github.com/arielfikru/lslc-research Adapter Weights (Qwen3-1.7B): https://huggingface.co/NekoFi/LSLC-Qwen3-1.7B-Adapter

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-24
DOI
https://doi.org/10.5281/zenodo.24473280
Primary Topic
Topic Modeling
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Layered Spatial Latent Caching (LSLC): In-Place Editable Compressed Context Memory vs. Raw-Text RAG with Volatility-Ordered Prefix Caching

Ariel Fikru
Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
preprint

Layered Spatial Latent Caching (LSLC): In-Place Editable Compressed Context Memory vs. Raw-Text RAG with Volatility-Ordered Prefix Caching

Ariel Fikru
preprint en

Abstract

Retrieval-Augmented Generation (RAG) over raw text chunks avoids quadratic Full-KV prefill (O(N · d_kv)) by retrieving top-k pages per query, yet remains fundamentally unsuited for multi-turn in-place revisions: immutable chunks serve stale constraints (0.0% override EM), appending errata leaves conflicting history in the prompt (46.7%–55.6% EM), and LLM-based chunk rewrites incur 790.9–14,630.9 ms/edit autoregressive decode latency. Conversely, recent latent context compressors (LCLMs, Memorilla) compress history into read-only continuous slots that lose exact verbatim identifiers, while editable KV methods (Models Take Notes at Prefill) operate over uncompressed standard KV caches. We propose Layered Spatial Latent Caching (LSLC), representing context as a modular, multi-layer 2D latent book Z ∈ R^(B × P × L × C × H × W) (12 KiB/page) paired with a 128 byte/page Sparse Exact-Recall Footnote Bank. LSLC introduces three core mechanisms: Volatility-Ordered Prefix Caching (1-level TOC at ≤32K and 2-level Chapter→Page hierarchy above ~100K), guaranteeing zero TOC prefix drift (max |Δ_TOC| = 0.0); In-Place Convex Sticky-Note Delta-Updates on dynamic layer l=2; and Hybrid Continuous-Discrete Page Memory pairing FactorizedRoPE3D latents with an 8 byte/token SparseExactBank resolved via the frozen LLM embedding table. Across frozen Qwen3-1.7B, Qwen3-4B, and 4-bit Qwen3-8B backbones: Against Constant-k=2 Raw-Text Chunk RAG (57.89–58.88 MiB live), 2-level hierarchical LSLC cuts live CUDA net VRAM by 1.70×–3.25× across 32K–256K (17.81 MiB at 32K, 24.98 MiB at 128K, 34.55 MiB at 256K — up to 829.9× below Full BF16 KV). Under a shared non-oracle Okapi BM25 retriever across N=180 32K NIAH episodes, 2-level LSLC achieves 91.1% Semantic EM (vs. 94.4% RAG) and 71.1% Exact EM (93.0% content-token accuracy). Across 3-seed state overrides (N=198), LSLC executes edits in 8.42–8.59 ms/edit (92×–1,738× faster than LLM chunk rewrites), reaching 100.0% EM on k=3 numeric overrides and 70.0%–91.7% EM on k=5 symbolic overrides. Code & Reproduction: https://github.com/arielfikru/lslc-research Adapter Weights (Qwen3-1.7B): https://huggingface.co/NekoFi/LSLC-Qwen3-1.7B-Adapter

Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon