Does the Model Read the Trial or Remember It?

When a language model is asked whether a clinical trial report supports a claim, there are two ways it can answer. It can read the report it was given. Or it can recall what it absorbed about that trial, or about the benchmark question itself, from its web-scale pretraining. ClinicalTrials.gov is public. The clinical inference benchmarks built from it have been online since 2023. So both kinds of memory are plausible. In evidence synthesis this distinction matters more than an accuracy score suggests. A system that answers from memory will confidently repeat stale results when a trial's posted results are amended. It will also look better on benchmarks than it is. We propose to measure, for each individual answer, whether it came from the text or from memory. Ground truth comes from counterfactually edited trial reports. We then train a cheap probe on the model's internal activations that flags memory-driven answers on ordinary, unedited inputs. Finally, we test whether reliance on memory grows with model size.

The scale question is not idle. On the SemEval-2024 clinical inference benchmark, models above 70B parameters showed diminishing or negative returns in faithfulness and consistency compared with mid-sized models such as Mixtral-8x7B (SemEval-2024 Task 2: Safe Biomedical Natural Language Inference for Clinical Trials). No one has explained why. Our hypothesis is that larger models memorize more trial-specific content and let it override the provided report. If that is right, the scale ceiling is partly a contamination effect, and it can be detected from inside the model.

Core Claim

We make three claims, each testable. First, editing a trial report so that the correct label flips, while leaving the claim unchanged, gives a per-instance ground truth for "this answer ignored the evidence." We call the rate at which models keep the original, pre-edit answer the memory-override rate. Second, this override behaviour is predictable from a single forward pass over the unedited input. A linear or small multilayer probe on late-layer hidden states should predict it better than cheap behavioural signals such as agreement between closed-book and open-book answers. Third, within a model family, the memory-override rate rises with parameter count. It should be concentrated on trials the model can recall without seeing the report, which separates memory of the trial from memory of the benchmark.

The closest existing work is CLEAR (Probing Latent Knowledge Conflict for Faithful Retrieval-Augmented Generation). CLEAR trains a probe on late decoder layers to detect when retrieved context conflicts with a model's beliefs, then fine-tunes attention toward the conflicting evidence. It works on open-domain question answering at up to 8B parameters. Our proposal differs in three ways. Our probe target is not "a conflict exists." It is "the model's answer followed memory," a behavioural label taken from counterfactual runs. That distinction matters because a model can register a conflict and still read correctly. We work on dense clinical trial reports. We also run the probe in matched model families from 7B to 72B, which is exactly the regime CLEAR leaves untested.

Research Program

Counterfactual trial reports. The base data are NLI4CT statement–report pairs (NLI4CT: Multi-Evidence Natural Language Inference for Clinical Trial Reports) and the perturbed NLI4CT-P test set. For each instance whose label depends on a specific span of the report, we edit that span so that the gold label inverts. The span might be an outcome value, an adverse-event count, an eligibility threshold, or a dosage. The statement is left untouched. This differs from NLI4CT-P's perturbations, which mostly alter the statement. Here the evidence changes and the claim does not, which mirrors an amended trial record. Edits are generated by rule where possible, for example scaling a reported number across a threshold or swapping arm labels. A clinically trained annotator checks a stratified sample to confirm that each edit is internally consistent and flips the label.

A model is scored as memory-overriding on an instance when it is correct on the original report but returns the original label on the edited report.

Separating two kinds of memory. Memory of the benchmark and memory of the trial leave different fingerprints, and we measure them separately.

