Manuscript Offprint
arXiv:2610.32126Data Quality in RVL-CDIP: A Systematic Audit
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
RVL-CDIP is the de facto standard benchmark for document classification, and reported accuracy on it is now 98.8%. In this paper, we audit RVL-CDIP for data quality issues and find that approximately 10.5% of its 400,000 documents have erroneous labels and that 35.2% of the test set has a duplicate or near-duplicate in the training set. Identification codes on the pages are sufficient to classify at 69% accuracy, and a state-of-the-art model loses 11 points without them. Image-only models trained on RVL-CDIP lose 16 to 28 points on documents from other sources, and the choice of OCR engine changes accuracy by 4.1 to 8.3 points. We find that nearly 16,000 RVL-CDIP documents contain sensitive personal data, and produce de-identified versions of these documents. We re-benchmark 25 models, and with all defects remediated, the 13 that we retrain are 0.9 to 2.9 points more accurate than in the original condition; the most accurate of them, LayoutLMv3, is 96.5% accurate. We release the corrected corpus, the annotations and the out-of-distribution data.
Keywords: document classification, data quality, benchmark auditing, label errors, data leakage, spurious correlations, de-identification, data privacy
1 Introduction
The RVL-CDIP corpus (Harley et al., 2015) was introduced in 2015 as a computer vision benchmark and has since become what prior work has called the de facto standard benchmark for document page classification (Larson et al., 2023), a description that our own survey of the literature confirms. Its 400,000 labeled document images across 16 categories made it large enough to train deep architectures at a time when comparable resources did not exist, and the community adopted it accordingly. Modern document understanding models, among them LayoutLMv3 (Huang et al., 2022), Donut (Kim et al., 2022), and UDOP (Tang et al., 2023), report document classification results on RVL-CDIP alone. Of the 34 papers we surveyed that report document classification results on RVL-CDIP, 23 evaluate classification on that dataset and nothing else, and 29 evaluate only on datasets derived from the archive from which RVL-CDIP was sampled (Section 2.2). Of the five that use a dataset from another source, two use proprietary in-house collections that cannot be reproduced. The other three all use NIST tax forms (Special Database 2 or 6, two sets of the same 1988 IRS forms), on which they report 99.99 to 100% accuracy; these datasets are therefore saturated. RVL-CDIP is the most popular benchmark for this task and effectively the only standardized
©2026 Larson and Leach.
benchmark of comparable scale, so that a claim about document classification performance is in practice usually a claim based on RVL-CDIP.
Performance on this benchmark has increased steadily and now appears close to saturation. Early convolutional models reported accuracies between 88% and 91% (Afzal et al., 2017); contemporary multi-modal architectures report the high 90s, with LayoutLLM (Fujitake, 2024) reporting 98.8%. Progress of this kind is normally interpreted as evidence that the underlying task is being solved, which depends on an assumption that is rarely examined: that the benchmark measures what it is taken to measure, and that successive improvements on it are improvements in document understanding and not an increasingly effective use of the properties of the benchmark itself.
There is good reason to examine that assumption: a body of work across natural language processing and computer vision has found that widely used benchmarks frequently contain substantial label noise (Northcutt et al., 2021a), significant overlap between test and training data (Allamanis, 2019; Elangovan et al., 2021), and collection artifacts that permit models to shortcut the intended task (Gururangan et al., 2018; McCoy et al., 2019; Niven and Kao, 2019). RVL-CDIP is a plausible candidate for such problems, because its documents are sampled from IIT-CDIP (Lewis et al., 2006), a collection of roughly seven million documents released through litigation against the American tobacco industry, which was assembled for legal discovery and was never curated for machine learning. Harley et al. themselves noted that the source collection had “missing or erroneous tags” and acknowledged that “the final categories are not perfectly distinct”, but did not publish category definitions against which those concerns could be assessed.
This paper reports a systematic audit of RVL-CDIP. Our central finding is that the benchmark is compromised along several independent dimensions simultaneously, and that a reported accuracy on RVL-CDIP is therefore a composite quantity: partly a measurement of document classification ability, and partly a measurement of a model's ability to learn the benchmark's defects. We organize the audit around five axes, four of which concern the dataset itself: the validity of its labels, the integrity of its train and test splits, the presence of spurious visual cues, and the narrowness of its distribution. The fifth concerns the evaluation protocol: because RVL-CDIP is distributed as images without a text layer, every text-based and multi-modal model must obtain its text from an optical character recognition engine of its own choice, and the choice of OCR engine, which is uncontrolled across the literature, has a larger effect on accuracy than the architectural differences on which these models are compared.
One further defect is separate from these five, and we treat it first: RVL-CDIP contains a large quantity of sensitive personal data (Social Security numbers, dates and places of birth, home addresses), which does not affect what a score on a document classification benchmark means but does determine what can responsibly be released. We quantify that exposure, de-identify the affected documents by replacing each sensitive entity with a synthetic but plausible one, and show that doing so changes none of the predictions of a DiT classifier on 445 resumes (Section 3). Because de-identification has almost no effect on classification, we run the entire audit on the de-identified corpus, so that the version of RVL-CDIP we measure model performance on is the same version that we release publicly.
Figure 1 shows an example page of each defect together with the corresponding result. Each of these defects has, in isolation, a bounded effect that could be dismissed as a known
(a) Label errors

labeled handwritten, is a letter (12.0% wrong)
(b) Test-train duplicates

test page (left) and a training page on the same form (35.2% of test pages have one)
(c) Identification codes

TIMN 0141540
7 of 7 image models: news_article with the code, scientific_publication without
(d) Narrow distribution

RVL-CDIP page (left) and a page from another source (image models: 14 to 28 points lower)
(e) OCR engine

November 3, 1975
Vol 234, No 5
Textract
November 3, 1975 Vol 234, No 5
Tesseract
Noveotera, 3575— Vol234.NoS.
the same line read by two engines (4.1 to 8.3 points between engines)
(f) Sensitive data
Expiration Date (optional) ___ 7/31/84
Expiration Date (optional) ___ 5/31/SS
a value before and after synthetic replacement (16,000 documents)
Figure 1: The defects of RVL-CDIP examined in this paper, each with an example page and the corresponding result. The addressee of the letter in (a) is masked, and the image models in (c) are those trained on the original labels.
limitation. Considered together they raise a question that cannot be answered by studying any one of them: what does an RVL-CDIP score measure when all of them are controlled at once? We construct a corpus in which all five axes are remediated at once and re-benchmark 24 models against it. We also test whether the defects are independent of one another, since defects that co-occur in the same documents cannot be corrected one at a time and their effects on accuracy are not additive.
This paper is a benchmark audit: we do not propose a new model or a new training procedure. It consolidates and substantially extends five of our earlier conference papers (Larson et al., 2022, 2023, 2024, 2025, 2026), each of which examined a single axis in isolation; the joint remediation and defect-interaction analyses and the OCR protocol analysis are new here.
We make the following contributions:
-
An audit of sensitive personal data in RVL-CDIP, finding 15,956 affected documents (4.0% of the corpus) including 2,342 US Social Security numbers, and a de-identification pipeline, based on synthetic replacement, that changes none of the predictions of a DiT classifier on 445 resumes and on whose output the remainder of this paper's experiments are run (Section 3).
-
An exhaustive, 400,000-document review of RVL-CDIP establishing a label error rate of approximately 10.5%, nearly nine times the error rate of the leading models, with per-category rates from 1.5% (resume) to 31.3% (letter). The rate is measured against published category criteria, absent from the original release (Sections 4 and 5).
-
A filter-and-refine method for detecting test–train overlap in scanned document collections, finding that approximately 35.2% of RVL-CDIP's test set has a near-duplicate counterpart in training. The validation split shows nearly the same rate, which indicates that the leakage was introduced when the corpus was assembled and not when it was split (Section 6).
-
A quantification of litigation ID codes as spurious cues: these codes appear on 92% of the corpus, and a classifier given only features of the codes classifies RVL-CDIP documents with 69% accuracy, and a state-of-the-art model loses 11.0 accuracy points when the codes are removed. We release an automatic detector and code-free versions of RVL-CDIP (Section 7).
-
Two out-of-distribution evaluation sets, RVL-CDIP-N and RVL-CDIP-O, on which RVL-CDIP-trained image-only models lose 14 to 28 accuracy points, against 3 to 4 for text models, and the image-only models' ability to separate in-domain from out-of-domain input decreases toward chance (Section 8).
-
An analysis of OCR engine choice as an uncontrolled confound in the multi-modal document classification literature, where holding architecture fixed and varying only the engine changes accuracy by 4.1 to 8.3 points, against 0.19 to 0.82 points between successive LayoutLM generations (Section 9).
-
A joint remediation experiment measuring model performance with all confounds controlled simultaneously (Section 10), and a defect-interaction analysis establishing whether they are independent (Section 11).
-
Public release of all annotations, corrected corpus variants, and evaluation data (Appendix A).
The paper is organized as follows: Section 2 describes RVL-CDIP, the collection from which it is derived and the benchmark-auditing literature; Section 3 quantifies the corpus's sensitive personal data and defines the de-identified corpus on which every later measurement is made; Section 4 provides the category criteria that the original release omitted, on which every subsequent measurement depends; Sections 5 through 9 examine the five axes in turn; and Sections 10 and 11 report the joint remediation and defect-interaction analyses.

(a) advertisement
(b) budget
(c) email
(d) file folder
(e) form
(f) handwritten

(g) invoice
(h) letter
(i) memo
(j) news article
(k) scientific publication
(1) specification
Figure 2: Example pages from twelve of the 16 RVL-CDIP categories, taken from the de-identified test split.
it (Section 2.2). We then review the prior work on which our audit is based, covering label errors and test–train duplication, spurious correlations, out-of-distribution evaluation, and sensitive data and de-identification (Section 2.3).
2.1 RVL-CDIP and IIT-CDIP
RVL-CDIP (Harley et al., 2015) consists of 400,000 grayscale document images distributed evenly across 16 categories: advertisement, budget, email, file_folder, form, handwritten, invoice, letter, memo, news_article, presentation, questionnaire, resume, scientific_publication, scientific_report, and specification. Each image is a single page, and in most cases the first page of its source document; Figure 2 shows example pages from twelve of the categories. The standard split allocates 320,000 documents to training and 40,000 each to validation and test; per-category counts are given in Table 1. The benchmark is used in two settings: supervised models are trained on the training split and evaluated on the test split, while zero-shot models are evaluated on the test split alone.
The documents are sampled from IIT-CDIP (Lewis et al., 2006), a collection of approximately seven million documents (some 40 million pages) made public as a result of litigation and settlement agreements involving several US tobacco companies. This provenance has three properties that are relevant to the audit: the documents are overwhelmingly scans of physical paper, with few born-digital files; they date from roughly the 1950s to 2006, the year IIT-CDIP was released, and concern a single industry; and they were assembled for legal discovery and indexed retrospectively, and were not selected or curated for machine learning evaluation. One consequence is that the research community has been benchmarking against a dataset for which no authoritative statement of what each category contains has ever existed, which Section 4 addresses.
Other datasets from the same collection include DocVQA (Mathew et al., 2021), FUNSD (Jaume et al., 2019), Tobacco3482 (Kumar and Doermann, 2013), and Tobacco800 (Zhu et al., 2007), which are taken wholly or in part from IIT-CDIP or its parent library and are used for visual question answering, form understanding, classification, and signature detection respectively. Our focus throughout this paper is RVL-CDIP, and we refer to these other datasets where a defect that we identify also occurs in them, which is principally the case for sensitive personal data (Section 3) and for ID codes (Section 7).
2.2 Reported Performance on RVL-CDIP
Table 2 lists reported accuracy on RVL-CDIP across the literature, with the modalities that each model uses: image, text, and layout. Early image-only convolutional models reported accuracies between 88% and 91% (Afzal et al., 2017). The incorporation of text and layout signals, and subsequently of transformer architectures pre-trained on document data, raised reported accuracy to the mid 90s. To our knowledge, the current state of the art is LayoutLLM at 98.80% (Fujitake, 2024), followed by EAML at 97.70% (Bakkali et al., 2021) and Bi-VLDoc at 97.17% (Luo et al., 2025).
Table 1: RVL-CDIP per-category train, validation, and test counts.
| Category | Train | Val. | Test |
|---|---|---|---|
| advertisement | 19,963 | 2,522 | 2,515 |
| budget | 20,010 | 2,485 | 2,505 |
| 19,954 | 2,530 | 2,516 | |
| file_folder | 20,022 | 2,451 | 2,527 |
| form | 19,957 | 2,537 | 2,506 |
| handwritten | 20,034 | 2,434 | 2,532 |
| invoice | 19,947 | 2,576 | 2,477 |
| letter | 20,106 | 2,430 | 2,464 |
| memo | 19,975 | 2,533 | 2,492 |
| news_article | 20,011 | 2,526 | 2,463 |
| presentation | 20,043 | 2,468 | 2,489 |
| questionnaire | 20,048 | 2,517 | 2,435 |
| resume | 20,037 | 2,426 | 2,537 |
| scientific_publication | 19,902 | 2,526 | 2,572 |
| scientific_report | 19,994 | 2,508 | 2,498 |
| specification | 19,997 | 2,531 | 2,472 |
Two features of this table are relevant to the rest of the paper. First, the differences between the highest-ranked models are very small: the improvement from LayoutLMv2-base to LayoutLMv3-base is 0.19 accuracy points, and from LayoutLMv1-base to LayoutLMv2-base 0.82 points, so that claims of progress in this literature are routinely based on differences of well under a point. Second, the error rate of the leading models (1.2% for LayoutLLM) is now about one ninth of the rate of label error we measure in the benchmark itself (Section 5). A model cannot be correct more often than the labels against which it is scored, so the differences between the highest-ranked models do not appear to be differences in classification accuracy in any straightforward sense.
The papers behind Table 2 evaluate document classification almost exclusively on RVL-CDIP. Table B.1 in Appendix B records, for each of the 34 papers cited there, which datasets it evaluates document classification on, how many datasets it evaluates on for every other task, and what document corpus it pre-trains on. Twenty-three of the 34 use RVL-CDIP and nothing else for classification. Eight use Tobacco3482 (Kumar and Doermann, 2013), which is taken from the same litigation archive; for six of them that is the only addition, so 29 of the 34 evaluate classification wholly on datasets derived from IIT-CDIP. Five report classification results on a dataset that is not derived from IIT-CDIP, and for two of those the dataset is private and cannot be reproduced (Tensmeyer and Martinez, 2017; Pramanik et al., 2022). Three papers remain (Csurka et al. 2016, Sarkhel and Nandi 2019, and Bakkali
Table 2: Reported accuracy on RVL-CDIP by model and modality (I: image, T: text, L: layout), ordered by reported score.
| Model (Reported by) | Mod. | Acc. | Model (Reported by) | Mod. | Acc. |
|---|---|---|---|---|---|
| LayoutLLM (Fujitake, 2024) | I, T, L | 98.80 | MGDoc (Wang et al., 2022b) | I, T, L | 93.64 |
| EAML (Bakkali et al., 2021) | I, T | 97.70 | Dessurt (Davis et al., 2022) | I | 93.60 |
| Bi-VLDoc (Luo et al., 2025) | I, T, L | 97.17 | Bigbird-base (Pham et al., 2022) | T | 93.48 |
| ERNIE-Layout-large (Peng et al., 2022) | I, T, L | 96.27 | Pramanik et al. (2022) | I, T, L | 93.36 |
| UDOP-Dual (Tang et al., 2023) | I, T, L | 96.22 | Bigbird-large (Pham et al., 2022) | T | 93.34 |
| DocFormer-base (Appalaraju et al., 2021) | I, T, L | 96.17 | Multimodal Ensemble (Dauphinee et al., 2019) | I, T | 93.07 |
| StructuralLM-large (Li et al., 2021a) | T, L | 96.08 | SelfDoc (Li et al., 2021b) | I, T, L | 92.81 |
| UDOP (Tang et al., 2023) | I, T, L | 96.00 | LadderNet (Sarkhel and Nandi, 2019) | I | 92.77 |
| LayoutLMv3-large (Huang et al., 2022) | I, T, L | 95.93 | Zingaro et al. (2021) | I, T | 92.70 |
| LiLT-base (Wang et al., 2022a) | T, L | 95.68 | DiT-large (Li et al., 2022) | I | 92.69 |
| LayoutLMv2-large (Xu et al., 2021) | I, T, L | 95.65 | VLCDoC (Bakkali et al., 2023) | I, T | 92.64 |
| BROS-base (Wang et al., 2022a) | T, L | 95.58 | InceptionResNetV2 (Xu et al., 2021) | I | 92.63 |
| TILT-large (Powalski et al., 2021) | I, T, L | 95.52 | EfficientNet (Ferrando et al., 2020) | I | 92.31 |
| DocFormer-large (Appalaraju et al., 2021) | I, T, L | 95.50 | Region Ensemble (Das et al., 2018) | I | 92.21 |
| LayoutLMv3-base (Huang et al., 2022) | I, T, L | 95.44 | DiT-base (Li et al., 2022) | I | 92.11 |
| Donut (Kim et al., 2022) | I, T | 95.30 | MAE-base (Li et al., 2022) | I | 91.42 |
| Wukong-Reader-large (Bai et al., 2023) | I, T, L | 95.26 | Stacked CNN Single (Das et al., 2018) | I | 91.11 |
| Pham et al. (2022) | T, L | 95.25 | BEiT-base (Li et al., 2022) | I | 91.09 |
| TILT-base (Powalski et al., 2021) | I, T, L | 95.25 | VGG-16 (Afzal et al., 2017) | I | 90.97 |
| LayoutLMv2-base (Xu et al., 2021) | I, T, L | 95.25 | Csurka et al. (2016) | I | 90.70 |
| UDoc-star (Gu et al., 2021) | I, T, L | 95.05 | ResNext-101 (Li et al., 2022) | I | 90.65 |
| Wukong-Reader-base (Bai et al., 2023) | I, T, L | 94.91 | Audebert et al. (2019) | I, T | 90.60 |
| StrucTexTv2-large (Yu et al., 2023) | I | 94.62 | ResNet-50 (Afzal et al., 2017) | I | 90.40 |
| LayoutLMv1-base (Xu et al., 2020) | I, T, L | 94.43 | RoBERTa-large (Li et al., 2021a) | T | 90.11 |
| LayoutLMv1-large (Xu et al., 2020) | I, T, L | 94.42 | RoBERTa-base (Li et al., 2021a) | T | 90.06 |
| MATrIX (Delteil et al., 2022) | I, T, L | 94.20 | BERT-large (Li et al., 2021a) | T | 89.92 |
| DocXClassifier-xl (Saifullah et al., 2024a) | I | 94.17 | BERT-base (Li et al., 2021a) | T | 89.81 |
| DocXClassifier-large (Saifullah et al., 2024a) | I | 94.15 | Tensmeyer and Martinez (2017) | I | 89.31 |
| DocXClassifier-base (Saifullah et al., 2024a) | I | 94.00 | GoogLeNet (Afzal et al., 2017) | I | 89.02 |
| UDoc (Gu et al., 2021) | I, T, L | 93.96 | AlexNet (Afzal et al., 2017) | I | 88.60 |
| Longformer-base (Pham et al., 2022) | T | 93.85 | |||
| Longformer-large (Pham et al., 2022) | T | 93.73 |
et al. 2023) whose classification results can be checked against public data of independent origin. In contrast, the same papers routinely evaluate information extraction and question answering across four, five, or thirteen datasets, while using a single dataset for classification. Twenty-two of the 34 also pre-train on IIT-CDIP or a corpus derived from it, so for most of this leaderboard the evaluation set and the pre-training corpus originate in the same collection of tobacco litigation documents.
2.3 Related Work
Label errors and test–train overlap. Our work belongs to an established literature that studies benchmark datasets empirically and does not assume that they are fixed ground truth. Label errors have been documented in text, image and document corpora alike (Rücker and Akbik, 2023; Northcutt et al., 2021a; Vu and Nguyen, 2020; Lim et al., 2024), and Northcutt et al. (2021a) found that correcting test set labels can reorder model leaderboards, so label quality is not a peripheral concern. A parallel line of work examines overlap between evaluation and training data: Allamanis (2019) showed that duplication inflates reported performance because part of the test set was effectively available during training, and the same holds in question answering (Lewis et al., 2021) and document information extraction (Laatiri et al., 2023). Others have argued more generally that meaningful evaluation requires data that was not available in training (Elangovan et al., 2021). Sections 5 and 6 examine label validity and split integrity respectively.
Spurious correlations and shortcut learning. Models frequently achieve strong benchmark performance by exploiting features that correlate with the target label but are irrelevant to the intended task, as documented in natural language inference (Gururangan et al., 2018; McCoy et al., 2019), image classification (Neuhaus et al., 2023), and medical imaging (Bissoto et al., 2019). A shortcut is by definition a real statistical regularity of the dataset from which it was learned, and it is useless, or misleading, on data from any other source. Closest to our setting, Saifullah et al. (2024b) applied explainability methods to document classifiers trained on RVL-CDIP and Tobacco3482 and observed that identification codes stamped on the documents were often highly relevant features, an observation that they did not pursue further and that Section 7 examines in depth.
Out-of-distribution evaluation. Evaluating beyond the training distribution involves two distinct problems: classifying inputs that belong to the label set but have a different source, and abstaining on inputs that do not belong to any label. Benchmarks for both exist in other domains, among them WILDS (Koh et al., 2021) and corruption benchmarks such as ImageNet-C (Hendrycks and Dietterich, 2019) for the first, and CLINC150 (Larson et al., 2019) and natural adversarial inputs (Hendrycks et al., 2021) for the second. Prior to our own work (Larson et al., 2022), no published evaluation data existed for either setting in document classification, and RVL-CDIP results were reported without any accompanying measure of generalization; Section 8 treats the two separately.
Sensitive data and de-identification. Further work on datasets concerns harmful content, including undesirable social bias, explicit material, and personally identifiable information (Birhane and Prabhu, 2021). Exposure of personal data in public corpora increases the risk of fraud and identity theft (Sweeney, 2006), models have been shown to leak their training data (Carlini et al., 2021), and community norms reflect the concern: the NeurIPS Code of Ethics states that “datasets should minimize the exposure of any personally identifiable information, unless informed consent from those individuals is provided to do so”. De-identification is well developed in adjacent fields, particularly face obfuscation in computer vision (e.g., Yang et al., 2022) and clinical natural language processing (e.g., Vakili and Dalianis, 2022), where anonymization is often a legal precondition of use, but much less developed for document images. The principal exception applies black redaction boxes to RVL-CDIP documents (Pagel et al., 2024) and finds that doing so degrades classifier performance, which motivates the utility-preserving approach of Section 3.
3 Sensitive Personal Data and De-Identification
RVL-CDIP contains a substantial quantity of sensitive personal data: Social Security numbers, dates and places of birth, home addresses, and more. The rest of this audit produces data configurations of RVL-CDIP, such as the corrected labels and the de-duplicated test split,
- https://neurips.cc/public/EthicsGuidelines, accessed October 2026.
that we release so that our results can be reproduced. We cannot responsibly release them with this personal data in place, and we therefore de-identify the corpus before the audit begins.
This section quantifies the exposure of sensitive personal data in RVL-CDIP and describes a de-identification method that replaces each sensitive entity with a synthetic but plausible one and leaves classifier predictions unchanged; the conventional method, which covers the entity with a redaction rectangle, is used as a baseline. We run the experiments from Section 5 onwards on the synthetic-replacement corpus, including the OCR of Section 9, and we distribute this corpus as the default version of RVL-CDIP; Appendix A lists the links to the released data.
3.1 Problems with Automated Detection
Automated detection would be preferable to reading 400,000 documents, and we evaluated four personally identifiable information (PII) detectors against our annotations: Presidio, Google DLP, Microsoft Azure's language service, and Amazon Comprehend. Two measurements show that they are unsuitable, one of coverage and one of recall. Their coverage is narrow: of the eleven sensitive entity types we record, only Social Security number and age are supported by all four, seven are detected by none, and the address and telephone detectors that they do provide do not distinguish between a home address or number and an employer's (Table 3). Their recall on the most important type is also uneven: measured as document-level recall over 1,773 annotated documents, Presidio finds 0.97 of Social Security numbers and Google DLP 0.93, but Amazon finds 0.77 and Azure 0.70, the latter missing roughly of the documents that contain one. Appendix C shows the per-tool results. Large language models are a further option, and Xu et al. (2026) evaluate several of them for sensitive entity extraction, including on RVL-CDIP; they find performance uneven across entity types and below that of a pattern-based baseline on Social Security numbers.
We therefore annotated the documents by hand. Manual annotation enables the position of each entity on the page to be recorded, which subsequent redaction requires and document-level detection does not provide.
3.2 Annotation
We extended the four entity types identified in our earlier work (Larson et al., 2023) (Social Security numbers, dates of birth, places of birth, and marital status) to the fuller set in Table 3, taking as reference the sensitivity classifications used by large institutions and by the US Department of Homeland Security's guidance on personally identifiable information (DHS Privacy Office, 2017).
Person names are not among the types we record, because names occur throughout this corpus (on letterheads, in signature blocks, in distribution lists) and most of them are not sensitive, so that annotating them would mark a large fraction of the corpus without addressing the risk. A name becomes a risk when it appears beside a Social Security number or a date of birth, so we annotate those entities and do not annotate the name.
We distinguish home addresses and home telephone numbers, which we treat as sensitive, from business addresses and telephone numbers, which we do not. The Table 3: The eleven sensitive entity types recorded during annotation.
9
| Entity type |
|---|
| US Social Security number |
| Age |
| Date of birth |
| Sex/gender |
| Place of birth |
general categories would match every letterhead and business card in the corpus, which are not sensitive and were mostly published deliberately. Entities that are sensitive but are outside the enumerated types, such as a photograph on a scanned driver's license, were recorded as other.
The annotation was carried out as part of our earlier study (Larson et al., 2024) by a team of nine people, five of them co-authors of that paper; the lead author, an author of the present paper, served as expert annotator and organized the process. FUNSD and Tobacco3482 were inspected by at least two annotators including the expert; DocVQA and Tobacco800 by the expert; and approximately half of RVL-CDIP by two annotators, the remainder by the expert alone. Inter-annotator agreement on the binary judgment of whether a document contains sensitive data, measured over five annotators on Tobacco3482 and FUNSD, yielded a Fleiss's kappa of 0.918. We did not use crowdsourcing, because in addition to its cost it would have exposed this material to a large number of additional people, which is contrary to the purpose of the annotation.
3.3 Prevalence of Sensitive Personal Data
Table 4 shows the counts for each entity type in RVL-CDIP, and Table D.1 in Appendix D shows them for all five datasets. We identified 15,956 RVL-CDIP documents containing sensitive personal data, of the corpus, among them 2,342 US Social Security numbers. We applied the same annotation and de-identification to four further datasets sampled from IIT-CDIP (DocVQA, Tobacco3482, Tobacco800 and FUNSD), since a Social Security number on a source page recurs in each dataset built from that page, and Social Security numbers occur in all five datasets, most numerously in RVL-CDIP (Appendix D). The most frequent entity types overall are dates and places of birth, home addresses, citizenship and nationality statuses, and marital, parental, and spousal statuses; the rarest are health status and religious affiliation, which appear only in RVL-CDIP and DocVQA.
The affected documents are ordinary ones: resumes, invoices, employment forms, and, in a number of cases, scanned photographs of driver's licenses and Social Security cards. Figure 3 shows representative examples, with the sensitive fields obscured by us. Within RVL-CDIP the concentration is highest in resume, where our earlier sampling found that of test documents contain a Social Security number, a date of birth, a place of birth, a marital or
Table 4: Sensitive entity counts in RVL-CDIP. Counts for all five IIT-CDIP-derived datasets are given in Table D.1.
| Dataset size | 400,000 |
|---|---|
| US Social Security no. | 2,342 |
| Date of birth | 12,800 |
| Place of birth | 6,125 |
| Age | 219 |
| Home address | 3,908 |
| Home telephone | 1,801 |
| Marital/parental status | 4,228 |
| Citizenship/nationality | 2,647 |
| Sex/gender | 602 |
| Health status | 60 |
| Religious affiliation | 43 |
| Documents affected | 15,956 |

Figure 3: Documents from RVL-CDIP containing sensitive personal information. Sensitive fields have been obscured by us; they appear unobscured in the corpus as distributed.
family status, and 8.9% a citizenship status. Because these types co-occur, the risk is greater than any single entity implies: a document containing a name together with a date and place of birth, a home address, and a Social Security number provides most of the information that identity fraud requires (Sweeney, 2006).
The period in which these documents were created partly explains why so many of them contain Social Security numbers and identity documents: Social Security numbers were used routinely as employee identifiers at that time, so their appearance on personnel paperwork was unremarkable, and individuals also gave identity documents to employers for ordinary administrative reasons. Neither the employees nor their employers could have foreseen that these documents would become permanently and publicly available as part of a machine learning corpus.
We therefore do not reproduce any document containing sensitive data in this paper, or identify any person, beyond the examples in Figure 3, whose sensitive fields we have obscured.
3.4 De-Identification with Synthetic Replacement
We de-identify sensitive documents by synthetic replacement: each annotated entity is erased from the page and a generated value of the same type is written in its place. Because the sensitive data annotation process recorded bounding boxes, the position of every sensitive entity on the page is known, which makes replacement possible. The annotated regions are small, occupying less than 2% of the page in most affected documents, and they are few relative to the corpus: 15,956 of RVL-CDIP's 400,000 pages contain an annotation, and those pages contain 39,435 regions in total, so 96% of the benchmark is left unaltered. We
Before
Assuming a final decision on product formulation: (all styles) is made on or before 8/18/80 . . .
It is requested that the following quantities of Omega Selling Samples be manufactured and shipped to arrive in the Field the week of August 18:
REGULAR STOCK
KINGS (Packs)
100's (Packs)
BOX (Packs)
Omega
21,000
21,000
21,000
This stock to be packed in 6M cases.
After
Assuming a final decision on product formulation: (all styles) is made on or before 8/18/80 . . .
It is requested that the following quantities of Omega Selling Samples be manufactured and shipped to arrive in the Field the week of March 25:
REGULAR STOCK
KINGS (Packs)
100's (Packs)
BOX (Packs)
Omega
21,000
21,000
21,000
This stock to be packed in 6M cases.
Keep out at 'Easton' News in Conjunct
Night Concurs
97
□ Mail-in Offer
acertw
Expiration Date (optional)
7/31/84
Expiration Date
Refund Value
(Other)
up offer)
Keep out at 'Easton' News in Conjunct
Night Concurs
97
□ Mail-in Offer
acertw
Expiration Date (optional)
5/31/55
Expiration Date
Refund Value
(Other)
up offer)
ACTION
EDED
NORTH CAROLINA CITIZENS FOR BUSINESS & INDUSTRY
Post Office Box 2300, Raleigh, N.O. 27800 • 819 888-0788
330 Fayetteville Street
July 6, 1987
SADERS TO HOLD PUBLIC HEARING ON H.1155
USED WITHOUT MORE STUDY: As you may have
is reports, Key legislative leaders last week
to finance
ACTION
EDED
NORTH CAROLINA CITIZENS FOR BUSINESS & INDUSTRY
Post Office Box 2300, Raleigh, N.O. 27800 • 819 888-0788
330 Fayetteville Street
July 2, 1954
SADERS TO HOLD PUBLIC HEARING ON H.1155
USED WITHOUT MORE STUDY: As you may have
is reports, Key legislative leaders last week
to finance
Figure 4: Synthetic replacement of non-PII dates for illustrative purposes, top to bottom: August 18 → March 25, 7/31/84 → 5/31/55, July 6, 1987 → July 2, 1954.
implemented this replacement pipeline as a command-line tool, which we release together with the fonts and word lists it uses (Appendix A).
Replacement values have two sources: places, nationalities, religions and months are taken from gazetteer lists included with the tool, and the patterned types are generated directly, so that each value has the internal structure its type requires. For example, a Social Security number has the format that the Social Security Administration issues, a telephone number conforms to the North American numbering plan, and a ZIP code is taken from the range belonging to its state.
The conventional alternative is to cover each annotated region with a black or white redaction rectangle. We generate a replacement because these corpora are also used for tasks other than classification: a rectangle placed over the answer to a visual question answering item makes that item unanswerable, and removes the target of an information extraction item, whereas a generated value of the same type preserves both while removing the original value. Replacement also makes any entity our annotation missed harder to find, since a reader can no longer assume that a plausible Social Security number on one of these pages is a real one.
Figure 4 shows examples of annotated regions before and after replacement, from which it can be seen that a replacement must match the typography of the page it is written into. We measure the typeface, size, stroke weight, baseline and skew of the original text on the page itself: for each annotated region, the pipeline locates the surrounding words in the page's Amazon Textract OCR and then carries out the steps below. Appendix E describes the full implementation.
-
Local context. The Textract words lying at least 70% inside the annotated bounding box are grouped into text lines. The measurements in the remaining steps are taken from those words; where the box does not enclose a complete word, the nearest words on the same line are used instead.
-
Typeface. The pipeline includes nineteen open-license fonts, chosen to cover the serif, sans-serif and typewriter faces that predominate in the corpus. Each candidate font is used to render the words that Textract read in the box, at the width of the scanned words, and the scan and each rendering are then despeckled, thinned to one-pixel skeletons, and compared by chamfer distance (Barrow et al., 1977). The comparison is repeated over as many as three words from the box, and the font with the best mean rank across them is selected. Regions that Textract labels HANDWRITING are matched against handwriting fonts instead, and the face chosen for the page's longest handwritten words is reused for every handwritten region on that page, so that all handwritten replacements in a document are drawn in the same handwriting font.
-
Size. Size is estimated by re-rendering the scanned words in the selected font and scaling until their widths agree. Widths are used rather than heights because Textract pads its boxes vertically, by roughly 8% of box height above the ink on these datasets.
-
Stroke weight. Measured as ink area divided by half the boundary length, on the scanned words and on the same words re-rendered in the selected font. The replacement is drawn with whichever outline width brings the two measurements closest; fonts already heavier than the scan are not thinned.
-
Baseline and skew. Textract's polygons understate skew (a median of against measured from the pixels of Tobacco3482), so both are measured from the image. A word's baseline is the lowest row in which ink is dense, computed after long horizontal runs are removed so that an underline or a printed form line is not mistaken for the baseline. A line's slope is fitted by least squares through the baselines of its words where at least three words span at least 150 pixels, and is accepted if it is at most . Otherwise the page's skew is used, which is the median of the slopes fitted to the page's lines of at least three words spanning at least 300 pixels, and is therefore also measured from the pixels.
-
Erase and refill. The region is filled with paper sampled from around it rather than with white, so that its color, grain and specks continue across the erased area. Ruled lines crossing the region, such as the printed lines of a form or an underline, are detected and redrawn: candidate rows are found by thresholding just below the paper's noise level, at three standard deviations, bridging the one-pixel steps of slightly tilted lines, and keeping only runs longer than the region is tall. Each candidate is then checked for clean paper above and below it and for ink in the gaps between words, which rejects a row of letter bottoms that resembles a ruled line.
-
Draw. The text is rendered at four times the output resolution and downsampled. Supersampling allows the outline width of step 4 to change stroke thickness in steps of half a pixel, which is finer than the output grid.
-
Degrade. IIT-CDIP documents are scans of physical paper and have the corresponding print and scanning noise, so a cleanly rendered replacement would be conspicuous. We add noise to the rendered text with Augraphy's LowInkRandomLines (Groleau et al., 2023) and then darken the strongest strokes, so that the low-ink lines do not wash out the text.
We apply two constraints to the generated values. Formats are copied and values are not: 7/31/84 is replaced by another five-digit slash-delimited date, MARRIED by an upper-case status, and a date annotated without its year, such as August 18 in Figure 4, is replaced by another month and day without a year. Values with internal structure are also generated consistently, so that a ZIP code agrees with the state printed beside it, a telephone number obeys the North American numbering plan, and street and city names are real US names; a replaced address that could not exist would be as conspicuous as an undegraded one.
Fifteen of the entity categories receive replacement text, covering 96% of annotated regions. The remainder (sex and gender, signature, health status, and the residual other) are erased and refilled but not written back, because these do not appear in standard formats. A health status might read “good health” in one document and give height, weight and eye color in another, and none of our data generators covers that range; a language model could plausibly provide replacements here, but we did not pursue that direction. Those regions, 3.8% of the annotated total, are therefore blanked, and the claims above about replacement preserving answerability do not apply to them.
3.5 Effect of De-Identification on Downstream Models
Whether de-identification damages the data determines what we can responsibly release, so we measure its effect in two ways, against black and white box redaction as baselines.
We first compute document similarity between de-identified documents and their originals. We take 445 resume documents from RVL-CDIP, each with an original, black, white and synthetic-replacement version, embed all four with CLIP using the ViT-B/32 backbone (Radford et al., 2021), and compute cosine similarity and Euclidean distance between each redacted version and its original. Black redaction produces the documents least similar to their originals. White and synthetic replacement are both closer and behave alike, with synthetic replacement slightly closer: it is more similar than white for 61.6% of documents by cosine similarity, less similar for 28.3%, and tied for the remaining 10.1%, and for no document was the black version the closest of the three. Similarity decreases as the redacted area of a page increases.
We then measure the effect on a classifier. Using DiT-base fine-tuned on the RVL-CDIP training split (Li et al., 2022), we compare predictions and softmax confidence scores on the original and redacted versions of the same 445 documents. Across all three treatments, no document changed its predicted label. Mean absolute change in confidence was 0.0036 for black, 0.0022 for white, and 0.0024 for synthetic replacement. Eleven documents showed larger shifts; in the most extreme, the confidence for a document with roughly 3% of its area redacted decreased by about 0.30, and the median shift among these eleven was 0.045. Prior work applying black redactions to RVL-CDIP reported degraded classifier performance (Pagel et al., 2024); we attribute the difference to redacting only the sensitive regions we had localized, rather than larger or less targeted areas.
The conclusion we draw concerns release policy: de-identification of these corpora has almost no effect on classification, so that there is no research argument for preferring the unredacted original data, and the de-identified versions should be the default distribution. We adopt that policy for the artifacts described in Appendix A.
We also adopt it for this paper, as stated at the start of this section, and give the text-based and multi-modal models of Section 9 the OCR of the replaced pages. A black or white box removes the words beneath it, so an OCR comparison on box-redacted pages would measure the effect of the redaction together with that of the engine. A replaced page keeps words of the same types in the same places, with different values, and we therefore run the OCR comparison on replaced pages. Appendix E.4 describes how the released pages are encoded and how the pipeline's use of Textract relates to that comparison.
4 Label Guidelines for RVL-CDIP Categories
In this section we describe the criteria that we use to decide which of the 16 RVL-CDIP categories a document belongs to. The original release of RVL-CDIP did not state what the categories contain; Harley et al. report that the categories were selected in part because each had at least 25,000 representatives in IIT-CDIP, but did not publish definitions, criteria, or annotation rules for them. It is also not documented who assigned the original category labels in the source collection; the available evidence suggests they were applied by staff at the library that hosted the tobacco documents (Schmidt et al., 2002; Tasker et al., 2022). Because the error analysis in Section 5 and the annotation of out-of-distribution data in Section 8 require a definition of each category, we wrote the label criteria in Table 5, and we hope that others who audit or extend the corpus will use them as well. We developed the label criteria in two stages: an initial review of 16,000 training documents, and revisions made during the exhaustive review of all 400,000 labels described in Section 5.
4.1 Method
We derived an initial set of criteria by sampling 1,000 documents from each of the 16 categories in the training split, and reviewing the resulting 16,000 documents category by category. The purpose of this first pass was descriptive: we sought to characterize what each category contains, before judging whether individual documents belong to it.
The first pass showed that most categories are internally heterogeneous and comprise several distinct sub-types. The resume category, for instance, contains at least four sub-types: conventional resumes and curricula vitae, “Biographical Sketch” documents of the kind required for United States National Institutes of Health grant applications, third-person executive biographies, and scanned business cards. The advertisement category likewise includes print advertisements from newspapers and magazines, scripts for television and radio spots, and advertisement insertion orders. A single category label thus describes a document less precisely than its name suggests, which we discuss further in Section 12 because it affects

