Resilient Latent Readouts for Long-Context Question Answering

Jingyi Liao, Rong-Cheng Tu, Wenhao Sun, Yiting Li, Zhao Jin, Khin Mi Mi Aung, Zhuoyi Lin, Xun Xu, Dacheng TaoNeurIPS 2026

TL;DR

When answering questions over massive documents or chat histories, standard retrieval systems fetch text snippets and feed them back to the LLM—meaning if a retriever misses the exact sentence containing a fact, the answer is lost forever. LIRA solves this by retrieving internal model states (KV-cache vectors) from a pre-computed pass over the full history rather than raw text. Because causal Transformers bake earlier context into later token states, LIRA can often recover the right answer even when the explicit supporting text wasn't selected at all.

What Problem Does This Paper Address?

Suppose you want an LLM to answer questions about a 50,000-token conversation. Feeding the entire history into the prompt for every question is expensive and drowns the model in distracting noise.

The standard alternative—Retrieval-Augmented Generation (RAG) and text-based agent memories—fetches a few relevant text passages and re-reads them in a short prompt. While clean, this interface is brittle: it optimizes solely for evidential coverage (did we grab the right words?). If retrieval misses a crucial earlier turn, re-encoding the surviving text snippets from scratch severs all connection to what came before.

Figure 1: (a) Given identical selected positions that omit an earlier answer-bearing segment, text- native memory re-encodes the selected text under a truncated prefix, losing both the omitted text and its contextual influence on retained tokens. Latent-state memory reads the corresponding states from the original full-prefix prefill, where that influence is preserved. (b) Stratified by oracle-coverage of the retrieval output, latent-state reuse and text-native re-prefill behave near-identically when coverage is full, but the gap widens monotonically as coverage drops, reaching +13.3 F1 at zero coverage.

The authors introduce a second, overlooked axis: inferential resilience—how well a system can still answer when selection is imperfect. In a causal Transformer, every token's hidden state attends to everything before it, quietly absorbing "echoes" of earlier facts. If we read out pre-computed latent states instead of raw text, retained states carry the contextual imprint of the entire history, acting as a safety net against retrieval errors.

Methods

LIRA (Latent Information Readout and Assembly) is a training-free, latent-memory reader that amortizes a single full-history forward pass into a reusable Key-Value (KV) store. When a question arrives, LIRA builds a compact, budgeted KV cache in three stages:

Figure 2: Overview of LIRA. From left to right, the figure traces through four stages: amortized latent-memory setup, calibrated endogenous localization, coverage-aware readout planning, and position-consistent latent-state assembly.
  1. Calibrated Endogenous Localization: Instead of an external embedding model, LIRA uses the LLM's own late-layer attention from the question tokens to the stored history. Raw attention, however, gets hijacked by query-independent "attention sinks" (BOS tokens, delimiters, formatting). LIRA fixes this by running a task-agnostic neutral probe (e.g., "Tell me about this.") against the cache and subtracting its baseline attention, isolating genuine query-specific signal to select top-scoring segment anchors.
  2. Coverage-Aware Readout Planning: LIRA checks if the attention mass is sharply concentrated in those initial anchors. If the signal looks diffuse (common in summarization or multi-hop queries), it triggers a two-part repair: near-field bridge repair grabs adjacent turns for local discourse continuity, and long-range residual fill sprinkles in top-scoring individual tokens from across the history. (Unlike raw text, isolated token states remain coherent to the model because they are already contextualized!)
  3. Position-Consistent Latent-State Assembly: Plucking sparse KV states from positions like token 450 and token 12,000 and packing them side-by-side scrambles Rotary Position Embeddings (RoPE). LIRA mathematically re-rotates the selected Keys so they form a clean, contiguous positional sequence right after the system prompt, leaving Values untouched.
Figure 4: Position-consistent latent-state assembly. Gathered keys are RoPE re-indexed from original po- sitions ik to compact positions ρ(ik).

Datasets

LIRA is training-free and evaluated across three open-weight models (Llama-3.1-8B-Instruct, Qwen2.5-7B-Instruct, and MoE model Qwen3-30B-A3B) on two existing benchmarks:

  • LoCoMo: Long-term conversational QA over multi-session dialogues, complete with gold supporting-turn annotations that allow exact measurement of retrieval coverage.
  • Loong: A multilingual (English and Chinese) multi-document QA benchmark (evaluated on 10K–100K token sets) spanning four reasoning types: Spotlight Locating, Comparison, Clustering, and Chain of Reason.

