﻿# Cache carryover in crossover benchmarks: random order is not a reset

A practical investigation of cache carryover in crossover benchmarks: random order is not a reset, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-bench-cache-carryover-treatment-order/
Language: en

## The comparison being tested

A benchmark alternates runtime settings on one long-lived service. The first treatment creates reusable prefix state and the next treatment benefits from it. Randomizing order changes which candidate inherits the advantage but does not remove carryover. A result labeled a comparison of current settings may actually estimate the effect of both the current and preceding treatment history.

## The confounding mechanism

Prefix caching reuses previously computed context rather than merely matching a benchmark label. Blocking and randomization address nuisance variation under a defined design, but persistent treatment effects can violate the intended comparable-state assumption. A process restart may clear one cache while leaving another tier warm. The relevant state boundary must therefore be verified rather than inferred from a shuffled schedule.

## Fix the experimental contract

Define whether the target is cold, deliberately warmed or history-dependent service. Record state preparation and the preceding treatment for every observation. Distinguish retained prompt preparation, model responses and runtime KV state where applicable. Specify a bounded washout or reset policy only for state that must be removed. Intentional shared-cache operation is a valid different question if its history is preserved.

## A step-by-step comparison

Construct synthetic sequences with the same current request under different preceding treatments. Compare both orderings and an independently prepared state control. Observe cache reuse through supported counters or diagnostics instead of assuming a repeated prompt guarantees a hit. Keep actual input tokens and output requirements comparable. If state cannot be reset, analyze and report the ordered sequence as the experimental condition.

## Evidence required for the result

Acceptance evidence includes treatment order, state preparation, cache identity and observations for each current request. Show whether the apparent effect changes with its predecessor. Retain failed reset attempts and uncertain cache coverage separately. A balanced order can expose carryover, but an attractive average over inherited states is not the same result as performance from a fresh or consistently warmed state.

## Interpretation and limits

This protocol does not require clearing every cache or treating reuse as an unfair advantage. The issue is whether the observed history matches the claim. Long-lived production service may intentionally depend on that history. Results remain bounded by cache tier, eviction behavior and workload sequence; they cannot establish one setting’s isolated effect when the previous treatment’s state remains uncontrolled or unobserved.

## Primary references and related reading

Counterbalance treatment order and verify state preparation; randomization cannot erase persistent state created by the previous treatment. [vLLM automatic prefix caching](https://docs.vllm.ai/en/latest/features/automatic_prefix_caching/); [NIST randomized block designs](https://www.itl.nist.gov/div898/handbook/pri/section3/pri332.htm).

The proposed investigation of cache carryover treatment order is not an executed deployment benchmark. Related reading: [Prefix caching: when repeated context helps a GPU pool](/journal/prefix-caching/); [lm-eval caching: prompt construction and model responses need separate identities](/journal/fg2-lm-eval-request-response-cache-experiment-identity/).