Figure 5: Check images labeled budget (top row) and invoice (bottom row) in RVL-CDIP.
zero-shot prompting and clustering analyses, both of which assume that each label describes a coherent set of documents.
The first pass also showed that the boundary between some pairs of categories has to be decided for both categories together. For instance, scanned checks (Figure 5) and political contribution requests appear in both budget and invoice, so a rule for either category requires a decision about which of the two categories these documents belong to. We resolved such cases empirically, by annotating the sub-types wherever they occurred and comparing their relative frequencies: check images accounted for 8.8% of the budget documents we reviewed but only 3.8% of invoice documents, and our criteria accordingly assign checks to budget. We set several rules in Table 5 in this way.
We also excluded from the criteria certain documents that recur in the corpus but do not have a semantic relation to the category in which they occur. The clearest instance is a placeholder page reading “IMAGE NOT AVAILABLE ONLINE” (Figure 6), which states that the material is held in the Minnesota Tobacco Document Depository. The Textract text of 494 RVL-CDIP pages contains the phrase “image not available”, and 375 of these pages are labeled advertisement. Each of the 45 classifiers that we trained on the original labels predicts advertisement for all 54 such pages in the test split, including the 11 pages labeled with other categories; the review of Section 5 marked all 54 pages as unknown, and we remove them in the fixed conditions of Section 10.
We revised the label criteria periodically during the roughly two years of exhaustive annotation, whenever annotators encountered boundary cases that the label criteria did not resolve. Table 5 shows the final version of the label criteria. The label criteria describe what each category contains in the corpus, and we did not try to reconstruct what the categories were originally intended to contain.

Figure 7: Non-English examples in RVL-CDIP, with their language and category label.
4.2 Scope Conventions
In addition to the label criteria for each category in Table 5, we follow three conventions that apply to all 16 categories.
Single label. RVL-CDIP is a single-label benchmark, and where a document could plausibly belong to two categories the corpus is largely consistent about which one is assigned: a handwritten letter, for example, is labeled handwritten and not letter. We adopt the corpus's own resolutions where they are consistent, and record documents as mixed where they are not (Section 5).
First page. Most images are the first page of a document. The systematic exceptions are charts and tables, typically labeled scientific_report, and presentation slides, labeled presentation, both of which may be taken from any position within a document.
Language. We assign a document to a category by its type, whatever its language. Almost all documents containing legible text are in English, and our review also found documents in German, Dutch, French, Spanish, Portuguese, Italian, Japanese, Chinese, Arabic, and Hebrew, such as German, French, and Portuguese news clippings labeled news_article (examples are displayed in Figure 7).
IMAGE
NOT
AVAILABLE
ONLINE
The material referenced in the associated index listing is available in the Minnesota Tobacco Document Depository. Please see this website's home page for additional information regarding the Depository.
Figure 6: A placeholder page from the advertisement category.
Table 5: Operational criteria for the 16 RVL-CDIP categories, with notes recording boundary cases encountered during annotation.
| Category | Description | Notes |
|---|---|---|
| advertisement | Advertisements from print media such as newspapers and magazines; a smaller number of scripts for television or radio advertisements; a small number of advertisement order and insertion documents. | Excludes the recurring “IMAGE NOT AVAILABLE” page, which appears predominantly in this category. |
| budget | Expense, spending, sales, cash, and accounting reports and forecasts; budgets; quotes and estimates; income and bank statements. Also receipt-like documents including political campaign contribution requests, other receipts, and checks and check stubs. | Checks are assigned here rather than to invoice: 8.8% of reviewed budget documents were checks, against 3.8% of invoice. |
| Scanned images of printed email messages. | ||
| file_folder | Scanned images of folders and binders, often characterized by vertically oriented text indicating a folder label. | A moderate number contain handwritten notes. Some scans are indistinguishable from blank pages. |
| form | Documents with ruled lines or boxes indicating fillable fields; also documents composed largely of key-value pair elements, such as “Size: Large”, whether or not the fields are ruled. | Substantial overlap with questionnaire, many of which contain form-like elements. |
| handwritten | Handwritten documents, including handwritten letters and scientific notes. | Takes precedence over the content-based categories: a handwritten letter is handwritten. |
| invoice | Invoices, bills, and account statements. | Excludes checks; see budget. |
| letter | Letters, typically bearing letterhead and commonly opening with a “Dear…” salutation. | The boundary with memo is frequently unclear and accounts for much of this category’s error rate. |
| memo | Memoranda and inter-office correspondence, often with explicit “TO”, “FROM”, and “SUBJECT” headings. | |
| news_article | News articles as clippings from newspapers and other print news media, and a small number from the web. Also press releases. | Press releases occur in both this category and presentation, more often in the latter. |
| presentation | Presentation and overhead slides; transcripts of speeches and statements. Also a large number of press releases. | See news_article. |
| questionnaire | Customer surveys and questionnaires; survey prompts written for surveyors; questionnaires forming part of legal proceedings and investigations. | Many contain substantial form-like elements; see form. |
| resume | Resumes and curricula vitae; “Biographical Sketch” documents; third-person executive biographies; a small number of business cards. | Contains a high concentration of sensitive personal data; see Section 3. |
| scientific_publication | Papers and articles from scientific journals and book chapters; book title pages; articles from science newsletters. | Newsletter articles closely resemble news_article. |
| scientific_report | Bioassay, pathology, and test reports; charts, graphs, and tables; research reports including progress reports; research proposals, abstracts, and paper drafts. | Reports and abstracts resemble scientific_publication; test results resemble specification. |
| specification | Data sheets, including safety data sheets; product, material, and test specifications; specification change reports. |
5 Axis I: Label Validity
Using the label criteria of Section 4, we determine how many of RVL-CDIP's 400,000 labels are correct.
5.1 Automated Error Detection
One way to estimate how many labels are wrong without reviewing every document is automated label-error detection. Confident learning (Northcutt et al., 2021b), as implemented in CleanLab, is one such method; it identifies likely errors from the disagreement between a model's predicted class probabilities and the assigned label, and it has been applied successfully to benchmarks across several modalities (Northcutt et al., 2021a). Other methods rank documents by the area under the margin during training (Pleiss et al., 2020) or by the loss of a fine-tuned pre-trained language model (Chong et al., 2022). However, all three methods assume that label errors are rare, because each of them judges a label by the predictions of a model trained on the labels under audit, and these predictions are informative only if most of those labels are correct. In RVL-CDIP the errors are frequent and systematic, and because they arise from category boundaries that were never specified, they recur in the same direction across all three splits. A model trained under these conditions thus learns the erroneous convention, and its confidence scores are high for the erroneous labels, as we show for confident learning in Appendix F. Establishing the error rate therefore requires human review.
5.2 Annotation Protocol
We manually inspected all 400,000 documents in RVL-CDIP. Annotation was carried out by a team of seven volunteer undergraduate researchers over approximately two years, working from the criteria in Table 5. Documents were distributed in batches of 1,000 taken from a single category, accompanied by that category's criteria. For each document, annotators recorded whether it satisfied the criteria for its assigned category: "yes" where it clearly did, "no" where it clearly did not, and "unsure" in ambiguous cases. Every "no" and every "unsure" was reviewed by the project lead, along with a sample of "yes" judgments, both to correct individual annotations and to identify where the criteria themselves needed revision. Documents marked "no" were assigned a corrected label wherever one could be determined; these corrections are released with the paper and are the basis of the remediated corpus of Section 10.
We distinguish three kinds of label error, and display examples of each label error type in Figure 8. A document is unknown where it does not satisfy the criteria for any RVL-CDIP category, so that no correct label for it exists within the label set. It is wrong where its assigned label is incorrect but a different, correct label is available. It is mixed where it satisfies the criteria for two or more categories, including its assigned one, which the single-label format of the benchmark cannot represent. A document is unsure where an annotator marked it as ambiguous and the review did not settle whether its label is correct, and we report these documents separately from both the error count and the correct count.

Figure 8: Examples of each error type. Top row: unknown, documents that do not satisfy the criteria for any RVL-CDIP category. Middle row: wrong, where a different category is correct. Bottom row: mixed, where more than one category legitimately applies.
Inter-rater agreement was assessed on a sample of 1,500 documents from five categories (resume, letter, memo, handwritten, and email), which gave a Fleiss's kappa of 0.74, in the range conventionally described as substantial agreement (Landis and Koch, 1977).
5.3 Findings
We find that approximately 10.5% of RVL-CDIP is erroneously labeled (Table 6): 5.17% unknown, 3.84% wrong, and 1.49% mixed, or 11.48% if unsure cases are counted as errors.
The rate differs greatly between categories: letter is erroneously labeled 31.26% of the time, close to a third of the category, with the errors concentrated at its boundary with memo, a distinction that our own criteria describe as frequently unclear. budget is the only other category above 15% (17.35%), followed by invoice (14.94%), questionnaire (14.44%), form (14.25%), handwritten (12.66%), and scientific_report (12.16%). At the
Table 6: Label error rates by category and error type. Any Error is the sum of unknown, wrong, and mixed; the final column additionally counts unsure cases as errors.
| Category | Unknown | Wrong | Mixed | Any Error | Unsure | Any + Unsure |
|---|---|---|---|---|---|---|
| advertisement | 5.89% | 0.60% | 1.62% | 8.12% | 1.50% | 9.61% |
| budget | 4.93% | 8.48% | 3.94% | 17.35% | 1.66% | 19.00% |
| 8.12% | 1.27% | 0.12% | 9.51% | 0.50% | 10.02% | |
| file_folder | 3.33% | 0.16% | 0.52% | 4.01% | 0.08% | 4.09% |
| form | 4.54% | 3.60% | 6.10% | 14.25% | 1.04% | 15.29% |
| handwritten | 9.50% | 2.12% | 1.03% | 12.66% | 0.00% | 12.66% |
| invoice | 5.83% | 8.52% | 0.60% | 14.94% | 1.16% | 16.10% |
| letter | 15.32% | 15.51% | 0.42% | 31.26% | 0.04% | 31.30% |
| memo | 3.11% | 1.72% | 1.12% | 5.96% | 1.91% | 7.87% |
| news_article | 3.51% | 4.50% | 0.54% | 8.55% | 0.96% | 9.52% |
| presentation | 3.26% | 1.34% | 0.87% | 5.47% | 2.08% | 7.55% |
| questionnaire | 7.38% | 5.98% | 1.09% | 14.44% | 1.27% | 15.72% |
| resume | 1.47% | 0.01% | 0.00% | 1.48% | 0.01% | 1.49% |
| scientific_publication | 2.15% | 2.39% | 0.00% | 4.54% | 2.72% | 7.26% |
| scientific_report | 2.90% | 4.09% | 5.17% | 12.16% | 0.45% | 12.60% |
| specification | 1.55% | 1.13% | 0.74% | 3.42% | 0.24% | 3.66% |
| RVL-CDIP | 5.17% | 3.84% | 1.49% | 10.51% | 0.98% | 11.48% |
other extreme, resume is erroneously labeled only 1.48% of the time, and specification, file_folder, and scientific_publication are all below 5%. The wrong labels also have a direction: of the 3,878 letter documents that we relabeled, 3,253 (83.9%) are memos, of the 2,129 relabeled invoice documents 1,846 (86.7%) are budgets, and of the 597 relabeled scientific_publication documents 548 (91.8%) are news articles; Table G.1 in Appendix G shows the original and corrected labels of all 15,366 relabeled documents. As a consequence, a model's aggregate accuracy on RVL-CDIP is an average over categories whose labels differ in reliability by more than a factor of twenty, and per-category results reported against this benchmark are not comparable with one another.
The errors are also systematic within categories, and the exhaustive review showed several patterns that a sample would not have shown. Press releases, for example, occur in both news_article and presentation, and are the more common of the two in presentation, which became apparent only after enough of both categories had been reviewed to perceive the imbalance.
5.4 Sampled and Exhaustive Error Rates
Our own earlier work (Larson et al., 2023) estimated RVL-CDIP's label error rate at 8.1%, with a further 1.7% of documents having multiple valid labels, from a sample of 1,000 training documents from each of the 16 categories. On the training split, the exhaustive review finds 8.97% without and 10.45% with the mixed documents, so that the sampled estimates were 0.9 and 0.7 percentage points lower, a difference larger than the sampling error of the earlier estimate (about 0.4 points at 95% confidence). We see two possible causes: annotators who review a whole category see more documents near its boundaries than annotators who review a sample, and some errors, such as the press-release asymmetry described above, are only apparent across many documents. Because the difference is small, we conclude only that a sampled estimate can understate the error rate.
6 Axis II: Split Integrity
The test split of a benchmark is informative to the extent that its documents were not available in training, because where evaluation data recurs in training, reported accuracy measures the recall of specific instances as well as generalization to the task, in proportions that are unknown. Allamanis (2019) describes the resulting scores as “inflated”, and similar findings have been reported for question answering (Lewis et al., 2021), image retrieval (Radenovic et al., 2018), and document information extraction (Laatiri et al., 2023). This section measures how much of RVL-CDIP’s test split recurs in its training split.
6.1 Definition of Duplicates
We treat two documents as duplicates or near-duplicates in either of two cases. In the first case the two samples are copies of the same underlying document that differ only in scanning artifacts, noise, or geometric distortion. The second case is a template match: the two documents are distinct instances of the same underlying form or letter, differing in the values filled into a shared structure. A purchase order form completed for two different orders, or the same circular letter addressed to two recipients, are template matches.
The second case requires justification, since the two documents are in an ordinary sense not the same document, and we count it as leakage for two reasons. The first reason is the task: RVL-CDIP requires a document's type, and document type is very largely a function of layout and structure, which is what the two documents of a template match have in common, whereas the variable content that distinguishes them is irrelevant to the task, so that a model that was trained on one instance has been shown the discriminative structure of the other. The second reason is empirical and is developed in Section 7: models on this benchmark rely on structural and incidental page features and not on document semantics, so that structural repetition is the kind of repetition that increases their scores. Figure 9 shows examples of both types.
6.2 Limitations of Perceptual Hashing
The standard tools for duplicate detection in image datasets use perceptual hashing (pHash and related methods, as used in CleanVision and fastdup), which assigns near-identical hashes to near-identical images and is unsuitable for both of the cases above. In the first case, scanner noise and geometric distortion between two scans of the same page are frequently large enough in pixel terms to produce different hashes, so recall is low, and in the second case hashing fails by construction, because template matches differ in their filled content, to which a perceptual hash is designed to be sensitive. A method that treats RVL-CDIP's duplicates as an image-hashing problem will therefore substantially undercount them.
6.3 Filter-and-Refine Detection
We therefore use a two-stage filter-and-refine pipeline: an inexpensive approximate stage proposes candidate pairs, and a more discriminative stage adjudicates them.

Duplicate Test-Train Pair
Near-Duplicate Test-Train Pair
Figure 9: Example test–train pairs: the first is a duplicate, the second a template-match near-duplicate. Near-duplicates need not be pixel-identical: they share an underlying document template while differing in filled fields or scanning conditions.
Filter. We embed every document with CLIP (Radford et al., 2021), giving a 512-dimensional representation per page, and -normalize. Stacking the train and test embeddings into matrices and , the full matrix of cosine similarities is a single product , which makes exhaustive comparison across the corpus tractable. For each test document we retain its ten most similar training documents as candidates. This stage is deliberately permissive: its purpose is recall, and its output is not used as evidence of duplication.
Refine. Each candidate (test, train) pair is then assessed by two complementary methods, one that compares the page images and one that compares their recognized text. For the images we use local feature matching: SuperPoint (DeTone et al., 2018) detects keypoints and computes descriptors, and LightGlue (Lindenberger et al., 2023) matches them across the pair (Figure 10). SuperPoint was designed for robustness to the geometric transformations that distinguish two scans of one page, and the printed structure that the two documents of a template match share also produces many matched keypoints. For the text we use sequence similarity, computed with the Ratcliff/Obershelp algorithm (Ratcliff and Metzener, 1988) over the documents' recognized text. Because this method gives a high score to long common subsequences, it detects the shared body of text of both duplicate types and tolerates the small regions in which the two documents differ. A pair is judged a duplicate where its sequence similarity is at least 0.2 and its feature match count is at least 100.
Calibration. We tuned these thresholds against a reference set of candidate pairs that the authors judged by hand. For 50 test documents from each of the 16 categories, we took two candidates from the filter stage, one chosen at random and the one with the highest CLIP similarity, which yields 1,528 distinct pairs. We marked 56 of these pairs as unsure and evaluate on the other 1,472, of which 403 are true matches. At the operating point above, the pipeline achieves precision of 100%, recall of 82.9%, and of 90.6%. We calibrated for precision, so that every pair we report is a genuine duplicate, with the consequence that we miss roughly one pair in six and all duplication rates in this section are lower bounds. The

Figure 10: Matched SuperPoint keypoints of a test document (left) and its duplicate in the training split (right), a random sample of 120 of the 599 matches.

Image Similarity: 0.884
Text Similarity: 0.571
Feature Match: 177
Image Similarity: 0.963
Text Similarity: 0.512
Feature Match: 121
Image Similarity: 0.982
Text Similarity: 0.929
Feature Match: 338
Figure 11: Further test–train pairs detected as duplicates, each annotated with its CLIP similarity (Image Similarity), text sequence similarity (Text Similarity) and SuperPoint match count (Feature Match).
reference pairs and our judgments are available on the project website (Appendix A), so that others can assess the threshold choice directly.
6.4 Findings
Table 7 reports the results, and Figure 11 shows further examples of the pairs the pipeline identifies. Approximately 35.2% of RVL-CDIP's test split has a duplicate or near-duplicate counterpart in its training split.
As with label errors, the rate varies widely between categories. Six categories exceed 50%: specification (82.20%), invoice (68.75%), questionnaire (61.56%), budget (59.04%), form (58.18%), and resume (57.59%); eight of the sixteen exceed one third, whereas file_folder (1.98%), handwritten (4.03%), and email (6.96%) have almost no overlap. The ordering has an explanation: the heavily affected categories consist of standardized documents (specifications, invoices, forms, questionnaires), in which the same template recurs across an organization's records, while the unaffected ones consist of documents that are structurally unique to their author, as handwriting necessarily is. For specification, more than four fifths of the test split has a counterpart in training, which should be considered when a per-category accuracy for it is read.
Table 7: Test–train and validation–train duplication by category. The percentage is the proportion of that split having a duplicate or near-duplicate counterpart in the training split.
| Category | Test | Validation | ||
|---|---|---|---|---|
| # Dup. | % Dup. | # Dup. | % Dup. | |
| advertisement | 856 | 34.04% | 843 | 33.43% |
| budget | 1,479 | 59.04% | 1,450 | 58.35% |
| 175 | 6.96% | 190 | 7.51% | |
| file_folder | 50 | 1.98% | 56 | 2.28% |
| form | 1,458 | 58.18% | 1,455 | 57.35% |
| handwritten | 102 | 4.03% | 112 | 4.60% |
| invoice | 1,703 | 68.75% | 1,803 | 69.99% |
| letter | 292 | 11.85% | 259 | 10.66% |
| memo | 457 | 18.34% | 440 | 17.37% |
| news_article | 501 | 20.34% | 514 | 20.35% |
| presentation | 710 | 28.53% | 688 | 27.88% |
| questionnaire | 1,499 | 61.56% | 1,515 | 60.19% |
| resume | 1,461 | 57.59% | 1,360 | 56.06% |
| scientific_publication | 445 | 17.30% | 450 | 17.81% |
| scientific_report | 856 | 34.27% | 899 | 35.85% |
| specification | 2,032 | 82.20% | 2,117 | 83.64% |
| Total | 14,076 | 35.19% | 14,151 | 35.38% |
The duplication rate does not depend on the particular split: applying the same pipeline to the validation split yields an overlap with training of 35.38%, against 35.19% for test, a difference of less than two tenths of a point. Had duplication arisen from an unlucky partition, the two splits would not agree so closely, and their agreement indicates that duplicates are distributed evenly throughout the corpus, and therefore that duplication is a property of how RVL-CDIP was assembled from IIT-CDIP and is independent of how it was subsequently divided. Re-partitioning the existing corpus therefore cannot remove the duplication, and duplicate pairs must be identified and removed, which is what the remediated variants of RVL-CDIP in Section 10 do.
6.5 Duplication and Label Error
Because Sections 5 and 6 report per-category rates over the same 16 categories, we can ask directly whether the two defects coincide, and across categories they do not: label error rate and duplication rate are almost uncorrelated (Pearson ; Spearman ). The extreme cases occur in both directions: specification combines the corpus's highest duplication (82.20%) with one of its lowest error rates (3.42%), while letter combines the highest error rate (31.26%) with low duplication (11.85%).
A plausible interpretation is that the two defects have different origins. Duplication results from templating: categories composed of standardized documents contain many duplicates, and standardized documents are also easy to label correctly, since their type is evident from their structure. Label error results from semantic proximity between categories, as in the letter/memo boundary, which is unrelated to whether documents recur.
If this interpretation is correct, the two confounds are independent and their effects on reported accuracy are cumulative. We treat this as a hypothesis, because a correlation over 16 category-level aggregates is weak evidence and is a statement about categories and not about documents. Section 11 tests the question at the level of individual documents, where the relevant annotations permit a direct join.
7 Axis III: Spurious Cues from Identification Codes
The preceding two sections concern defects in RVL-CDIP's labels and in the division of its splits. This section concerns a defect in the document images themselves: a visual feature that correlates strongly with the target label and is not related to the document type. In this section we describe the identification codes stamped on the pages of RVL-CDIP, measure how well the codes alone predict the category of a document, and describe how we detect the codes and remove them from all 400,000 documents; Section 10 measures the effect of the codes on trained classifiers.
7.1 Identification Codes
Nearly every document in RVL-CDIP has a short alphanumeric code stamped onto the page (Figure 12), which is a Bates number or a comparable identifier that was applied during legal discovery to index the document within the litigation. The codes were added after the documents were created, by the parties that produced them, to track the documents through a legal process.
The code of a document records where the document was placed in the numbering of the litigation, and the accuracy of a classifier that is given only the codes (Section 7.3) shows that this position is correlated with
| 86462730 | 52261 1486 |
|---|---|
| 2001211221 | 2061002293 |
| 86462932 | 1003044600 D |
| 50145702 | T11640-0529 |
Figure 12: Identification codes from RVL-CDIP, illustrating the range of position, orientation, typeface, and format.
the type of the document: documents with neighboring numbers tend to belong to the same category. The release of RVL-CDIP does not record how the documents were collected and numbered, so we cannot establish the cause of this correlation; one possible cause is that documents of the same kind were kept in the same files and were numbered together when the files were produced. A model that learns to use these codes therefore learns how the documents were numbered during the litigation, which is correlated with the label within RVL-CDIP and does not have any value for documents from other sources. A classifier that relies on the codes can change its prediction when a code is erased from the page, as in the example of Figure 13.
Recent work applying explainability methods to document classifiers observed that these codes are highly relevant features (Saifullah et al., 2024b), but did not pursue the observation.
7.2 Annotation and Distribution

Figure 14: Position of the detected identification codes on the page for five RVL-CDIP categories, as the share of the category's pages with a code at each position; all 16 categories are in Figure H.1.
We annotated identification codes in 11,200 documents sampled from RVL-CDIP and in all 3,482 documents of Tobacco3482, marking each code with a bounding box. Regions were cropped, rotated to horizontal where necessary, and transcribed with Amazon Texttract.
The codes are present on most documents: the RVL-CDIP sample contains 11,102 codes distributed over 10,306 documents, or 92.0% of the sample; some documents have more than one code, and 894 have none. Tobacco3482 is comparable at 92.8%, so that the codes are available to a classifier on about nine of every ten inputs.
Both the position and the content of the codes vary systematically by category. Positionally, the codes of each category have a distinct distribution over the page (Figure 14, and Figure H.1 in Appendix H for all 16 categories): codes in email documents cluster into roughly three regions, and the codes of handwritten documents lie almost all in one narrow region at the right edge of the lower half of the page. As to content, 10,099 of the 11,102 codes (91.0%) begin with a digit, and the distribution over that first digit differs between categories (Table H.1 in Appendix H). The extreme case is handwritten, in which approximately 99.9% of codes begin with the digit 5. A single character of the code is thus nearly sufficient to identify one of the sixteen categories.

handwritten
questionnaire
Figure 13: Document classifiers are sensitive to the removal of identification codes. After the code (marked in red) is erased from the page, a DiT classifier changes its prediction to an incorrect label.
7.3 Predictive Signal of Identification Codes
To measure the information available in the codes alone, we train a classifier on features derived only from the code, without the rest of the document. The features describe the position, dimensions, and orientation of its bounding box; the length and character composition of its text; the format of the text, by which we mean its pattern of digits and letters and its first one to five characters, each represented by the distribution over categories observed for it among the training documents; the categories of the training codes nearest to it in numeric value; the same description of a second code where the page has more than one; and the confidence of the OCR engine on the cropped code, together with whether OCR of the full page read the code and agreed with the reading of the crop (Appendix I).
A second configuration adds the class probabilities of a small convolutional network trained from scratch on the cropped code region, scaled to 32 by 256 pixels, so that the appearance of the code is available to the classifier as well as its transcription. For RVL-CDIP the codes are located by the detector of Section 7.4 and transcribed by OCR of the cropped regions, and an XGBoost classifier is trained on the 320,000 training documents and evaluated on the 40,000 test documents; for Tobacco3482 we use the annotated boxes and their transcriptions and report the mean over ten stratified splits into 2,611 training and 871 evaluation documents.
On RVL-CDIP's 16-way task the classifier yields an accuracy of from the code features and with the convolutional network added, against a chance rate of approximately , and on Tobacco3482's 10-way task, where it has 2,611 training documents rather than 320,000, it yields accuracies of and , against a chance rate of (Table 8).
For comparison, zero-shot CLIP, given the entire document image, achieves on RVL-CDIP and on Tobacco3482 in the evaluation of Siddiqui et al. (2021), and on RVL-CDIP in our own evaluation of the CLIP ViT-L/14 model (Section 10), so that a gradient-boosted model that is given only the features of the codes exceeds zero-shot CLIP by between 25.5 and 30.0 points on RVL-CDIP and by seven points on Tobacco3482.
Table 8: Accuracy of an XGBoost classifier on identification-code features, alone and with a CNN on the cropped code, and on the file name of the page. Zero-shot CLIP from Siddiqui et al. (2021).
| Model | RVL-CDIP | Tob.3482 |
|---|---|---|
| Random chance | 6.25 | 17.8 |
| Zero-shot CLIP | 39.2 | 49.5 |
| Code feats. | 69.2 | 56.5 |
| Code feats. +CNN | 69.9 | 57.8 |
| File name only | 68.8 | 55.6 |
A document's category can be predicted equally well—without the page image—from the identifier of the page in the dataset. The original release of RVL-CDIP identifies each image by its file path, and its label files list the images by these paths, which are named after the codes: in a path such as imagesq/q/o/c/qoc54c00/80035521.tif, the folder is the document identifier of the source archive and the file name is the Bates number of the document, or the range of numbers for a multi-page document. Applying the format, prefix, and nearest-number features to the file name alone, with no pixels, no detector, and no OCR, yields an accuracy of on RVL-CDIP, which is within half a point of the classifier that uses the codes on the page, and adding the folder identifier raises this to ; the file names of Tobacco3482 follow the same convention and yield an accuracy of 55.6% (last row of Table 8). The standard RVL-CDIP benchmark setup does not provide the file names to a model, so that a model can obtain this information only from the codes on the page, but the result shows that the information is in the numbering of the documents and does not depend on our detection and transcription, and that it can be reproduced from the paths of the public release (Appendix J).
7.4 Detection and Removal at Scale
Establishing what the codes contribute to a trained classifier requires removing them from all 400,000 documents, for which we trained a YOLOv8 object detector on 8,000 annotated RVL-CDIP training documents. On held-out data the detector achieves precision of 97.5%, recall of 96.8%, and of 97.1% on RVL-CDIP, and precision of 97.8%, recall of 93.7%, and of 95.7% on Tobacco3482, the latter without any Tobacco3482 training data, which indicates that the detector trained on RVL-CDIP is also accurate on Tobacco3482. We applied it to the remaining 388,800 RVL-CDIP documents and replaced every detected region with white pixels, producing code-free versions of both corpora, which we release together with the detector weights and the detected regions (Appendix A). The change in the accuracy of a classifier when the codes are removed is reported in Section 10, with the other accuracy experiments, and Section 11 examines how the removal interacts with label correction, de-duplication and the choice of OCR engine.
8 Axis IV: Distributional Narrowness
The preceding sections examine problems within RVL-CDIP; this section examines the range of documents the corpus does not cover and describes the two evaluation sets with which Section 10 measures how models trained on it behave outside that range.
8.1 Distributional Coverage of RVL-CDIP
RVL-CDIP is limited in three respects, all of which result from its sampling from IIT-CDIP. In time, every document predates 2006, and most were created decades earlier; in medium, the documents are scans of physical paper with the noise of the scanning equipment of their era, and almost none are born-digital; and in domain, the documents concern a single industry, and largely a single episode of litigation within it.
As we showed in Section 2.2, 23 of the 34 papers that we surveyed evaluate document classification only on RVL-CDIP, which consists of scanned tobacco-industry documents produced before 2006. RVL-CDIP cannot show whether a model trained on it classifies a born-digital invoice from 2024, and because no alternative benchmark of comparable scale exists, this question has largely not been asked.
To examine it, we constructed evaluation data that differs from RVL-CDIP in time, medium and domain.
8.2 Out-of-Distribution Evaluation: RVL-CDIP-N and RVL-CDIP-O
Out-of-distribution behavior consists of two problems, both of which occur for a document classifier that is deployed on unconstrained input, and we constructed one evaluation set for each of them. The first is generalization: given a document that belongs to one of the sixteen categories but has a different source, does the model still classify it correctly? This is covariate shift in the vocabulary of the domain-adaptation literature, in that the distribution over inputs changes while the labeling function relating input to label does not. The second is abstention: given a document belonging to none of the sixteen categories, is the model's confidence in its prediction low enough that the document can be identified and set aside? In the terms of Yang et al. (2024) this is semantic shift, since the input belongs to a class outside the label set, and it is distinct from concept shift, in which the labels of inputs from the same classes change.
RVL-CDIP-N contains 1,002 documents that belong to the RVL-CDIP categories but are sampled from a different distribution (Figure 15). Sources are the public DocumentCloud repository, which hosts government, legal, and public-service documents released under freedom-of-information requests, and general web search. Roughly 65% of the DocumentCloud documents and 95% of the web-search documents are born-digital, whereas almost no RVL-CDIP document is, and the great majority postdate 2006. Annotation of RVL-CDIP-N followed the criteria of Section 4, including RVL-CDIP's own single-label conventions, so that a handwritten letter is labeled handwritten as it would be in the original corpus. We admitted only unambiguous instances of each category. The set covers twelve of the sixteen categories, because we did not find sufficient contemporary examples of advertisement, file_folder, presentation and scientific_report.
RVL-CDIP-O contains 2,915 documents belonging to none of the sixteen categories: court filings, instructional guides, sheet music, timelines, schedules, and others (Figure 16). These are sampled from the same two sources as RVL-CDIP-N, DocumentCloud and general web search, and are ordinary documents of types that the label set of the benchmark does not cover.
Both sets follow RVL-CDIP's own conventions so that the comparison is fair: we take only the first page of each document, convert to grayscale, and scale so that the larger dimension is 1000 pixels. Together they comprise 3,917 documents.
Since we released RVL-CDIP-N and RVL-CDIP-O (Larson et al., 2022), three other studies have evaluated RVL-CDIP classifiers on out-of-distribution data. He et al. (2023) alter RVL-CDIP pages synthetically, replacing words in the OCR text, merging word boxes, warping the page, or replacing its background with a natural photograph. Gu et al. (2023) remove four RVL-CDIP categories (letter, form, scientific_report and presentation) from training to serve as out-of-distribution data, and add scientific posters and the receipts of the CORD dataset (Park et al., 2019). Sheikh et al. (2025) collected about 38,000 images from the web, roughly half of them in five RVL-CDIP categories and the rest in five categories that RVL-CDIP does not have, among them business cards, certificates and menus. We do not evaluate our models on these sets. Two of the document types that these studies treat as out of distribution are part of RVL-CDIP categories: budget contains receipts and other receipt-like documents, and resume contains business cards (Table 5). Because Harley et al. (2015) did not publish definitions of the categories (Section 4), the authors of these studies could not have known which document types each category includes, and part of the data that they use as out of distribution belongs to the label set of RVL-CDIP.
handwritten
letter
invoice
resume
form

