Research

Fit Over Depth: Transfer-Appropriate Compression for Long-Context LLM QA

Members
2-person team · CUAI 9th NLP Team 1
My Role
Study design, pipeline, analysis
Project Period
Jul 2026 – Sep 2026
Venue
2026 CUAI Summer Conference · 3rd Place Award-Winning Short Paper
Stack
Python · PyTorch · Transformers · T5-small · RoBERTa · Llama-3.1-70B (teacher) · SQuAD, NewsQA, NarrativeQA, CaseHOLD

254 = 254exact tie vs. RAG out of 579 questions (0.4387)
−14% tokens3,081 vs. 3,588 tokens/Q (~290K saved total)
0.339 → 0.439accuracy gain once verbatim extraction + local repair replace rewriting

Abstract

Long-context QA is often framed as a context-length limit, yet our preliminary experiment across 607 questions (1,000–50,000 words) showed that appending 40,000 extra words changed accuracy by only +2 questions (+1.4 pp); the real bottleneck is utilization — on News (where closed-book accuracy is near zero), feeding the entire raw document still stayed below 0.40. I tested whether three human memory-enhancement strategies — elaborative rehearsal, the testing effect, and maintenance rehearsal — can narrow this utilization gap across 579 questions in four genres (SQuAD, NewsQA, NarrativeQA, CaseHOLD) against Adaptive-k RAG.

The findings split cleanly along two axes. First, rewriting collapsed structurally: elaborative rehearsal learned to copy its prior thread summary and ignore new chunks across every model scale (0.339 vs. RAG 0.439). Second, among strategies that preserve original sentences verbatim, no single strategy dominated everywhere — performance depended on whether encoding fit the document’s length and narrative continuity, aligning with Transfer-Appropriate Processing (Morris, Bransford & Franks, 1977) rather than Levels of Processing. Combining verbatim maintenance rehearsal with a document-length adaptive compression ratio and local coherence repair (window = 1 neighbor padding) matched RAG to the exact question count (254/579) while saving 14% of tokens (507 tokens/Q; ~290K tokens total).

Research questions & preliminary finding

Before compressing anything, we tested whether long contexts hurt primarily because of sheer length. Fixing 143 evidence-bearing questions inside 10,000-word passages and appending 40,000 additional words produced virtually no degradation (+1.4 pp). Yet on NewsQA — where parametric pretraining knowledge is near zero — even full-context input capped at 0.395 accuracy. Models fail to utilize evidence that is already in front of them.

RQ1 · Utilization
Can cognitive memory-enhancement strategies narrow this long-context utilization gap?
RQ2a · Preserve vs. rewrite
Does whether a strategy rewrites or preserves source sentences determine whether it works at all?
RQ2b · Encoding fit
Among verbatim strategies that survive, does fit between encoding and document structure determine which strategy wins?

Two prior architectures framed the initial attempt: ReadAgent (Lee et al., ICML 2024) compresses documents into gists and looks up raw pages on demand, while C-DIC (Jung et al., ICML 2026) maintains multi-slot thread memories via retrieve-and-replace updates. Following Craik & Lockhart’s (1972) Levels of Processing prediction, I implemented elaborative rehearsal first.

Setup & evaluation protocol

Documents are segmented via semantic chunking at minimum cosine similarity between adjacent paragraphs/sentences (s_i = cos(e_i, e_{i+1})), strictly respecting sentence/dialogue integrity and explicit scene breaks within [min_words, max_words]. For lookup, instead of fixing a static k per genre, we apply Adaptive-k (Taguchi et al., EMNLP 2025), cutting ranked query–chunk similarities at the sharpest drop (gap(i) = s(i) − s(i+1)).

The initial t5-small compressor was trained in two stages: (1) one-shot compression on XSum, then (2) rolling thread-memory distillation on 336 training (and 48 validation) documents generated by a Llama-3.1-70B-Instruct teacher. All methods were scored on the same 579 questions against closed-book, full-context, and pure Adaptive-k RAG baselines.

GenreDatasetQuestionsMetricDocument Profile
WikiSQuAD100EM / F1~19,600 tokens; short, independent facts, low continuity
NewsNewsQA200EM / F1~65,000 tokens; near-zero closed-book knowledge, low continuity
NovelNarrativeQA79EM / F1~81,100 tokens; strong narrative continuity, plot-summary questions
Case lawCaseHOLD (LexGLUE)2005-way MC~87,400 tokens; formal legal holdings, 200 shared-pool excerpts

Overview: three human memory strategies tested

I translated all three cognitive strategies into context compressors and evaluated each on the 579-question benchmark against Adaptive-k RAG (0.439): elaborative rehearsal (rewriting rolling gists), the testing effect (query-aware extraction), and maintenance rehearsal (query-agnostic verbatim selection + local repair).