Benchmark-level shortcuts are captured with a statement-only condition (the report removed) and a mismatched-report condition (another trial's report). This extends the statement-only finding of NLI4CT, where BERT with no premise reached 0.626 F1 against 0.644 with the premise. It falls in the data-level and label-level contamination categories of Benchmark Data Contamination of Large Language Models: A Survey.

Trial-level memory is measured directly with a closed-book recall test. The model is given only a trial identifier and title and asked for its primary outcome and arm-level results. Recall accuracy then becomes a per-trial covariate.

A clean reference comes from a few hundred new statements written in NLI4CT style over breast cancer reports first posted after each model's stated training cutoff. On these, override should be near zero. This uses the temporal logic that the survey documents for post-cutoff performance cliffs, but at instance level rather than in aggregate.

The probe. For each open-weight model, we extract hidden states at the final statement token across all layers. We fit probes to predict the override label, holding out whole trials so the probe cannot memorize trial identity. Following the layer-stage picture of Unveiling Knowledge Utilization Mechanisms in LLM-based Retrieval-Augmented Generation, in which late layers host a contest between parametric memory and context, we expect the signal to peak at a similar relative depth across sizes. Whether it does is itself a finding about scaling. The probe is applied to the unedited input, so it answers the deployment question: "is this answer coming from the report?"

To guard against the known risk that probes pick up correlates rather than mechanisms, we add two controls. The first is a control task: the same probe architecture trained on shuffled labels. The second is a causal check: we add or subtract the probe direction during the forward pass on edited reports and measure whether the override rate moves.

Scale. We use matched families, Llama 3 at 8B and 70B and Qwen2.5 at 7B, 32B and 72B, so that size is not confounded with training recipe. The override rate, closed-book recall and probe accuracy are compared across sizes. Each model's override rate is also correlated with its faithfulness score on NLI4CT-P.

When Context Leads but Parametric Memory Follows in Large Language Models found a roughly 70/30 context-to-memory split that is stable across scales. On its face this contradicts our scale hypothesis. That work, however, measured sourcing on Wikipedia text that agrees with memory. A constant share under agreement says nothing about who wins under conflict, and our edited reports test exactly that conflict case.

Baselines

The naive reference point is the base model's accuracy on the original NLI4CT and NLI4CT-P sets with no detection at all. For detection, the corresponding floor is a constant predictor and the statement-only agreement signal.

The strongest cheap behavioural competitor is closed-book agreement. Each instance is run with and without the report, and the answer is flagged as memory-driven when the two predictions agree. It costs two forward passes and needs no labels, which is why it is the bar the probe must clear. It runs on the same models and the same held-out trials. Its threshold-free AUROC against the counterfactual override labels is the comparison point.

The strongest existing contamination detector is CDD from Generalization or Memorization: Data Contamination and Trustworthy Evaluation for Large Language Models. CDD flags memorized items by how sharply repeated samples collapse onto one output. It reported relative gains of 21.8% to 30.2% in accuracy and AUC over n-gram and model-based detectors on DETCON. We run it with its published sampling settings on every instance and report its AUROC for predicting override. Because it needs tens of samples per instance, we also report detection quality per unit of compute.

The strongest existing probe-based method is CLEAR's conflict probe. It reports 74.4% F1 on FaithEval with LLaMA-3.1-8B against a 71.6% baseline. We retrain its probe architecture on our data with its own labels, edited versus unedited, and with the same probe tuning budget as ours.

For task accuracy, the reference numbers are the SemEval-2024 top system, Mixtral-8x7B-Instruct, with F1 0.8, average faithfulness 0.835 and consistency 0.751, and DeBERTa-large at F1 0.77 and consistency 0.76 (BD-NLP at SemEval-2024 Task 2). These anchor whether our models are competitive, not what our detector must beat. No reported result was found on Lacuna for per-instance memory-override detection on clinical trial inference, so there is no prior number for our primary metric.

The key ablation swaps our behaviour-grounded override labels for CLEAR-style conflict labels while keeping the probe, data and layers fixed. If the conflict-label probe predicts override just as well, then grounding the labels in behaviour is not the contribution.

Beating the baselines means two things. On held-out trials, the probe's AUROC must exceed closed-book agreement and CDD with confidence intervals that do not overlap under trial-level bootstrap. And it must do so at no more than the cost of closed-book agreement.

Why not just…?

Why not just use closed-book agreement and skip the probe? This is the real threat. It is cheap and needs no training. Its weakness is structural. When memory happens to be correct, a model that read the report and a model that ignored it give the same answer, so agreement cannot tell them apart. Our counterfactual labels separate exactly these cases. The head-to-head AUROC comparison settles the question. If agreement matches the probe, we will report that the internal signal adds nothing for detection and keep the probe only as a tool for the scaling analysis.

Why not just run CDD on the clinical benchmark? CDD measures whether a benchmark item's output distribution has collapsed, which signals memory of the item. It is not designed to detect a trial's results overriding a changed report, and it needs repeated sampling, which is costly at 70B. Its authors evaluated it only on code and grade-school math. We run it directly. If it predicts override as well as the probe, it wins on simplicity for anyone willing to pay the sampling cost.

Why not just compare scores before and after the training cutoff? Temporal splits give one aggregate number per model. That number is confounded by changes in which trials are posted and how hard they are, and it cannot flag an individual answer. We use post-cutoff trials as the clean reference rather than as the method, and they serve as a false-positive check for the probe.

Why not just fine-tune the model to follow context, as CLEAR does? That treats the symptom without telling a clinician which answers to distrust, and it might suppress legitimate use of background medical knowledge. Detection comes first in this proposal. Steering along the probe direction is tested only as a causal check.

Proposed Experiments

The first experiment establishes the phenomenon. We report the override rate per model on counterfactual NLI4CT reports, split by section type (results, adverse events, eligibility, intervention) and by single versus comparison instances. We expect override to be concentrated on results and adverse-event spans and on trials with high closed-book recall. If override shows no relation to closed-book recall, the effect is not trial memory, and we fall back to the benchmark-shortcut explanation measured by the statement-only and mismatched-report conditions.

The second experiment is detection. Probe, closed-book agreement, CDD and the CLEAR-label probe are scored by AUROC on held-out trials and on the post-cutoff set. On the post-cutoff set, the false-positive rate is the main metric.

The third experiment is the decisive scaling test. Within each family, does the override rate increase from the smallest to the largest model? Does it track the drop in NLI4CT-P faithfulness at the top of the range? A flat override rate across sizes would agree with the 70/30 finding and refute our explanation of the scale ceiling. A rising rate would give the first mechanistic account of it.

The fourth experiment is the causal check. If shifting activations along the probe direction lowers override on edited reports without lowering accuracy on unedited ones, the probe is reading something the model uses, not a passive correlate. If accuracy falls as well, the direction encodes something broader than memory reliance, and we will say so.