Key Insights and Ideas

  • "Zero-coverage" recovery is real: When LIRA and a text-native control are forced to use the exact same retrieved token positions—and those positions contain 0% of the gold supporting evidence—LIRA still scores up to +13.3 F1 higher (+91.2% relative gain on Llama-3.1-8B). Later dialogue turns genuinely encode enough causal influence from omitted earlier turns to reconstruct answers.
  • KV compression $\neq$ Memory readout: Runtime KV-cache compression methods (like SnapKV and PyramidKV) try to approximate full-cache behavior, making them sensitive to model-specific attention quirks (dropping sharply in F1 on Qwen2.5-7B). Optimizing directly for calibrated, query-conditioned evidence is far more stable across model families.
  • Subtracting "bored" attention unlocks localization: Removing the neutral-probe attractor calibration tanks F1 by nearly 15 points, proving that raw LLM attention is heavily polluted by structural attractors rather than pure semantics.
  • Geometry matters: Skipping RoPE re-indexing collapses accuracy from 80.40% to 19.48%—packing sparse latent states without fixing their rotational phase renders the cache nearly unusable.

Key Results

  • Beating Full Context with a fraction of the tokens: On LoCoMo, LIRA is the strongest non-oracle compact-memory method across all three backbones and surpasses Full Context on 8 of 9 metrics (e.g., 56.86 vs. 51.43 F1 and 80.40% vs. 76.43% judged accuracy on Llama-3.1-8B), matching Full Context with just 1,024 retained tokens.
  • Excelling at both focal and diffuse multi-doc reasoning: On Loong (Llama-3.1-8B, Set 1), LIRA hits 47.51% overall accuracy—beating Full Context (41.23%), SnapKV (44.32%), and Dense-RAG (which collapses to 15.40% because multi-document reasoning resists surface-level chunk matching). LIRA shines brightest on single-site Spotlight Locating (+5.03 over best baseline) and diffuse Clustering (+4.09).

Limitations and Future Work

While the paper does not include a standalone "Limitations" section, several practical trade-offs are noted in the text and experiments:

  • Persistent storage footprint: Unlike text-RAG or permanent cache eviction, LIRA's amortized setup requires running one full-prefix pass and storing the full KV states in persistent memory so queries can selectively read from them.
  • Model-bound representations: Unlike text memories which are model-agnostic, latent states are tied to the exact LLM backbone that generated them.
  • Slight overhead at 100% coverage: In the controlled ablation where 100% of gold evidence is explicitly captured, text-native re-prefill edges out latent states by 1–2 F1 points, suggesting that full-prefix states can carry faint background noise when explicit text already tells the whole story.

Summary updated

Abstract

Long-context question answering often asks a model to answer from extended documents, multi-turn dialogues, or persistent histories. Directly prefilling the full history preserves all observed tokens, but it is expensive and can expose generation to substantial irrelevant or spuriously salient context, which may hinder evidence localization and answer synthesis. This motivates compact memory interfaces that provide a short, query-conditioned readout of the history. Existing systems predominantly instantiate this readout as text, where the reader sees only what was selected and any evidence left out is unrecoverable, leaving the interface fragile to selection errors. We argue that memory readout has two coupled axes that should be optimized separately: evidential coverage, whether all right support is selected, and inferential resilience, how much answerability remains under imperfect selection. To jointly address these two axes, we propose LIRA, a latent-memory reader that exposes full-prefix contextualized states rather than re-encoded text. It amortizes one full-prefix pass into a reusable latent store; for each query, it localizes candidate positions with calibrated endogenous attention, repairs incomplete support with coverage-aware planning, and packs selected states into a position-consistent readout for autoregressive generation. Across three open-weight backbones on LoCoMo and Loong, LIRA is the strongest non-oracle compact-memory method and surpasses Full Context on 8 of 9 LoCoMo metrics. When localization misses all supporting evidence, LIRA improves F1 by up to 13.3 points over a text-native control with identical positions, suggesting that full-prefix states preserve answer-relevant influence discarded by text-native re-encoding.
BibTeX
@inproceedings{liao2026resilient,
  author = {Jingyi Liao and Rong-Cheng Tu and Wenhao Sun and YITING LI and Zhao Jin and Khin Mi Mi Aung and Zhuoyi Lin and Xun Xu and Dacheng Tao},
  title = {{Resilient Latent Readouts for Long-Context Question Answering}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=vHe2MR0CGu},
}
Figure