Elaborative rehearsal rewrote the text and collapsed (0.339). The testing effect survived with 5.3× fewer tokens (0.366). Maintenance rehearsal kept sentences verbatim and matched RAG (0.439) with 14% fewer tokens.
Three memory strategies compared on 579 questions: rewriting collapsed (0.339), testing-effect extraction traded accuracy for 5.3× token reduction (0.366), and verbatim maintenance + repair tied RAG (0.439) with 14% fewer tokens.

01 · First hypothesis: deep processing should win

Levels of Processing (Craik & Lockhart, 1972) predicts that deep, meaning-based elaboration always outperforms shallow maintenance for long-term retention. Following that prediction, I built a C-DIC–style text-level thread memory: each chunk C_t retrieves its closest thread state Z_j*, inserting a new thread if similarity stays below τ and otherwise replacing it with a rewritten summary S_t. At test time, QA answers from gists first and falls back to raw chunks via Adaptive-k lookup.

On the full 579-question benchmark, elaborative rehearsal failed on both accuracy and cost: it scored 0.339 vs. 0.439 for RAG (Wiki 0.620 vs. 0.850; News 0.220 vs. 0.420; Novel 0.291 vs. 0.316; Case law 0.245 vs. 0.300) while consuming roughly 7× the tokens (25,551 vs. 3,588). By contrast, query-aware testing-effect extraction used 5.3× fewer tokens and 34% lower latency, sitting 0.073 below RAG at 0.366.

Elaborative rehearsal rolling thread memory: as new chunks C3 to Ct arrive, the compressor copies prior thread Z1 unchanged and drops new chunk facts, causing 0.339 accuracy at 7x RAG token cost.
Initial elaborative rehearsal pipeline: (a) as new chunks arrive, thread Z₁ stays frozen instead of updating; (b) zoomed step t contrasts the intended merge against observed thread-copy collapse (0.339 vs. 0.439 RAG at 7× token cost).

02 · Diagnosis: why retrieve-and-replace collapsed

I isolated the failure in three controlled steps. First, keeping Adaptive-k retrieval fixed and swapping raw chunks for gists dropped accuracy to 0.121; switching selection to gist embeddings changed nothing (0.119), proving the defect lived in the gist content itself, not retrieval. Second, in a minimal slot-swap control (C_t + Z_j* vs. Z_j* + C_t), both t5-small and the 70B teacher literally copied the existing thread Z_j* while ignoring the new chunk C_t. Scaling up the compressor actually worsened performance (0.339 → 0.212).

Third, we checked whether inference-time fixes could repair collapse without retraining on Wiki (n = 100): detecting low-novelty outputs and regenerating without prior context raised collapsed baseline accuracy from 0.130 → 0.390, and contrastive decoding reached 0.330 — confirming the failure sits in how retrieval and generation couple, though neither approached Adaptive-k RAG (0.850). This aligns with three recent findings: extractive beats abstractive compression (EXIT, ACL 2025), query-aware beats query-agnostic compression (LongLLMLingua, 2024), and order-preserving simple retrieval (DOS RAG, EMNLP 2025) beats tree summarization (RAPTOR). Finding (RQ2a): rewriting itself was the structural fault.

(a) What the compressor was meant to do, and what it did. (b) Inference-time fixes on Wiki. (c) A bigger compressor does worse: a structural problem, not a capacity limit.
(a) Thread-memory collapse across slot-swap tests. (b) Inference-time mitigation on Wiki (n = 100: 0.130 → 0.390 / 0.330 vs. RAG 0.850). (c) Scaling the abstractive compressor degrades accuracy (0.339 → 0.212).

03 · Second hypothesis: verbatim maintenance & adaptive ratio

Removing rewriting eliminates thread-copy collapse altogether. Under Transfer-Appropriate Processing (Morris et al., 1977), compression should preserve original wording and scale with document structure rather than force a uniform abstractive rewrite.

I switched to verbatim maintenance rehearsal using a RoBERTa sentence scorer without cross-chunk integration. Raising a fixed keep ratio from R = 0.3 → 0.5 lifted accuracy from 0.325 → 0.368 by cutting lost evidence sentences from 43% to 26%. Replacing fixed cuts with a document-length dependent ratio R = min(1, K / |D|) (K = 32,000 tokens) keeps shorter documents nearly intact.

Overall accuracy jumped to 0.428 — closing the gap to RAG (0.439) to 0.011 at roughly half the token budget (1,862 vs. 3,588) — and surpassed RAG on Wiki (0.880 vs. 0.850).

Accuracy against mean context tokens per question (log scale), 4 genres, n = 579.
Accuracy vs. mean context tokens per question (log scale) across 4 genres (n = 579): unlike gists, verbatim maintenance scales monotonically with budget.

04 · Second diagnosis: extraction creates seams (local coherence repair)

