NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Is Domain Pre-Training Real Skill or Recall? A Controlled Contamination Test for Measurement Extraction

Scientific measurement extraction means turning a sentence like "approximately 5 mg of caffeine was administered after fasting" into a structured record: the quantity (5), its unit (mg), what was measured (caffeine), which property (dose), and any conditions (after fasting). The models that do best at this are mostly built on encoders pre-trained on scientific papers, such as SciBERT. The main benchmark, MeasEval, was built from 110 open-access Elsevier articles. That raises a question nobody has tested: those articles, or close copies of them, may have been in the scientific pre-training corpora themselves. If so, part of the "domain pre-training advantage" could be familiarity with the exact test passages rather than a better grasp of how numbers attach to their context.

We propose to measure this directly instead of guessing at it. We would run continued pre-training of the same encoder on a scientific corpus in several versions that differ only in whether, and how often, half of the benchmark's test articles are included. This yields extraction models whose contamination status is known exactly. We would then build automatic, label-preserving perturbations of the test passages: resampled values, renamed entities, inserted distance between a number and what it measures, and converted units. We test whether the drop in accuracy on perturbed text is larger for injected articles than for clean ones. Once validated against known contamination, this perturbation gap becomes an audit we can apply to off-the-shelf SciBERT, BERT, task-adapted models, and prompted general models, where the training data cannot be controlled.

Core Claim

The claim is that the advantage of domain-pre-trained encoders on contextual measurement extraction can be split into two parts. One is a transferable component that survives label-preserving rewrites of the test text. The other is a recall component that exists only for passages seen during pre-training.

We expect recall to be concentrated where extraction is hardest and rarest: measured entities far from their quantity, and qualifiers. Long-range measured entities score only 0.40–0.55 F1 and degrade with distance (Multi-Source (Pre-)Training for Cross-Domain Measurement, Unit and Context Extraction). Qualifiers defeated even strong systems (CONNER reports 0% F1 on the Qualifies relation). Rare, idiosyncratic content is exactly where Counterfactual Memorization in Neural Language Models finds memorization of specific training examples to be strongest. Quantities and units score above 0.90 F1 and should be largely immune.

What is new is not "check for overlap." It is a perturbation-based audit for tuple extraction whose sensitivity is calibrated against models with known injected contamination. With that calibration, a null result on SciBERT becomes informative rather than ambiguous.

Why this question, and what prior work supplies

Three groups of prior work play different roles here.

The first group motivates the question. The SciBERT paper trains a BERT encoder from scratch on 1.14M Semantic Scholar papers with a scientific vocabulary that shares only 42% of the general vocabulary's frequent words (SciBERT). The MeasEval systems that build on it credit its gains over BERT entirely to domain representations (CLaC-BP; Counts@IITK), as does the multi-source task-adaptive pre-training study (Multi-Source (Pre-)Training). None of them checks whether the benchmark articles were in the pre-training text. The Illusion of Generalization in Tabular Language Models shows that this can matter. It audited a domain model pre-trained on web tables and found near-zero median lift over majority-class baselines. Eight of its ten best datasets showed contamination, and a general instruction-tuned model recovered 92.2% of its accuracy. That paper studies tabular prediction rather than extraction from prose, and it audits after the fact rather than injecting contamination under control.

The second group constrains the design. Investigating Data Contamination for Pre-training Language Models pre-trained GPT-2 models with controlled leakage. It found that leaking raw text helps far less than leaking text together with answers, that benefit rises up to about 10 repetitions and then falls by 20, and that standard n-gram filters miss the influential leaked tokens. For MeasEval, pre-training corpora could contain only the raw article text, never the annotations. Prior work therefore predicts a modest effect, and our design must be powered to detect a small one. We include 1 and 10 repetitions to follow the reported non-monotonic curve. Soft Contamination Means Benchmarks Test Shallow Generalization shows that paraphrased near-duplicates escape exact-match filtering and still inflate scores. We therefore add a paraphrase-injection arm and use embedding-similarity search when auditing real corpora.