Figure 15: Documents from RVL-CDIP-N, shown prior to grayscale conversion. These belong to the RVL-CDIP categories but are largely born-digital, post-2006, and unrelated to the tobacco industry.
Larson and Leach Figure 16: Documents from RVL-CDIP-O, shown prior to grayscale conversion. Each is an unremarkable document that belongs to none of the 16 RVL-CDIP categories. 8.3 Measuring Abstention To measure performance on RVL-CDIP-N, we use accuracy, because the documents of RVL-CDIP-N have correct labels; we report micro accuracy in Section 10.4, alongside the remediation conditions, and macro accuracy in Appendix K. RVL-CDIP-O requires different treatment, because the models were never trained to emit an “other” class. We therefore assess whether a model’s confidence separates in-domain from out-of-domain input. For a document image x, let f be a trained classifier and z = f(x) ∈ R K its vector of logits over the K = 16 categories, with zi the logit of category i; we consider two confidence functions of z. The maximum softmax probability (Hendrycks and Gimpel, 2017) is maxi s(z)i , the largest of the normalized logits s(z)i = e zi PK j=1 e zj , and the energy score (Liu et al., 2020) is computed from the logits directly as E(z; T) = T · logX K j=1 e zj/T , where T is a temperature parameter, set to 1. Higher values of either function indicate that the document is more likely to belong to one of the 16 categories. Either can be thresholded 32 to abstain, and we report the area under the ROC curve, which measures separability across all thresholds. We report AUC in two settings: T-O, separating the RVL-CDIP test split from RVL-CDIP-O, and N-O, separating RVL-CDIP-N from RVL-CDIP-O. The second is the harder and the more realistic setting, because the model must distinguish documents it should classify from documents it should refuse when neither resembles its training data. The results are reported in Section 10.5; false positive rate at 95% true positive rate, and two further confidence functions—MaxLogit (Hendrycks et al., 2022) and GEN (Liu et al., 2023)—are reported in Appendix L, but neither function changes any conclusion of that section.
9 Axis V: OCR Engine Choice
Unlike the four preceding axes, which concern properties of the corpus itself, Axis V concerns the protocol by which it is used: the corpus was released as a dataset of images, so every paper reporting a text or layout model has had to produce the tokens, and usually their bounding boxes, with an OCR engine of its own choosing, frequently without recording which. “Accuracy on RVL-CDIP” therefore does not denote a single quantity for these models, since two papers may report scores on the same 40,000 test images after giving their models materially different text, which is a failure of coordination between papers, for which no individual paper is at fault, and which has the largest consequences for the highest-ranked models, almost all of which have been multi-modal architectures since roughly 2020 (Table 2).
9.1 Evidence from Prior Work
Our earlier work gave two indications that the choice of engine has a substantial effect. Both arose incidentally while we studied other questions, and neither is a controlled experiment, since both compare our own runs with published results. In our out-of-distribution study (Larson et al., 2022), LayoutLMv2 evaluated on the RVL-CDIP test split with Tesseract obtained 88.7%, against the 95.3% its authors reported with a proprietary Microsoft Azure OCR model; the architecture, weights and test images were the same, and the gap is 6.6 points. In our label-error study (Larson et al., 2023), BERT and RoBERTa trained on AWS Textract output scored 2.63 and 2.65 points above their published results, although that comparison also involves different training runs.
9.2 OCR Reporting in Prior Work
Before we measure the effect of the OCR engine on the accuracy of a classifier, we ask how much the published papers report about the OCR engines that they used. We extend the survey of the 34 RVL-CDIP papers of Section 2 with three questions, which apply to the 24 of them that report a model using text or layout: whether the paper names the OCR engine that produced its RVL-CDIP text, whether it reports any measurement of OCR quality, and whether any of its experiments varies the engine (Table 9).
Of the 24 papers, 23 use an external OCR engine, Donut being the exception because it reads the page image directly. Nineteen of the 23 name the engine that produced their RVL-CDIP text, VLCDoC names Tesseract only as an example of an off-the-shelf system, and three do not name it, among them LayoutLM, which names Tesseract for its pre-training
Table 9: OCR engine used for the RVL-CDIP text, as stated in each surveyed paper with a text or layout model. No paper reports a measurement of OCR quality on RVL-CDIP, and only UDoc compares engines.
| Paper | Engine | Paper | Engine |
|---|---|---|---|
| LayoutLLM (Fujitake) | EasyOCR | UDoc (Gu et al.) | |
| EAML (Bakkali et al.) | Tesseract 4.0 | LayoutLM (Xu et al.) | |
| Bi-VLDoc (Luo et al.) | Tesseract | MATrIX (Delteil et al.) | Textract |
| ERNIE-Layout (Peng et al.) | Microsoft OCR | MGDoc (Wang et al.) | EasyOCR |
| UDOP (Tang et al.) | - | Pramanik et al. | Tesseract |
| DocFormer (Appalaraju et al.) | Textract | Dauphinee et al. | Tesseract |
| StructuralLM (Li et al.) | Tesseract | SelfDoc (Li et al.) | Tesseract |
| LayoutLMv3 (Huang et al.) | Microsoft Read API | Zingaro et al. | |
| LiLT (Wang et al.) | TextIn API | VLCDoC (Bakkali et al.) | “e.g. Tesseract” |
| LayoutLMv2 (Xu et al.) | Microsoft OCR | Audebert et al. | Tesseract 4.0 |
| TILT (Powalski et al.) | Microsoft Azure OCR | Pham et al. | - |
| Wukong-Reader (Bai et al.) | in-house (Huawei) | Donut (Kim et al.) | none (OCR-free) |
Also reports 93.42, 93.96 and 94.10% with Tesseract, EasyOCR and Google OCR. Names Tesseract for the pre-training corpus only. The text released by Audebert et al..
corpus only. The 19 named engines are Tesseract in eight papers, EasyOCR in three, Microsoft OCR services in four, Amazon Textract in two, the TextIn API in one and an in-house engine in one, so that eight of the 19 depend on a commercial or in-house system. None of the 23 papers report a measurement of OCR quality on RVL-CDIP, and only UDoc (Gu et al., 2021) varies the engine, obtaining 93.42%, 93.96% and 94.10% with Tesseract, EasyOCR and Google OCR, a range of 0.68 points that is larger than many of the differences between neighboring models in Table 2. Where the engine is not named, the reported number cannot be reproduced even given the model code and the benchmark, since a necessary input to the model is unspecified.
9.3 Agreement Between OCR Engines
Downstream accuracy conflates OCR quality with a model's tolerance of OCR error, so before measuring the effect of the engines on a classifier we compare their output directly. Since no ground-truth transcription exists for RVL-CDIP, the error rate of neither engine can be measured, and we therefore measure how far the Textract and Tesseract 4.1.1 text layers disagree, over all 400,000 pages. For each page we count the words produced by each engine and compute two measures of disagreement, taking Textract as the reference only for normalization: the character edit distance divided by the length of the Textract text after whitespace is collapsed, and the overlap between the two multisets of words after lowercasing and stripping punctuation, which ignores reading order.
Textract produces 84.6 million words across the corpus and Tesseract 69.3 million, 18% fewer, and although the two engines produce no text on similar numbers of pages (15,979 and 13,833), only 4,253 pages are empty for both, so on thousands of pages one engine returns text and the other returns none. Our comparison does not show which engine is right on these pages, since the text returned may be text that the other engine missed or spurious output from marks on a page without text. File folders account for most of this,
Table 10: Agreement between the Textract and Tesseract 4.1.1 text layers on all RVL-CDIP pages (25,000 per category, 400,000 in all). Empty pages do not have any text. Character distance is the edit distance normalized by the Textract length, and word overlap is the between the two bags of lowercased, punctuation-stripped words; both are medians over the 374,439 pages on which neither engine is empty.
| Category | Words per page | Empty (%) | Char. distance | Word overlap | ||
|---|---|---|---|---|---|---|
| Textract | Tesseract | Textract | Tesseract | |||
| advertisement | 97 | 51 | 3.1 | 11.9 | 0.76 | 0.23 |
| budget | 153 | 107 | 0.7 | 1.6 | 0.58 | 0.46 |
| 124 | 118 | 0.0 | 0.2 | 0.11 | 0.85 | |
| file_folder | 4 | 6 | 54.3 | 22.6 | 0.86 | 0.17 |
| form | 164 | 139 | 0.3 | 0.8 | 0.35 | 0.61 |
| handwritten | 95 | 61 | 1.6 | 10.7 | 0.73 | 0.09 |
| invoice | 132 | 100 | 0.4 | 1.0 | 0.52 | 0.45 |
| letter | 205 | 191 | 0.2 | 0.6 | 0.10 | 0.87 |
| memo | 196 | 183 | 0.2 | 0.9 | 0.10 | 0.88 |
| news_article | 484 | 302 | 0.3 | 0.7 | 0.71 | 0.49 |
| presentation | 145 | 139 | 1.4 | 0.9 | 0.16 | 0.84 |
| questionnaire | 237 | 197 | 0.5 | 1.2 | 0.27 | 0.70 |
| resume | 327 | 314 | 0.1 | 0.1 | 0.08 | 0.89 |
| scientific_publication | 628 | 524 | 0.3 | 0.5 | 0.64 | 0.71 |
| scientific_report | 174 | 155 | 0.5 | 1.0 | 0.17 | 0.80 |
| specification | 219 | 183 | 0.1 | 0.4 | 0.38 | 0.68 |
| All | 211 | 173 | 4.0 | 3.5 | 0.34 | 0.69 |
with Textract producing no text on 54% of them and Tesseract on 23%, while on handwritten pages and advertisements the pattern is the reverse and Tesseract produces no text on 11 to 12% against 2 to 3% for Textract. Where both engines produce text, the disagreement depends strongly on the category (Table 10). On letters, memos, email and resumes the engines differ on a median 8 to 11% of characters and share 85 to 89% of their words, whereas on news articles and scientific publications the character distance is 64 to 71% while the word overlap is 49 to 71%, so that part of the difference there is due to reading order. On handwritten pages the two engines share only 9% of their words and so produce what are effectively different transcriptions, and advertisements and file folders are nearly as divergent.
The magnitude of the effect is measured in Section 10.6, and independently of it, a benchmark that is used for text-based models but does not provide text leaves a necessary input to the discretion of each user, which makes comparisons between users unsound to that extent. We release both text layers over the full corpus, with bounding boxes and with the engine version recorded per document, so that later work can hold OCR fixed by using a published one or measure its own sensitivity by running against both. The general form of this requirement is discussed in Section 12.
10 Re-Benchmarking RVL-CDIP
In the preceding sections we examined the defects of RVL-CDIP one at a time. In this section, we measure how the accuracy of 24 models on the RVL-CDIP test split and on RVL-CDIP-N changes when the defects are removed, separately and together, how well these models abstain on RVL-CDIP-O, and how their accuracy depends on the OCR engine.
10.1 Models
We evaluate twenty-five models in seven groups, which are the row groups of the tables in this section. Seven image models are fine-tuned on the page image, of which AlexNet (Krizhevsky et al., 2012), GoogLeNet (Szegedy et al., 2015), SqueezeNet (Iandola et al., 2016), VGG-16 (Simonyan and Zisserman, 2015), ResNet-50 (He et al., 2016) and ResNeXt-50 (Xie et al., 2017) are initialized with ImageNet weights and DiT-base (Li et al., 2022) with weights from self-supervised pretraining on IIT-CDIP (Lewis et al., 2006), the collection from which RVL-CDIP was sampled. Two text models, BERT-base (Devlin et al., 2019) and RoBERTa-base (Liu et al., 2019), take the first 512 tokens of the OCR text of a page as input, and two multi-modal models take the OCR words together with their positions on the page, LayoutLM (Xu et al., 2020) without the page image and LayoutLMv3 (Huang et al., 2022) with it; both were also pretrained on IIT-CDIP, as is usual for the document models evaluated on RVL-CDIP. Each of these eleven models is trained once for every combination of label set and identification-code condition in Section 10.2, and the tables report the mean over three random seeds. All text and word positions are produced by Amazon Textract from the pages of each condition.
Two linear baselines, each a single run, show the accuracy of a pipeline of low engineering complexity, in which no neural network is trained: a linear SVM (Fan et al., 2008) on TF-IDF features (Salton and Buckley, 1988) of the OCR text, and the same SVM on these features concatenated with frozen SigLIP image embeddings (Zhai et al., 2023), which is the most accurate of the linear SVMs that we trained (Tables K.1 and K.2 in Appendix K show all of them). The remaining twelve models are evaluated with their published weights. DocXClassifier (Saifullah et al., 2024a) and Donut (Kim et al., 2022) are public checkpoints that their authors fine-tuned on the original RVL-CDIP training split; we use them as released and did not retrain them, because of the computational cost of doing so for every condition.
The other ten of these twelve models are zero-shot classifiers, which are not trained on RVL-CDIP and choose among the sixteen category names. Four of them are vision-language models that classify the page image, CLIP (Radford et al., 2021), ALIGN (Jia et al., 2021), SigLIP (Zhai et al., 2023) and SigLIP 2 (Tschannen et al., 2025). The other five classify the OCR text of the page: Jev 1.13 (Almeida, 2026), a hosted model designed to choose among a given set of options, and four large language models, Llama 4 Maverick (Meta AI, 2025), gpt-oss-20b (OpenAI, 2025), Qwen 3 32B (Yang et al., 2025) and Mistral 7B (Jiang et al., 2023), which are given a prompt that lists the category names (Prompt 1 of Appendix M). We also give Jev the page image in place of the OCR text, an input that its API offers as a preview, and list this run with the zero-shot image models as Jev 1.13, image; elsewhere in the text, Jev without a qualifier refers to the run on the OCR text. Appendix N compares the accuracy of the four language models under the three prompts of that appendix. The four language models are scored on the pages that have OCR text (38,377 of the 40,000 test pages and 1,001 of the 1,002 pages of RVL-CDIP-N); we did not run them on the pages without identification codes because of the cost, so that they do not have entries in the columns in which the codes are removed. Since these ten models were never trained on RVL-CDIP, they cannot have learned its label errors, its duplicated test pages or its identification codes, and their accuracy changes across the conditions only through the test pages and labels, which makes them a control for the retrained models. Appendix O lists the pretrained weights, the input and the hyperparameters of every model.
10.2 Corpus and Protocol Variants
We evaluate every condition on the de-identified corpus of Section 3. In the original condition, we keep the labels, duplicates and identification codes of the published corpus, so that this condition differs from it only in the replaced sensitive data. In the other conditions, we remove the defects of Sections 5 to 7, singly and together. Of the 40,000 test pages, the review of Section 5 found a label error on 4,317 (unknown, wrong or mixed) and marked 402 as unsure. In the dropped conditions, we remove all 4,719 of these pages. In the fixed conditions, we give the corrected category to the 1,166 pages for which the review assigned one and remove the other 3,553 pages, which are 2,511 unknown, 640 mixed and 402 unsure pages. In the de-duplicated conditions, we keep only the 25,923 test pages that have no detected duplicate in the training split (Section 6). In the code-removal conditions, we replace the codes with white pixels on the page and delete them from the OCR text (Section 7).
We apply a remediation either to the test pages only or to the training split as well. In the test-side conditions, we score a model trained on the original training split on the changed test pages or labels, to measure how much of its accuracy depends on the defect. In the retrained conditions (+RT), we train the model and select its checkpoint on training and validation splits with the same remediation, to measure the accuracy of a model that never saw the defect. After the label correction, 296,605 of the 320,000 training pages and 36,380 of the 40,000 validation pages remain. We apply de-duplication to the test pages only, since we did not retrain any model on a de-duplicated training split, and the validation split still overlaps with the training split. In the fully remediated condition, we combine the corrected labels, code removal in training and testing, and the de-duplicated test pages; for the models that we do not retrain, we apply only the test-side changes. We list the eleven conditions in Table 11 with their numbers of test pages, which differ because we remove pages when we correct the labels and when we de-duplicate.
We report accuracy micro-averaged over the test pages of a condition. Besides the test split, we evaluate the four training variants (original or corrected labels, each with or without codes) on the 1,002 pages of RVL-CDIP-N, which does not contain identification codes or duplicates of training pages, and we measure how well they separate in-scope pages from the 2,915 out-of-scope pages of RVL-CDIP-O (Section 8). We give the text and multi-modal models the Textract OCR of the pages of each condition throughout, and we vary the OCR engine only in Section 10.6. The public checkpoints, the zero-shot image models, Jev and the four large language models have a single set of weights and therefore appear only in the test-side conditions.
Table 11: The eleven conditions of Table 12, under the column names used there. Trained on lists the labels and pages of the training and validation splits, and the number of test pages.
| Condition | Test pages | Test labels | Trained on | |
|---|---|---|---|---|
| All test pages | ||||
| Orig. | all | original | original labels, with codes | 40,000 |
| Drop. | wrong labels removed | original | original labels, with codes | 35,280 |
| Fixed | uncorrectable removed | corrected | original labels, with codes | 36,446 |
| Fixed+RT | uncorrectable removed | corrected | corrected labels, with codes | 36,446 |
| De-duplicated test pages | ||||
| Orig. | de-duplicated | original | original labels, with codes | 25,923 |
| Drop. | wrong labels removed, de-dup. | original | original labels, with codes | 22,530 |
| Fixed | uncorrectable removed, de-dup. | corrected | original labels, with codes | 23,132 |
| Fixed+RT | uncorrectable removed, de-dup. | corrected | corrected labels, with codes | 23,132 |
| Codes removed from all test pages | ||||
| Test | all | original | original labels, with codes | 40,000 |
| +RT | all | original | original labels, without codes | 40,000 |
| Full | uncorrectable removed, de-dup. | corrected | corrected labels, without codes | 23,132 |
10.3 Joint Remediation
Table 12 reports the accuracy of the models of Section 10.1 on the test split under the eleven conditions of Section 10.2.
The first four columns show the effect of the label errors. Every model is more accurate when the 4,719 test pages with a label error or an unsure label are removed (Drop.), by 2.3 to 4.1 points for the retrained models and the public checkpoints and by 3.1 to 6.8 points for the zero-shot models. When the predictions of the same models are scored against the corrected labels (Fixed), the gain over the original condition is smaller, 0.3 to 1.5 points for the image models, BERT, RoBERTa and LayoutLM, 0.1 points for DocXClassifier, and 2.2 and 1.7 points for the two SVMs, and LayoutLMv3 and Donut, the two most accurate models under the original labels, are 0.2 and 0.3 points less accurate than in the original condition. The corrected test split contains the 1,166 pages whose label was changed, and a model trained on the original labels mostly predicts the original label for them: LayoutLMv3 predicts the original label for 75.8% of these pages and the corrected label for 15.7%, against 56.8% and 34.6% for the TF-IDF SVM. The original test split therefore rewards a model for reproducing the errors of the training labels, and the two most accurate models under the original labels are the two that become less accurate when the test labels are corrected. Retraining on the corrected labels (Fixed+RT) adds 2.2 to 2.8 points for every retrained model, so that the retrained models are 2.7 to 4.5 points more accurate than in the original condition, with the smallest total gain for LayoutLMv3 (2.7) and the largest for the two SVMs (4.5 and 4.0).
The next four columns repeat these conditions on the 25,923 test pages for which no training duplicate was detected. Under the original labels the retrained models and the public checkpoints are 1.8 to 4.2 points less accurate on these pages than on all test pages: the decrease is 2.9 to 3.5 points for the six CNNs, 2.3 to 3.0 points for DiT, BERT, RoBERTa,
Table 12: Accuracy (%) on the RVL-CDIP test split under the eleven conditions of Table 11, all on the de-identified corpus of Section 3. Retrained models are means over three seeds (one run for the linear baselines), and values marked † apply the test-side changes only. Models marked ‡ are scored on the 38,377 test pages that have OCR text.
| Model | All test pages | De-duplicated | Codes removed | Full | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Orig. | Drop. | Fixed | Fixed+RT | Orig. | Drop. | Fixed | Fixed+RT | Test | +RT | ||
| 40,000 | 35,280 | 36,446 | 36,446 | 25,923 | 22,530 | 23,132 | 23,132 | 40,000 | 40,000 | 23,132 | |
| Image | |||||||||||
| AlexNet | 89.3 | 92.5 | 90.2 | 92.8 | 85.8 | 90.0 | 88.5 | 90.4 | 84.9 | 88.5 | 90.2 |
| GoogLeNet | 89.2 | 92.6 | 90.3 | 93.2 | 86.0 | 90.3 | 88.7 | 91.0 | 85.7 | 88.5 | 90.8 |
| SqueezeNet | 88.7 | 92.3 | 90.1 | 92.6 | 85.8 | 90.3 | 88.9 | 90.8 | 83.8 | 87.7 | 90.5 |
| VGG-16 | 91.3 | 94.3 | 91.9 | 94.6 | 88.1 | 92.1 | 90.5 | 92.6 | 87.5 | 90.8 | 92.3 |
| ResNet-50 | 90.9 | 94.1 | 91.7 | 94.3 | 87.7 | 91.9 | 90.3 | 92.4 | 87.7 | 90.2 | 92.1 |
| ResNeXt-50 | 91.3 | 94.4 | 92.0 | 94.7 | 88.2 | 92.3 | 90.7 | 92.7 | 88.2 | 90.6 | 92.6 |
| DiT-base | 92.8 | 95.6 | 93.1 | 95.9 | 90.4 | 94.1 | 92.3 | 94.5 | 89.4 | 92.2 | 94.3 |
| Text | |||||||||||
| BERT-base | 92.3 | 95.3 | 93.1 | 95.7 | 89.4 | 93.4 | 92.0 | 93.8 | 90.9 | 91.4 | 93.4 |
| RoBERTa-base | 92.5 | 95.8 | 93.6 | 96.0 | 89.7 | 94.0 | 92.7 | 94.4 | 90.7 | 91.6 | 94.1 |
| Multi-modal | |||||||||||
| LayoutLM-base | 93.4 | 96.4 | 94.1 | 96.7 | 91.0 | 94.9 | 93.4 | 95.4 | 91.9 | 92.6 | 95.2 |
| LayoutLMv3-base | 94.8 | 97.2 | 94.6 | 97.5 | 93.0 | 96.2 | 94.3 | 96.6 | 92.7 | 94.4 | 96.5 |
| Linear baselines | |||||||||||
| TF-IDF SVM | 88.9 | 93.0 | 91.2 | 93.4 | 84.7 | 90.0 | 89.1 | 90.3 | 88.8 | 88.8 | 90.3 |
| TF-IDF + SigLIP SVM | 93.1 | 96.8 | 94.8 | 97.1 | 90.6 | 95.5 | 94.4 | 96.0 | 92.5 | 92.8 | 96.0 |
| Public checkpoints | |||||||||||
| DocXClassifier | 94.0 | 96.7 | 94.1 | - | 91.7 | 95.3 | 93.4 | - | 93.2 | - | |
| Donut | 95.2 | 97.6 | 94.9 | - | 93.4 | 96.6 | 94.6 | - | 84.2 | - | |
| Zero-shot, image | |||||||||||
| CLIP ViT-L/14 | 43.7 | 46.8 | 46.6 | - | 44.9 | 49.2 | 48.9 | - | 44.1 | - | |
| ALIGN | 47.0 | 51.0 | 51.2 | - | 47.1 | 52.0 | 52.2 | - | 47.4 | - | |
| SigLIP | 56.2 | 61.4 | 61.3 | - | 57.6 | 64.0 | 64.1 | - | 58.1 | - | |
| SigLIP 2 | 54.0 | 58.8 | 58.7 | - | 53.9 | 59.6 | 59.6 | - | 54.6 | - | |
| Jev 1.13, image | 72.1 | 79.0 | 78.5 | - | 73.3 | 81.4 | 81.2 | - | 71.5 | - | |
| Zero-shot, text | |||||||||||
| Jev 1.13 | 67.0 | 72.9 | 72.3 | - | 66.5 | 73.0 | 72.5 | - | 67.4 | - | |
| Llama 4 Maverick | 67.6 | 73.5 | 72.8 | - | 65.3 | 72.0 | 71.6 | - | - | - | - |
| gpt-oss-20b | 64.6 | 70.2 | 69.7 | - | 63.8 | 70.1 | 69.7 | - | - | - | - |
| Qwen 3 32B | 62.3 | 67.3 | 66.4 | - | 62.6 | 68.9 | 68.5 | - | - | - | - |
| Mistral 7B | 57.0 | 61.6 | 60.9 | - | 54.3 | 59.8 | 59.4 | - | - | - | - |
LayoutLM, DocXClassifier and the SVM on TF-IDF text and SigLIP embeddings, 1.8 points for LayoutLMv3 and Donut, and 4.2 points for the TF-IDF SVM. The five zero-shot image models and Jev, which do not have access to the training split, change by between -0.6 and +1.4 points. Section 6.5 suggested that duplicated pages are mostly standardized documents whose type is evident from their structure, which would make them easier to classify for any model; the zero-shot results do not show this, since the de-duplicated pages are not harder to classify for a model that has not seen their duplicates, and the decrease of the trained models is therefore not due to the pages that remain being harder in themselves. The four large language models, which are scored on the pages with OCR text, change by between -2.6 and +0.3 points. With retraining on the corrected labels the decrease is between 0.9 points for LayoutLMv3 and 3.1 points for the TF-IDF SVM. Since the zero-shot models show that these pages are not harder to classify, this decrease of 0.9 to 3.1 points is the part

Figure 17: Test accuracy with and without identification codes, one line per model. Left: models trained on pages with codes and the original labels, tested on pages with the codes and with the codes removed. Middle: the same models against models trained and tested on pages without codes. Right: the left panel for models trained on the corrected labels. Retrained models are means over three seeds (one run for the linear baselines).
of a retrained model's accuracy on the full test split that depends on having seen a duplicate of the test page during training.
Figure 17 shows the effect of the identification codes for each model as a pair of connected points. Under the original labels, removing the codes from the test pages lowers the accuracy of the seven image models by 3.1 to 4.8 points, BERT and RoBERTa by 1.4 and 1.8 points, LayoutLM and LayoutLMv3 by 1.5 and 2.1 points and the two SVMs by 0.1 and 0.6 points, and it lowers the accuracy of the public Donut checkpoint from 95.2 to 84.2% and that of DocXClassifier by 0.9 points. The four zero-shot vision-language models and Jev, which were never trained on RVL-CDIP, are 0.3 to 1.8 points more accurate on the same pages.
Jev with the page image is 0.6 points less accurate, and all of this decrease falls on the file_folder category, in which its accuracy decreases from 79.9 to 69.4%, whereas its accuracy on the other fifteen categories changes by less than 0.1 points. Many file_folder pages show a folder cover on which the code is one of the few printed marks, so that removing it leaves a nearly blank page, which Jev then mostly assigns to scientific_publication or handwritten (Appendix K). The trained image models lose 3.3 to 5.2 points on the other fifteen categories and change by at most 0.5 points on file_folder, so that their decrease does not come from these pages. Apart from the folder covers, the pages therefore do not become harder to classify when the codes are erased, and the lower accuracy of the trained models is due to what these models had learned from the codes.

Figure 18: Test accuracy before and after the other remediations, each measured against the original condition (original labels, all test pages, codes present), one line per model: corrected test labels without retraining, corrected labels with retraining, test pages with a detected training duplicate removed, and all three remediations together. Values are those of Table 12.
Models that are trained and tested on pages without codes are less accurate than their counterparts with codes, by 0.5 to 1.0 points for the image models, 0.9 points for BERT and RoBERTa, 0.8 and 0.3 points for LayoutLM and LayoutLMv3 and at most 0.3 points for the SVMs, so that most of the loss at test time is recovered when the codes are also absent from training. Under the corrected labels the loss at test time is 0.5 to 1.5 points for the image models, 0.3 and 0.4 points for BERT and RoBERTa, 0.2 and 0.1 points for LayoutLM and LayoutLMv3, and at most 0.1 points for the SVMs. Correcting the labels therefore reduces the effect of the codes on every retrained model, to between a twentieth (LayoutLMv3) and two fifths (the TF-IDF SVM) of its size under the original labels.
Under the original labels, most of the effect falls on the 3,553 unknown, mixed and unsure test pages that we remove in the fixed conditions: on these pages, removing the codes lowers the accuracy of the image models by 11.6 to 18.3 points and that of BERT, RoBERTa, LayoutLM and LayoutLMv3 by 7.8 to 8.6 points, against 2.2 to 3.6 and 0.8 to 1.4 points on the other 36,446 test pages. A model trained on the original labels thus uses the codes mostly to reproduce the original label of a page whose content does not support that label, which the codes allow because they record the place of the page in the source archive, and that place is correlated with the original label (Section 7).
Figure 18 shows the label and duplicate comparisons of Table 12 in the same form, together with the fully remediated condition, in which the models are trained on the corrected labels and on pages without codes and are scored on the corrected, de-duplicated test pages without

Figure 19: Fully remediated test accuracy (corrected labels, codes removed from the training and test pages, test pages with a detected training duplicate left out) of the retrained models, with the linear SVMs on frozen features set against the fine-tuned models. The SVMs are those of Table K.1 without the handwriting-token and Tesseract variants.
codes. In this condition the retrained models are 0.9 to 2.9 points more accurate than in the original condition, because their gain from the label corrections (2.7 to 4.5 points) is larger than their combined loss from the removal of the duplicates and the codes when these are measured under the corrected labels (0.9 to 3.1 and at most 0.4 points); LayoutLM and LayoutLMv3 gain 1.8 and 1.7 points. The codes contribute little to this difference once the labels are corrected and the models retrained, since the fully remediated accuracy of every retrained model is within 0.4 points of its accuracy on the same de-duplicated pages with codes (Fixed+RT, de-duplicated). Donut, for which no retrained version exists, is 9.3 points less accurate than in the original condition with the test-side changes alone (86.0 against 95.2%), and DocXClassifier 0.6 points.
Figure 19 ranks the retrained models by their fully remediated accuracy and separates the linear SVMs on frozen features from the fine-tuned models. The SVM on TF-IDF text concatenated with SigLIP embeddings obtains 96.0%, between LayoutLM at 95.2% and LayoutLMv3 at 96.5%, and the same SVM with ImageNet ResNet-50 features in place of the SigLIP embeddings obtains 94.6%, above DiT at 94.3%, RoBERTa at 94.1% and BERT at
93.4%, although the ResNet-50 features alone yield an accuracy of 80.4% and the TF-IDF text alone 90.3% (Table K.1).
10.4 Accuracy on RVL-CDIP-N
Table 13 shows the accuracy of the same models on the 1,002 pages of RVL-CDIP-N, which does not have identification codes, training duplicates or label corrections of its own, so that a model's accuracy there depends only on whether it was trained on the original labels and pages, on the corrected labels, on the code-free pages, or on both. Training on the corrected labels raises the accuracy of every retrained model on RVL-CDIP-N, by 10.0 to 15.7 points for the seven image models (from between 61.4 and 71.2% to between 73.1 and 86.9%), by 5.1 points for BERT, 3.8 for RoBERTa and 5.7 for LayoutLM, and by 7.5 points for the SVM on TF-IDF text and SigLIP embeddings, while the TF-IDF SVM gains only 1.1 points. For the image models and LayoutLMv3 these gains are several times as large as their gains on the test split, which are at most 4.0 points, so that for these models the test split understates how much the label errors reduce accuracy on documents from other sources.
On RVL-CDIP-N, LayoutLMv3 gains 13.4 points, from 83.7 to 97.2%, and almost all of this gain is in one category: the three models trained on the original labels classify between 16 and 31% of the 176 handwritten pages of RVL-CDIP-N correctly and assign most of the others to letter, memo, presentation and scientific_report, whereas the models trained on the corrected labels classify 93% of them correctly. For the SVM on TF-IDF text, the same category gains most from a page-level signal provided by the OCR engine: when two
Table 13: Accuracy (%) on RVL-CDIP-N. Left, the retrained models by training variant (means over three seeds, one run for the linear baselines); right, the public checkpoints and zero-shot models, which were not retrained. Models marked ‡ are scored on the 1,001 pages that have OCR text. Δ is the difference between Both and Original.
| Model | Original | Fixed | No codes | Both | Δ |
|---|---|---|---|---|---|
| Image | |||||
| AlexNet | 61.4 | 73.1 | 59.9 | 70.2 | +8.8 |
| GoogLeNet | 64.0 | 76.1 | 61.7 | 72.9 | +8.8 |
| SqueezeNet | 66.4 | 76.4 | 63.0 | 73.7 | +7.3 |
| VGG-16 | 66.8 | 79.6 | 67.0 | 77.7 | +10.9 |
| ResNet-50 | 66.6 | 78.1 | 63.6 | 76.7 | +10.1 |
| ResNeXt-50 | 66.8 | 79.5 | 66.6 | 76.8 | +10.0 |
| DiT-base | 71.2 | 86.9 | 71.4 | 84.2 | +13.0 |
| Text | |||||
| BERT-base | 86.6 | 91.7 | 86.4 | 91.6 | +5.0 |
| RoBERTa-base | 88.8 | 92.5 | 87.8 | 93.4 | +4.7 |
| Multi-modal | |||||
| LayoutLM-base | 91.0 | 96.7 | 90.0 | 96.6 | +5.6 |
| LayoutLMv3-base | 83.7 | 97.2 | 85.6 | 96.1 | +12.3 |
| Linear baselines | |||||
| TF-IDF SVM | 84.6 | 85.7 | 84.5 | 86.1 | +1.5 |
| TF-IDF + SigLIP SVM | 89.8 | 97.3 | 92.0 | 97.0 | +7.2 |
| Model | Acc. |
|---|---|
| Public checkpoints | |
| DocXClassifier | 75.0 |
| Donut | 78.9 |
| Zero-shot, image | |
| CLIP ViT-L/14 | 82.7 |
| ALIGN | 87.7 |
| SigLIP | 92.3 |
| SigLIP 2 | 93.1 |
| Jev 1.13, image | 95.4 |
| Zero-shot, text | |
| Jev 1.13 | 84.8 |
| Llama 4 Maverick | 87.8 |
| gpt-oss-20b | 84.3 |
| Qwen 3 32B | 85.4 |
| Mistral 7B | 78.2 |
tokens are added to its input, the number of words on the page and the share of them that Textract classifies as handwritten, the SVM trained on the corrected labels classifies 93.8% of the handwritten pages of RVL-CDIP-N correctly instead of 65.9%, and its accuracy on RVL-CDIP-N rises from 85.7 to 92.1%, against 1.2 points on the test split (Appendix K).
Removing the identification codes from the training pages lowers the RVL-CDIP-N accuracy of the corrected-label image models by 1.4 to 3.3 points and that of LayoutLMv3 by 1.1, and changes the accuracy of BERT, RoBERTa, LayoutLM and the two SVMs by at most one point. Under the corrected labels, every retrained model that reads text except the TF-IDF SVM is more accurate on RVL-CDIP-N than any fine-tuned image model, with the SVM on TF-IDF text and SigLIP embeddings at 97.3%, LayoutLMv3 at 97.2%, LayoutLM at 96.7%, RoBERTa at 92.5% and BERT at 91.7%, whereas the best fine-tuned image model, DiT, obtains 86.9% and the public DocXClassifier and Donut checkpoints 75.0 and 78.9%. On RVL-CDIP-N, SigLIP 2 and SigLIP, which were never trained on RVL-CDIP, obtain 93.1 and 92.3% and so exceed every image model fine-tuned on the corpus, Jev, a zero-shot model that reads the Textract text, obtains 84.8%, and the four large language models are between 78.2 and 87.8% accurate, although the two SigLIP models classify only 54.0 and 56.2% of the original test split correctly (Table 12). Given the page image, Jev obtains 95.4% on RVL-CDIP-N, which is more than any model trained on the original labels (at most 91.0%, for LayoutLM) and less than LayoutLM, LayoutLMv3 and the SVM on TF-IDF text and SigLIP embeddings trained on the corrected labels (96.7 to 97.3%); most of its gain over the OCR text is on the handwritten pages, of which it classifies 80% correctly instead of 22%. A model's accuracy on the RVL-CDIP test split is therefore a poor guide to its accuracy on contemporary documents of the same categories.
Figure 20 plots the accuracy of each model on the test split against its accuracy on RVL-CDIP-N. Under the original labels the seven fine-tuned image models are 21.6 to 27.9 points less accurate on RVL-CDIP-N than on the test split, the DocXClassifier and Donut checkpoints 19.1 and 16.3 points, LayoutLMv3 11.1 points, and BERT, RoBERTa and LayoutLM 5.7, 3.7 and 2.4 points, whereas the four zero-shot vision-language models are 36.1 to 40.7 points more accurate there, Jev 17.8 points with the OCR text and 23.3 points with the page image, and the four large language models 19.7 to 23.1 points. Under the corrected labels the difference decreases to between 9.0 and 19.7 points for the image models, to 4.0 and 3.5 points for BERT and RoBERTa, and to at most 0.3 points for LayoutLM, LayoutLMv3 and the SVM on TF-IDF text and SigLIP embeddings. For these three models the difference between the test split and RVL-CDIP-N almost disappears when they are trained on the corrected labels, which suggests that much of their lower accuracy on RVL-CDIP-N under the original labels is related to the label errors, whereas the image models are still 9.0 to 19.7 points less accurate on RVL-CDIP-N when they are trained on the corrected labels.
10.5 Abstention on RVL-CDIP-O
This subsection reports the two abstention settings of Section 8, T-O and N-O, as AUC under maximum softmax probability and the energy score, for thirteen models trained on the original labels: the five CNNs, BERT, RoBERTa, LayoutLM and LayoutLMv3 of Section 10.1, and the published RVL-CDIP checkpoints of DiT-base, DiT-large, DocXClassifier and Donut. Four zero-shot vision-language models (CLIP ViT-L/14, ALIGN, SigLIP and SigLIP 2) serve