Even with dynamic compression, a sharp gap remained on Novel (0.278 vs. 0.316). Extracting non-adjacent sentences tears apart local discourse links that readers rely on for bridging inference (Kintsch, 1988; Clark & Haviland, 1977). Under Zwaan, Langston & Graesser’s (1995) Event-Indexing Model, narrative comprehension tracks five continuity axes — time, space, character, causality, and intentionality.

To restore those cut seams without rewriting a single word, I added local coherence repair: padding every kept sentence with one original neighbor on each side (window = 1). The resulting architecture — Transfer-Appropriate Extraction — chains semantic chunking, RoBERTa importance scoring with R = min(1, 32,000 / |D|), and window = 1 repair on narrative and legal texts (Wiki and News already sit near zero gap).

Final architecture: Encoding (semantic chunking + RoBERTa maintenance rehearsal with adaptive ratio), Local coherence repair (window=1 neighbor padding restoring event-indexing links), and Question-time QA (Adaptive-k + Reader LLM).
Final architecture (Transfer-Appropriate Extraction): offline semantic chunking and verbatim RoBERTa selection with adaptive ratio R = min(1, K/|D|), window = 1 local coherence repair, and Adaptive-k question-time QA.

As the Event-Indexing Model predicted in advance, the repair effect was strongly asymmetric across genres: on Novel (79 questions), window = 1 padding closed 100% of the gap to RAG (0.278 → 0.316, exact tie at 25/79) while still using fewer tokens (858 vs. 977). On structured Case law (200 questions), it closed 60% of the gap (0.275 → 0.290, 55 → 58 of 200 vs. RAG 60). Applying the exact same repair to query-aware testing-effect extraction closed only 44% of its novel gap — separating seam loss from sentence-selection mismatch.

What local repair changed: fiction gap closed 100%, case law 60%.
Genre-asymmetric impact of local coherence repair (window = 1): 100% recovery on narrative fiction and 60% on case law.

05 · Full-scale results: final model vs. RAG

Across all 579 questions, the final model ties Adaptive-k RAG to the exact number of correct answers — 254 vs. 254 (0.4387) — while cutting mean context length by 507 tokens per question (−14%: 3,081 vs. 3,588), saving roughly 290,000 tokens across the benchmark and matching or reducing token cost in every single genre. Meanwhile, query-aware testing-effect extraction offers a distinct efficiency point (0.366 accuracy with 5.3× fewer tokens and 34% shorter latency) for cost-sensitive deployments.

Condition (n = 579)WikiNewsNovelCase lawOverallMean Tokens
Full context (upper reference)0.8100.3950.4940.3600.515—
Elaborative rehearsal + retrieval0.6200.2200.2910.2450.33925,551
Testing effect (query-aware)————0.366~675
Adaptive-k RAG (baseline)0.8500.4200.3160.3000.4393,588
Final: Transfer-Appropriate Extraction0.8800.4150.3160.2900.4393,081 (−14%)
(a) Accuracy by genre. (b) Ours − RAG, correct answers. (c) Mean context tokens per question. Single-run point estimates, no significance tests.
(a) Per-genre accuracy. (b) Exact question delta vs. RAG (overall 254 = 254). (c) Mean tokens per question (3,081 vs. 3,588; −14%). Single-run point estimates.

Why fit beat depth (RQ2b)

Comparing the two verbatim survivors across genres confirms Transfer-Appropriate Processing: no single strategy won uniformly. On short, low-continuity Wiki documents, length-adaptive maintenance rehearsal barely pruned and beat RAG (+3.0 pp). On News (near-zero closed-book knowledge), precise fact lookup was the bottleneck so RAG and maintenance sat within ±0.5 pp. On Novel, NarrativeQA questions are written from plot summaries, so plot-importance maintenance + repair matched RAG whereas query-aware extraction fell behind by −20.2 pp. The useful question was never “how deeply should the model process?” but “does the encoding strategy match the document’s structure and retrieval demand?”

Limitations & future work

  • Single-run point estimates: Results reflect single evaluation runs without statistical significance tests; the main verified advantage over RAG is efficiency (−14% tokens at equal accuracy).
  • CaseHOLD retrieval inversion: Pooling 200 unrelated legal excerpts into a shared retrieval index reduced Adaptive-k gold-chunk recall to 7.0% (below chance); skipping retrieval jumped accuracy from 0.290–0.300 to 0.560 — consistent with proactive interference (Anderson, 1974) and encoding-specificity violation (Tulving & Thomson, 1973).
  • Compressor capacity & length ceiling: Scaling RoBERTa-base to RoBERTa-large improved selection quality (MAP 0.493 → 0.584, though QA gains remained genre-dependent), whereas scaling the abstractive compressor hurt. Extending documents to 75,000 and 90,000 words (0.583 and 0.556, within −2.8 pp of 50K words) showed no sharp midpoint cliff.
  • Next steps: Run repeated seeds with confidence intervals, benchmark against newer adaptive compressors (QwenLong-CPRS, ArcAligner, TiMem), and pair automated QA with a human reading study on compressed contexts.