The third group supplies the method. DyVal regenerates reasoning problems from graphs and shows that reordering descriptions alone costs GPT-4 13.6% on reachability (DyVal). INVITE distorts structured facts to block recall of memorized answers (INVITE). RandomCalculation and partial-prompt completion separate memorized math from reasoning (Reasoning or Memorization?). All of these operate on arithmetic, logic, or factual triples. None handles span-level, multi-way tuple extraction from scientific prose, where a perturbation must keep the gold annotation valid. Building perturbations that preserve the annotation is the technical contribution of this proposal.

Research Program

The first component is a perturbation generator for MeasEval, and for the battery-patent and materials-procedure sets used in the multi-source study. Every perturbation edits text while tracking character offsets, so gold spans and relations carry over automatically. There are four families:

  • Value resampling changes numbers within a plausible range and keeps units and modifiers.
  • Unit conversion rescales the value together with the unit, for example mg to µg.
  • Entity and property substitution replaces measured entities with same-type entities drawn from other excerpts.
  • Distance insertion adds a neutral parenthetical or relative clause between a quantity and its measured entity.

The fourth family directly probes the reported link between distance and failure. Two annotators would check fluency and label validity on 150 perturbed items per family, and families with more than 10% invalid items would be discarded.

The second component is the controlled contamination experiment. We would take BERT-base, whose general vocabulary lets us keep tokenization fixed across arms, and continue pre-training it on roughly one billion tokens of open-access scientific text. Before training, we remove MeasEval source articles from this corpus by fuzzy and embedding-based deduplication. We split the MeasEval test articles at the article level into an injected half and a held-out half. The arms are:

  • clean;
  • injected half inserted once;
  • injected half inserted ten times;
  • LLM paraphrases of the injected half inserted ten times.

Every arm then receives identical fine-tuning on the MeasEval training annotations, using the cascade architecture with quantity markers from the multi-source paper. We run three fine-tuning seeds per arm. The quantity of interest is a difference-in-differences:

$$\Delta = (F^{in}_{orig} - F^{in}_{pert}) - (F^{out}_{orig} - F^{out}_{pert})$$

Here $F$ is relation-level F1, the superscript marks injected versus held-out test articles, and the subscript marks original versus perturbed text. Subtracting the held-out drop cancels any change in difficulty that the perturbation itself introduces. $\Delta$ is reported separately for quantities, units, measured entities, properties, and qualifiers, and for distance buckets.

The third component applies the calibrated audit to models whose training data we do not control:

  • SciBERT, BERT-base, and RoBERTa-large;
  • the multi-source task-adaptive model;
  • an instruction-tuned general LLM prompted few-shot.

For these models no injected half exists. We therefore compare the perturbation drop on MeasEval excerpts that our corpus search finds in their known pre-training corpora with the drop on excerpts it does not find. This comparison is only possible for corpora that can be searched; we search the open Semantic Scholar paper corpus using 13-gram and embedding similarity. We also compare against the perturbation drops observed in the clean and injected arms of the controlled experiment.

Baselines

The naive reference point is the official MeasEval baseline, which scores overall F1 (Overlap) of 0.239 (SemEval-2021 Task 8: MeasEval). A related reference is BERT-Large with token tagging and a linear multilabel head, which reached 0.272 overall F1 (Stanford MLab). These bound how much of any "domain" gain is above a weak, general-encoder system.

The strongest existing system is CONNER, a cascade of CRF and pointer-network taggers on RoBERTa-large. It reports 65.52% overall F1, second place in the competition (CONNER). The task paper reports top systems near 0.519 F1 (Overlap), which suggests the two figures are computed under different scoring settings. We will rescore everything with the official scorer under both the Strict and Overlap schemes rather than compare across papers. CONNER is the strongest competitor because it is a general-domain encoder, not domain-pre-trained, that nonetheless matches SciBERT systems. If its perturbation drop is as large as SciBERT's, contamination cannot explain the SciBERT gain. We will reimplement the cascade as described, fine-tune it on the same training split with the same hyperparameter search budget as every other system (24 configurations), and report results on both original and perturbed text.