Figure 20: Test accuracy against accuracy on RVL-CDIP-N, one point per model; points below the diagonal are less accurate on RVL-CDIP-N than on the test split. Left: models trained and tested with the original labels. Right: models retrained on the corrected labels; the public checkpoints and the zero-shot models are scored against the corrected test labels and keep their single RVL-CDIP-N value. The four large language models (Maverick, gpt-oss, Qwen, Mistral) are scored on the pages that have OCR text.
as a control. Every image of the three sets is converted to grayscale, because the released RVL-CDIP-O images are in color and color alone would identify the out-of-scope documents.
The results of the RVL-CDIP-O experiments are shown in Table 14. In the T-O setting, every trained model separates reasonably well, with AUC between 0.808 and 0.960 across the thirteen models and both confidence functions. In the N-O setting, most of this separation is absent for the trained image models: the AUC of the five CNNs is lower by 0.23 to 0.28, at 0.594 to 0.673, close to the 0.5 of a confidence that does not contain information about domain membership, and that of Donut, the best model in the T-O setting, decreases from 0.960 to 0.840. The text models change little: BERT, RoBERTa and LayoutLM change by at most 0.03, and LayoutLMv3, which also reads the page image, by 0.07.
Our interpretation is that the image models have overfit to the appearance of RVL-CDIP pages: their confidence is high on pages that look like RVL-CDIP scans, so that in the T-O setting they separate the cleaner, more recent and born-digital RVL-CDIP-O documents by their appearance, and this cue is absent when the in-domain pages are also unlike RVL-CDIP. The text models, which do not use the appearance of the page, are the control for this interpretation, and their separation is almost unchanged between the two settings. The duplicates of Section 6 may contribute, since a test page with a near-copy in the training split is especially familiar to the model, but we did not measure separability on the de-duplicated test pages.
Table 14: Separability (AUC) of in-domain from out-of-scope documents under maximum softmax probability and the energy score, for models trained on the original labels; Section 11 compares their corrected-label counterparts. -O separates the RVL-CDIP test split (40,000 documents) from RVL-CDIP- (2,915); -O separates RVL-CDIP- (1,002) from RVL-CDIP-. The zero-shot models are never trained on RVL-CDIP. Appendix L shows FPR95 and two further scores.
| Input | Model | -O | -O | ||
|---|---|---|---|---|---|
| MSP | Energy | MSP | Energy | ||
| Image | AlexNet | 0.880 | 0.914 | 0.645 | 0.673 |
| GoogLeNet | 0.837 | 0.845 | 0.604 | 0.594 | |
| ResNet-50 | 0.874 | 0.875 | 0.624 | 0.600 | |
| ResNeXt-50 | 0.882 | 0.889 | 0.618 | 0.612 | |
| VGG-16 | 0.889 | 0.930 | 0.661 | 0.668 | |
| DiT-base | 0.895 | 0.892 | 0.733 | 0.759 | |
| DiT-large | 0.814 | 0.825 | 0.691 | 0.731 | |
| DocXClassifier | 0.897 | 0.808 | 0.707 | 0.626 | |
| Donut | 0.909 | 0.960 | 0.793 | 0.840 | |
| Text | BERT | 0.859 | 0.845 | 0.841 | 0.858 |
| RoBERTa | 0.868 | 0.857 | 0.838 | 0.871 | |
| Multi-modal | LayoutLM | 0.861 | 0.865 | 0.834 | 0.858 |
| LayoutLMv3 | 0.893 | 0.907 | 0.827 | 0.838 | |
| Zero-shot VLM | CLIP ViT-L/14 | 0.623 | 0.861 | 0.806 | 0.756 |
| ALIGN | 0.655 | 0.612 | 0.861 | 0.666 | |
| SigLIP | 0.710 | 0.862 | 0.890 | 0.812 | |
| SigLIP 2 | 0.673 | 0.797 | 0.916 | 0.820 | |
Although the text models keep their separation in the -O setting, the separation of all thirteen models is too weak for reliable abstention: at the threshold that keeps 95% of RVL-CDIP-, the best of the thirteen models still accepts 59.5% of RVL-CDIP- (Appendix L), and the -O setting is the one that corresponds to a model deployed on contemporary documents.
The zero-shot models are a second control. Their confidence functions are computed in the same way as for the trained models, from the sixteen image-caption similarity scores, scaled by the model's learned temperature (and for SigLIP and SigLIP 2 offset by its learned bias), in place of logits, and a page is set aside when the maximum softmax probability or the energy score is below a threshold. Under maximum softmax probability their pattern is the reverse of that of the trained image models: they separate the -O setting well (0.806 to 0.916) and the -O setting poorly (0.623 to 0.710), because they classify only 44 to 56% of the RVL-CDIP test pages correctly, against 83 to 93% of RVL-CDIP-, and are correspondingly unsure of them, which indicates that the -O separation of the trained image models results from their training on RVL-CDIP; this reversal depends in part on the confidence function (Appendix L).
Table 15: Out-of-scope separability (AUC, maximum softmax probability) by training variant: is the RVL-CDIP test split against RVL-CDIP-, is RVL-CDIP- against it. The public checkpoints and the zero-shot models were not retrained and have one value per setting, placed under Original; Table L.1 shows the energy score.
| Model | ||||||||
|---|---|---|---|---|---|---|---|---|
| Original | Fixed | No codes | Both | Original | Fixed | No codes | Both | |
| Image | ||||||||
| AlexNet | 0.877 | 0.905 | 0.872 | 0.902 | 0.643 | 0.731 | 0.645 | 0.717 |
| GoogLeNet | 0.860 | 0.884 | 0.855 | 0.876 | 0.620 | 0.702 | 0.619 | 0.688 |
| SqueezeNet | 0.877 | 0.899 | 0.873 | 0.901 | 0.648 | 0.744 | 0.642 | 0.738 |
| VGG-16 | 0.899 | 0.924 | 0.887 | 0.918 | 0.671 | 0.763 | 0.656 | 0.743 |
| ResNet-50 | 0.884 | 0.901 | 0.879 | 0.898 | 0.641 | 0.718 | 0.638 | 0.719 |
| ResNeXt-50 | 0.890 | 0.908 | 0.882 | 0.903 | 0.635 | 0.730 | 0.637 | 0.718 |
| DiT-base | 0.885 | 0.914 | 0.877 | 0.917 | 0.709 | 0.787 | 0.704 | 0.782 |
| Text | ||||||||
| BERT-base | 0.838 | 0.875 | 0.831 | 0.873 | 0.814 | 0.872 | 0.799 | 0.874 |
| RoBERTa-base | 0.845 | 0.876 | 0.844 | 0.876 | 0.822 | 0.894 | 0.806 | 0.901 |
| Multi-modal | ||||||||
| LayoutLM-base | 0.846 | 0.889 | 0.847 | 0.889 | 0.821 | 0.912 | 0.810 | 0.910 |
| LayoutLMv3-base | 0.890 | 0.930 | 0.888 | 0.921 | 0.832 | 0.924 | 0.829 | 0.896 |
| Linear baselines | ||||||||
| TF-IDF SVM | 0.936 | 0.943 | 0.935 | 0.943 | 0.857 | 0.862 | 0.857 | 0.864 |
| TF-IDF + SigLIP SVM | 0.925 | 0.948 | 0.924 | 0.950 | 0.883 | 0.947 | 0.881 | 0.944 |
| Public checkpoints | ||||||||
| DocXClassifier | 0.897 | - | - | - | 0.707 | - | - | - |
| Donut | 0.934 | - | - | - | 0.806 | - | - | - |
| Zero-shot, image | ||||||||
| CLIP ViT-L/14 | 0.623 | - | - | - | 0.806 | - | - | - |
| ALIGN | 0.655 | - | - | - | 0.861 | - | - | - |
| SigLIP | 0.710 | - | - | - | 0.890 | - | - | - |
| SigLIP 2 | 0.673 | - | - | - | 0.916 | - | - | - |
| Jev 1.13, image | 0.742 | - | - | - | 0.912 | - | - | - |
| Zero-shot, text | ||||||||
| Jev 1.13 | 0.709 | - | - | - | 0.860 | - | - | - |
Table 15 shows the AUC under maximum softmax probability for the retrained models of this section, by training variant. Training on the corrected labels raises the AUC of every retrained model in both settings, by 0.007 to 0.043 in the setting and by 0.005 to 0.096 in the setting, where the image models gain 0.077 to 0.096 but remain between 0.702 and 0.787. Removing the identification codes from training changes the AUC by at most 0.016 in either setting, and the variant with both changes is within 0.028 of the corrected-label variant. With the corrected labels, the SVM on TF-IDF text and SigLIP embeddings separates the setting best (0.947), followed by LayoutLMv3 (0.924), and both exceed SigLIP 2 (0.916); Section 11 examines why the label correction raises separability.
10.6 OCR Engine Comparison
Because RVL-CDIP was released without OCR transcriptions (Section 9), every text or layout model depends on an OCR engine chosen by its user, and we measure the effect of
Table 16: Accuracy by OCR engine, holding architecture fixed, on the RVL-CDIP test split. Tesseract is our own 4.1.1 run. Original uses the labels as released; errors fixed uses the corrected labels of Section 5. is Textract minus Tesseract, in accuracy points. Every is significant under a paired McNemar test at . The first three models read text alone; LayoutLM also reads the coordinates the engine assigns.
| Model | Original labels | Errors fixed | ||||
|---|---|---|---|---|---|---|
| Tesseract | Textract | Tesseract | Textract | |||
| TF-IDF SVM | 81.96 | 90.23 | +8.27 | 86.21 | 94.07 | +7.86 |
| BERT-base | 86.66 | 92.54 | +5.88 | 90.23 | 95.97 | +5.75 |
| RoBERTa-base | 86.50 | 92.47 | +5.97 | 90.38 | 95.97 | +5.59 |
| LayoutLM-base | 89.39 | 93.50 | +4.11 | 92.43 | 96.99 | +4.56 |
that choice by training identical models on two text layers covering the full corpus: our own Tesseract 4.1.1 run, with automatic page segmentation and no preprocessing, and AWS Textract. Both layers provide tokens and bounding boxes. We train BERT (Devlin et al., 2019), RoBERTa (Liu et al., 2019), LayoutLM (Xu et al., 2020) and LayoutLMv3 (Huang et al., 2022), together with TF-IDF features and a linear SVM as an unpretrained lower bound, once on the output of each OCR engine, with the same architecture, hyperparameters, schedule and seeds. We score each model on the test split under both the original and the corrected labels of Section 5, and on RVL-CDIP-N (Section 8), where an in-distribution gain without an out-of-distribution one would indicate that the effect is specific to the corpus and is not an improvement in document understanding. Since the engines differ in reading order and line grouping as well as in character accuracy, the comparison for the text-only models is between whole text layers, and for LayoutLM it also covers the coordinates each engine reports.
Textract raises the accuracy of every model in Table 16 by 4.1 to 8.3 points, five to forty times the 0.19 to 0.82 points separating successive LayoutLM generations, while BERT and RoBERTa, despite different pretraining corpora and tokenizers, differ by at most 0.16 points in any column, so that the engine that produced the text has a larger effect than the choice between these models. Reported architectural improvements may be real, but they are several times smaller than the variation that an unrecorded choice of engine introduces. The gain is largest for TF-IDF (about 8 points), which cannot recover from a garbled token, smaller for the pretrained text transformers (5.6 to 6.0 points), and smallest for LayoutLM (4.1 to 4.6 points), whether because token positions are affected less by a change of engine than characters are or because its 97.0% Textract score under the corrected labels is near ceiling; in either case its gap is still about five times the difference between two model generations. Correcting the labels raises every score but changes each gap by less than half a point and not in a consistent direction, so the OCR effect is not an artifact of label noise and is close to independent of it (Section 11).
Part of Textract's advantage may come from the identification codes: the codes are short, often rotated and stamped over other content, and we expect two OCR engines to disagree more on text of this kind than on the body text of a page, so that Textract may transcribe the codes more accurately than Tesseract does. A TF-IDF SVM trained and tested on the de-identified pages under the original labels is 9.1 points more accurate on Textract than on Tesseract text when the codes are present (88.9 against 79.8%) and 9.1 points when they are removed from the training and test pages (88.8 against 79.7%), and with the codes erased at test time alone it loses 0.1 points on Textract and 0.2 on Tesseract, so that for this model the gap between the engines is not due to the codes. For the pretrained models the comparison exists on Textract only, where BERT loses 1.4 and RoBERTa 1.8 points under the original labels when the codes are removed at test time (Table 12) and BERT, RoBERTa and LayoutLM lose between 0.2 and 0.4 points under the corrected ones, against the 4.1 to 6.0 points by which Textract exceeds Tesseract for the same architectures in Table 16; the codes can therefore account for at most about a third of the OCR gain, although the direct test, which would retrain these models on Tesseract text of the code-free pages, was not run.
11 Interaction Between Defects
This section examines whether the defects of Sections 5 to 9 are independent of one another. If they are, their effects on measured accuracy add and each can be remediated separately, and if they are associated, the remediation of one defect changes the effect of another. We first measure the association between pairs of defects and then compare the fully remediated accuracy of Section 10 with the sum of the effects of the single remediations.
11.1 Pairwise Associations
Table 17 relates the label status of each test and validation page to whether a training duplicate was detected for it. Pages with a label error or an unsure label have a training duplicate less often than pages with a correct label, 28.1 against 36.1% in the test split, with an odds ratio of 0.69 (95% interval 0.65 to 0.74) and of 0.67 when the comparison is stratified by category, and in the validation split the two odds ratios are 0.74 and 0.75. The two groups of these pages differ: the unknown, mixed and unsure pages are duplicated at 21.4%, whereas the relabeled pages are duplicated at 48.4%, which is a consequence of the categories in which they occur, since their stratified odds ratio is 0.98. The association also
Table 17: Label status of the test and validation pages against the detection of a training duplicate. Dupl. is the share of pages with a training duplicate, OR the odds ratio of having one against the pages with a correct label, and OR, strat. the Mantel–Haenszel odds ratio stratified by original category. Error or unsure are the pages with a label error (unknown, wrong or mixed) or an unsure label in the review of Section 5; the review assigned a corrected category to the relabeled pages.
| Label | Test | Validation | ||||||
|---|---|---|---|---|---|---|---|---|
| n | Dupl. (%) | OR | OR, strat. | n | Dupl. (%) | OR | OR, strat. | |
| Correct | 35,280 | 36.1 | - | - | 35,291 | 36.2 | - | - |
| Error or unsure | 4,719 | 28.1 | 0.69 | 0.67 | 4,709 | 29.5 | 0.74 | 0.75 |
| relabeled | 1,166 | 48.4 | 1.66 | 0.98 | 1,089 | 49.0 | 1.70 | 0.96 |
| not relabeled | 3,553 | 21.4 | 0.48 | 0.57 | 3,620 | 23.6 | 0.55 | 0.68 |
Table 18: Retraining on the corrected labels and out-of-scope separability. Each row pairs a model trained on the original labels with the same architecture retrained on the corrected labels. Accuracy on RVL-CDIP-N (%) and the mean maximum softmax probability on RVL-CDIP-N and RVL-CDIP-O are given as original corrected; AUC is corrected minus original.
| Model | Accuracy N | Mean MSP | AUC N-O | AUC T-O | |||
|---|---|---|---|---|---|---|---|
| N | O | MSP | Energy | MSP | Energy | ||
| AlexNet | 62.1 72.9 | 0.884 0.930 | 0.821 0.837 | +0.096 | +0.078 | +0.007 | +0.005 |
| GoogLeNet | 63.1 73.5 | 0.900 0.933 | 0.861 0.870 | +0.080 | +0.067 | +0.005 | -0.015 |
| ResNet-50 | 62.1 75.5 | 0.902 0.932 | 0.858 0.876 | +0.066 | +0.083 | -0.006 | -0.014 |
| ResNeXt-50 | 65.2 77.9 | 0.893 0.944 | 0.846 0.865 | +0.106 | +0.090 | -0.006 | -0.016 |
| VGG-16 | 67.0 80.3 | 0.933 0.963 | 0.884 0.892 | +0.098 | +0.096 | -0.008 | -0.006 |
| BERT | 88.1 91.3 | 0.987 0.991 | 0.929 0.941 | +0.026 | +0.014 | -0.005 | -0.011 |
| RoBERTa | 89.8 94.9 | 0.990 0.996 | 0.927 0.952 | +0.070 | +0.036 | -0.017 | -0.024 |
| LayoutLM | 90.3 92.2 | 0.976 0.980 | 0.850 0.902 | -0.032 | -0.029 | -0.041 | -0.038 |
| LayoutLMv3 | 81.3 95.1 | 0.959 0.985 | 0.833 0.878 | +0.048 | +0.072 | +0.002 | +0.002 |
differs between categories: in the test split the odds ratio and its interval are below one in nine of the sixteen categories and above one in file_folder, handwritten and email, three categories in which at most 5.3% of the correctly labeled pages have a duplicate, and across the sixteen categories the two rates are uncorrelated (r = -0.05), as Section 6.5 found for the whole corpus.
The pair of label errors and OCR engine (Axes I and V) is measured in Section 10.6, which crosses the two OCR engines with the original and the corrected label sets: the Textract advantage is 5.88 points under the original labels and 5.75 under the corrected ones for BERT, 5.97 and 5.59 for RoBERTa, 8.27 and 7.86 for TF-IDF, and 4.11 and 4.56 for LayoutLM (Table 16). Correcting the labels reduces the OCR effect by at most 0.41 points for the first three models, which is less than a ceiling effect alone would explain at accuracies in the mid-nineties, and increases it by 0.45 points for LayoutLM. Axes I and V are therefore close to independent: fixing the labels does not fix the OCR confound, and a corrected corpus evaluated with an unreported engine remains as incomparable across papers as the original.
For label errors and distribution (Axes I and IV), the interaction occurs through accuracy alone (Table 18). Retraining on the corrected labels raises N-O separability in eight of the nine model pairs of Section 10.5, by 0.014 to 0.106 AUC depending on the model and confidence function, while T-O separability changes by between -0.041 and +0.007. The mean confidence that the models assign shows the source of the gain: corrected-label models are more confident on RVL-CDIP-N, as their higher accuracy there would predict, but in all nine pairs they are also more confident on RVL-CDIP-O. The separation increases because the confidence on the in-domain side increases, and the models do not learn to decline what they cannot classify: correcting the labels makes a model a better classifier of in-scope documents from other sources and does not make it more likely to reject out-of-scope ones. LayoutLM, whose accuracy on RVL-CDIP-N gains least from the correction (1.9 points), is the one pair in which N-O separability decreases.
Table 19: Change in test accuracy (points) of the retrained models against the original condition: under each remediation alone (corrected labels with retraining, codes removed from the training and test pages, de-duplicated test pages), their sum, and all three together, with the difference between the last two. The last three columns show the interaction of each pair of remediations (L labels, C codes, D de-duplication), which is the amount by which the change under the pair differs from the sum of its two single changes. Values are means over three seeds (one run for the linear baselines).
| Model | Alone | Sum | All three | Difference | Pairs | ||||
|---|---|---|---|---|---|---|---|---|---|
| Labels | Codes | De-dup. | L, C | L, D | C, D | ||||
| Image | |||||||||
| AlexNet | +3.5 | -0.8 | -3.5 | -0.8 | +0.9 | +1.7 | +0.7 | +1.1 | -0.3 |
| GoogLeNet | +3.9 | -0.7 | -3.3 | -0.1 | +1.5 | +1.7 | +0.6 | +1.1 | -0.3 |
| SqueezeNet | +3.9 | -1.0 | -2.9 | +0.1 | +1.9 | +1.8 | +0.8 | +1.1 | -0.3 |
| VGG-16 | +3.4 | -0.5 | -3.2 | -0.3 | +1.0 | +1.3 | +0.3 | +1.1 | -0.2 |
| ResNet-50 | +3.5 | -0.7 | -3.2 | -0.4 | +1.3 | +1.6 | +0.5 | +1.2 | -0.2 |
| ResNeXt-50 | +3.4 | -0.7 | -3.1 | -0.5 | +1.2 | +1.7 | +0.5 | +1.2 | -0.3 |
| DiT-base | +3.2 | -0.6 | -2.3 | +0.3 | +1.6 | +1.3 | +0.4 | +1.0 | -0.2 |
| Text | |||||||||
| BERT-base | +3.3 | -0.9 | -3.0 | -0.6 | +1.1 | +1.7 | +0.7 | +1.2 | -0.4 |
| RoBERTa-base | +3.5 | -0.9 | -2.8 | -0.2 | +1.6 | +1.8 | +0.7 | +1.2 | -0.4 |
| Multi-modal | |||||||||
| LayoutLM-base | +3.3 | -0.8 | -2.4 | +0.1 | +1.8 | +1.7 | +0.7 | +1.1 | -0.3 |
| LayoutLMv3-base | +2.7 | -0.3 | -1.8 | +0.5 | +1.7 | +1.2 | +0.3 | +0.9 | -0.2 |
| Linear baselines | |||||||||
| TF-IDF SVM | +4.5 | -0.2 | -4.2 | +0.1 | +1.3 | +1.2 | +0.1 | +1.1 | 0.0 |
| TF-IDF + SigLIP SVM | +4.0 | -0.3 | -2.5 | +1.3 | +2.9 | +1.6 | +0.3 | +1.4 | -0.1 |
Identification codes and OCR engine (Axes III and V) are the one case where the two defects could be the same defect. Identification codes are text, so that an engine that reads them better gives a model a stronger shortcut and does not thereby give it a better transcription of the document; the comparisons in Section 10.6 indicate that this accounts for none of the OCR advantage of a TF-IDF SVM and for at most about a third of that of the pretrained text models, for which the direct comparison on Tesseract text was not run.
11.2 Additivity of Confounds
Table 19 compares, for each retrained model, the change in test accuracy under all three remediations with the sum of the changes under each remediation alone, all measured against the original condition of Table 12. The fully remediated accuracy of every model is 1.2 to 1.8 points higher than the sum of the three single changes would predict. Most of this difference is due to the pair of label correction and de-duplication (0.9 to 1.4 points): de-duplication lowers the accuracy of the models by 1.8 to 4.2 points under the original labels and by 0.9 to 3.1 points under the corrected labels, because the test pages without a training duplicate contain a larger share of wrong labels (13.1%) than the pages with one (9.4%, Table 17), so that part of the accuracy that the models lose on the de-duplicated pages under the original labels is due to label errors. The pair of label correction and codes contributes 0.1 to 0.8 points, since the removal of the codes lowers accuracy less under the corrected labels, and the pair of codes and de-duplication between -0.4 and 0.0 points. Subtracting the separately measured effect of each defect from a reported accuracy would therefore underestimate the accuracy of the model on the fully remediated benchmark by 1.2 to 1.8 points.
12 Discussion
This section discusses what the results mean for readers of published RVL-CDIP results, gives guidance to researchers who continue to use the benchmark, considers whether it should still be used and what a successor would require, and draws lessons for the auditing of other benchmarks.
12.1 Interpreting RVL-CDIP Scores
Our audit found five properties of RVL-CDIP that affect a published accuracy. Approximately 10.5% of the labels are wrong, and a model is scored as correct when it reproduces a wrong label and as wrong when it predicts the correct category. Approximately 35.2% of the test pages have a near-duplicate in the training split, and a model can classify these pages by recalling the training page. An identification code added during the litigation appears on 92% of the documents and is associated with the label, and a classifier that uses only the codes is 69% accurate (Section 7). All documents come from one industry, one medium, and one era, and an accuracy on them is not evidence about documents from other settings. Text and layout models require OCR text, which the benchmark does not distribute; the authors of each paper produce it with their own OCR engine, and the choice of engine changes accuracy by 4.1 to 8.3 points in our experiments (Section 9), so the accuracies of text and layout models from different papers are not comparable.
Correcting the labels raises the measured accuracy, removing the duplicates and removing the identification codes lower it, and changing the OCR engine can raise or lower it. Because these effects differ in sign and are not additive (Section 11), a published accuracy cannot be corrected by adjusting it for each defect separately, and Section 10 therefore measures the accuracy with all of them remediated at once.
We draw two further conclusions about the published results, which do not depend on the measurements of Section 10. First, the models at the top of the leaderboard differ by fractions of a point (0.19 to 0.82 points between successive LayoutLM generations), whereas each of the defects that we quantify changes accuracy by several points. RVL-CDIP in its present form therefore does not show which of these models is more accurate, although they may differ in ability.
Second, a result of 98.8% indicates that the task is nearly solved only if the remaining 1.2% of errors reflect the difficulty of the task. Since approximately 10.5% of the corpus is mislabeled, nearly nine times the remaining 1.2%, a model that scores 98.8% reproduces most of the wrong labels in the test set, and the score shows how closely the model matches the original labeling rather than how close the task is to being solved. The out-of-distribution results of Section 10 show that the classification of contemporary documents is not close to being solved.
12.2 Guidance for Users of RVL-CDIP
We offer the following guidance to researchers who will continue to use this benchmark, which, for current lack of an alternative, will be most of them.
Heterogeneous categories. Several categories comprise multiple distinct document types: resume contains curricula vitae, biographical sketches, executive biographies, and business cards, and advertisement contains print advertisements and broadcast scripts. This affects any method that assumes that a category name describes its members: zero-shot classification that represents each category by its name and clustering analyses that expect categories to be coherent are both affected, and weak results in those settings may be due to the label set.
Label errors. Approximately 10.5% of the labels are wrong, a rate that exceeds the error rate of every model at the top of the leaderboard. It also varies by more than a factor of twenty across categories, from 1.48% for resume to 31.26% for letter, so that per-category results are not comparable with one another.
Documents with several valid labels. Approximately 1.5% of documents have more than one valid label. A single-label benchmark accepts only one of the valid labels, so a model that predicts another valid label for such a document is scored as wrong.
Test–train duplication. Approximately 35.2% of the test set is duplicated in training, with the highest rate of any category for specification, at 82.2%. Because the validation split has the same rate, a random re-partitioning does not reduce the duplication; the duplicates have to be identified first, and then either removed or assigned to the same split as the pages that they duplicate.
Identification codes. Identification codes are a usable shortcut: a classifier that uses only features of the codes is 69% accurate, and the public Donut checkpoint is 11 points less accurate when the codes are removed (95.2 against 84.2%). Most of the effect of the identification codes concerns the wrong labels: a model trained on the original labels uses the codes mostly on pages whose label is wrong, and a model trained on the corrected labels loses at most 1.5 points when the codes are removed (Section 10). Work on explainability, robustness, or shortcut learning that uses this corpus should account for the identification codes explicitly; our code-free version is available for that purpose.
Scope of the corpus. The corpus is limited in era, medium, industry, and language: a score on RVL-CDIP is evidence only about English-language scanned tobacco-industry documents produced before 2006. Claims of general document classification ability require out-of-distribution evaluation on data such as RVL-CDIP-N and RVL-CDIP-O.
OCR engine. For text and layout models the OCR engine is part of the experimental setup and materially affects the result. Papers should at least name the engine, and should preferably use a published text layer, so that others can reproduce the input.
Sensitive personal data. The corpus contains sensitive personal data. Care should be taken when redistributing the corpus, and users of RVL-CDIP should prefer de-identified versions, which we show do not measurably change classification accuracy. Models can also memorize and leak training data (Carlini et al., 2021), so that the deployment of models trained on this corpus is a privacy question as well as a question of curation.
Table 20: Availability of model weights for the 34 papers of Table B.1, as of September 2026. Only the fourteen papers that release weights of any kind are listed, named by the model each reports on RVL-CDIP; the other twenty release neither a backbone nor an RVL-CDIP classifier. “Backbone” is the pre-trained model before task fine-tuning; “classifier” is a checkpoint that performs the 16-way RVL-CDIP task and so permits re-scoring against corrected labels without retraining. Papers below the rule release a backbone, and a classifier for them is not available from any source.
| Model | Backbone | RVL-CDIP classifier | Availability |
|---|---|---|---|
| DiT (Li et al., 2022) | authors | authors | Hugging Face, live |
| Donut (Kim et al., 2022) | authors | authors | Hugging Face, live |
| DocXClassifier (Saifullah et al., 2024a) | authors | authors | institutional host, live |
| StrucTexTv2 (Yu et al., 2023) | authors | authors | host refuses access |
| Stacked CNN (Das et al., 2018) | authors | authors | 2018 cloud link, unverified |
| LayoutLMv1 (Xu et al., 2020) | authors | third party | fidelity unverified |
| LayoutLMv3 (Huang et al., 2022) | authors | third party | reports 95.2 vs. 95.44 |
| LiLT (Wang et al., 2022a) | authors | third party | separate OCR pipeline |
| ERNIE-Layout (Peng et al., 2022) | authors | not found | model zoo path moved |
| EfficientNet (Ferrando et al., 2020) | — | on request | no public download |
| UDOP (Tang et al., 2023) | authors | none | releases a fine-tuning script |
| Dessurt (Davis et al., 2022) | authors | none | releases a dataset loader |
| StructuralLM (Li et al., 2021a) | authors | none | backbone only |
| LayoutLMv2 (Xu et al., 2021) | authors | none | backbone only |
Release of fine-tuned classifiers. Corrected labels are of limited use if the models scored against the old ones cannot be re-scored. We checked all 34 papers of Table B.1 for released weights (Table 20). Five make an RVL-CDIP classifier available from the authors, and three more exist only as community uploads whose numbers do not match the published ones. For the remaining twenty-six the reported accuracy cannot be reproduced without repeating the fine-tuning, and in most cases the pre-training as well; eighteen of the 34 do not release any code of their own. The three highest scores in Table 2 (LayoutLLM, EAML, and Bi-VLDoc) are all in that group. Some of these papers do release something: five publish a pre-trained backbone, and two of these, UDOP (Tang et al., 2023) and Dessurt (Davis et al., 2022), also release RVL-CDIP fine-tuning scripts and dataset loaders but not the resulting checkpoint. We recommend that authors release both the pre-trained backbone and the fine-tuned classifier, since a reader can reproduce the reported accuracy with the classifier but not with the backbone alone, and that the checkpoints be kept available so that they can be scored on the corrected evaluation data that we provide. Authors who cannot release a checkpoint should at least release the model's prediction for each test document, preferably with its confidence scores, which is enough to re-score the model against the corrected labels.
12.3 Should RVL-CDIP Still Be Used?
A natural response to an audit of this kind is that the benchmark should be abandoned, which we do not recommend, for the following reason. RVL-CDIP is effectively the only standardized document classification benchmark at its scale, so that retiring it without a replacement would remove the one benchmark that papers share, and comparison across papers would become impossible where it is now imprecise. A common measure with known flaws is more useful than no common measure.
We recommend instead that researchers use the remediated variants that we release, which are de-identified by default, address four of the five axes directly, and provide both text layers for the fifth, and that they report out-of-distribution results alongside in-distribution ones, using RVL-CDIP-N and RVL-CDIP-O or comparable data, so that a claim of general capability is supported by evidence. We also recommend treating the per-category defect profiles in this paper as a guide to which parts of the corpus remain trustworthy: a study confined to email, handwritten, and file_folder has very little duplication, whereas one centered on letter uses a category whose labels are wrong nearly a third of the time. In parallel, the field should build a successor benchmark, for which the next subsection lists requirements.
12.4 Requirements for a Successor Benchmark
Our findings suggest the following requirements, of which the first several restate and update recommendations from our earlier work and the remainder are new.
-
Published annotation guidelines, released together with the dataset. Without them, a label review has to define the categories first, as we did in Section 4 before the review of Section 5.
-
Low label error, measured and reported. A stated error rate, with the method by which it was obtained, is more useful than an unstated assumption of correctness.
-
Multi-label annotation for documents that have more than one type.
-
Verified split integrity. Duplication should be checked at construction, when it is cheap to prevent; an audit afterwards is expensive.
-
No sensitive personal data, verified before release.
-
Documented provenance artifacts. Anything stamped, watermarked, or otherwise added to documents by the collection process should be identified and reported, since such features are candidate shortcuts by construction (Section 7).
-
A canonical text layer. A benchmark that expects text-based models should distribute the text, as it distributes labels and splits. Otherwise a necessary input is left to each user and cross-paper comparison is unsound (Section 9).
-
Paired out-of-distribution evaluation data, provided from the outset, so that generalization is measured from the first use of the benchmark.
-
Contemporary and born-digital documents in addition to historical scans, since deployed systems receive such documents.
-
Breadth and multilinguality: substantially more than 16 categories, and more than one language, to test capabilities that RVL-CDIP cannot test.
This list describes a considerable undertaking, and RVL-CDIP has not been replaced for a decade because assembling 400,000 labeled documents is difficult and assembling them well is more difficult. A successor does not need to be as large as RVL-CDIP, however: its test set has to be large enough to separate models reliably, and pre-trained models need much less labeled training data than the 320,000 pages of the RVL-CDIP training split, so a much smaller corpus with reviewed labels would serve the purposes listed above. We consider this a reason to begin the work now, since the alternative is to continue to rely on discovery material that was never intended for this purpose.
12.5 Lessons for Benchmark Auditing
In this subsection we describe the findings of the audit that also apply to other benchmarks.
Provenance. The five problems of RVL-CDIP are consequences of a single fact: the corpus was assembled for legal discovery and subsequently repurposed for machine learning without curation. Label errors follow from category tags applied retrospectively, by non-specialists, to material that was indexed for litigation (Section 5). Test-train duplication follows from repeated scanning campaigns that entered the same physical page into the collection more than once (Section 6). Identification codes follow from the Bates stamping that discovery requires (Section 7). Distributional narrowness follows from the scope of the litigation, which determined what was disclosed and when (Section 8). The presence of sensitive personal data follows from the fact that these documents were never intended to be public (Section 3): they are internal records, such as personnel files and tax forms, that entered the public domain through compulsory disclosure, and the personal data that such records ordinarily contain was not removed before the disclosure. The general lesson is that an audit should examine how a corpus was assembled, because this tells an auditor what to look for: corpora from opportunistic sources, such as web scrapes, administrative records, and litigation releases, each have characteristic defects that an auditor can anticipate.
Automated label-error detection. Confident learning assumes that errors are the exception, since the confidence scores that it uses come from a model trained on the labels under audit. Where errors are pervasive and directionally consistent, the model learns the erroneous convention and assigns high confidence to it. On the RVL-CDIP test split it estimates an error rate of 2.0 to 6.0% where the review finds a label error or an unsure label on 11.8% of the pages, and it finds 10.5 to 22.8% of the wrong labels (Appendix F). Such tools are appropriate for finding sporadic mistakes, and they fail on a corpus whose category boundaries were never specified.
Defect rates across splits. Duplication in RVL-CDIP's validation split matches its test split to within two tenths of a point (Section 6). That agreement distinguishes a defect introduced during corpus assembly from one introduced during partitioning, and the distinction determines whether re-splitting is a remedy. The check requires almost no additional work, and we recommend it for other benchmarks.
Zero-shot models as a control. Throughout this paper, models never trained on RVL-CDIP behave in ways that isolate the confounds: the four zero-shot vision-language models and Jev are 0.3 to 1.8 points more accurate when the identification codes are removed from the test pages, and Jev with the page image is less accurate only on folder covers on which the code is one of the few printed marks, whereas every model trained on RVL-CDIP is less accurate (Table 12). A model that has not seen the training distribution provides a reference for separating dataset-specific shortcuts from the difficulty of the task, and we recommend including one in an audit for that reason.
Preprocessing left to the user. The OCR problem of Section 9 arises in any benchmark that distributes data in a form that models cannot use directly and does not provide the converted form. Other examples are audio that requires transcription, raw text that requires a tokenizer, and structured records that require feature extraction. In each case the authors of each paper produce their own conversion, and the resulting numbers are not strictly comparable. The remedy is for benchmarks to distribute the converted representation as a canonical artifact. Leaving the conversion to each user has a second disadvantage: the tools are not equally available. The OCR engines reported in the RVL-CDIP literature range from open-source Tesseract to proprietary cloud services, so that to the extent that conversion quality affects accuracy, the arrangement gives an advantage to groups that can pay for the better tools, and the reported number does not show this.
Cost of exhaustive auditing. The label review reported here occupied seven annotators for approximately two years. We report this because it determines whether audits of this kind can be repeated, and for most benchmarks they cannot be repeated routinely. This supports the recommendations above: quality assurance requires far less effort at construction time than afterwards, and when a benchmark is released without it, the work is left to the community, which will generally not do it.
13 Limitations
In this section, we describe the limitations of our audit.
Label review. Since RVL-CDIP was published without label criteria, we measured our error rates against criteria that we wrote ourselves (Section 4). A different team would draw some category boundaries differently, most of all the boundary between letter and memo, which contributes more to our error rate than any other boundary. The 10.5% figure should therefore be read as “erroneous with respect to these stated criteria”, and we publish the criteria so that others can see where their boundaries differ from ours. The review took about two years with a changing group of annotators, and agreement was substantial, with a Fleiss’s kappa of 0.74 for category judgments and 0.918 for the presence of sensitive data. Because the project lead re-examined every judgment that a label was wrong or uncertain and only a sample of the judgments that it was correct, a remaining mistake is more likely to be a missed label error than a spurious one, and our error rate is therefore more likely to be understated than overstated.
Lower bounds and definitions. Three of our main results are lower bounds: the duplication rate, the decrease in accuracy when the identification codes are removed, and the label error rate. Duplicate detection has 100% precision and 82.9% recall, and the 35.2% duplication rate therefore omits roughly one pair in six. Removing an identification code with white pixels erases its characters but preserves the position and dimensions of the region, which our analysis shows to be predictive (Section 7.3). The reported decreases in accuracy therefore understate the contribution of the codes by an amount that we have not measured. The label error rate excludes the unsure cases, and counting the unsure cases as errors would raise the label error rate from 10.51% to 11.48%. For scanned documents, the term “duplicate” does not have an exact definition. A page scanned twice, a form template filled in with different content, and two documents that follow a common layout convention are not sharply separated. We state our criterion for a duplicate and publish the adjudicated pairs, so that others can apply a different criterion.
Models and evaluation data. We did not re-benchmark every model reported on RVL-CDIP, because many lack public implementations or trained weights, and we used DocXClassifier and Donut, and in the abstention comparison also DiT-base and DiT-large, as published checkpoints without retraining. DiT, LayoutLM and LayoutLMv3 are initialized with weights pretrained on IIT-CDIP, which contains the RVL-CDIP test pages with their identification codes. Our remediation of duplicates and codes therefore applies to fine-tuning and evaluation only, and we did not measure the contribution of this pretraining. The OCR comparison covers Tesseract, the most widely used open-source engine, and the commercial Amazon Textract, and with a third engine a model might be less accurate than with Tesseract or more accurate than with Textract. RVL-CDIP-N and RVL-CDIP-O were collected by us following our understanding of the category criteria; to our knowledge they are the only out-of-distribution data for this benchmark that consist of new documents; the other out-of-distribution sets for RVL-CDIP are augmentations of its existing pages. RVL-CDIP-N covers twelve of the sixteen categories, and both sets are small (1,002 and 2,915 documents), and per-category estimates from these two sets are therefore uncertain.
De-identification. Our de-identification addresses the practical risk that sensitive personal data can be retrieved from widely mirrored corpora, and it does not provide a formal privacy guarantee such as differential privacy. An entity that our annotation missed remains in the released data, where it is only harder to locate among realistic synthetic entities, and the original corpora remain available from their existing sources. Format matching discloses the format and approximate width of each replaced value: a date replaced as 7/31/84 → 5/31/55 discloses that the original was a slash-delimited five-digit date, and a replaced address discloses how many lines it occupied. This is acceptable for the corpora that we release, since the format of a field is rarely identifying on its own, but users of the pipeline should disable format matching where the format itself is sensitive. The 3.8% of annotated regions in the categories without replacement text are left blank (Section 3). On preprinted forms, an annotation box can also span part of the form as well as the value, as in a voucher reading April 10 ___ 19 87, where the 19 is preprinted and the 87 is the value, and the replacement can then be a string in which a date would not be written; we have not quantified how many regions are affected.
Scope of the conclusions. The methodological claims of Section 12, that confident learning fails under systematic error and that provenance predicts defects, are argued from a single corpus and should be read as hypotheses that are well supported in one case. The sampled and the exhaustive error rates were also obtained by the same group, and part of the difference between the two rates may be due to our own growing familiarity with the corpus. The category-level comparison of Section 6.5 is based on sixteen aggregates and is ecological, and the document-level analysis of Section 11 should be preferred where the two address the same question.
14 Conclusion
In this paper, we audited RVL-CDIP and found that approximately 10.5% of its labels are wrong, that 35.2% of the test pages have a duplicate or near-duplicate in the training split, and that a classifier that uses only the identification codes added during the litigation is 69% accurate. Image-only models trained on RVL-CDIP are 16 to 28 points less accurate on documents from other sources, the choice of OCR engine changes the accuracy of text and layout models by 4.1 to 8.3 points, and nearly 16,000 documents contain sensitive personal data. With all defects remediated, the 13 models that we retrain are 0.9 to 2.9 points more accurate than in the original condition, and the effects of the defects on accuracy are not additive. The differences between the leading published models are smaller than these effects, so the published results on RVL-CDIP do not show which of those models is more accurate. We release de-identified versions of the corpus with and without identification codes, the corrected labels, the duplicate pairs, the output of two OCR engines, and the out-of-distribution sets RVL-CDIP-N and RVL-CDIP-O, and we recommend that researchers who continue to use RVL-CDIP evaluate on the corrected data and report out-of-distribution results alongside in-distribution ones.
Broader Impact Statement
The corpora that we audit contain personal information about employees, job applicants, and correspondents of tobacco companies, including Social Security numbers, birth dates, and home addresses. These records became public through litigation to which these people were not parties, and the corpora have since been downloaded and mirrored widely as machine learning training data. The people concerned did not consent to this use, and their consent can no longer be obtained. We consider the reduction of this exposure the most important outcome of this work, and the de-identified corpora are therefore the version that we distribute by default.
Documenting where sensitive data occurs in a public corpus is necessary to justify and reproduce its removal, but the same documentation could direct a malicious reader toward the un-redacted originals, which remain available from their existing sources and which our work does not withdraw. We therefore release the de-identified images and their OCR text but neither the locations nor the values of the sensitive entities, we report statistics only in aggregate, and we do not name any individual or reproduce any document containing sensitive data beyond the examples in Figure 3, whose sensitive fields we have obscured. Appendix A lists the released artifacts and explains why the de-identified versions are the default. We judge that the reduction in risk from removing thousands of Social Security numbers from actively used datasets outweighs the residual risk from describing the removal, and we hold that judgment with less confidence than we would like.
The label errors, test–train duplicates, and identification-code shortcut that we measure matter for a different reason: document classifiers built on this benchmark are deployed in settings such as records processing, claims handling, and compliance review, where misclassification has material effects on individuals. A benchmark that overstates accuracy, and that cannot measure generalization beyond pre-2006 tobacco-industry paperwork, encourages deployment on the basis of evidence that does not support it. The corrected corpus and the out-of-distribution data we release allow that gap to be measured.
We are conscious that this paper criticizes a resource the field has depended on, and that its authors performed a service in creating and releasing it that far outweighs the defects we document. Almost none of what we report was reasonably discoverable in 2015: the confounds became consequential only as accuracy approached the corpus's noise floor. We do not argue that RVL-CDIP should not have been built or used. We think that a benchmark as widely used as RVL-CDIP should be re-examined periodically.
Acknowledgments and Disclosure of Funding
We thank the co-authors of the five earlier papers that this article consolidates (Larson et al., 2022, 2023, 2024, 2025, 2026): Yutong Ai, Ramla Alakraa, Siddharth Betala, Gayatri Chakkithara, Cyrus Desai, Sam Desai, Santiago Pedroza Diaz, Sharad Duwal, Amogh Manoj Joshi, David Kuang, Gordon Lim, Nicole Cornehl Lima, Yash Mathur, Attila Nagy, Temi Okotore, Vedant Padwal, Kaushal Kumar Prajapati, Junjie Shen, Jamiu Tunde Suleiman, Brian Vilnrotter and Yixin Yuan. This material is based upon work supported by a National Science Foundation Graduate Research Fellowship held by Stefan Larson, by gift funding from Amazon, and by the Undergraduate Research Opportunity Program (UROP) of the University of Michigan. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation or of Amazon. Amazon had no role in the design of the study, in the collection, analysis, or interpretation of the data, or in the writing of the paper; the authors have no competing interests to declare.
References
Muhammad Zeshan Afzal, Andreas Kölsch, Sheraz Ahmed, and Marcus Liwicki. Cutting the error by half: Investigation of very deep CNN and advanced training strategies for document image classification. In Proceedings of the 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), 2017. URL https://arxiv.org/pdf/1704.03557.pdf.
Miltiadis Allamanis. The adverse effects of code duplication in machine learning models of code. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, 2019. URL https://arxiv.org/pdf/1812.06469.pdf.
Diogo Almeida. Introducing System One Models & Jev. https://typesafe.ai/blog/introducing-system-one-models-and-jev, 2026. TypeSafe AI blog post, October 2026.
Srikar Appalaraju, Bhavan Jasani, Bhargava Urala Kota, Yusheng Xie, and R. Manmatha. DocFormer: End-to-end transformer for document understanding. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021. URL https://openaccess.thecvf.com/content/ICCV2021/papers/Appalaraju_DocFormer_End-to-End_Transformer_for_Document_Understanding_ICCV_2021_paper.pdf.
Nicolas Audebert, Catherine Herold, Kuider Slimani, and Cédric Vidal. Multimodal deep networks for text and image-based document classification. In Proceedings of the Conférence Nationale sur les Applications Pratiques de l'Intelligence Artificielle (APIA), 2019. URL https://hal.archives-ouvertes.fr/hal-02163257/document.
Haoli Bai, Zhiguang Liu, Xiaojun Meng, Wentao Li, Shuang Liu, Yifeng Luo, Nian Xie, Rongfu Zheng, Liangwei Wang, Lu Hou, Jiansheng Wei, Xin Jiang, and Qun Liu. Wukong-Reader: Multi-modal pre-training for fine-grained visual document understanding. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (ACL), 2023. doi:10.18653/v1/2023.acl-long.748. URL https://aclanthology.org/2023.acl-long.748.
Souhail Bakkali, Zuheng Ming, Mickaël Coustaty, and Marçal Rusiñol. EAML: ensemble self-attention-based mutual learning network for document image classification. International Journal on Document Analysis and Recognition (IJDAR), 24(3):251–268, 2021.
Souhail Bakkali, Zuheng Ming, Mickael Coustaty, Marçal Rusiñol, and Oriol Ramos Terrades. VLCDoC: Vision-language contrastive pre-training model for cross-modal document classification. Pattern Recognition, 139:109419, 2023. URL https://arxiv.org/pdf/2205.12029.pdf.
Harry G. Barrow, Jay M. Tenenbaum, Robert C. Bolles, and Helen C. Wolf. Parametric correspondence and chamfer matching: Two new techniques for image matching. In Proceedings of the 5th International Joint Conference on Artificial Intelligence, 1977.
Bespoke Labs, Shreyas Pimpalgaonkar, Pratik Dalal, and Maheswaran Sathiamoorthy. Nimble. https://github.com/bespokelabsai/nimble, 2026. Model: https://huggingface.co/bespokelabs/Bespoke-Nimble-9B.
Abeba Birhane and Vinay Uday Prabhu. Large image datasets: A pyrrhic win for computer vision? In Proceedings of the Winter Conference on Applications of Computer Vision (WACV), 2021. URL https://openaccess.thecvf.com/content/WACV2021/papers/Birhane_Large_Image_Datasets_A_Pyrrhic_Win_for_Computer_Vision_WACV_2021_paper.pdf.
Alceu Bissoto, Michel Fornaciali, Eduardo Valle, and Sandra Avila. (de)constructing bias on skin lesion datasets. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2019. ISIC Skin Image Analysis Workshop.
Marc Brooker, Mike Chambers, and Fabio Nonato de Paula. Introducing Strands Decider 2B: A small, open source, decision model. https://strandsagents.com/blog/introducing-strands-decider/, 2026. Strands Agents blog post, October 2026.
Nicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Úlfar Erlingsson, Alina Oprea, and Colin Raffel. Extracting training data from large language models. In Proceedings of the 30th USENIX Security Symposium, 2021. URL https://arxiv.org/abs/2012.07805.
Michelle Chen. Introducing Clef: Our open-source decision models, and new RL fine-tuning platform. https://blog.cloudflare.com/clef-decision-models/, 2026. Cloudflare blog post, October 2026.
Derek Chong, Jenny Hong, and Christopher Manning. Detecting label errors by using pre-trained language models. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022. URL https://aclanthology.org/2022.emnlp-main.618.
Convai Innovations. Laya. https://github.com/NandhaKishorM/laya, 2026. Model: https://huggingface.co/convaiinnovations/laya, accessed October 2026.
Gabriela Csurka, Diane Larlus, Albert Gordo, and Jon Almazán. What is the right way to represent document images? arXiv preprint arXiv:1603.01076, 2016. URL https://arxiv.org/pdf/1603.01076.pdf.
Arindam Das, Saikat Roy, Ujjwal Bhattacharya, and Swapan Kumar Parui. Document image classification with intra-domain transfer learning and stacked generalization of deep convolutional neural networks. In Proceedings of the 24th International Conference on Pattern Recognition (ICPR), 2018. URL https://arxiv.org/pdf/1801.09321.pdf.
Tyler Dauphinee, Nikunj Patel, and Mohammad Rashidi. Modular multimodal architecture for document classification. arXiv preprint arXiv:1912.04376, 2019. URL https://arxiv.org/pdf/1912.04376.pdf.
Brian Davis, Bryan Morse, Bryan Price, Chris Tensmeyer, Curtis Wigington, and Vlad Morariu. End-to-end document recognition and understanding with Dessurt. In Proceedings of the European Conference on Computer Vision Workshops (ECCVW), 2022. URL https://arxiv.org/pdf/2203.16618v3.pdf.
Thomas Delteil, Edouard Belval, Lei Chen, Luis Goncalves, and Vijay Mahadevan. MATrIX – modality-aware transformer for information eXtraction. arXiv preprint arXiv:2205.08094, 2022. URL https://arxiv.org/pdf/2205.08094v1.pdf.
Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. SuperPoint: Self-supervised interest point detection and description. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2018.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2019.
DHS Privacy Office. Handbook for safeguarding sensitive PII: Privacy policy directive 047-01-007, revision 3. Technical report, U.S. Department of Homeland Security, 2017. URL https://www.dhs.gov/sites/default/files/publications/dhs%20policy%20directive%20047-01-007%20handbook%20for%20safeguarding%20sensitive%20PII%2012-4-2017.pdf.
Aparna Elangovan, Jiayuan He, and Karin Verspoor. Memorization vs. generalization: Quantifying data leakage in NLP performance evaluation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics
(EACL), 2021. doi: 10.18653/v1/2021.eacl-main.113. URL https://aclanthology.org/2021.eacl-main.113.
Rong-En Fan, Kai-Wei Chang, Cho-Jui Hsieh, Xiang-Rui Wang, and Chih-Jen Lin. LIBLIN-EAR: A library for large linear classification. Journal of Machine Learning Research, 9:1871–1874, 2008.
Javier Ferrando, Juan Luis Domínguez, Jordi Torres, Raúl García, David García, Daniel Garrido, Jordi Cortada, and Mateo Valero. Improving accuracy and speeding up document image classification through parallel systems. In Proceedings of the International Conference on Computational Science (ICCS), 2020. URL https://arxiv.org/pdf/2006.09141.pdf.
Masato Fujitake. LayoutLLM: Large language model instruction tuning for visually rich document understanding. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), 2024.
Alexander Groleau, Kok Wei Chee, Stefan Larson, Samay Maini, and Jonathan Boarman. Augraphy: A data augmentation library for document images. In Proceedings of the 17th International Conference on Document Analysis and Recognition (ICDAR), 2023. doi:10.1007/978-3-031-41682-8_24. URL https://arxiv.org/pdf/2208.14558v1.pdf.
Jiuxiang Gu, Jason Kuen, Vlad I. Morariu, Handong Zhao, Nikolaos Barmpalios, Rajiv Jain, Ani Nenkova, and Tong Sun. Unified pretraining framework for document understanding. In Advances in Neural Information Processing Systems (NeurIPS), 2021. URL https://proceedings.neurips.cc/paper/2021/file/0084ae4bc24c0795d1e6a4f58444d39b-Paper.pdf.
Jiuxiang Gu, Yifei Ming, Yi Zhou, Jason Kuen, Vlad Morariu, Handong Zhao, Ruiyi Zhang, Nikolaos Barmpalios, Anqi Liu, Yixuan Li, Tong Sun, and Ani Nenkova. A critical analysis of document out-of-distribution detection. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 4973–4999, 2023. doi: 10.18653/v1/2023.findings-emnlp.332. URL https://aclanthology.org/2023.findings-emnlp.332/.
Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel Bowman, and Noah A. Smith. Annotation artifacts in natural language inference data. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2018. doi: 10.18653/v1/N18-2017. URL https://aclanthology.org/N18-2017.
Adam W. Harley, Alex Ufkes, and Konstantinos G. Derpanis. Evaluation of deep convolutional nets for document image classification and retrieval. In Proceedings of the 13th International Conference on Document Analysis and Recognition (ICDAR), 2015. URL https://arxiv.org/pdf/1502.07058.pdf.
Jiabang He, Yi Hu, Lei Wang, Xing Xu, Ning Liu, Hui Liu, and Heng Tao Shen. Do-GOOD: Towards distribution shift evaluation for pre-trained visual document understanding models. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 569–579, 2023. doi: 10.1145/3539618.3591670.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. URL https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/He_Deep_Residual_Learning_CVPR_2016_paper.pdf.
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In Proceedings of the 7th International Conference on Learning Representations (ICLR), 2019.
Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In Proceedings of the 5th International Conference on Learning Representations (ICLR), 2017.
Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
Dan Hendrycks, Steven Basart, Mantas Mazeika, Andy Zou, Joseph Kwon, Mohammadreza Mostajabi, Jacob Steinhardt, and Dawn Song. Scaling out-of-distribution detection for real-world settings. In Proceedings of the 39th International Conference on Machine Learning (ICML), 2022.
Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, and Furu Wei. LayoutLMv3: Pretraining for document AI with unified text and image masking. In Proceedings of the 30th ACM International Conference on Multimedia, 2022. URL https://arxiv.org/pdf/2204.08387.pdf.
Forrest N. Iandola, Song Han, Matthew W. Moskewicz, Khalid Ashraf, William J. Dally, and Kurt Keutzer. SqueezeNet: AlexNet-level accuracy with fewer parameters and model size. arXiv preprint arXiv:1602.07360, 2016. URL https://arxiv.org/abs/1602.07360.
Guillaume Jaume, Hazim Kemal Ekenel, and Jean-Philippe Thiran. FUNSD: A dataset for form understanding in noisy scanned documents. In Proceedings of the 2019 International Conference on Document Analysis and Recognition Workshops (ICDARW), 2019. URL https://arxiv.org/pdf/1905.13538.pdf.
Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yunhsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021.
Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. Mistral 7B. arXiv preprint arXiv:2310.06825, 2023.
Geewook Kim, Teakgyu Hong, Moonbin Yim, JeongYeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, and Seunghyun Park. OCR-free document understanding transformer. In Proceedings of the European Conference on Computer Vision (ECCV), 2022. URL https://arxiv.org/pdf/2111.15664.pdf.
Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, Tony Lee, Etienne David, Ian Stavness, Wei Guo, Berton Earnshaw, Imran Haque, Sara Beery, Jure Leskovec, Anshul Kundaje, Emma Pierson, Sergey Levine, Chelsea Finn, and Percy Liang. WILDS: A benchmark of in-the-wild distribution shifts. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021. URL https://arxiv.org/pdf/2012.07421.pdf.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2012. URL https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf.
Jayant Kumar and David Doermann. Unsupervised classification of structurally similar document images. In Proceedings of the 12th International Conference on Document Analysis and Recognition (ICDAR), 2013. URL https://ieeexplore.ieee.org/document/6628809.
Seif Laatiri, Pirashanth Ratnamogan, Joël Tang, Laurent Lam, William Vanhuffel, and Fabien Caspani. Information redundancy and biases in public document information extraction benchmarks. In Proceedings of the 17th International Conference on Document Analysis and Recognition (ICDAR), 2023. URL https://arxiv.org/pdf/2304.14936.pdf.
J. Richard Landis and Gary G. Koch. The measurement of observer agreement for categorical data. Biometrics, 33(1):159–174, 1977.
Stefan Larson, Anish Mahendran, Joseph J. Peper, Christopher Clarke, Andrew Lee, Parker Hill, Jonathan K. Kummerfeld, Kevin Leach, Michael A. Laurenzano, Lingjia Tang, and Jason Mars. An evaluation dataset for intent classification and out-of-scope prediction. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 2019.
Stefan Larson, Gordon Lim, Yutong Ai, David Kuang, and Kevin Leach. Evaluating out-of-distribution performance on document image classifiers. In Advances in Neural Information Processing Systems (NeurIPS), Datasets and Benchmarks Track, 2022.
Stefan Larson, Gordon Lim, and Kevin Leach. On evaluation of document classification with RVL-CDIP. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics (EACL), 2023. URL https://aclanthology.org/2023.eacl-main.195.
Stefan Larson, Nicole Cornehl Lima, Santiago Pedroza Diaz, Amogh Manoj Joshi, Siddharth Betala, Jamiu Tunde Suleiman, Yash Mathur, Kaushal Kumar Prajapati, Ramla Alakraa,
Junjie Shen, Temi Okotore, and Kevin Leach. De-identification of sensitive personal data in datasets derived from IIT-CDIP. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2024.
Stefan Larson, Sharad Duwal, Brian Vilnrotter, Gayatri Chakkithara, Vedant Padwal, and Kevin Leach. Spurious cues in RVL-CDIP and Tobacco3482 document classification: The case of ID codes. In Proceedings of the 2025 ACM Symposium on Document Engineering. ACM, 2025. doi: 10.1145/3704268.3748683.
Stefan Larson, Attila Nagy, Sam Desai, Cyrus Desai, Nicole Lima, Yixin Yuan, Siddharth Betala, Kaushal Kumar Prajapati, Jamiu T. Suleiman, Sharad Duwal, and Kevin Leach. Revising RVL-CDIP: Quantifying errors and test-train overlap. In Proceedings of the 2026 ACM Symposium on Document Engineering. ACM, 2026. doi: 10.1145/3820755.3821486.
D. Lewis, G. Agam, S. Argamon, O. Frieder, D. Grossman, and J. Heard. Building a test collection for complex document information processing. In Proceedings of the 29th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, 2006. doi: 10.1145/1148170.1148307. URL https://ir.cs.georgetown.edu/downloads/sigir06cdipcoll_v05-with-authors.pdf.
Patrick Lewis, Pontus Stenetorp, and Sebastian Riedel. Question and answer test-train overlap in open-domain question answering datasets. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics (EACL), 2021. doi:10.18653/v1/2021.eacl-main.86. URL https://aclanthology.org/2021.eacl-main.86.
Chenliang Li, Bin Bi, Ming Yan, Wei Wang, Songfang Huang, Fei Huang, and Luo Si. StructuralLM: Structural pre-training for form understanding. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP), 2021a. doi: 10.18653/v1/2021.acl-long.493. URL https://aclanthology.org/2021.acl-long.493.
Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, and Furu Wei. DiT: Self-supervised pre-training for document image transformer. In Proceedings of the 30th ACM International Conference on Multimedia, 2022. URL https://arxiv.org/pdf/2203.02378.pdf.
Peizhao Li, Jiuxiang Gu, Jason Kuen, Vlad I. Morariu, Handong Zhao, Rajiv Jain, Varun Manjunatha, and Hongfu Liu. SelfDoc: Self-supervised document representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021b. URL https://openaccess.thecvf.com/content/CVPR2021/papers/Li_SelfDoc_Self-Supervised_Document_Representation_Learning_CVPR_2021_paper.pdf.
Gordon Lim, Stefan Larson, and Kevin Leach. Label errors in the Tobacco3482 dataset. arXiv preprint arXiv:2412.13140, 2024.
Philipp Lindenberger, Paul-Edouard Sarlin, and Marc Pollefeys. LightGlue: Local feature matching at light speed. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023.
Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
Xixi Liu, Yaroslava Lochman, and Christopher Zach. GEN: Pushing the limits of softmax-based out-of-distribution detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
Chuwei Luo, Guozhi Tang, Qi Zheng, Cong Yao, Lianwen Jin, Chenliang Li, Yang Xue, and Luo Si. Bi-VLDoc: bidirectional vision-language modeling for visually-rich document understanding. International Journal on Document Analysis and Recognition (IJDAR), 2025. URL https://arxiv.org/pdf/2206.13155.pdf.
Minesh Mathew, Dimosthenis Karatzas, and C.V. Jawahar. DocVQA: A dataset for VQA on document images. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV), 2021. URL https://openaccess.thecvf.com/content/WACV2021/papers/Mathew_DocVQA_A_Dataset_for_VQA_on_Document_Images_WACV_2021_paper.pdf.
Tom McCoy, Ellie Pavlick, and Tal Linzen. Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019. doi: 10.18653/v1/P19-1334. URL https://aclanthology.org/P19-1334.
Meta AI. The Llama 4 herd: The beginning of a new era of natively multimodal AI innovation. https://ai.meta.com/blog/llama-4-multimodal-intelligence/, 2025. Meta AI blog post, April 2025.
Yifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun, Wei Li, and Yixuan Li. Delving into out-of-distribution detection with vision-language representations. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
Yannic Neuhaus, Maximilian Augustin, Valentyn Boreiko, and Matthias Hein. Spurious features everywhere – large-scale detection of harmful spurious features in ImageNet. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023.
Timothy Niven and Hung-Yu Kao. Probing neural network comprehension of natural language arguments. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
Curtis G. Northcutt, Anish Athalye, and Jonas Mueller. Pervasive label errors in test sets destabilize machine learning benchmarks. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, 2021a. URL https://openreview.net/pdf?id=XccDXrDNLek.
Curtis G. Northcutt, Lu Jiang, and Isaac L. Chuang. Confident learning: Estimating uncertainty in dataset labels. Journal of Artificial Intelligence Research (JAIR), 70:1373–1411, 2021b. URL https://dl.acm.org/doi/pdf/10.1613/jair.1.12125.
OpenAI. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925, 2025.
Johannes Pagel, Stefanie Vogl, and Laura Israel. Analyzing the impact of redaction on document classification performance of deep CNN models. OSF Preprints, 2024. URL https://osf.io/preprints/osf/sntb3.
Seunghyun Park, Seung Shin, Bado Lee, Junyeop Lee, Jaeheung Surh, Minjoon Seo, and Hwalsuk Lee. CORD: A consolidated receipt dataset for post-OCR parsing. In Document Intelligence Workshop at Neural Information Processing Systems, 2019.
Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
Qiming Peng, Yinxu Pan, Wenjin Wang, Bin Luo, Zhenyu Zhang, Zhengjie Huang, Yuhui Cao, Weichong Yin, Yongfeng Chen, Yin Zhang, Shikun Feng, Yu Sun, Hao Tian, Hua Wu, and Haifeng Wang. ERNIE-layout: Layout knowledge enhanced pre-training for visually-rich document understanding. In Findings of the Association for Computational Linguistics: EMNLP 2022, 2022. URL https://aclanthology.org/2022.findings-emnlp.274.
Hai Pham, Guoxin Wang, Yijuan Lu, Dinei Florencio, and Cha Zhang. Understanding long documents with different position-aware attentions. arXiv preprint arXiv:2208.08201, 2022. URL https://arxiv.org/pdf/2208.08201.pdf.
Geoff Pleiss, Tianyi Zhang, Ethan Elenberg, and Kilian Q. Weinberger. Identifying mislabeled data using the area under the margin ranking. In Advances in Neural Information Processing Systems (NeurIPS), 2020. URL https://proceedings.neurips.cc/paper/2020/file/c6102b3727b2a7d8b1bb6981147081ef-Paper.pdf.
Rafał Powalski, Łukasz Borchmann, Dawid Jurkiewicz, Tomasz Dwojak, Michał Pietruszka, and Gabriela Pałka. Going full-TILT boogie on document understanding with text-image-layout transformer. In Proceedings of the 16th International Conference on Document Analysis and Recognition (ICDAR), 2021. URL https://arxiv.org/pdf/2102.09550.pdf.
Subhojeet Pramanik, Shashank Mujumdar, and Hima Patel. Towards a multi-modal, multi-task learning based pre-training framework for document representation learning. arXiv preprint arXiv:2009.14457, 2022. URL https://arxiv.org/pdf/2009.14457v2.pdf.
Filip Radenovic, Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Re-visiting Oxford and Paris: Large-scale image retrieval benchmarking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR),
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021. URL https://proceedings.mlr.press/v139/radford21a/radford21a.pdf.
John W. Ratcliff and David E. Metzener. Pattern matching: The gestalt approach. Dr. Dobb's Journal, 1988.
Susanna Rücker and Alan Akbik. CleanCoNLL: A nearly noise-free named entity recognition dataset. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
Saifullah, Stefan Agne, Andreas Dengel, and Sheraz Ahmed. DocXclassifier: towards a robust and interpretable deep neural network for document image classification. International Journal on Document Analysis and Recognition (IJDAR), 27(3):447–473, 2024a. doi: 10.1007/s10032-024-00483-w. URL https://link.springer.com/article/10.1007/s10032-024-00483-w.
Saifullah, Stefan Agne, Andreas Dengel, and Sheraz Ahmed. The reality of high performing deep learning models: A case study on document image classification. IEEE Access, 12:103537–103564, 2024b. URL https://ieeexplore.ieee.org/document/10591981.
Gerard Salton and Christopher Buckley. Term-weighting approaches in automatic text retrieval. Information Processing & Management, 24(5):513–523, 1988.
Ritesh Sarkhel and Arnab Nandi. Deterministic routing between layout abstractions for multi-scale classification of visually rich documents. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI), 2019. URL https://www.ijcai.org/proceedings/2019/0466.pdf.
Heidi Schmidt, Karen Butter, and Cynthia Rider. Building digital tobacco industry document libraries at the University of California, San Francisco Library/Center for Knowledge Management. D-Lib Magazine, 8(9), 2002. URL https://www.dlib.org/dlib/september02/schmidt/09schmidt.html.
Talha Uddin Sheikh, Sankalp Sinha, Shino Sam, Didier Stricker, and Muhammad Zeshan Afzal. ZOD: Zero-shot and out-of-distribution detection dataset for document images. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops, pages 7554–7564, 2025.
Shoaib Ahmed Siddiqui, Andreas Dengel, and Sheraz Ahmed. Analyzing the potential of zero-shot recognition for document image classification. In Proceedings of the 16th International Conference on Document Analysis and Recognition (ICDAR), 2021. doi:10.1007/978-3-030-86337-1_20.
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2015. URL https://arxiv.org/pdf/1409.1556.pdf.
Latanya Sweeney. Protecting job seekers from identity theft. IEEE Internet Computing, 10(2):74–78, 2006. URL https://ieeexplore.ieee.org/document/1607991.
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. URL https://arxiv.org/pdf/1409.4842.pdf.
Zineng Tang, Ziyi Yang, Guoxin Wang, Yuwei Fang, Yang Liu, Chenguang Zhu, Michael Zeng, Cha Zhang, and Mohit Bansal. Unifying vision, text, and layout for universal document processing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023. URL https://arxiv.org/pdf/2212.02623.pdf.
Kate Tasker, Rachel Taketa, Charles Macquarie, and Ariel Deardorff. Digital archives and data science: Building programs and partnerships for health sciences research. In Handbook of Research on Academic Libraries as Partners in Data Science Ecosystems. IGI Global, 2022. URL https://escholarship.org/content/qt6hc248qk/qt6hc248qk.pdf.
Chris Tensmeyer and Tony Martinez. Analysis of convolutional neural networks for document image classification. In Proceedings of the 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), 2017. URL https://arxiv.org/pdf/1708.03273.pdf.
Michael Tschannen, Alexey Gritsenko, Xiao Wang, Muhammad Ferjad Naeem, Ibrahim Alabdulmohsin, Nikhil Parthasarathy, Talfan Evans, Lucas Beyer, Ye Xia, Basil Mustafa, Olivier Hénaff, Jeremiah Harmsen, Andreas Steiner, and Xiaohua Zhai. SigLIP 2: Multilingual vision-language encoders with improved semantic understanding, localization, and dense features. arXiv preprint arXiv:2502.14786, 2025.
Thomas Vakili and Hercules Dalianis. Utility preservation of clinical text after de-identification. In Proceedings of the 21st Workshop on Biomedical Language Processing, 2022. URL https://aclanthology.org/2022.bionlp-1.38.
Hieu M. Vu and Diep Thi-Ngoc Nguyen. Revising FUNSD dataset for key-value detection in document images. arXiv preprint arXiv:2010.05322, 2020.
Jiapeng Wang, Lianwen Jin, and Kai Ding. LiLT: A simple yet effective language-independent layout transformer for structured document understanding. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (ACL), 2022a. doi:10.18653/v1/2022.acl-long.534. URL https://aclanthology.org/2022.acl-long.534.
Zilong Wang, Jiuxiang Gu, Chris Tensmeyer, Nikolaos Barmpalios, Ani Nenkova, Tong Sun, Jingbo Shang, and Vlad Morariu. MGDoc: Pre-training with multi-granular hierarchy for document image understanding. In Proceedings of the 2022 Conference on Empirical
Methods in Natural Language Processing (EMNLP), 2022b. URL https://aclanthology.org/2022.emnlp-main.265.
Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. URL https://arxiv.org/pdf/1611.05431.
Errita Xu, Stefan Larson, and Kevin Leach. Sensitive data detection in documents with LLMs. In Proceedings of the 2026 ACM Symposium on Document Engineering. ACM, 2026. doi: 10.1145/3820755.3832805.
Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, and Lidong Zhou. LayoutLMv2: Multi-modal pre-training for visually-rich document understanding. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP), 2021. doi:10.18653/v1/2021.acl-long.201. URL https://aclanthology.org/2021.acl-long.201.
Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, and Ming Zhou. LayoutLM: Pre-training of text and layout for document image understanding. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2020. doi: 10.1145/3394486.3403172. URL https://arxiv.org/pdf/1912.13318.pdf.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jing Zhou, Jingren Zhou, Junyang Lin, Kai Dang, Keqin Bao, Kexin Yang, Le Yu, Lianghao Deng, Mei Li, Mingfeng Xue, Mingze Li, Pei Zhang, Peng Wang, Qin Zhu, Rui Men, Ruize Gao, Shixuan Liu, Shuang Luo, Tianhao Li, Tianyi Tang, Wenbiao Yin, Xingzhang Ren, Xinyu Wang, Xinyu Zhang, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yinger Zhang, Yu Wan, Yuqiong Liu, Zekun Wang, Zeyu Cui, Zhenru Zhang, Zhipeng Zhou, and Zihan Qiu. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.
Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. Generalized out-of-distribution detection: A survey. International Journal of Computer Vision, 132(12):5635–5662, 2024. doi: 10.1007/s11263-024-02117-4.
Kaiyu Yang, Jacqueline Yau, Li Fei-Fei, Jia Deng, and Olga Russakovsky. A study of face obfuscation in ImageNet. In Proceedings of the 39th International Conference on Machine Learning (ICML), 2022. URL https://proceedings.mlr.press/v162/yang22q/yang22q.pdf.
Yuechen Yu, Yulin Li, Chengquan Zhang, Xiaoqiang Zhang, Zengyuan Guo, Xiameng Qin, Kun Yao, Junyu Han, Errui Ding, and Jingdong Wang. StructexTv2: Masked visual-textual prediction for document image pre-training. In Proceedings of the 11th International Conference on Learning Representations (ICLR), 2023. URL https://openreview.net/pdf?id=HE_75XY5Ljh.
Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. Sigmoid loss for language image pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023.
Guangyu Zhu, Yefeng Zheng, David Doermann, and Stefan Jaeger. Multi-scale structural saliency for signature detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2007. URL https://ieeexplore.ieee.org/document/4270280.
Stefano Pio Zingaro, Giuseppe Lisanti, and Maurizio Gabbrielli. Multimodal side-tuning for document classification. In Proceedings of the 25th International Conference on Pattern Recognition (ICPR), 2021. URL https://arxiv.org/pdf/2301.07502.pdf.
Appendix A. Released Artifacts
In this section, we describe the annotations, corpora, models and code that we release with this paper, and we state where each of them is hosted. In addition, the website https://rvlcdip-errors.com/ is a web interface to a database of our annotations, in which the reader can browse the documents whose labels we judged to be wrong and the test-train duplicates that we found.
A.1 Inventory
Table A.1 lists the artifacts, several of which are described further below. The de-identification pipeline is publicly available on GitHub.
Table A.1: Artifacts released with this paper.
| Artifact | Contents | Section |
|---|---|---|
| Category criteria | 16 operational definitions | Section 4 |
| Label annotations | 400,000 judgments; error type; corrected label where determined | Section 5 |
| Corrected corpus variants | the conditions of Section 10 | Section 10 |
| Duplicate pairs | test-train and validation-train pairs | Section 6 |
| Duplicate calibration set | 1,528 pairs judged by hand, 403 matches | Section 6 |
| ID code annotations | 11,102 boxes (RVL-CDIP), 3,774 (Tobacco3482) | Section 7 |
| ID code detections | 446,332 boxes with transcriptions, all of RVL-CDIP | Section 7 |
| ID code detector | trained YOLOv8 weights | Section 7 |
| ID code classifiers | code | Section 7 |
| ID-code-free corpora | RVL-CDIP and Tobacco3482 | Section 7 |
| RVL-CDIP-N | 1,002 documents, 12 categories | Section 8 |
| RVL-CDIP-O | 2,915 documents | Section 8 |
| Trained classifiers | 7 image, 4 text and layout, 12 linear models | Section 10 |
| De-identified corpora | five IIT-CDIP-derived datasets | Section 3 |
| De-identification pipeline | code | Section 3 |
| OCR text layers | Tesseract 4.1.1 and Textract, tokens and boxes | Section 9 |
The label annotations contain our judgment for each of the 400,000 documents. Where a document was judged wrong and a correct label could be determined, that label is included; where it was judged mixed, all applicable labels are recorded. The annotations are hosted on the Hugging Face Hub as one record per document in the order of the RVL-CDIP label files, giving the original label, the judgment, the corrected label, the second category of a mixed document, and the annotators' free-text note, with the exception of the notes that marked a page as containing personal data, which were removed before release.
The duplicate pairs are hosted on the Hugging Face Hub.
The duplicate calibration set, which consists of the 1,528 pairs that we judged by hand and our judgments, is available at https://rvlcdip-errors.com/.
The identification-code annotations and detections and the detector are hosted on the Hugging Face Hub. The dataset contains the bounding box and the transcription of every code, for the hand-annotated RVL-CDIP documents and Tobacco3482 and for the 446,332 regions that the detector found on the full RVL-CDIP corpus, each transcribed by OCR of the cropped region, together with the path of the page in the original release so that the records can be joined against the corpus as distributed. About 1% of the detected regions are not identification codes, and the transcriptions of eight of them that had the form of a social security number were removed after manual review.
The code for the identification-code classifiers of Section 7.3 and Appendix J is publicly available on GitHub.
RVL-CDIP-N and RVL-CDIP-O are hosted on the Hugging Face Hub, each as the page images together with the Textract text of every page and the raw Textract responses, which contain the word and line boxes.
The trained classifiers are released as weights with the code that loads them. The repository contains seven image classifiers (AlexNet, GoogLeNet, ResNet-50, ResNeXt-50, SqueezeNet, VGG-16, and DiT-base), four models that read the OCR output (BERT, RoBERTa, LayoutLM, and LayoutLMv3), and twelve linear support vector machines: three on TF-IDF features of the OCR text (the Textract text with and without tokens describing the amount of handwriting, and the Tesseract text), three on frozen image features (CLIP embeddings, SigLIP embeddings, and the pooled features of a ResNet-50 trained on ImageNet), and six on the TF-IDF features concatenated with each of the three kinds of image features, with and without the handwriting tokens. Each model is released in four variants that cross the original and the corrected labels with training pages in which the identification codes are kept or removed. All were trained on the de-identified corpus; for the neural models one of the three training seeds is released, which was fixed in advance and not selected by accuracy, and the support vector machines are deterministic and have a single run.
The Tesseract and Textract OCR text layers are hosted on the Hugging Face Hub together with the page images of the de-identified corpus and of its counterpart without
-
https://huggingface.co/datasets/stefan-hf/rvlcdip-label-fixes
-
https://huggingface.co/datasets/stefan-hf/rvlcdip-duplicates
-
https://huggingface.co/datasets/stefan-hf/rvlcdip-id-codes and https://huggingface.co/stefan-hf/yolov8n-rvlcdip-idcodes
-
https://huggingface.co/datasets/stefan-hf/rvlcdip-n and https://huggingface.co/datasets/stefan-hf/rvlcdip-o
-
https://huggingface.co/stefan-hf/rvlcdip-classifiers identification codes. We produced both layers by running the two engines on the de-identified pages.
A.2 Release Policy for Sensitive Data
We distribute the de-identified versions of the corpora as the default. Section 3 shows that de-identification has almost no effect on classification: none of the documents in that evaluation changed its predicted label, and the mean changes in confidence were of order . We therefore see no reason for research to prefer the original data.
We do not release the locations, types, or values of the sensitive entities that our annotation found. Combined with the original corpora, which remain publicly downloadable from their existing sources, the locations alone would show where each Social Security number appears, so we report the annotation only through the aggregate statistics of Section 3. Our obligations conflict at this point, and we discuss the conflict in the Broader Impact Statement.
A.3 Provenance and Licensing
All artifacts are keyed to the original RVL-CDIP file identifiers, so that they can be joined against the corpus as distributed. Annotations are released in plain-text tabular formats, and each is versioned, since several supersede figures reported in our earlier papers and readers will need to know which version a given number came from.
Appendix B. Datasets Used by the Surveyed Papers
Table B.1 lists, for each of the 34 papers of Table 2, the datasets on which it evaluates document classification and other tasks and the document corpus on which it pre-trains; Section 2.2 summarizes it.
Table B.1: Datasets used by the 34 papers of Table 2, all of which evaluate document classification on RVL-CDIP. “Other tasks” counts datasets used for tasks other than classification (IE: information extraction, VQA: question answering, LA: layout analysis, TSR: table structure, OCR: text detection and recognition, NLI: natural language inference). †: not publicly available. “—” in the last column: no document-corpus pre-training.
| Paper | Tobacco3482 | Other classif. | Other tasks | Pre-training |
|---|---|---|---|---|
| Csurka et al. (2016) | — | NIST-2, MARG, CLEF-IP, IH1-3† | — | — |
| Tensmeyer and Martinez (2017) | — | ANDOC† | — | — |
| Afzal et al. (2017) | ● | — | — | RVL-CDIP |
| Das et al. (2018) | — | — | — | — |
| Sarkhel and Nandi (2019) | ● | NIST-6, MARG | — | — |
| Dauphinee et al. (2019) | — | — | — | — |
| Audebert et al. (2019) | ● | — | — | — |
| Xu et al. (2020) | — | — | 2 (IE) | IIT-CDIP |
| Ferrando et al. (2020) | ● | — | — | — |
| Zingaro et al. (2021) | ● | — | — | — |
| Li et al. (2021a) | — | — | 2 (IE, VQA) | IIT-CDIP |
| Li et al. (2021b) | — | — | 1 (IE) | RVL-CDIP |
| Xu et al. (2021) | — | — | 5 (IE, VQA) | IIT-CDIP |
| Appalaraju et al. (2021) | — | — | 3 (IE) | IIT-CDIP |
| Powalski et al. (2021) | — | — | 3 (IE, VQA) | RVL-CDIP, IDL |
| Bakkali et al. (2021) | ● | — | — | — |
| Gu et al. (2021) | — | — | 3 (IE, LA) | IIT-CDIP |
| Huang et al. (2022) | — | — | 4 (IE, VQA, LA) | IIT-CDIP |
| Li et al. (2022) | — | — | 3 (LA, TSR, OCR) | IIT-CDIP |
| Wang et al. (2022a) | — | — | 3 (IE) | IIT-CDIP |
| Wang et al. (2022b) | — | — | 2 (IE) | RVL-CDIP |
| Kim et al. (2022) | — | — | 4 (IE, VQA) | IIT-CDIP |
| Davis et al. (2022) | — | — | 6 (IE, VQA, OCR) | IIT-CDIP |
| Peng et al. (2022) | — | — | 5 (IE, VQA) | IDL crawl |
| Pham et al. (2022) | — | — | 2 (IE) | IIT-CDIP |
| Delteil et al. (2022) | — | — | 2 (IE) | IIT-CDIP |
| Bakkali et al. (2023) | ● | NIST-6 | — | — |
| Saifullah et al. (2024a) | ● | — | — | RVL-CDIP |
| Pramanik et al. (2022) | — | arXiv† | 2 (IE, TSR) | arXiv† |
| Luo et al. (2025) | — | — | 3 (IE, VQA) | IIT-CDIP |
| Bai et al. (2023) | — | — | 4 (IE, VQA) | IIT-CDIP |
| Yu et al. (2023) | — | — | 4 (IE, LA, TSR, OCR) | IIT-CDIP |
| Tang et al. (2023) | — | — | 13 (IE, VQA, LA, NLI) | IIT-CDIP |
| Fujitake (2024) | — | — | 3 (IE, VQA) | inherited |
Appendix C. Sensitive Entity Types and Automated Detection
Table C.1 describes what each entity type of Table 3 covers. Besides the eleven types, the annotators marked signatures, a residual other category, and in a few regions person names, which were not annotated systematically (Appendix E.1).
We evaluated four PII detectors against the annotations: Presidio 2.2.33, Google DLP, the language service of Microsoft Azure, and Amazon Comprehend. All four read text, so we gave them the Textract OCR of each page, and we measured recall at the document level on 1,773 annotated documents. Table C.2 shows which entity types each detector supports and its recall on them. Seven of the eleven types are supported by none of the detectors, and Google DLP is the only one that detects dates of birth and sex or gender. All four find every annotated age, but recall on Social Security numbers ranges from 0.70 for Azure to 0.97 for Presidio.
The missed Social Security numbers follow from how the detectors use context (Figure C.1). A detector that looks for a keyword such as SSN near a nine-digit number misses a number whose label is in a column heading far above it, and misses a number that is written without any label, as in a biographical sketch that gives it in parentheses after the name. Placing a redaction by its position relative to a field label is also unreliable (Figure C.2): on a form that prints the options of a field, the text next to the label is a printed option, and the value that the person entered is elsewhere on the line.
Table C.1: The sensitive entity types recorded during annotation.
| Entity type | Covers |
|---|---|
| US Social Security number | A full Social Security number, or a part of one such as the last four digits. |
| Date of birth | A person’s date of birth, in any format. |
| Age | A person’s age, stated as a number. |
| Place of birth | The city, state or country in which a person was born. |
| Marital/parental/spousal status | A person’s marital status and the number of their children, which are often in separate fields. |
| Home address | A residential address, in full or in its parts (street, city, state, ZIP code). The address of an employer or other organization is not included. |
| Home telephone number | A residential telephone number. Business numbers are not included. |
| Citizenship/nationality | A person’s citizenship or nationality. |
| Religious affiliation | A person’s religion or denomination. |
| Sex/gender | A person’s sex or gender, as entered in a field. |
| Health status | A statement about a person’s health. |
| Other | Sensitive content outside these types, such as the photograph on a scanned driver’s license. |
Table C.2: Document-level recall of four PII detectors on 1,773 annotated documents, by entity type. A dash marks a type that the detector does not support.
| Entity type | Presidio | Google DLP | Azure | Amazon |
|---|---|---|---|---|
| US Social Security number | 0.97 | 0.93 | 0.70 | 0.77 |
| Date of birth | – | 0.82 | – | – |
| Age | 1.00 | 1.00 | 1.00 | 1.00 |
| Sex/gender | – | 1.00 | – | – |
| Place of birth | – | – | – | – |
| Marital/parental/spousal status | – | – | – | – |
| Home address | – | – | – | – |
| Home telephone number | – | – | – | – |
| Citizenship/nationality | – | – | – | – |
| Religious affiliation | – | – | – | – |
| Health status | – | – | – | – |
| Biographical Information | ||
|---|---|---|
| Last name, first name | Date of Birth | Social Security # |
| Smith, John A. | 09/01/60 | 123-45-6789 |
| PRINCIPAL INVESTIGATOR/PROGRAM DIRECTOR: John B. Smith, Ph.D. | ||
| BIOPRAPHICAL SKETCH SS#123-45-6789 | ||
| John C. Smith, 1988 | ||
| John C. Smith, Ph.D. (123-45-6789) Professor of Biology and Chemistry | ||
| Born: 3/2/70 | ||
Figure C.1: Reconstructed examples, with invented values, of the layouts in which detectors missed Social Security numbers. In the top example the label is in a column heading above the number, and in the bottom example the number has no label.

