Same Content, New Page: Splitting the Open-Model Document Reasoning Gap into Memorization and Layout

When an open-weights vision-language model trails a proprietary one on a document question-answering benchmark, there are two very different explanations. The first is memorization: the proprietary model may have seen the benchmark's tables and answers, or near copies of them, during training. The second is spatial reading: the proprietary model may simply be better at finding things on a page whose columns, headers and whitespace are arranged in unfamiliar ways. Current evidence cannot tell these apart.

We propose a counterfactual rendering protocol that can. We take benchmark items whose underlying content is machine-readable and regenerate each one in four versions: original content on the original page design, original content on a new page design, altered content on the original design, and altered content on a new design. Altered content means the cell values are edited and the answer is recomputed. Comparing a model's accuracy across these four versions separates three things: credit it gets from remembering the content, credit it gets from remembering the page design, and its real ability to reason over layouts it has never seen. Running this for open and proprietary models shows how much of the measured gap belongs to each source.

The opportunity is that the pieces exist separately but have never been combined. DocHop builds leak-resistant synthetic documents and finds open models at 7–22% against 60.18% for GPT-5.2 Reasoning. It uses one clean single-page layout family and never measures contamination. DyVal shows that freshly generated reasoning problems expose memorization: models with strong static scores fall to near zero. DyVal works on text only. MM-DETECT finds contamination in both open and proprietary multimodal models, often inherited from the text-only pretraining of the language backbone. Its tests (shuffling multiple-choice options, guessing masked words in captions) do not apply to open-ended questions about documents.

Core Claim

Our claim is that layout and content can be varied independently once a document is generated from a structured source rather than taken as a fixed scan. With that independence, the static-benchmark gap between open and proprietary models can be written as a sum of measurable parts.

Let $A(c,\ell)$ be a model's accuracy when content $c$ is rendered in layout $\ell$. Let $c_0,\ell_0$ be the benchmark's original content and layout, and $c_1,\ell_1$ freshly altered ones. We define three quantities:

  • Content credit: $M_c = A(c_0,\ell_0) - A(c_1,\ell_0)$, the accuracy lost when the values change but the page design does not.
  • Layout credit: $M_\ell = A(c_0,\ell_0) - A(c_0,\ell_1)$, the accuracy lost when the page design changes but the content does not.
  • Fresh accuracy: $R = A(c_1,\ell_1)$, accuracy when both are new.

The residual interaction term

$$A(c_0,\ell_0) - R - M_c - M_\ell$$

measures memorization that requires the familiar content and the familiar design together. Applying the same decomposition to the difference between an open and a proprietary model splits their gap into the same parts.

Predictions. Our working prediction has two parts:

  1. Open models carry a larger content credit than proprietary models on benchmarks whose tables are widely circulated in text form. This would follow MM-DETECT's finding that leakage enters through the text backbone.
  2. The fresh-accuracy gap persists, and widens as layout complexity grows. This would follow DocHop's drop from about 85% to 40% as chart count rises, and MORE's collapse on complex tables.

Either prediction can fail, and both failure outcomes are informative.

Research Program

Sources. We draw items from benchmarks whose content can be edited programmatically. These are the table-question sets WikiTQ, TabFact, HiTab and FinQA used by TableMaster, plus DocHop's generated documents, whose constraint graphs are explicit. We restrict to items where the answer can be recomputed after editing. For items with an annotated or recoverable executable program, we execute that program. For the rest, a model writes a program and we keep it only if it reproduces the original answer.

Content edits. Edits change numeric values and entity names but keep the table's schema and the question's logic. Recomputed answers are spot-checked by annotators.

Layout generator. We extend the idea behind Document Domain Randomization, which randomizes columns, margins and fonts to train layout detectors, from bounding-box labels to question-answering labels. The generator varies:

  • the number of columns and the reading flow;
  • bordered versus borderless tables;
  • whether multi-level headers are merged;
  • where the table falls relative to the narrative text;
  • typography and page density.

Page styles are seeded from the six document domains of DocLayNet.

Defining the "original" layout. For sources that were never images, the original layout $\ell_0$ is a canonical rendering we fix in advance. For DocHop it is DocHop's own A4 layout. The interpretation differs by source. For DocHop, $M_\ell$ measures memorization of a real benchmark design. For text-table sources, $M_\ell$ cannot measure design memorization, because no original page design existed. There it measures sensitivity to layout, and the content credit $M_c$ carries the contamination signal.

Realism check. Rendered pages must look like real documents to a layout detector. A DocLayout-YOLO model trained on DocLayNet should detect regions on our pages at a mean average precision close to what it achieves on real pages. A large shortfall would mean our pages are out of distribution for reasons unrelated to layout reasoning. We will report this check before any model results.

Perception versus reasoning. Every version of every item also has a text-only condition. The model receives the exact Markdown source instead of the image. Accuracy lost between the text-only condition and the rendered page is a cost of reading the page, and is distinct from reasoning failure.

Baselines