For the domain-pre-training question, the direct competitor is SciBERT with the same cascade head. The file reports no MeasEval-specific SciBERT versus BERT number; CLaC-BP gives its scores only in a figure. The relevant reported figure is SciBERT's average 2.11 F1 gain over BERT-base across other scientific tasks (SciBERT). On news text, CQE reports 92.0 F1 for values and 85.6 for value plus unit on NewsQuant (CQE). That is a secondary setting where web leakage into general LLMs is plausible.

The key ablation is the clean arm of the controlled experiment. It is the same model, data, and compute as the injected arms, minus the benchmark passages. The paraphrase arm separately tests whether soft contamination behaves like exact contamination.

"Beating" a baseline means something specific here. The audit beats simpler detectors if its $\Delta$ separates the injected from the clean arm with article-level bootstrap confidence intervals excluding zero, in cases where n-gram overlap and masked-token recovery fail to separate them. We will also report whether the domain gain holds up, measured as SciBERT minus BERT on perturbed held-out text.

Why not just…?

Why not just search SciBERT's pre-training corpus for the MeasEval articles? We do this, but finding an article in the corpus does not tell us its effect. The GPT-2 study shows that text-only leakage can have small or non-monotonic effects (Investigating Data Contamination), and the soft-contamination study shows that exact search misses paraphrases (Soft Contamination). A positive search with zero $\Delta$ would mean the overlap is harmless. Only the injection arms can tell those outcomes apart.

Why not just annotate a fresh test set from papers published after the models were trained? This is a real threat to the proposal, because fresh data is the cleanest test. However, it confounds contamination with drift in topic and writing style, and with differences between annotators on a task whose qualifiers already have low inter-annotator agreement. Fresh data is also expensive and goes stale once released. We will annotate 40 post-2023 open-access excerpts as an external check. If the domain gain measured on perturbed text matches the gain on fresh text, the perturbation audit is validated as a reusable, cheaper substitute. If the two disagree, the fresh set is authoritative, and we report that the perturbations fail to capture the shift.

Why not just use a memorization probe like partial-prompt completion or masked-token recovery? These probes detect that a passage was seen, as with the 40% truncation result on Qwen2.5-Math-7B (Reasoning or Memorization?). They do not show that seeing it improved extraction of a measured entity three clauses away. We run masked-token recovery on every arm as a baseline detector and report whether it predicts $\Delta$. If it predicts $\Delta$ as well as the perturbation gap does, we will recommend the simpler probe instead.

Why not just prompt a general LLM and skip domain pre-training entirely? This alternative is a competitor system rather than a way to answer the question, and it is included as one. CQE reports that few-shot GPT-3 hallucinated heavily and confused multipliers with units on NewsQuant (CQE). General LLMs are also the models most likely to have absorbed open-access papers. The perturbation gap therefore matters most for them.

Decisive Checks

The first check is calibration: does the injected-arm $\Delta$, especially at 10 repetitions, differ from zero, and is it largest for measured entities at long distance and for qualifiers? If even ten repetitions of injection produce no $\Delta$, we conclude that text-only contamination does not inflate encoder-based measurement extraction. That would itself be a useful negative result, and the off-the-shelf audit would then be reported as a check on that conclusion rather than a contamination detector.

The second check is the substantive one: on held-out, perturbed text, does SciBERT still beat BERT-base and match CONNER at equal tuning budget?

The third check is that the domain gain measured on the fresh post-2023 set agrees with the gain measured on perturbed text. Power is the main risk, since the test set has only 499 quantities. We address it by pooling MeasEval with the battery-patent and materials-procedure test splits, using article-level bootstrap, and fixing the analysis plan before the injected models are evaluated.