Figure C.2: A reconstructed citizenship field. The text next to the label is the printed option U.S., and the entered value is Sweden, after Other.
Appendix D. Sensitive Data in Datasets Derived from IIT-CDIP
Section 3 reports the RVL-CDIP counts. Table D.1 shows them for all five datasets derived from IIT-CDIP, since a sensitive entity on an RVL-CDIP page recurs in every other dataset built from the same source page.
Table D.1: Sensitive entity counts across the five IIT-CDIP-derived datasets. “Documents affected” counts documents containing at least one sensitive entity, so it is not the column sum.
| RVL-CDIP | Tob.3482 | Tob.800 | FUNSD | DocVQA | Total | |
|---|---|---|---|---|---|---|
| Dataset size | 400,000 | 3,482 | 1,290 | 199 | 12,767 | 417,738 |
| US Social Security no. | 2,342 | 9 | 5 | 2 | 70 | 2,428 |
| Date of birth | 12,800 | 62 | 7 | — | 232 | 13,101 |
| Place of birth | 6,125 | 29 | 7 | — | 123 | 6,284 |
| Age | 219 | — | — | — | 44 | 263 |
| Home address | 3,908 | 6 | 1 | 1 | 276 | 4,192 |
| Home telephone | 1,801 | 4 | — | — | 143 | 1,948 |
| Marital/parental status | 4,228 | 18 | 7 | — | 116 | 4,369 |
| Citizenship/nationality | 2,647 | 19 | — | — | 49 | 2,715 |
| Sex/gender | 602 | 3 | — | — | 88 | 693 |
| Health status | 60 | — | — | — | 2 | 62 |
| Religious affiliation | 43 | — | — | — | 4 | 47 |
| Documents affected | 15,956 | 66 | 12 | 2 | 360 | 16,396 |
Appendix E. The De-Identification Pipeline
The pipeline of Section 3 is released as doc-redact. In this appendix, we describe how the pipeline generates the replacement values and chooses the typeface, and how we checked the annotations before any page was rendered. The encoding of the output pages is described in Appendix E.4.
E.1 Replacement Values
The pipeline has a value generator for fifteen annotation categories, listed in Table E.1. Four of the categories are the parts of a home address (street, city, state and ZIP code), for annotations that mark them separately, and two, person names and other identification numbers, are not among the eleven entity types of Table 3; names were not annotated systematically, and the generator covers the few regions in which one was marked. Sex and gender, health status, signatures and the residual other category have no generator, and their regions are erased and refilled but not written back (Section 3).
Replacements are consistent within a page. When the same value appears in more than one region, such as a Social Security number entered on two forms or a date of birth written both as 4/12/50 and as April 12, 1950, all of its regions receive one replacement, each written in its own format. Addresses are linked by their parts, so that a street, a city and a ZIP code that recur on a page, whether in full addresses or in separately annotated parts, are each replaced in the same way everywhere they occur. The marital status and the number of children are linked in the same way, because they are often annotated as separate regions. The original values are compared only in memory and are not stored.
E.2 Typeface Matching
The nineteen print typefaces, shown in Figure E.1, are of four kinds: serif (Liberation Serif in regular and bold, Gelasio, and TeX Gyre Pagella, Schola and Bonum), sans-serif (Liberation Sans in regular and bold, Carlito, and DejaVu Sans), typewriter faces with serifs (Courier Prime and Courier 10 Pitch, each in regular and bold, Cutive Mono, and Special Elite), and monospaced sans-serif (Liberation Mono, Inconsolata, and DejaVu Sans Mono). All are distributed under licenses that allow redistribution, and they are included with the doc-redact code. Regions whose words Textract labels as handwriting are matched against twelve handwriting typefaces instead, and the letters of a handwritten replacement are drawn one at a time, each with a small random change of size, height, spacing and rotation, so that a repeated letter is not drawn identically twice.
Only words of at least four letters and at least 10 pixels in height are compared, since shorter words do not distinguish between typefaces. The words inside the region are tried first, longest first, and if none of them qualifies, the words on the same line nearest to the region are used; this is the case for a Social Security number or a telephone number, which contains no letters. Each candidate typeface renders a word at the size at which its width matches the scan, and at 3% smaller and larger, and the scan and the rendering are compared by chamfer distance over shifts of up to 3 pixels. Each word ranks the typefaces, and the typeface with the lowest total rank over at most three words is chosen. If no word can be
(a) Print typefaces
| Liberation Serif (serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
|---|---|
| Liberation Serif Bold (serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Gelasio (serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| TeX Gyre Pagella (serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| TeX Gyre Schola (serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| TeX Gyre Bonum (serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Liberation Sans (sans-serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Liberation Sans Bold (sans-serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Carlito (sans-serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| DejaVu Sans (sans-serif) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Courier Prime (typewriter) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Courier Prime Bold (typewriter) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Courier 10 Pitch (typewriter) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Courier 10 Pitch Bold (typewriter) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Cutive Mono (typewriter) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Special Elite (typewriter) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Liberation Mono (monospaced sans) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Inconsolata (monospaced sans) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| DejaVu Sans Mono (monospaced sans) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
(b) Handwriting typefaces
| Patrick Hand (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
|---|---|
| Kalam (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Architects Daughter (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Caveat (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Indie Flower (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Gochi Hand (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Shadows Into Light (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Reenie Beanie (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Nothing You Could Do (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Covered By Your Grace (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Just Another Hand (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
| Homemade Apple (handwriting) | Margaret Ellison, 4127 Oak Ridge Road, 05/31/55 |
Figure E.1: The typefaces bundled with doc-redact: (a) print, (b) handwriting, drawn here without the per-letter changes.
Table E.1: Value generators of the de-identification pipeline. Each replacement is written in the format of the original where the format can be detected, and in a format chosen at random otherwise.
| Category | Replacement |
|---|---|
| Social Security number | Nine digits in the form the Social Security Administration issues: area 001 to 899 other than 666, group 01 to 99, serial 0001 to 9999. A partial number, such as the last four digits, is filled digit by digit in the layout of the original. |
| Date of birth | A date between 1930 and 1970, in the original's format (numeric or with the month written out, its separators, and a two- or four-digit year). |
| Age | A number between 29 and 59. |
| Place of birth | A real US city, with the state written as in the original (postal code, traditional abbreviation, full name, or omitted). |
| Marital/parental/spousal status | One status (married, divorced, widowed or single) and one number of children (none to four) per document, written as in the original (a word, an initial, a coded entry such as “c. 2”, or a count of children). |
| Home address | A street line in the usual US form, named after a tree, a president, a surname, a US place or a numbered street, with a real US city and a ZIP code from the range of the state it is written beside. |
| Street, city, state, ZIP | As for a home address, for annotations that mark the parts separately. |
| Home telephone number | Ten digits that follow the North American Numbering Plan, so that the area code and the exchange both begin with 2 to 9, in the original's layout. |
| Citizenship/nationality | One of 25 forms, from American and U.S.A. to Canadian and Japanese. |
| Religious affiliation | One of seven affiliations, such as Catholic or Jewish. |
| Other identification number | Seven to twelve digits, in the layout of the original where it consists of digits and separators. |
| Person name | A given name and a surname, with any title of the original kept and the given name chosen to agree with it. |
measured, the replacement is drawn in Inconsolata, or in Patrick Hand for handwriting. The matcher's errors are most likely where a region and its line offer only one or two measurable words, since the vote then rests on few letters, and it can then choose a serif face for text that is set in a bold sans-serif.
E.3 Checking Annotations Before Rendering
Before rendering, the pipeline compares the OCR text inside each annotated region with the region's category, and flags the regions where the two disagree. A region is flagged if it contains no OCR words; if its text reads as a date and its category is not a date of birth, a home address or a street; if its text has the form of a Social Security number and its category is not that; if its category consists of digits (Social Security number, telephone number, age, ZIP code or date of birth) and its text has none; or if its category is a word (place of birth, marital status, religion, nationality, city or state) and its text has only digits and punctuation. We used these flags to find annotation errors before the pages were rendered.
A further flag records that the format of the original could not be detected, in which case the generator chooses a format at random.
E.4 Encoding and Use of OCR
We describe here how the pages of the released corpus are encoded and how the replacement pipeline uses OCR. RVL-CDIP is distributed as TIFF files, which we converted to JPEG at quality 75, and the pipeline reads these copies and writes the de-identified pages as JPEG at quality 95. Re-encoding changes the whole page and not only the replaced regions: measured against the quality-75 copies outside all annotated regions, the mean change is 0.31 gray levels, against 0.003 for a lossless encode. The same encoding is applied to all pages and therefore to all conditions in Section 10, so the comparisons between those conditions are made on equally encoded pages. Our figures are therefore not bitwise comparable with previously published RVL-CDIP results, although the comparison of original and de-identified pages in Section 3 indicates that the difference is smaller than the precision at which those results are reported, and our measurements are made on the files that we distribute.
The words, and the word boxes from which the pipeline measures size, baseline and typeface, are obtained from Amazon Textract. Since Section 9 compares Textract against Tesseract as engines, we note that these are two different uses of it: Textract located the words a replacement had to imitate, on the 4% of pages that contain an annotation; it did not produce any text on which a model is evaluated, and both engines are run over the replaced pages on equal terms.
Appendix F. Confident Learning on RVL-CDIP
Confident learning (Northcutt et al., 2021b) estimates which labels of a dataset are wrong from the out-of-sample class probabilities of a model trained on those labels. We apply it to the RVL-CDIP test split, for which the review of Section 5 gives the status of every label: 4,719 of the 40,000 test pages (11.8%) have a label error (4,317) or an unsure label (402), and in this appendix we count all of them as wrong labels; the review assigned a corrected category to 1,166 of them. The probabilities are those of the eleven fine-tuned models of Section 10.1, trained on the original labels and on pages with identification codes with three seeds each, and they are out-of-sample for the test pages because the models were trained on the training split. We use the cleanlab package (version 2.9.0) with its default settings, and we count a flagged page as correct when the review found its label wrong.
Table F.1 shows, for each of the eleven models, the share of test labels that confident learning estimates to be wrong, the share of pages that it flags, and the precision and recall of the flagged pages against our review. Depending on the model, confident learning estimates that between 2.0 and 6.0% of the test labels are wrong, where the review finds 11.8%. It flags 2.2 to 6.6% of the pages, 39.7 to 57.1% of the flagged pages have a wrong label, and the flagged pages contain 10.5 to 22.8% of the wrong labels. LayoutLMv3, the most accurate of the eleven models, yields the smallest estimate (2.0%) and finds the smallest share of the wrong labels (10.5%). The three other confident-learning filters of the package find 8.6 to 25.4% of the wrong labels, and the rule that flags every page whose predicted category differs from its label finds 23.5 to 38.4% at a precision of 38.3 to 53.3%. When the pages are ranked by the label-quality score of the package and as many pages are inspected as
Table F.1: Confident learning on the RVL-CDIP test split, scored against the label review, which finds a label error or an unsure label on 11.8% of the 40,000 test pages. Estimate is the share of wrong labels estimated by the method and Flagged the share of pages that it flags; precision and recall are those of the flagged pages; at 4,719 is the precision among the 4,719 pages with the lowest label-quality score. All values are in percent and are means over three seeds.
| Model | Test acc. | Estimate | Flagged | Precision | Recall | P at 4,719 |
|---|---|---|---|---|---|---|
| Image | ||||||
| AlexNet | 89.3 | 4.5 | 5.3 | 39.7 | 17.8 | 37.2 |
| GoogLeNet | 89.2 | 5.9 | 6.6 | 40.4 | 22.6 | 38.1 |
| SqueezeNet | 88.7 | 3.4 | 4.3 | 44.9 | 16.4 | 39.9 |
| VGG-16 | 91.3 | 6.0 | 6.3 | 42.6 | 22.8 | 38.6 |
| ResNet-50 | 90.9 | 5.2 | 5.7 | 44.3 | 21.5 | 39.6 |
| ResNeXt-50 | 91.3 | 4.9 | 5.3 | 44.8 | 20.3 | 39.5 |
| DiT-base | 92.8 | 3.6 | 4.0 | 47.1 | 15.8 | 40.0 |
| Text | ||||||
| BERT-base | 92.3 | 5.3 | 5.6 | 47.6 | 22.5 | 35.7 |
| RoBERTa-base | 92.5 | 4.8 | 5.1 | 51.2 | 22.1 | 38.5 |
| Multi-modal | ||||||
| LayoutLM-base | 93.4 | 4.5 | 4.7 | 52.1 | 20.6 | 34.5 |
| LayoutLMv3-base | 94.8 | 2.0 | 2.2 | 57.1 | 10.5 | 39.1 |
there are wrong labels, 34.5 to 40.0% of the inspected pages have a wrong label. The wrong labels that the review could correct are found about as often as those of the pages without a corrected category (11.1 to 26.1% against 10.3 to 22.3%), and for a flagged page of the first kind the prediction of the model is the corrected label in 66.6 to 89.0% of the cases.
Table F.2 shows the same quantities for each category. In letter, the category with the most wrong labels, the review finds 30.7% of the test labels wrong, and the method flags 5.6% of the pages, which contain 12.3% of the wrong labels; in budget the three values are 21.3, 5.2 and 14.9%, and email has the lowest recall of the sixteen categories (5.1%). The same procedure applied to the models trained on the corrected labels, with the corrected test labels, flags 0.9 to 3.8% of the 36,446 pages of the corrected test split.
Confident learning therefore underestimates the label error rate of the test split by a factor of two to six, and with its default settings it finds less than a quarter of the wrong labels that the review found. We did not apply it to the training split, which would require probabilities from cross-validation.
Table F.2: Confident learning by original category on the RVL-CDIP test split: number of test pages, share of wrong labels according to the review, and the share of pages flagged, with the precision and recall of the flags. Values are in percent and are means over the eleven models and three seeds of Table F.1.
| Category | n | Wrong labels | Flagged | Precision | Recall |
|---|---|---|---|---|---|
| letter | 2,464 | 30.7 | 5.6 | 68.5 | 12.3 |
| budget | 2,505 | 21.3 | 5.2 | 63.5 | 14.9 |
| form | 2,506 | 16.5 | 10.6 | 47.7 | 30.1 |
| questionnaire | 2,435 | 15.2 | 5.9 | 55.8 | 20.1 |
| invoice | 2,477 | 14.8 | 4.6 | 55.6 | 16.6 |
| scientific_report | 2,498 | 13.2 | 10.3 | 31.9 | 23.8 |
| handwritten | 2,532 | 12.7 | 3.4 | 70.3 | 16.4 |
| 2,516 | 11.1 | 0.8 | 68.9 | 5.1 | |
| advertisement | 2,515 | 10.9 | 4.8 | 41.1 | 16.4 |
| news_article | 2,463 | 9.5 | 5.6 | 51.9 | 30.3 |
| scientific_publication | 2,571 | 8.3 | 4.0 | 45.1 | 21.6 |
| memo | 2,492 | 8.1 | 3.6 | 49.6 | 21.5 |
| presentation | 2,489 | 6.3 | 9.0 | 29.3 | 40.2 |
| file_folder | 2,527 | 5.7 | 1.9 | 55.0 | 16.6 |
| specification | 2,472 | 3.4 | 3.5 | 37.2 | 36.0 |
| resume | 2,537 | 1.5 | 1.6 | 39.1 | 32.0 |
Appendix G. Original and Corrected Labels
Table G.1 cross-tabulates the original and corrected labels of the 15,366 documents across all three splits that the review found wrong and relabeled (Section 5); documents found unknown, which have no corrected label, are not included.
Table G.1: Original label (rows) against corrected label (columns) for the 15,366 relabeled documents of RVL-CDIP, all splits. Empty cells are zero. adv = advertisement, bud = budget, ema = email, fol = file_folder, frm = form, hw = handwritten, inv = invoice, let = letter, mem = memo, news = news_article, pres = presentation, qst = questionnaire, res = resume, pub = scientific_publication, rep = scientific_report, spec = specification.
| adv | bud | ema | fol | frm | hw | inv | let | mem | news | pres | qst | res | pub | rep | spec | Total | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| adv | - | 1 | 1 | 38 | 22 | 16 | 14 | 17 | 39 | 1 | 1 | 1 | 151 | ||||
| bud | - | 156 | 53 | 370 | 1,499 | 10 | 16 | 6 | 7 | 3 | 2,120 | ||||||
| ema | 2 | 15 | - | 3 | 7 | 2 | 52 | 138 | 32 | 49 | 1 | 2 | 15 | 318 | |||
| fol | 2 | 1 | - | 12 | 10 | 1 | 2 | 2 | 1 | 4 | 3 | 1 | 1 | 40 | |||
| frm | 62 | 6 | 100 | - | 74 | 188 | 82 | 90 | 1 | 21 | 6 | 20 | 255 | 905 | |||
| hw | 39 | 2 | 1 | 45 | 78 | - | 1 | 234 | 19 | 6 | 106 | 3 | 2 | 536 | |||
| inv | 1 | 1,846 | 54 | 97 | 34 | - | 82 | 12 | 3 | 2,129 | |||||||
| let | 3 | 3 | 175 | 44 | 81 | 272 | 15 | - | 3,253 | 11 | 7 | 1 | 3 | 7 | 1 | 2 | 3,878 |
| mem | 1 | 11 | 48 | 77 | 176 | 3 | 92 | - | 1 | 2 | 3 | 17 | 431 | ||||
| news | 40 | 56 | 23 | 3 | 1 | 4 | - | 455 | 544 | 1,126 | |||||||
| pres | 6 | 3 | 162 | 18 | 100 | 14 | 3 | 19 | - | 8 | 2 | 335 | |||||
| qst | 11 | 2 | 122 | 118 | 205 | 972 | 48 | 3 | 5 | - | 3 | 1 | 1 | 3 | 1,494 | ||
| res | 1 | - | 1 | 2 | |||||||||||||
| pub | 38 | 2 | 1 | 1 | 548 | - | 3 | 4 | 597 | ||||||||
| rep | 1 | 28 | 34 | 257 | 449 | 8 | 6 | 1 | 3 | 2 | 203 | - | 30 | 1,022 | |||
| spec | 1 | 37 | 104 | 58 | 9 | 65 | 5 | 3 | - | 282 |
Appendix H. Identification Codes: Leading-Digit Distribution
Table H.1 shows the leading-character distribution for all sixteen categories, which Section 7 discusses. Figure H.1 shows the position of the detected codes on the page for all sixteen categories.

Figure H.1: Position of the identification codes detected on all 400,000 RVL-CDIP pages, by original category, as the share of the category's pages with a code at each position; the number under each panel is the share of its pages with at least one detected code.
Table H.1: Frequency of the leading character of identification codes, by category, for the digits 0–9. Percentages within a row; rows do not sum to 100 because leading characters other than digits are omitted.
| Category | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| advertisement | 3.5 | 4.2 | 34.4 | 2.7 | 1.4 | 30.4 | 8.1 | 2.0 | 3.8 | 5.4 |
| budget | 1.5 | 0.7 | 37.6 | 0 | 0 | 2.2 | 4.5 | 0.7 | 7.0 | 9.1 |
| 0 | 0.2 | 54.4 | 0 | 0.4 | 16.4 | 0.2 | 14.0 | 0.2 | 0.2 | |
| file_folder | 5.8 | 0.6 | 76.4 | 0 | 1.1 | 2.3 | 1.3 | 1.9 | 5.9 | 1.7 |
| form | 2.4 | 0.7 | 64.4 | 0.1 | 1.0 | 18.0 | 2.6 | 0.4 | 4.1 | 5.6 |
| handwritten | 0 | 0 | 0 | 0 | 0.1 | 99.9 | 0 | 0 | 0 | 0 |
| invoice | 4.1 | 3.5 | 38.4 | 0.3 | 0 | 8.0 | 4.6 | 1.9 | 17.5 | 11.6 |
| letter | 2.7 | 3.6 | 24.3 | 0.2 | 0.6 | 44.1 | 8.2 | 1.5 | 4.2 | 4.2 |
| memo | 3.0 | 8.1 | 40.2 | 1.1 | 1.1 | 4.8 | 14.5 | 2.7 | 9.2 | 6.7 |
| news_article | 6.5 | 17.9 | 51.7 | 0.5 | 0 | 0.3 | 2.7 | 0 | 2.1 | 1.5 |
| presentation | 1.4 | 2.0 | 68.7 | 0.1 | 0.7 | 1.7 | 6.2 | 0.7 | 7.2 | 6.2 |
| questionnaire | 6.5 | 7.2 | 32.8 | 0.1 | 3.2 | 29.0 | 8.4 | 2.1 | 7.1 | 1.6 |
| resume | 4.0 | 3.7 | 19.1 | 0 | 12.5 | 51.3 | 1.6 | 0.5 | 4.0 | 0.5 |
| scientific_publication | 12.7 | 8.9 | 35.3 | 0 | 1.6 | 9.2 | 1.2 | 0.3 | 3.6 | 3.1 |
| scientific_report | 5.9 | 8.1 | 62.4 | 0 | 0.3 | 3.7 | 1.4 | 0 | 13.7 | 1.4 |
| specification | 1.3 | 0.6 | 72.6 | 0.6 | 0 | 18.2 | 5.0 | 0.6 | 0.7 | 0 |
| All | 3.7 | 4.5 | 45.6 | 0.4 | 1.1 | 20.1 | 4.3 | 2.1 | 5.5 | 3.6 |
Appendix I. Identification Codes: Features of the Code-Only Classifier
The XGBoost classifier of Section 7.3 receives one feature vector per document, computed from the bounding boxes of the identification codes on the page and from the transcriptions of the text inside them, and Table I.1 lists the features by group with the number in each group for RVL-CDIP, 330 in total. A page with several codes is described mainly through the first code that has a transcription, which we call the main code, and a page without a code keeps its row with the code features missing, so that the absence of a code is itself available to the classifier. For RVL-CDIP the boxes are the regions that the detector of Section 7.4 removed, which exist on 91% of pages (446,332 boxes on 364,168 pages), and each box was cropped with a margin of four pixels, turned upright, and transcribed with Amazon Textract, which returned text for 99.5% of the boxes; for Tobacco3482 the boxes and the transcriptions are those of the annotation.
The first three groups describe where the ID code is located and what kind of string it is without recording which digits or letters it contains beyond the first, and they depend on the equipment and conventions of the party that numbered the document and not on the content of the document. The format, prefix, and nearest-number groups do record the content of the code, by replacing a pattern, a prefix, or a position in the numbering sequence with the categories observed for it among the training documents, which lets the classifier learn that a particular range of Bates numbers belongs largely to one category; these features depend on the training labels, so for a training document they are computed from the other four of five folds of the training set and for a test document from the whole training set, and no document's own label enters its features. The two OCR groups describe how legible the ID code is, through the confidence of the engine on the crop and through whether the engine could read the code when given the whole page, which it did for 42% of RVL-CDIP pages, and they therefore depend on the size and quality of the print and not on the content of the code. Several features are redundant by construction, the ratios being functions of the counts and the normalized quantities of the raw ones, which is harmless for tree ensembles that split on one feature at a time. For Tobacco3482 the same groups are computed from the annotated boxes and transcriptions, with distributions over ten categories in place of sixteen and without the rotation fields, which exist only for the RVL-CDIP crops.
The second configuration of Table 8 adds the class probabilities of a convolutional network that sees only the pixels of the code. Each crop is scaled to a height of 32 pixels and placed on a white canvas of 32 by 256 pixels, and the network, which has five residual blocks of 32 to 256 channels followed by global average pooling, is trained from scratch for 20 epochs on the crops of the training documents with the category of the document as the target; a page with several codes receives the mean of their log-probabilities. The probabilities given to the XGBoost classifier are out-of-fold for the training documents, from five networks each trained on four fifths of the training pages, and the mean of the five networks for the test documents. For Tobacco3482 the network is trained in the same way within each of the ten splits, for 60 epochs on about 2,800 crops, and the network trained on RVL-CDIP is not reused because the two corpora share documents. All XGBoost models use the default settings of the library.
Table I.1: Features of the code-only classifier of Section 7.3, by group, with the number of features in each group for RVL-CDIP (sixteen categories). The main code is the first code on the page that has a transcription.
| Group | Features | N |
|---|---|---|
| Bounding box | position, height, width, area, and center of the main code's box, the area and the center both in pixels and as shares of the page, and whether the box is wider than it is tall | 11 |
| All codes on the page | number of codes, the boxes and orientations of up to three codes, the box enclosing all of them, and the numbers of horizontal and vertical codes | 23 |
| Length and characters | length of the main code in characters and in tokens, the numbers and shares of digits and of letters, and its first character, also as indicators for a digit and for a letter | 9 |
| String structure | number of space-separated groups and the lengths of the first two, the leading run of digits as a number and its logarithm, the number of leading letters, and indicators for a trailing letter and for a hyphen | 8 |
| Format and prefixes | for the pattern of digits and letters of the main code and for each of its first one to five characters, the distribution over categories of the training codes that share it and the logarithm of their number | 102 |
| Nearest numbers | among training codes with the same pattern, the distribution over categories of the five nearest in numeric value, the logarithm of the distance to the nearest, and its category | 18 |
| Second code | the string structure, format and prefix, and nearest-number features of the second transcribed code on the page, computed against all training codes | 128 |
| OCR of the crop | for the main and the second code, the confidence of the engine, the rotation chosen for the crop and how it was determined, the confidence of the rejected rotation, and whether both rotations returned the same text; for the page, the number of transcribed codes and their mean and minimum confidence | 19 |
| OCR of the page | for the main and the second code, whether OCR of the full page returned text inside the box, whether that text equals or is contained in the reading of the crop, their string similarity and length ratio; for the page, the number and share of codes that full-page OCR read | 12 |
Appendix J. Identification Codes: Supplementary Results for the Code-Only Classifier
Figure J.1 shows how the accuracy of the code-only classifier of Section 7.3 on RVL-CDIP is built up as the feature groups of Table I.1 are added. The position and size of the boxes together with the number of codes on the page yield an accuracy of 42.0% against a chance rate of 6.25%, which is already above the 39.2% that Siddiqui et al. (2021) report for zero-shot CLIP on the whole page, and adding the length of the code and its counts of digits, letters, and tokens raises this to 44.9%. The largest steps come from the content of the code: its format and its first one to five characters bring the accuracy to 58.4%, and the categories of the training codes nearest in numeric value add a further 8.1 points for 66.5%, so that the classifier gains more than twenty points from learning which party produced the document and in which batch it was numbered. The features of the second code and the two OCR groups add 2.7 points for the 69.2% of Table 8; added one group at a time to the 66.5% model, the OCR of the crop contributes 1.7 points, the OCR of the page 1.1, and the second code 0.5. The convolutional network obtains 59.0% from the pixels of the crops alone, without the position of the box or any transcription, and its probabilities raise the 66.5% model to 69.0% but the 69.2% model only to 69.9%, which indicates that the network and the OCR groups capture largely the same property of the ID code, namely how it was printed. On Tobacco3482 the corresponding figures are 56.7% before the second-code and OCR groups, 56.5% with them, and 57.8% with the network, whose probabilities alone yield an accuracy of 51.3%, and none of these differences exceeds the standard deviation over the ten splits (0.7 to 1.2 points).
The file-name classifier of Section 7.3 uses the string-structure, format and prefix, and nearest-number groups of Table I.1, computed from the first number in the file name of the page in the original release, together with the length of the name and, where the name contains a range, the number of pages in the range, for 130 features, and obtains 68.8% on the RVL-CDIP test split; the folder name, which is the document identifier of the source archive, adds target encodings of its final characters and raises the accuracy to 70.3%, and yields an accuracy of 41.4% when used alone. For Tobacco3482 the image file names yield an accuracy of 55.6% (standard deviation 1.4 over the ten splits). The nearest-number features, here as for the ID codes on the page, can use near-duplicate documents and multi-page documents whose pages are in different splits (Section 6), so part of this accuracy is due to the overlap between the splits.
The signal is unevenly distributed over the categories, as Figure J.2 shows for the classifier without the convolutional network: it recovers email (95.9%), handwritten (94.0%), resume (91.1%), and specification (86.0%) from the code in more than five cases out of six, whereas memo (37.3%) and letter (36.4%) are recovered in fewer than two cases out of five. Table J.1, which is computed from the annotated sample, shows part of the explanation, since the categories that are recovered most reliably are those whose codes have a format of their own: 98% of the codes on handwritten documents are two-part codes of five and four digits, a format that no more than 43% of the codes in any other category share; 47% of resume documents do not have a code, against at most 19% elsewhere, and the codes that they do have are vertical in only 31% of cases where every other category is at 51% or above; and email has the largest share of codes containing letters (40%).

Figure J.1: Accuracy of the code-only classifier on the RVL-CDIP test split as groups of features are added cumulatively (XGBoost, 320,000 training documents). The dashed line marks zero-shot CLIP applied to the whole page (Siddiqui et al., 2021), and the dotted line a linear SVM trained on frozen ImageNet ResNet-50 features of the whole page (Table K.1).

Figure J.2: Recall of the code-only classifier by category on the 40,000 documents of the RVL-CDIP test split.
Table J.1: Format of identification codes by category in the 11,200 annotated RVL-CDIP documents, in percent. No code is the share of documents without a code; the remaining columns are shares of the documents that have one: codes whose box is taller than it is wide, two-part codes of five and four digits, ten-digit numbers, and codes containing at least one letter.
| Category | No code | Vertical | Two-part | Ten digits | Letters |
|---|---|---|---|---|---|
| advertisement | 4 | 73 | 30 | 39 | 5 |
| budget | 0 | 60 | 1 | 39 | 36 |
| 0 | 63 | 22 | 36 | 40 | |
| file_folder | 11 | 86 | 0 | 76 | 3 |
| form | 3 | 88 | 18 | 65 | 2 |
| handwritten | 0 | 94 | 98 | 0 | 1 |
| invoice | 7 | 74 | 8 | 40 | 10 |
| letter | 12 | 84 | 43 | 28 | 6 |
| memo | 13 | 70 | 2 | 50 | 9 |
| news_article | 0 | 73 | 0 | 61 | 27 |
| presentation | 4 | 84 | 0 | 71 | 5 |
| questionnaire | 5 | 85 | 27 | 39 | 3 |
| resume | 47 | 31 | 0 | 21 | 3 |
| scientific_publication | 19 | 51 | 0 | 47 | 27 |
| scientific_report | 2 | 86 | 0 | 71 | 4 |
| specification | 1 | 76 | 18 | 73 | 1 |
In the earlier version of this experiment, a random forest that used only code features and was trained to discriminate between two categories at a time separated email from budget with 97% accuracy, and email and resume were each distinguishable from the remaining categories at rates between 78% and 97%.
Appendix K. Joint Remediation: Per-Condition Detail
Figure K.1 shows the four training variants of Table 13 as connected pairs, and Figure K.2 charts the loss at test time shown in Figure 17 for every model, including the zero-shot models, which are 0.3 to 1.8 points more accurate on the pages without codes, except Jev with the page image, which is 0.6 points less accurate (Section 10).
Tables K.1 and K.2 show all twelve linear SVMs, of which Tables 12 and 13 show the SVM on TF-IDF text and the SVM on TF-IDF text with SigLIP embeddings. Each is a one-vs-rest linear SVM whose regularization strength, and for the fusion models the weight of the image block, is chosen on validation accuracy: three read the OCR text alone (TF-IDF features of the Textract text with and without the handwriting tokens, and of the Tesseract text), three read frozen image features alone (the pooled features of a ResNet-50 trained on ImageNet, CLIP embeddings and SigLIP embeddings), and six read the TF-IDF features concatenated with one of the three kinds of image features, with and without the handwriting tokens. The handwriting tokens (HW in the tables) are two pseudo-words added to the TF-IDF input of each page, both computed from its Textract output: the number of words on the page, in bins of powers of two, and the share of these words that Textract marks as handwritten, in tenths.

Figure K.1: Accuracy on RVL-CDIP-N by training variant, one line per model, from Table 13. Left: models trained on the original and on the corrected labels, both with codes. Middle and right: models trained with and without codes, under the original and under the corrected labels.
Table K.1: Accuracy (%) of the twelve linear SVMs on the RVL-CDIP test split under the conditions of Table 12, one run each. HW adds two tokens that give the number of words on the page and the share that Textract marks as handwriting; the image features come from frozen encoders.
| Model | All test pages | De-duplicated | Codes removed | Full | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Orig. | Drop. | Fixed | Fixed+RT | Orig. | Drop. | Fixed | Fixed+RT | Test | +RT | ||
| n | 40,000 | 35,280 | 36,446 | 36,446 | 25,923 | 22,530 | 23,132 | 23,132 | 40,000 | 40,000 | 23,132 |
| Text | |||||||||||
| TF-IDF | 88.9 | 93.0 | 91.2 | 93.4 | 84.7 | 90.0 | 89.1 | 90.3 | 88.8 | 88.8 | 90.3 |
| TF-IDF + HW | 89.8 | 94.1 | 92.3 | 94.6 | 86.0 | 91.6 | 90.8 | 92.2 | 89.7 | 89.7 | 92.2 |
| TF-IDF, Tesseract text | 79.8 | 84.0 | 82.5 | 84.7 | 74.0 | 79.1 | 78.5 | 80.2 | 79.6 | 79.7 | 80.0 |
| Image features | |||||||||||
| ResNet-50 (ImageNet) | 76.9 | 81.5 | 80.4 | 82.3 | 74.7 | 80.0 | 79.4 | 80.8 | 75.3 | 76.4 | 80.4 |
| CLIP | 87.5 | 92.8 | 91.5 | 93.8 | 85.4 | 91.8 | 91.1 | 93.0 | 87.1 | 87.4 | 92.8 |
| SigLIP | 90.7 | 95.1 | 93.4 | 95.6 | 88.6 | 94.0 | 93.1 | 94.7 | 89.7 | 90.3 | 94.8 |
| Text and image features | |||||||||||
| TF-IDF + ResNet-50 | 92.1 | 95.9 | 93.9 | 96.2 | 89.2 | 94.2 | 93.1 | 94.6 | 91.9 | 91.9 | 94.6 |
| TF-IDF + CLIP | 92.3 | 96.4 | 94.5 | 96.8 | 89.7 | 94.9 | 94.0 | 95.5 | 92.1 | 92.3 | 95.4 |
| TF-IDF + SigLIP | 93.1 | 96.8 | 94.8 | 97.1 | 90.6 | 95.5 | 94.4 | 96.0 | 92.5 | 92.8 | 96.0 |
| TF-IDF + HW + ResNet-50 | 92.2 | 96.0 | 94.0 | 96.3 | 89.4 | 94.4 | 93.3 | 94.8 | 92.0 | 92.1 | 94.8 |
| TF-IDF + HW + CLIP | 92.4 | 96.4 | 94.5 | 96.9 | 89.7 | 95.0 | 94.1 | 95.6 | 92.2 | 92.4 | 95.5 |
| TF-IDF + HW + SigLIP | 93.1 | 96.9 | 94.9 | 97.1 | 90.7 | 95.6 | 94.5 | 96.1 | 92.5 | 92.8 | 96.0 |

Figure K.2: Test accuracy lost when the identification codes are removed from the test pages, for every model. Filled markers are models trained with codes on the original labels, hollow markers the same architectures trained with codes on the corrected labels; the public checkpoints and the zero-shot models have one value.
Because Textract decides whether a word is handwritten from the page image, an SVM with these tokens is no longer a text-only model. With the corrected labels and retraining, the text-only SVMs obtain 93.4% on Textract text, 94.6% with the handwriting tokens and 84.7% on Tesseract text, the image-only SVMs 82.3% on the ResNet-50 features, 93.8% on CLIP and 95.6% on SigLIP embeddings, and the fusions 96.2, 96.8 and 97.1% for the three encoders, to which the handwriting tokens add at most 0.2 points. On RVL-CDIP-N the same three fusions obtain 91.9, 95.6 and 97.3%, against 85.7% for the TF-IDF text alone and 62.1, 88.3 and 95.6% for the three kinds of image features alone. When the identification codes are removed from the test pages under the original labels, the SVM on ImageNet ResNet-50 features loses the most of the twelve (1.6 points, from 76.9 to 75.3%), followed by the SVM on SigLIP embeddings (1.0 points), and the three text-only SVMs lose at most 0.2 points.
Table K.3 extends the zero-shot text row of Table 12 to five decision models, each of which is given the Textract text of a page together with the sixteen category names and is run once without any training on RVL-CDIP; the columns are the test-side conditions of that table and the accuracy on RVL-CDIP-N.
Table K.2: Accuracy (%) of the linear SVMs on RVL-CDIP-N by training variant, one run each. The SVM trained on Tesseract text is left out, because the RVL-CDIP-N text is Textract output.
| Model | Original | Fixed labels | Codes removed | Both |
|---|---|---|---|---|
| Text | ||||
| TF-IDF | 84.6 | 85.7 | 84.5 | 86.1 |
| TF-IDF + HW | 90.5 | 92.1 | 90.3 | 92.1 |
| Image features | ||||
| ResNet-50 (ImageNet) | 56.0 | 62.1 | 54.0 | 60.5 |
| CLIP | 81.1 | 88.3 | 80.8 | 88.7 |
| SigLIP | 87.7 | 95.6 | 90.1 | 95.8 |
| Text and image features | ||||
| TF-IDF + ResNet-50 | 85.9 | 91.9 | 86.3 | 91.9 |
| TF-IDF + CLIP | 88.3 | 95.6 | 88.0 | 95.1 |
| TF-IDF + SigLIP | 89.8 | 97.3 | 92.0 | 97.0 |
| TF-IDF + HW + ResNet-50 | 86.1 | 93.2 | 86.3 | 93.6 |
| TF-IDF + HW + CLIP | 88.6 | 95.1 | 88.3 | 95.2 |
| TF-IDF + HW + SigLIP | 90.4 | 97.3 | 92.0 | 97.0 |
Table K.3: Accuracy (%) of zero-shot decision models that read Textract text, under the test-side conditions of Table 12 and on RVL-CDIP-N. Full applies corrected labels, code removal and de-duplicated test pages together. Each model is run once.
| Model | All test pages | De-duplicated | Codes removed | Full | RVL-CDIP-N | ||||
|---|---|---|---|---|---|---|---|---|---|
| Orig. | Drop. | Fixed | Orig. | Drop. | Fixed | ||||
| 40,000 | 35,280 | 36,446 | 25,923 | 22,530 | 23,132 | 40,000 | 23,132 | 1,002 | |
| Jev 1.13 | 67.0 | 72.9 | 72.3 | 66.5 | 73.0 | 72.5 | 67.4 | 73.3 | 84.8 |
| Bespoke-Nimble-9B | 63.0 | 68.3 | 67.7 | 62.6 | 68.8 | 68.4 | 63.3 | 69.0 | 80.4 |
| clef-flash | 59.3 | 64.0 | 63.5 | 57.5 | 62.8 | 62.3 | 59.4 | 62.3 | 82.2 |
| Strands Decider 2B | 53.5 | 57.3 | 56.4 | 50.8 | 54.9 | 54.3 | 53.5 | 54.2 | 80.3 |
| Laya (English) | 35.2 | 37.6 | 37.1 | 31.3 | 33.7 | 33.4 | 35.4 | 33.6 | 52.2 |
When Jev is given the page image in place of the OCR text, it is 6.2 points more accurate under the corrected test labels (78.5 against 72.3%), and the two inputs lead to the same prediction on 84.1% of the test pages. Most of the gain is in categories that are recognized by their layout: the accuracy on handwritten rises from 3 to 49%, on file_folder from 63 to 83%, on advertisement from 84 to 93% and on form from 70 to 80%, whereas presentation, budget and resume remain between 32 and 65% with either input. To compare how much of a page the codes occupy in each category, we counted the pixels darker than half of the gray scale on 150 random test pages per category, with and without the codes. The codes make up a median of 6.3% of these pixels on the file_folder pages and 9.8% on the 314 file_folder pages that Jev classifies correctly only with the codes (corrected labels), 6.2% on the email pages, on which the accuracy of Jev does not change, and between 0.1 and 1.9% in the other fourteen categories. Without the codes, Jev assigns 144 of these 314 pages to scientific_publication and 66 to handwritten.
Table K.4: Accuracy (%) of the zero-shot large language models by prompt, on the pages that have OCR text, under the test-side conditions of Table 12 without code removal and on RVL-CDIP-N. Each model is run once per prompt.
| Model | Prompt | All test pages | De-duplicated | RVL-CDIP-N | ||||
|---|---|---|---|---|---|---|---|---|
| Orig. | Drop. | Fixed | Orig. | Drop. | Fixed | |||
| 38,377 | 33,796 | 34,922 | 24,324 | 21,062 | 21,624 | 1,001 | ||
| Llama 4 Maverick | 1, names only | 67.6 | 73.5 | 72.8 | 65.3 | 72.0 | 71.6 | 87.8 |
| 2, corpus-grounded | 73.8 | 80.4 | 79.9 | 69.3 | 76.6 | 76.4 | 88.3 | |
| 3, generic | 67.8 | 73.6 | 73.0 | 65.2 | 72.0 | 71.4 | 86.4 | |
| gpt-oss-20b | 1, names only | 64.6 | 70.2 | 69.7 | 63.8 | 70.1 | 69.7 | 84.3 |
| 2, corpus-grounded | 70.6 | 76.7 | 76.2 | 67.9 | 74.8 | 74.5 | 83.2 | |
| 3, generic | 64.8 | 70.4 | 69.8 | 63.3 | 69.6 | 69.2 | 82.3 | |
| Qwen 3 32B | 1, names only | 62.3 | 67.3 | 66.4 | 62.6 | 68.9 | 68.5 | 85.4 |
| 2, corpus-grounded | 63.6 | 68.5 | 67.7 | 61.5 | 67.7 | 67.3 | 81.6 | |
| 3, generic | 58.6 | 63.1 | 62.3 | 56.7 | 62.1 | 61.7 | 81.8 | |
| Mistral 7B | 1, names only | 57.0 | 61.6 | 60.9 | 54.3 | 59.8 | 59.4 | 78.2 |
| 2, corpus-grounded | 54.6 | 58.6 | 58.1 | 54.5 | 59.7 | 59.4 | 76.4 | |
| 3, generic | 55.1 | 59.5 | 58.8 | 53.0 | 58.3 | 58.0 | 68.3 | |
Table K.4 shows the accuracy of the four large language models of Table 12 with each of the three prompts of Appendix M, under the test-side conditions that do not remove the identification codes and on RVL-CDIP-N; Tables 12 and 13 show the rows of Prompt 1. The models were run on the pages that have OCR text and are scored on those pages, so that the number of pages in each condition is smaller than in Table 12, and Appendix N tests the differences between the prompts under the original condition.
Table K.5 shows macro accuracy, the mean of the per-category recalls over the categories present, for the models of Tables 12 and 13; we did not compute it for the four large language models. On RVL-CDIP-N, which covers twelve categories with unequal numbers of pages, macro accuracy under the original labels is higher than micro accuracy for 13 of the 15 trained models and public checkpoints, by up to 7.2 points for Donut and 6.3 points for LayoutLMv3, because the 176 handwritten pages, which make up 17.6% of RVL-CDIP-N and on which several of these models are weakest, count for one twelfth of the macro average. Training on the corrected labels raises the macro accuracy of every retrained model on RVL-CDIP-N, by 1.6 to 9.6 points, which is less than the gain in micro accuracy for every retrained model except the TF-IDF SVM (1.6 against 1.1 points), so that part of the micro gain is due to the larger weight of the handwritten pages.
Table K.5: Macro accuracy (%), mean per-category recall) on the RVL-CDIP test split, in three of the conditions of Table 11, and on RVL-CDIP-N by training variant, as in Table 13.
| Model | Test split | RVL-CDIP-N | |||||
|---|---|---|---|---|---|---|---|
| Orig. | Fixed+RT | Full | Original | Fixed | No codes | Both | |
| Image | |||||||
| AlexNet | 89.3 | 92.7 | 87.0 | 62.9 | 71.7 | 63.4 | 70.1 |
| GoogLeNet | 89.2 | 93.0 | 87.5 | 66.2 | 74.2 | 65.1 | 72.2 |
| SqueezeNet | 88.6 | 92.5 | 87.3 | 66.2 | 74.9 | 64.8 | 73.1 |
| VGG-16 | 91.2 | 94.5 | 89.5 | 69.4 | 77.8 | 70.3 | 77.1 |
| ResNet-50 | 90.8 | 94.2 | 89.3 | 69.7 | 77.2 | 67.1 | 76.5 |
| ResNeXt-50 | 91.3 | 94.6 | 89.9 | 68.8 | 78.3 | 69.5 | 76.2 |
| DiT-base | 92.7 | 95.9 | 92.4 | 76.6 | 86.2 | 76.2 | 84.7 |
| Text | |||||||
| BERT-base | 92.3 | 95.6 | 92.8 | 89.5 | 93.6 | 88.7 | 93.5 |
| RoBERTa-base | 92.5 | 96.0 | 93.2 | 91.2 | 94.1 | 89.8 | 94.4 |
| Multi-modal | |||||||
| LayoutLM-base | 93.4 | 96.7 | 94.4 | 92.8 | 96.3 | 90.6 | 95.8 |
| LayoutLMv3-base | 94.8 | 97.5 | 95.6 | 90.0 | 97.2 | 90.5 | 96.1 |
| Linear baselines | |||||||
| TF-IDF SVM | 88.9 | 93.4 | 89.4 | 86.4 | 88.0 | 86.5 | 88.3 |
| TF-IDF + SigLIP SVM | 93.1 | 97.1 | 94.9 | 89.3 | 96.7 | 91.7 | 96.2 |
| Public checkpoints | |||||||
| DocXClassifier | 94.0 | – | 91.8 | 79.7 | – | – | – |
| Donut | 95.2 | – | 87.3 | 86.1 | – | – | – |
| Zero-shot, image | |||||||
| CLIP ViT-L/14 | 43.7 | – | 48.3 | 81.6 | – | – | – |
| ALIGN | 47.0 | – | 52.1 | 86.0 | – | – | – |
| SigLIP | 56.3 | – | 62.8 | 92.8 | – | – | – |
| SigLIP 2 | 54.0 | – | 58.9 | 89.5 | – | – | – |
| Zero-shot, text | |||||||
| Jev 1.13 | 67.1 | – | 74.5 | 91.6 | – | – | – |
Appendix L. Out-of-Distribution Supplementary Results
All models are evaluated on the same three sets: the 40,000 documents of the RVL-CDIP test split, the 1,002 of RVL-CDIP-N, and the 2,915 of RVL-CDIP-O. Every image is converted to grayscale on load, for every model and every set, because the released RVL-CDIP-O images are in color while RVL-CDIP and RVL-CDIP-N are grayscale, and color alone would otherwise mark the out-of-scope documents. The text and multi-modal models use Amazon Textract OCR. The five CNNs, BERT, RoBERTa, LayoutLM and LayoutLMv3 are the models of Section 10, each trained once on the original and once on the corrected labels; DiT, DocXClassifier and Donut are their authors' published RVL-CDIP checkpoints, for which no corrected-label version exists. Donut is generative, so its logits are the decoder's next-token logits over the sixteen category tokens that follow its task prefix, and its prediction is the category it would generate if restricted to a valid one. The zero-shot vision-language models score each image against sixteen captions of the form This is a photo of a letter document.,
Table L.1: Out-of-scope separability (AUC under the energy score) by training variant, as Table 15, for the models that produce logits.
| Model | T-O | N-O | ||||||
|---|---|---|---|---|---|---|---|---|
| Original | Fixed | No codes | Both | Original | Fixed | No codes | Both | |
| Image | ||||||||
| AlexNet | 0.912 | 0.931 | 0.894 | 0.923 | 0.676 | 0.741 | 0.661 | 0.723 |
| GoogLeNet | 0.874 | 0.879 | 0.860 | 0.856 | 0.627 | 0.691 | 0.626 | 0.660 |
| SqueezeNet | 0.885 | 0.882 | 0.852 | 0.869 | 0.644 | 0.719 | 0.665 | 0.722 |
| VGG-16 | 0.924 | 0.943 | 0.907 | 0.936 | 0.683 | 0.770 | 0.664 | 0.751 |
| ResNet-50 | 0.897 | 0.895 | 0.887 | 0.884 | 0.645 | 0.709 | 0.634 | 0.701 |
| ResNeXt-50 | 0.907 | 0.908 | 0.887 | 0.894 | 0.641 | 0.728 | 0.634 | 0.705 |
| DiT-base | 0.911 | 0.926 | 0.892 | 0.927 | 0.714 | 0.800 | 0.704 | 0.793 |
| Text | ||||||||
| BERT-base | 0.837 | 0.869 | 0.821 | 0.864 | 0.834 | 0.888 | 0.817 | 0.884 |
| RoBERTa-base | 0.848 | 0.870 | 0.838 | 0.877 | 0.848 | 0.895 | 0.839 | 0.902 |
| Multi-modal | ||||||||
| LayoutLM-base | 0.851 | 0.879 | 0.846 | 0.880 | 0.848 | 0.907 | 0.840 | 0.919 |
| LayoutLMv3-base | 0.905 | 0.943 | 0.905 | 0.933 | 0.840 | 0.928 | 0.845 | 0.899 |
| Public checkpoints | ||||||||
| DocXClassifier | 0.809 | - | - | - | 0.626 | - | - | - |
| Donut | 0.960 | - | - | - | 0.840 | - | - | - |
| Zero-shot, image | ||||||||
| CLIP ViT-L/14 | 0.861 | - | - | - | 0.756 | - | - | - |
| ALIGN | 0.611 | - | - | - | 0.666 | - | - | - |
| SigLIP | 0.864 | - | - | - | 0.812 | - | - | - |
| SigLIP 2 | 0.796 | - | - | - | 0.820 | - | - | - |
one per category. Their logits are the image-text similarities scaled by each model's learned temperature (and, for SigLIP and SigLIP 2, offset by its learned bias), so the scores computed through a softmax depend on that temperature; we use each model's own.
Section 10.5 reports maximum softmax probability and the energy score. We also compute two further post-hoc scores from the same logits. MaxLogit (Hendrycks et al., 2022) is the largest unnormalized logit, , which keeps the magnitude information that the softmax discards. GEN (Liu et al., 2023) is the negated generalized entropy of the softmax probabilities , with ; it weights small probabilities heavily, and so remains informative when the largest is close to one. For the zero-shot models we add MCM (Ming et al., 2022), the confidence function usually used with vision-language models: maximum softmax probability over the raw cosine similarities at temperature 1 and not at the model's learned temperature. Table L.2 shows AUC under every score, and Table L.3 the false positive rate at 95% true positive rate (FPR95): the share of RVL-CDIP-O accepted at the threshold that accepts 95% of in-domain documents.
None of the alternative scores changes a conclusion of Section 10.5 or Section 11: under every score, the CNNs separate the -O setting worse than every text and multi-modal model, and retraining on the corrected labels raises -O AUC in eight of the nine pairs. With sixteen classes MaxLogit cannot differ from the energy score by more than log 16, and
Table L.2: AUC under each confidence function. (corrected): retrained on the corrected labels. MCM needs cosine similarities, so is defined for the zero-shot models only.
| Model | T-O | N-O | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| MSP | Energy | MaxLogit | GEN | MCM | MSP | Energy | MaxLogit | GEN | MCM | |
| AlexNet | 0.880 | 0.914 | 0.914 | 0.912 | – | 0.645 | 0.673 | 0.673 | 0.673 | – |
| AlexNet (corrected) | 0.886 | 0.919 | 0.919 | 0.917 | – | 0.740 | 0.751 | 0.751 | 0.755 | – |
| GoogLeNet | 0.837 | 0.845 | 0.845 | 0.849 | – | 0.604 | 0.594 | 0.595 | 0.599 | – |
| GoogLeNet (corrected) | 0.842 | 0.829 | 0.829 | 0.840 | – | 0.684 | 0.661 | 0.662 | 0.674 | – |
| ResNet-50 | 0.874 | 0.875 | 0.875 | 0.884 | – | 0.624 | 0.600 | 0.601 | 0.611 | – |
| ResNet-50 (corrected) | 0.868 | 0.861 | 0.862 | 0.871 | – | 0.689 | 0.682 | 0.683 | 0.690 | – |
| ResNeXt-50 | 0.882 | 0.889 | 0.889 | 0.895 | – | 0.618 | 0.612 | 0.613 | 0.619 | – |
| ResNeXt-50 (corrected) | 0.877 | 0.874 | 0.874 | 0.881 | – | 0.724 | 0.702 | 0.703 | 0.715 | – |
| VGG-16 | 0.889 | 0.930 | 0.930 | 0.928 | – | 0.661 | 0.668 | 0.669 | 0.672 | – |
| VGG-16 (corrected) | 0.881 | 0.925 | 0.925 | 0.923 | – | 0.759 | 0.765 | 0.765 | 0.771 | – |
| DiT-base | 0.895 | 0.892 | 0.893 | 0.895 | – | 0.733 | 0.759 | 0.749 | 0.745 | – |
| DiT-large | 0.814 | 0.825 | 0.831 | 0.787 | – | 0.691 | 0.731 | 0.725 | 0.687 | – |
| DocXClassifier | 0.897 | 0.808 | 0.857 | 0.867 | – | 0.707 | 0.626 | 0.672 | 0.688 | – |
| Donut | 0.909 | 0.960 | 0.960 | 0.954 | – | 0.793 | 0.840 | 0.840 | 0.828 | – |
| BERT | 0.859 | 0.845 | 0.845 | 0.849 | – | 0.841 | 0.858 | 0.857 | 0.851 | – |
| BERT (corrected) | 0.854 | 0.834 | 0.834 | 0.846 | – | 0.866 | 0.872 | 0.871 | 0.876 | – |
| RoBERTa | 0.868 | 0.857 | 0.857 | 0.861 | – | 0.838 | 0.871 | 0.871 | 0.865 | – |
| RoBERTa (corrected) | 0.851 | 0.832 | 0.833 | 0.841 | – | 0.908 | 0.908 | 0.908 | 0.908 | – |
| LayoutLM | 0.861 | 0.865 | 0.867 | 0.871 | – | 0.834 | 0.858 | 0.858 | 0.855 | – |
| LayoutLM (corrected) | 0.820 | 0.827 | 0.828 | 0.832 | – | 0.802 | 0.829 | 0.828 | 0.820 | – |
| LayoutLMv3 | 0.893 | 0.907 | 0.906 | 0.906 | – | 0.827 | 0.838 | 0.838 | 0.836 | – |
| LayoutLMv3 (corrected) | 0.894 | 0.909 | 0.908 | 0.910 | – | 0.876 | 0.910 | 0.909 | 0.899 | – |
| CLIP ViT-L/14 | 0.623 | 0.861 | 0.864 | 0.606 | 0.616 | 0.806 | 0.756 | 0.785 | 0.852 | 0.845 |
| ALIGN | 0.655 | 0.612 | 0.633 | 0.678 | 0.677 | 0.861 | 0.666 | 0.731 | 0.891 | 0.894 |
| SigLIP | 0.710 | 0.862 | 0.863 | 0.807 | 0.800 | 0.890 | 0.812 | 0.838 | 0.925 | 0.926 |
| SigLIP 2 | 0.673 | 0.797 | 0.799 | 0.671 | 0.681 | 0.916 | 0.820 | 0.861 | 0.946 | 0.945 |
its AUC is within 0.009 of energy's for every supervised model except DocXClassifier, whose energy score separates unusually poorly (T-O AUC 0.808, against 0.897 under maximum softmax probability) and which MaxLogit partly recovers (0.857). Among the supervised models, GEN differs from the better of maximum softmax probability and energy by between -0.044 (DiT-large, N-O) and +0.009 (ResNet-50, T-O). For the zero-shot models the four scores disagree far more. In the N-O setting GEN is the best of the four for every zero-shot model (0.852 to 0.946) and energy the worst, while in the T-O setting MaxLogit is the best for three of the four. MCM raises every zero-shot model's N-O AUC above maximum softmax probability at the model's own temperature, by 0.029 to 0.039, and agrees with GEN to within 0.010 in both settings: GEN's small exponent flattens the probabilities much as a higher temperature does. The scores agree less closely at a fixed operating point than across all thresholds: LayoutLM's T-O AUC varies by only 0.011 across the four scores, yet at the 95% threshold it accepts between 58.1% and 83.4% of RVL-CDIP-O, depending on the score.
Table L.3: FPR95 (%) under each confidence function: the share of RVL-CDIP-O accepted at the threshold that accepts 95% of in-domain documents. Lower is better. (corrected): retrained on the corrected labels. MCM needs cosine similarities, so is defined for the zero-shot models only.
| Model | T-O | N-O | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| MSP | Energy | MaxLogit | GEN | MCM | MSP | Energy | MaxLogit | GEN | MCM | |
| AlexNet | 69.0 | 51.0 | 51.3 | 50.8 | – | 90.5 | 91.6 | 91.2 | 90.5 | – |
| AlexNet (corrected) | 66.2 | 49.8 | 50.1 | 50.6 | – | 86.3 | 86.7 | 85.6 | 85.5 | – |
| GoogLeNet | 74.5 | 62.8 | 63.1 | 62.8 | – | 93.3 | 92.8 | 93.0 | 92.9 | – |
| GoogLeNet (corrected) | 73.8 | 65.5 | 65.9 | 65.7 | – | 90.7 | 87.2 | 86.8 | 86.6 | – |
| ResNet-50 | 67.1 | 56.3 | 56.0 | 55.4 | – | 92.5 | 93.6 | 93.4 | 93.2 | – |
| ResNet-50 (corrected) | 68.6 | 58.3 | 58.7 | 58.4 | – | 91.9 | 90.4 | 90.5 | 90.5 | – |
| ResNeXt-50 | 63.9 | 49.4 | 50.1 | 50.7 | – | 92.4 | 92.1 | 92.4 | 91.9 | – |
| ResNeXt-50 (corrected) | 66.0 | 54.9 | 55.1 | 54.4 | – | 84.8 | 87.1 | 86.8 | 87.3 | – |
| VGG-16 | 61.3 | 42.2 | 42.2 | 43.6 | – | 89.2 | 90.7 | 90.8 | 90.3 | – |
| VGG-16 (corrected) | 61.4 | 48.2 | 48.1 | 48.2 | – | 85.3 | 86.4 | 85.8 | 85.3 | – |
| DiT-base | 57.8 | 49.5 | 53.3 | 49.7 | – | 84.6 | 85.2 | 83.7 | 83.4 | – |
| DiT-large | 58.4 | 55.5 | 55.7 | 53.0 | – | 86.6 | 84.0 | 84.9 | 84.3 | – |
| DocXClassifier | 48.3 | 66.5 | 52.1 | 56.0 | – | 87.9 | 91.9 | 90.4 | 89.7 | – |
| Donut | 41.2 | 19.8 | 20.5 | 25.0 | – | 83.4 | 74.8 | 74.4 | 81.8 | – |
| BERT | 82.9 | 88.7 | 88.0 | 87.3 | – | 75.2 | 64.8 | 65.4 | 67.2 | – |
| BERT (corrected) | 80.4 | 83.0 | 83.6 | 82.5 | – | 69.6 | 63.5 | 64.3 | 64.2 | – |
| RoBERTa | 81.8 | 87.2 | 87.4 | 87.2 | – | 69.3 | 60.1 | 61.0 | 61.6 | – |
| RoBERTa (corrected) | 83.7 | 83.5 | 84.6 | 83.0 | – | 60.0 | 53.5 | 53.5 | 53.4 | – |
| LayoutLM | 58.1 | 83.4 | 82.3 | 75.3 | – | 67.6 | 59.5 | 60.7 | 59.1 | – |
| LayoutLM (corrected) | 65.1 | 89.5 | 88.9 | 80.5 | – | 77.5 | 68.9 | 68.7 | 70.4 | – |
| LayoutLMv3 | 53.7 | 39.1 | 40.9 | 40.8 | – | 79.1 | 74.1 | 76.3 | 74.8 | – |
| LayoutLMv3 (corrected) | 54.3 | 43.1 | 43.9 | 44.9 | – | 59.5 | 47.9 | 50.1 | 50.8 | – |
| CLIP ViT-L/14 | 91.8 | 54.9 | 51.8 | 94.1 | 93.7 | 66.4 | 81.6 | 79.5 | 57.2 | 58.9 |
| ALIGN | 89.5 | 84.7 | 84.8 | 92.2 | 91.0 | 49.8 | 81.1 | 72.6 | 46.7 | 45.6 |
| SigLIP | 82.0 | 53.3 | 54.5 | 76.4 | 77.7 | 48.7 | 73.2 | 65.0 | 36.7 | 34.4 |
| SigLIP 2 | 92.9 | 63.5 | 64.8 | 98.4 | 96.9 | 37.0 | 80.2 | 71.9 | 24.5 | 26.0 |
Six RVL-CDIP-O documents do not yield OCR text, so text models are shown an empty document for them. Excluding them does not change any AUC by as much as 0.001 or any FPR95 by as much as 0.2 percentage points.
Figure L.1 repeats the T-O comparison with the identification codes removed from the test pages while the model and the RVL-CDIP-O pages stay the same. For the image models trained with codes the AUC decreases by 2.3 to 8.1 points under the original labels and by 1.0 to 3.3 points under the corrected labels, in every seed, whereas for the same architectures trained without codes it changes by between -0.9 and +0.7 points, so that part of what separates the test pages from out-of-scope documents for a model trained with codes is the code itself.

Figure L.1: Out-of-scope separability (AUC, maximum logit) of the RVL-CDIP test split against RVL-CDIP-O with the identification codes on the test pages and with the codes removed, for models trained with and without codes under the original and the corrected labels. One line per model; retrained models are means over three seeds (one run for the linear baselines).
Appendix M. Zero-Shot Classification Prompts
The zero-shot large language models evaluated in Section 10 are prompted with one of three prompts, reproduced below exactly as issued. All three have the same structure (a system role, the enumerated list of the sixteen categories, an instruction to answer with a category name and nothing else, and a JSON response schema) and differ only in how much the categories are described. Prompt 1 gives the category names alone. Prompt 2 defines each category against the RVL-CDIP corpus itself, so that the sub-types present in the data (for example, that budget covers campaign contribution requests and check stubs) are stated explicitly. Prompt 3 gives generic dictionary definitions written without reference to the corpus. The contrast between Prompts 2 and 3 is the one of interest: it separates knowing what a category is called from knowing what the benchmark's annotators put in it, a distinction that, as Section 4 argues, the label names alone do not express.
In every case the OCR'd document text is appended directly after the final line of the prompt, and the model's reply is parsed as JSON and matched against the sixteen category names after lower-casing and mapping interior whitespace to underscores. Replies that do not parse, or that do not name a category, are counted as errors and are not discarded.
Prompt 1: category names only
You are a document categorization system.
Classify the text of a document into one of the following categories:
- advertisement
- budget
- file_folder
- form
- handwritten
- invoice
- letter
- memo
- news_article
- presentation
- questionnaire
- resume
- scientific_publication
- scientific_report
- specification
Respond only with the category name. Do not provide an explanation.
Respond with the following JSON format: {"prediction": <category name>}
Here is the document text to classify:
Prompt 2: corpus-grounded definitions
You are a document categorization system.
Classify the text of a document into one of the following categories:
-
advertisement: advertisements from print-form media like newspapers, magazines, and radio/television scripts.
-
budget: various budget documents such as expense, spending, sales, cash, and accounting reports and forecasts; campaign contribution requests; checks and check stubs.
-
email: printed emails.
-
file_folder: folders and binders. These will typically have little text.
-
form: form documents with form-like elements. These include fax forms.
-
handwritten: handwritten documents.
-
invoice: invoices, bills, quotations, and estimates.
-
letter: letters, often with letterhead and "Dear..." salutations.
-
memo: memo or memoranda documents or inter-office correspondence documents, often with clear "TO", "FROM" headings.
-
news_article: news articles in the form of clippings from newspapers and other print-form news media.
-
presentation: presentation and overhead slides, transcripts of speeches and statements, and press releases.
-
questionnaire: customer surveys and questionnaires, survey prompts.
-
resume: resumes, curricula vitae (CVs), biographical sketches, executive biographies, business cards.
-
scientific_publication: scientific publications or articles from scientific journals and book chapters; includes book title pages.
-
scientific_report: scientific reports like bioassay, pathology, test reports, charts, graphs, tables, research progress reports, research proposals.
-
specification: specifications like data sheets (including material safety data sheets); product, material, and test specifications.
Respond only with the category name. Do not provide an explanation.
Respond with the following JSON format:
{"prediction": <category name>}
Here is the document text to classify:
Prompt 3: generic definitions
You are a document categorization system.
Classify the text of a document into one of the following categories:
-
advertisement: a notice or announcement in a public medium promoting a product.
-
budget: an estimate, often itemized, of expected income and expense for a given period in the future.
-
email: a message sent by email.
-
file_folder: a folded sheet of light cardboard used to cover or hold documents.
-
form: a document with blank spaces to be filled in with particulars before it is executed.
-
handwritten: handwritten documents.
-
invoice: an itemized bill for goods sold or services provided, containing individual prices, the total charge, and the terms.
-
letter: a written or printed communication addressed to a person or organization and usually transmitted by mail.
-
memo: an informal message, especially one sent between two or more employees of the same company, concerning company business.
-
news_article: the presentation of a report on recent or new events in a newspaper or other periodical or on radio or television.
-
presentation: a document for a formal talk given to an audience to share information, persuade, inspire, or demonstrate something, often using visuals like slides to support the spoken message.
-
questionnaire: a list of questions, usually printed, submitted for replies that can be analyzed for usable information.
-
resume: a brief written account of personal, educational, and professional qualifications and experience, as that prepared by an applicant for a job.
-
scientific_publication: periodical that shares new scientific research and knowledge with the scientific community and the public.
-
scientific_report: document that details a scientific experiment or research project, presenting the methodology, data, results, and conclusions to inform readers and allow for reproduction of the study.
-
specification: a detailed description or assessment of requirements, dimensions, materials, etc.
Respond only with the category name. Do not provide an explanation.
Respond with the following JSON format: {"prediction": <category name>}
Here is the document text to classify:
Rejection Variant for Out-of-Scope Detection
For the out-of-scope evaluation on RVL-CDIP-O (Appendix N), each prompt is issued in a rejection variant that adds a seventeenth option, none_of_the_above, and changes nothing else. The variants are derived from the prompts above by program, so the structure, the sixteen category entries, and the response instructions are identical to those shown. The new entry follows the style of the prompt it extends (a bare name in Prompt 1, a one-line gloss in Prompts 2 and 3), so that the rejection option is never the only entry with, or without, a definition. Each variant also gains a guardrail sentence immediately before the response instruction, intended to stop a model from using the rejection option to express uncertainty between two of the sixteen categories. The box below shows the end of the Prompt 2 variant exactly as issued. In Prompt 1, item 17 reads 17. none_of_the_above; in Prompt 3 it reads 17. none_of_the_above: a document that does not belong to any of the sixteen categories above.
Rejection variant of Prompt 2, from item 16 to the end
- specification: specifications like data sheets (including material safety data sheets); product, material, and test specifications.
- none_of_the_above: the document is not any of the sixteen types above.
Choose none_of_the_above only if the document belongs to none of the sixteen categories. Do not choose it because you are uncertain between two of the sixteen; in that case choose the more likely of the two.
Respond only with the category name. Do not provide an explanation.
Respond with the following JSON format: {"prediction": <category name>}
Here is the document text to classify:
The document text is Amazon Textract OCR, one line of text per detected line, appended after the final line of the prompt as before. Each model is queried once per document at temperature 0 with an output limit of 8,192 tokens.
Replies are normalized as in the main evaluation, and scored with the following additional rules. A reply naming none_of_the_above is an explicit rejection. A reply naming a label outside the seventeen offered, such as legal_document or certificate, is an implicit rejection: the model has recognized that the document fits none of the categories and said so in its own words, so it is counted as a detection, and Appendix N reports the two routes separately. Where a reply contains several prediction objects, as when a model revises its answer, the last one naming one of the seventeen labels is taken. A reply that hedges between labels ("news_article" or "presentation") does not name a single answer and is unparseable, whereas a single label with a parenthetical gloss counts as that label. A reply cut off at the output limit is almost always one answer repeated until the budget runs out; it is accepted only if one label accounts for at least 90% of the repetitions, and is otherwise unparseable. Unparseable replies count as not rejected, which is the conservative choice for detection. Pages on which OCR does not find text are excluded from every denominator, since the model is never shown a document.
Input of the Decision Models
The decision models of Table K.3 do not take a free-text prompt. Each request consists of three fields, the Textextract text of the page, a question and a list of options, and the model assigns a probability to every option, of which the highest is taken as the prediction. The box below shows the question and the options as they were issued to all five models: the options are the sixteen category names with the underscores replaced by spaces, in the order of the label indices, and no definitions of the categories are given. A page on which OCR does not find text is passed as the string “[no text was recognized on this page]”. For the run of Jev on the page image, the text field is replaced by the page image of the de-identified corpus as we release it, at its stored resolution, and the question reads “This is one scanned document page. What type of document is it?”, with the same options; the pages outside the range of 280 to 1,568 pixels accepted by the API (one test page and three pages of RVL-CDIP-N) are rescaled into that range.
Input of the decision models: question and options
Text: <Textextract text of the page>
Question: This is the OCR text of one scanned document page. What type of document is it?
Options: letter form email handwritten advertisement scientific report scientific publication specification file folder news article budget invoice presentation questionnaire resume memo
Table N.1: Zero-shot accuracy (%) by prompt, with 95% Wilson intervals as half-widths, and the Cochran omnibus test across the three prompts. RVL-CDIP contributes 38,377 documents, RVL-CDIP- 1,001. All eight omnibus tests reject.
| Test set | Model | Prompt 1 | Prompt 2 | Prompt 3 | Q | p |
|---|---|---|---|---|---|---|
| RVL-CDIP | Llama 4 Maverick | 67.61 ± 0.47 | 73.79 ± 0.44 | 67.77 ± 0.47 | 1787.9 | <10-15 |
| Mistral 7B | 56.96 ± 0.50 | 54.56 ± 0.50 | 55.07 ± 0.50 | 175.9 | <10-15 | |
| gpt-oss-20b | 64.63 ± 0.48 | 70.62 ± 0.46 | 64.80 ± 0.48 | 1642.1 | <10-15 | |
| Qwen 3 32B | 62.28 ± 0.48 | 63.56 ± 0.48 | 58.60 ± 0.49 | 853.0 | <10-15 | |
| RVL-CDIP-N | Llama 4 Maverick | 87.81 ± 2.03 | 88.31 ± 1.99 | 86.41 ± 2.12 | 8.4 | 0.015 |
| Mistral 7B | 78.22 ± 2.55 | 76.42 ± 2.63 | 68.33 ± 2.88 | 83.4 | <10-15 | |
| gpt-oss-20b | 84.32 ± 2.25 | 83.22 ± 2.31 | 82.32 ± 2.36 | 9.1 | 0.010 | |
| Qwen 3 32B | 85.41 ± 2.19 | 81.62 ± 2.40 | 81.82 ± 2.39 | 33.5 | 5.4 × 10-8 |
Appendix N. Prompt Sensitivity: Statistical Analysis
This appendix reports the significance testing behind the zero-shot prompt comparison, and is written to be read on its own. The three prompts of Appendix M are issued to each model over the same documents in the same order, so every within-dataset comparison is paired at the document level. We therefore use McNemar's exact test for pairwise comparisons, which conditions on the discordant documents (those that exactly one prompt classifies correctly), and Cochran's as the omnibus test across all three prompts. The exact binomial form is used in place of the approximation because several discordant counts on RVL-CDIP- are small. Accuracy intervals are Wilson score intervals (Table N.1); -values are corrected within each dataset by the Holm–Bonferroni step-down procedure (Table N.2). An unpaired two-proportion test would be both invalid and less powerful on this design. The gpt-oss-120b model of Section 10 was evaluated on RVL-CDIP- only; because the analysis below turns on comparing behavior across the two test sets, it is excluded throughout.
Two features of the data govern how the results should be read. First, statistical power is highly asymmetric: RVL-CDIP contributes 38,377 documents and RVL-CDIP- only 1,001, so paired differences are resolved to roughly percentage points on the former and to on the latter. A null result on RVL-CDIP- is therefore weak evidence of no effect, and we do not report it as one. Second, accuracy on RVL-CDIP- is some twenty points higher than on RVL-CDIP, so a given absolute gain is less available there; comparisons across the two datasets are consequently made on the log-odds scale, which is free of that ceiling.
Transfer of the Corpus-Grounded Prompt
Prompt 2 differs from Prompt 3 in that its category definitions are written to the RVL-CDIP corpus itself, naming the sub-types its annotators actually filed under each label. If that information is what the prompt provides, its benefit should be specific to RVL-CDIP and should not apply to RVL-CDIP-, whose documents were collected separately. Table N.3 tests this directly, comparing the odds of a correct classification under Prompt 2 against Prompt 1 on each dataset and testing the difference on the log-odds scale.
The pattern is consistent across three of the four models. On RVL-CDIP, Prompt 2 removes of Llama 4 Maverick's errors and of gpt-oss-20b's; on RVL-CDIP- the
Table N.2: Pairwise comparisons by McNemar's exact test. is the accuracy of the second prompt minus the first, in percentage points, with a paired interval; are the discordant counts. is corrected within each test set.
| Test set | Model | Contrast | (pp) | ||
|---|---|---|---|---|---|
| RVL-CDIP | Llama 4 Maverick | P1 vs. P2 | +6.17 [+5.82, +6.53] | 1285/3654 | *** |
| P1 vs. P3 | +0.16 [-0.09, +0.40] | 1147/1207 | 0.448 NS | ||
| P2 vs. P3 | -6.02 [-6.37, -5.66] | 3631/1322 | *** | ||
| Mistral 7B | P1 vs. P2 | -2.40 [-2.80, -2.00] | 3530/2608 | *** | |
| P1 vs. P3 | -1.90 [-2.24, -1.56] | 2575/1847 | *** | ||
| P2 vs. P3 | +0.51 [+0.12, +0.89] | 2682/2876 | 0.029 * | ||
| gpt-oss-20b | P1 vs. P2 | +5.99 [+5.64, +6.33] | 1194/3491 | *** | |
| P1 vs. P3 | +0.17 [-0.11, +0.45] | 1470/1534 | 0.448 NS | ||
| P2 vs. P3 | -5.82 [-6.17, -5.47] | 3524/1291 | *** | ||
| Qwen 3 32B | P1 vs. P2 | +1.28 [+0.94, +1.62] | 2029/2520 | *** | |
| P1 vs. P3 | -3.68 [-4.01, -3.34] | 2841/1430 | *** | ||
| P2 vs. P3 | -4.96 [-5.31, -4.60] | 3399/1497 | *** | ||
| RVL-CDIP-N | Llama 4 Maverick | P1 vs. P2 | +0.50 [-0.78, +1.78] | 19/24 | 1.000 NS |
| P1 vs. P3 | -1.40 [-2.60, -0.19] | 26/12 | 0.201 NS | ||
| P2 vs. P3 | -1.90 [-3.37, -0.42] | 38/19 | 0.114 NS | ||
| Mistral 7B | P1 vs. P2 | -1.80 [-3.79, +0.20] | 61/43 | 0.475 NS | |
| P1 vs. P3 | -9.89 [-12.10, -7.68] | 118/19 | *** | ||
| P2 vs. P3 | -8.09 [-10.51, -5.67] | 120/39 | *** | ||
| gpt-oss-20b | P1 vs. P2 | -1.10 [-2.35, +0.15] | 26/15 | 0.475 NS | |
| P1 vs. P3 | -2.00 [-3.35, -0.65] | 34/14 | 0.044 * | ||
| P2 vs. P3 | -0.90 [-2.18, +0.38] | 26/17 | 0.666 NS | ||
| Qwen 3 32B | P1 vs. P2 | -3.80 [-5.29, -2.30] | 49/11 | *** | |
| P1 vs. P3 | -3.60 [-4.93, -2.26] | 42/6 | *** | ||
| P2 vs. P3 | +0.20 [-1.27, +1.67] | 27/29 | 1.000 NS |
Table N.3: Transfer of the Prompt 2 benefit. Relative error reduction is ; the odds ratio is McNemar's conditional odds ratio , above 1 where Prompt 2 helps. The final columns test whether the log-odds benefit differs between the two test sets, a scale on which the ceiling difference does not have an effect.
| Model | Rel. error reduction | Odds ratio (P2 vs. P1) | Interaction | |||
|---|---|---|---|---|---|---|
| RVL-CDIP | -N | RVL-CDIP | -N | log OR | ||
| Llama 4 Maverick | +19.1% | +4.1% | 2.84 | 1.26 | -0.81 [-1.42, -0.21] | 0.009 ** |
| Mistral 7B | -5.6% | -8.3% | 0.74 | 0.70 | -0.05 [-0.44, +0.35] | 0.815 NS |
| gpt-oss-20b | +16.9% | -7.0% | 2.92 | 0.58 | -1.62 [-2.26, -0.98] | *** |
| Qwen 3 32B | +3.4% | -26.0% | 1.24 | 0.22 | -1.71 [-2.37, -1.05] | *** |
same prompt removes 4.1% and adds 7.0%. For Qwen the reversal is largest: a 3.4% error reduction on RVL-CDIP becomes a 26.0% increase on RVL-CDIP-N, an odds ratio of 0.22 (95% CI [0.12, 0.43]), which results from 49 documents that Prompt 1 classifies correctly and Prompt 2 does not against 11 in the other direction. The interaction is significant for all three on the log-odds scale, so it is not an artifact of the differing accuracy ceilings. Mistral 7B is
Table N.4: Parse-failure sensitivity on RVL-CDIP: for each contrast with unparseable responses scored as errors, and with the affected documents removed. No comparison changes sign or significance verdict under either treatment. Significance marks here use uncorrected -values, and Table N.2 Holm-corrected ones.
| Model | Dropped | Contrast | Δ scored as error | Δ complete cases |
|---|---|---|---|---|
| Llama 4 Maverick | 278 | P1 vs. P2 | +6.17 *** | +5.80 *** |
| P1 vs. P3 | +0.16 NS | +0.15 NS | ||
| P2 vs. P3 | -6.02 *** | -5.65 *** | ||
| Mistral 7B | 2771 | P1 vs. P2 | -2.40 *** | -2.90 *** |
| P1 vs. P3 | -1.90 *** | -1.70 *** | ||
| P2 vs. P3 | +0.51 ** | +1.20 *** | ||
| gpt-oss-20b | 9 | P1 vs. P2 | +5.99 *** | +5.98 *** |
| P1 vs. P3 | +0.17 NS | +0.17 NS | ||
| P2 vs. P3 | -5.82 *** | -5.81 *** | ||
| Qwen 3 32B | 876 | P1 vs. P2 | +1.28 *** | +0.79 *** |
| P1 vs. P3 | -3.68 *** | -4.12 *** | ||
| P2 vs. P3 | -4.96 *** | -4.91 *** |
the exception only in that Prompt 2 never helps it on either dataset, leaving no benefit to fail to transfer.
We interpret this as a measurement of how much of the RVL-CDIP task consists of corpus-specific annotation convention, as distinct from document category. Definitions that encode those conventions (that budget includes check stubs and campaign contribution requests, that presentation includes press releases) remove up to a fifth of a model's errors on the corpus that follows them, and do not have a benefit, or are harmful, on documents that do not. Prompt 3 is the control for this interpretation: it provides definitions of comparable length and specificity written without reference to the corpus, and on RVL-CDIP it is statistically indistinguishable from not providing definitions for both Maverick (+0.16 pp, ) and gpt-oss-20b (+0.17 pp, ). Those two intervals exclude any effect larger than 0.45 pp, so this is a tightly bounded null result and not an underpowered one. The gain from Prompt 2 is thus not a gain from longer or more detailed prompting; it is a gain from knowing the corpus.
A caution on the two datasets' differing precision applies to Table N.3. The discordant counts underlying the RVL-CDIP-N odds ratios are small (19/24 for Maverick and 26/15 for gpt-oss-20b), and neither of those pairwise comparisons is significant on its own. Only Qwen's reversal is established by its own test; for the other two the evidence is the interaction, which borrows precision from the much larger RVL-CDIP sample.
Sensitivity to Unparseable Responses
Throughout, a response that cannot be parsed as one of the sixteen category names is scored as an error. This is the conservative choice for a benchmark comparison, but it conflates classification accuracy with instruction-following, and the models differ sharply in how often it applies: gpt-oss-20b fails to parse on 9 of 38,377 documents, Mistral 7B on 2,771. We therefore repeated every comparison on complete cases only, discarding any document that at least one of the three prompts failed to parse (Table N.4).
Table N.5: Out-of-scope detection on RVL-CDIP-O (%): the share of its 2,909 documents that a model rejects, explicitly or with a label outside the seventeen offered, with 95% Wilson intervals as half-widths, and the Cochran Q omnibus test across the three prompts. Unparseable replies count as not rejected.
| Model | Prompt 1 | Prompt 2 | Prompt 3 | Q | p |
|---|---|---|---|---|---|
| Llama 4 Maverick | 3.09±0.63 | 6.53±0.90 | 8.04±0.99 | 129.7 | <10-15 |
| Mistral 7B | 13.13±1.23 | 8.25±1.00 | 20.14±1.46 | 285.8 | <10-15 |
| gpt-oss-20b | 37.19±1.76 | 52.35±1.81 | 59.02±1.79 | 575.0 | <10-15 |
| Qwen 3 32B | 62.22±1.76 | 50.74±1.82 | 64.15±1.74 | 282.0 | <10-15 |
No comparison changes sign, and none crosses a significance boundary. The largest movement is Qwen's Prompt 1 versus Prompt 2 contrast, which decreases from +1.28 to +0.79 pp and remains significant. Mistral 7B's accuracy increases by roughly three points on every prompt once its unparseable responses are removed, but the ordering of its prompts is unchanged and its preference for Prompt 1 over Prompt 2 widens, from -2.40 to -2.90 pp. Its atypical behavior is therefore a property of how it classifies under corpus-grounded definitions, not of how often it fails to answer in the requested format.
Out-of-Scope Detection on RVL-CDIP-O
The rejection variants of the three prompts (Appendix M) were issued to each model over RVL-CDIP-O, none of whose documents belongs to any of the sixteen categories, so the correct reply is always a rejection. The share of documents a model rejects is therefore its recall on the out-of-scope class, which we call its detection rate. Of the 2,915 documents, 6 do not yield OCR text and are excluded, leaving 2,909. As before, every prompt sees the same documents in the same order, so the comparisons are paired and use the same tests, with Holm correction across the twelve pairwise contrasts. A model that rejects every document would score here, and we did not measure how often the models reject in-distribution documents under the rejection variants. The rates in this subsection therefore show how readily each model rejects a document, and they do not measure how well it separates out-of-scope documents from in-distribution ones.
Detection divides the models into two groups (Table N.5). Two of them, gpt-oss-20b and Qwen 3 32B, reject between and of documents depending on the prompt; Llama 4 Maverick and Mistral 7B reject between and , assigning the great majority of out-of-scope documents to one of the sixteen categories. Prompt 3 yields the highest detection for all four models, every omnibus test rejects, and all twelve pairwise contrasts remain significant after correction (Table N.6). Because we did not measure false rejections, these results do not show whether the generic definitions of Prompt 3 help a model recognize documents outside the label set or only make the model more ready to reject.
The two routes to rejection are used very differently (Table N.7). Llama 4 Maverick and gpt-oss-20b never answer outside the seventeen labels, so every detection they make is an explicit rejection. Mistral 7B does the reverse: labels of its own, most often legal_document and educational_material, account for of its detections, and it names the option it was offered less often than it invents one. Qwen 3 32B uses both, with its own labels a
Table N.6: Pairwise comparisons of out-of-scope detection by McNemar's exact test. is the detection rate of the second prompt minus the first, in percentage points, with a 95% paired interval; are the discordant counts. is corrected across the twelve contrasts.
| Model | Contrast | (pp) | ||
|---|---|---|---|---|
| Llama 4 Maverick | P1 vs. P2 | 31/131 | *** | |
| P1 vs. P3 | 13/157 | *** | ||
| P2 vs. P3 | 64/108 | ** | ||
| Mistral 7B | P1 vs. P2 | 257/115 | *** | |
| P1 vs. P3 | 117/321 | *** | ||
| P2 vs. P3 | 57/403 | *** | ||
| gpt-oss-20b | P1 vs. P2 | 155/596 | *** | |
| P1 vs. P3 | 86/721 | *** | ||
| P2 vs. P3 | 229/423 | *** | ||
| Qwen 3 32B | P1 vs. P2 | 544/210 | *** | |
| P1 vs. P3 | 240/296 | * | ||
| P2 vs. P3 | 106/496 | *** |
Table N.7: Routes to rejection on RVL-CDIP-O, as a percentage of documents: an explicit none_of_the_above, a label outside the seventeen offered, and unparseable replies, which count as not rejected. Detection in Table N.5 is the sum of the first two columns.
| Model | Prompt | Explicit | Own label | Unparseable |
|---|---|---|---|---|
| Llama 4 Maverick | 1 | 3.09 | 0.00 | 0.03 |
| 2 | 6.53 | 0.00 | 0.14 | |
| 3 | 8.04 | 0.00 | 0.07 | |
| Mistral 7B | 1 | 4.78 | 8.35 | 3.64 |
| 2 | 3.88 | 4.37 | 4.43 | |
| 3 | 8.42 | 11.72 | 7.46 | |
| gpt-oss-20b | 1 | 37.19 | 0.00 | 0.00 |
| 2 | 52.35 | 0.00 | 0.00 | |
| 3 | 59.02 | 0.00 | 0.00 | |
| Qwen 3 32B | 1 | 57.24 | 4.98 | 0.00 |
| 2 | 48.30 | 2.44 | 0.00 | |
| 3 | 61.57 | 2.58 | 0.00 |
minority of its detections (4–8%). Unparseable replies occur only for Mistral 7B (3.6–7.5% of documents) and Llama 4 Maverick (at most 4 documents per prompt). Counting them as detections instead would raise Mistral 7B's rate to at most 27.6%, which leaves the grouping unchanged.
Appendix O. Models and Training Details
Table O.1 lists the training setup of the fine-tuned models, each of which is trained with the settings of its publication or of our earlier work, and only the label set and the pages change between the conditions of Section 10. The input of the image models is the page converted to grayscale, resized to 224 by 224 pixels and replicated to three channels, and these models are trained with a cross-entropy loss and mixed precision; the six convolutional networks
Table O.1: Training setup of the eleven fine-tuned models of Section 10. Every model is trained for the full number of epochs and the epoch with the highest validation accuracy is kept.
| Model | Initial weights | Optimizer | Schedule | LR | Batch | Epochs |
|---|---|---|---|---|---|---|
| Six CNNs | ImageNet (torchvision) | SGD, momentum 0.9 | polynomial, power 0.5 | 64 | 30 | |
| DiT-base | microsoft/dit-base | AdamW | cosine, 10% warmup | 32 | 10 | |
| BERT-base | bert-base-uncased | AdamW | linear, 10% warmup | 16 | 5 | |
| RoBERTa-base | roberta-base | AdamW | linear, 10% warmup | 16 | 5 | |
| LayoutLM-base | microsoft/layoutlm-base-uncased | AdamW | linear, 10% warmup | 16 | 5 | |
| LayoutLMv3-base | microsoft/layoutlmv3-base | Adam | constant | 64 | 10 |
(AlexNet, GoogLeNet, SqueezeNet, VGG-16, ResNet-50 and ResNeXt-50) are trained with the same settings. The input of BERT and RoBERTa is the Textract text of the page truncated to 512 tokens, that of LayoutLM is the Textract words with their bounding boxes, truncated to 512 tokens, with gradients clipped at a norm of 1.0 in training, and that of LayoutLMv3 is the same words and boxes together with the page image; LayoutLMv3 is trained with mixed precision on two GPUs with 32 pages each. Each of the eleven models is trained with the seeds 42, 1 and 2 for every combination of label set and code condition.
The TF-IDF features are computed on lowercased word unigrams and bigrams that occur in at least two training pages, limited to the 50,000 most frequent and with sublinear term-frequency scaling, and the SVM is a one-vs-rest linear SVM, trained with scikit-learn (Pedregosa et al., 2011), whose regularization constant (0.1, 0.3, 1 or 3) is chosen on validation accuracy. For the SVM on text and image features the SigLIP embedding (google/siglip-so400m-patch14-384) is standardized, scaled so that its norm is comparable to that of the TF-IDF vector and multiplied by a weight, and the weight (0.5, 1 or 2) and the regularization constant are chosen together on validation accuracy.
The public checkpoints are naver-clova-ix/donut-base-finetuned-rv1cdip for Donut and the ConvNeXt-base weights released by the authors for DocXClassifier. The zero-shot image models are openai/clip-vit-large-patch14-336, kakaobrain/align-base, google/siglip-so400m-patch14-384 and google/siglip2-so400m-patch16-naflex, each of which computes the similarity between the page image and the sixteen prompts “This is a photo of category.” and predicts the category with the highest similarity. Jev 1.13 (Almeida, 2026) was queried through the API of its developer in October 2026 with the full Textract text of the page and the question and options given in Appendix M, and the option to which it assigns the highest probability is taken as its prediction. We queried the same API in October 2026 with the page images, an input that the API offers as a preview feature, and sent only the de-identified images that we release. The four large language models were queried through Amazon Bedrock in April 2026 with each of the three prompts of Appendix M (Prompt 1 in the main tables) followed by the Textract text of the page, and the category named in the reply is taken as the prediction. Bespoke-Nimble-9B (Bespoke Labs et al., 2026), a LoRA adapter on Qwen3.5-9B that scores the answer options without generating text, was run on our GPUs with the inference code of its developers, the same text and the same options, and the option with the highest score is taken as its prediction; no page exceeds its input limit of 8,192 tokens. Strands Decider 2B (Brooker et al., 2026), which replaces the language-model head of Qwen3.5-2B with a pointer head that scores each option against the answer position, was run on our GPUs in its release StrandsAgents/strands-decider-2B-hobson-v21 with the strands-decider package (version 0.1.0), one request per page with the same text and options, and the option with the highest score is taken as its prediction. Laya (Convai Innovations, 2026) pairs a ModernBERT-large encoder with a decision head that scores each option at its own mask token; we ran its English model on our GPUs with the laya package (version 0.4.0), the same text and the same options, and the option with the highest score is taken as its prediction, with the text truncated to the model's input limit of 512 tokens. clef-flash (Chen, 2026) adds low-rank adapters and a routing head to a frozen Qwen3.5-9B and scores all options in a single forward pass over the input; we ran its release Cloudflare/clef-flash on our GPUs with the code of its repository, on the same text and options and without the page image, and the option with the highest score is taken as its prediction.