Naive reference. The first reference point is the static benchmark score itself, $A(c_0,\ell_0)$, as models are usually reported. Every decomposed quantity is measured against it. For the text sources, the strongest published static number in our file is TableMaster with GPT-4o-mini: 78.13% on WikiTQ and 90.12% on TabFact, reported by TableMaster on clean text tables. For DocHop, the reference is 60.18% for GPT-5.2 Reasoning, with open models at 7–22%.

Strongest existing contamination detector: MM-DETECT-style perturbation. We adapt option-order and slot-guessing perturbation from MM-DETECT to our items. TabFact's true/false format allows label reordering. For open-ended items, we mask a header cell and ask the model to fill it in. This baseline runs on the same items, models and prompts. MM-DETECT summarizes its scores with a dataset-level difference between perturbed and original correct rates, but the file reports no per-model numeric values. For document benchmarks, we found no reported result on Lacuna for MM-DETECT. Our protocol beats this baseline if, on a planted-contamination model (described under Proposed Experiments), its content credit separates contaminated from clean items with higher area under the ROC curve than MM-DETECT's instance-level score.

Strongest existing membership test for document models: DocMIA. DocMIA infers whether a document was in training by briefly fine-tuning on it and tracking how far and how fast the parameters move. It reports up to 82.5% F1 on Donut and about 72% on VT5 and Pix2Struct. It needs gradient access, so it runs only on open models. We give it the same fine-tuning budget DocMIA reports and apply it to the same planted-contamination model. Agreement with DocMIA on open models validates our protocol. Our protocol's advantage is that it also works on proprietary APIs, where DocMIA cannot run.

Ablations. Two ablations isolate the key ingredient, which is independent factorization:

  1. Run only the content-altered, layout-fixed version, which is essentially DyVal moved onto rendered pages.
  2. Run only the layout-varied, content-fixed version, which is essentially a robustness test.

If either single axis explains the gap as well as the full design, the four-version structure is not earning its cost.

Equal treatment of models. All models get identical images at fixed resolution, identical prompts, and the same number of attempts. Open models include Qwen2.5-VL, and Llama-3.1-70B for the text-only condition. Proprietary models include GPT-4o and Gemini.

Why not just…?

Why not just run a fresh contamination-free benchmark like DocHop and report the gap? A fresh benchmark gives the fresh-accuracy cell, $R$, and nothing else. It cannot say how much of the larger static gap was memorized content versus memorized design, and that is exactly what the field disputes. DocHop also fixes a single layout family, so it cannot show whether the fresh gap depends on layout. This alternative is a real threat if content credit and layout credit both turn out to be near zero for every model. In that case a fresh benchmark would have sufficed, and we would report that finding plainly.

Why not just OCR the page and give clean text to a strong language model? The text-only condition is exactly this experiment, with a perfect transcript as an upper bound on OCR quality. Two results in the file already argue against it. MORE shows dots.ocr reading text order at 97.18% but tables at only 39.81%. DocHop attributes open-model failures to binding values to the wrong chart or column, not to misreading characters. If the open–proprietary gap closes in the text-only condition, the gap is about perception. That would itself be a key finding, and it would redirect effort toward document parsing.

Why not just perturb the question text, as MM-DETECT does? Paraphrasing a question or shuffling its options leaves the page untouched, so it cannot detect memorized table values or memorized page designs. It also needs a multiple-choice format. We include it as a baseline precisely so the planted-contamination test can show whether text-only perturbation misses contamination that content editing catches.

Why not just close the gap by fine-tuning open models on many synthetic document question-answer pairs? That addresses the gap without diagnosing it, and it risks the failure DyVal documents for WizardMath-13B: strong scores on familiar templates, near zero on new ones. Our generator can test this directly. We fine-tune an open model on layouts from one set of domains and measure fresh accuracy on held-out domains. If fine-tuning closes the fresh gap across domains, synthetic data is the practical answer, and our decomposition becomes the way to verify it.

Proposed Experiments

Positive control. We first plant contamination. We fine-tune an open model on a known half of the original renderings and test whether the protocol detects that half. Content credit and layout credit on contaminated items should clearly exceed their values on clean items. We compare detection quality against the MM-DETECT and DocMIA baselines.

Main study. We then run the four-version design across all sources and models. For each benchmark we report:

  • content credit $M_c$, layout credit $M_\ell$, fresh accuracy $R$, and the interaction term;
  • each quantity in both the image condition and the text-only condition;
  • bootstrap confidence intervals over items.

Complexity curves. We plot fresh accuracy against generator settings that control layout complexity: number of columns, borderless tables, and merged header depth.

Decisive outcomes. Three outcomes would be decisive:

  1. If open models show significantly larger content credit than proprietary models on the text-table sources, part of the reported static gap is a contamination artifact. Conversely, if proprietary models carry more, as MM-DETECT's ScienceQA results for Claude-3.5-Sonnet hint, static benchmarks understate the true gap.
  2. If the fresh-accuracy gap widens with layout complexity in the image condition but not in the text-only condition, the remaining gap is about spatial reading of pages.
  3. If the gap persists in the text-only condition as well, the gap lies in multi-step reasoning, independent of layout.