Guide

Measuring Memory Compression Loss: A Practical Method

Published Jul 18, 2026

Knowing that a memory pipeline loses information under compression is one thing; knowing exactly how much, and where, is another. This guide is the practical, step-by-step version of that measurement: run a reference baseline, run the system under test, diff the results per task type, and — the step that turns a number into a diagnosis — check whether each gap comes from retrieval missing evidence or from extraction dropping structure the retrieval step actually found. The method is the same one behind DecisionSynth Bench's own scoreboard; applying it to a private system just means running it against your own corpus instead of the public one.

Step 1: Establish the ceiling with a verbatim baseline

The number that makes a compression-loss measurement meaningful is the ceiling it's measured against. Run a memory system that does no compression at all — stores every record close to verbatim, retrieves by simple lexical overlap, answers by pulling the matching field directly out of stored text — over your corpus, at the retrieval budget (k) you intend to test everything else at. This isn't a strawman configuration; a reference implementation built exactly this way (no extraction, no summarization, no graph — just verbatim storage and keyword-overlap retrieval) requires zero network calls and zero API keys, and its whole purpose is to establish the ceiling everything else gets compared against.

On a corpus in the hundreds-to-low-thousands-of-records range, this baseline should score close to the practical maximum — DecisionSynth Bench's own verbatim baseline scores 0.950 overall exact-match on its 591-episode dev set and 0.980 on its held-out set. If your baseline doesn't land somewhere near that range on a comparably sized corpus, something is wrong with the baseline setup itself, not with any system you haven't tested yet.

Step 2: Run the system under test over the identical corpus and budget

Run your actual system — whatever memory pipeline you're evaluating — over the same corpus and the same retrieval budget k used for the baseline. Matching k matters more than it might seem: a larger retrieval budget structurally favors recall for any system, so comparing a baseline run at k=5 against a system run at k=10 doesn't isolate compression loss, it conflates it with a retrieval-budget difference.

Step 3: Diff per task type, not just the overall score

A single blended score hides which kind of structure is actually being lost. Compute the exact-match gap separately for each question type your corpus tests — direct recall, rationale lookup, rule attribution, precedent search, temporal ordering, or whatever task taxonomy applies to your domain — rather than reporting one aggregate delta.

  • ·A gap concentrated in one task type (say, rule attribution) is a specific, fixable finding about what that pipeline's extraction step drops
  • ·A gap spread evenly across every task type is a different signal — often a retrieval problem rather than an extraction problem, which step 4 isolates
  • ·Report the raw task count per type alongside the gap — a delta computed from a handful of tasks deserves a directional read, not a precise one
const baseline = await score(runBaseline(corpus, tasks), tasks);
const system    = await score(runSystem(corpus, tasks), tasks);

for (const taskType of TASK_TYPES) {
  const gap = baseline.by_type[taskType].exact_match_rate
            - system.by_type[taskType].exact_match_rate;
  console.log(taskType, gap.toFixed(3));
}
// A gap concentrated on rule_attribution specifically means the
// extraction step is dropping citations, not general recall.
// A gap spread evenly across every type points at a different
// problem — likely retrieval, checked in step 4.

Step 4: Attribute the loss to retrieval or to extraction

A lower exact-match score has two structurally different possible causes, and the fix is different depending on which one applies. If retrieval recall (R@k) is also low relative to the baseline on the same task type, the system isn't finding the relevant evidence at all — that's a retrieval problem, and the fix is in how the system searches or indexes, not in what it extracted from what it found. If retrieval recall is close to the baseline but exact-match is still low, the system found the right evidence and still answered incorrectly — that's an extraction or reasoning problem, meaning whatever got stored from that evidence didn't preserve what the question needed, even though the evidence itself was retrievable.

This is the step that turns 'the system lost 40 points on rationale lookup' into an actionable finding: 'the system loses 40 points on rationale lookup because recall stays high but the extracted representation doesn't preserve override reasons' points an engineering team at the extraction prompt. 'The system loses 40 points on rationale lookup because recall itself is low' points them at the retrieval index instead. Reporting the blended score alone erases that distinction entirely.

Step 5: Reading the table the way a scoreboard is meant to be read

Once the baseline, the system, the per-task-type gaps, and the retrieval-vs-extraction attribution are all in hand, reading the resulting table is mostly a matter of resisting two temptations: treating the baseline's high score as an embarrassment for the system under test rather than the reference point it's meant to be, and averaging away exactly the per-task-type detail that made the measurement useful in the first place. A system that trails the baseline by a wide margin overall but tracks it closely on the task types that matter most for your actual use case may be perfectly fit for purpose — the baseline exists to show what compression costs, not to set a bar every production system is expected to clear.

Key takeaways

  • Compression loss is measured, not assumed — run a verbatim, no-compression baseline over your own corpus at your own retrieval budget as the reference point.
  • Match the retrieval budget (k) between the baseline and the system under test — a larger budget structurally favors recall regardless of pipeline quality, which would conflate two different variables.
  • Diff per task type, not just overall — a gap concentrated in one question type is a specific, fixable finding; a gap spread evenly across every type usually points somewhere else entirely.
  • Attribute each gap to retrieval or extraction by checking recall alongside exact-match — low recall means the system isn't finding the evidence; high recall with low exact-match means it found the evidence and still lost the structure the question needed.
  • The baseline's high score is the ceiling reference, not a bar every production system needs to clear — the useful output of this method is the diagnosis, not a verdict that any gap is a failure.

FAQ

Should the goal be closing the gap to the baseline as close to zero as possible?+

No — the gap is largely a design tradeoff, not a defect to eliminate. Verbatim storage doesn't scale the way a compressed representation does, which is the entire reason production systems compress in the first place. The point of measuring the gap is deciding what your use case can tolerate losing, not chasing a zero delta that would require giving up the scaling properties compression exists to provide.

What if I don't have a verbatim baseline system available to run?+

A reference baseline for this purpose is deliberately simple to build: it stores content verbatim, retrieves by token overlap, and answers by field extraction — no model calls or embeddings required. That simplicity is intentional; the baseline's job is to establish a ceiling, not to be a sophisticated system in its own right.

How large does my corpus need to be for this method to produce a reliable delta?+

Large enough that each task type you're measuring has more than a handful of examples — a gap computed from a single-digit task count should be read as directional, the same discipline that applies to any small-sample result. Report the task count next to each delta so anyone reading the table can weight it correctly.

Can this method run continuously, as a regression check?+

Yes — since the baseline and the scoring method are deterministic given a fixed corpus and k, re-running the same measurement after a pipeline change turns it into a regression gate: a task type that regresses relative to the last known-good run is a specific, attributable signal that something in the pipeline changed for the worse.

Does a wide gap on one task type always mean the pipeline is broken?+

Not necessarily — it depends whether that task type matters for the use case. A system feeding a casual chatbot can tolerate a wide gap on rule attribution, since nothing downstream needs a citation; the same gap in a compliance-adjacent deployment is a real problem. The measurement tells you the size of the gap; whether it's acceptable is a use-case judgment on top of it.