﻿# RVL-CDIP: test document classification with source awareness

Use RVL-CDIP for page-type classification while preserving label order, archive provenance and the difference between visual categories and content understanding.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/data-guide-rvlcdip-document-source-bias/
Language: en

## Classify the page rather than its regions

RVL-CDIP is a document image classification resource. The [dataset authors' page](https://adamharley.com/rvl-cdip/) describes grayscale pages assigned to 16 document types, including forms, letters and memos. The prediction is a category for the image. A model that correctly calls a page an invoice has not thereby identified its table, read its total or linked its fields. Choose this dataset for page routing or visual document representations, and use separate evidence for extraction quality.

## Preserve the original label order

The release's label files pair a relative image path with a numeric category. The authors' order begins with letter, form and email; it is not an alphabetical vocabulary. Loading a derivative with reordered class names can produce plausible-looking predictions attached to the wrong category. Compare class names as well as integer labels when moving a checkpoint between loaders. Keep the mapping with the model output rather than reconstructing it from a sorted directory listing.

## Treat archive origin as part of the domain

The [original classification and retrieval paper](https://arxiv.org/html/1502.07058) studies visual document style, including similarities between categories. The collection comes through IIT-CDIP from the Legacy Tobacco Document Library. That origin helps explain why success here does not establish performance on newly generated office PDFs, phone photographs or another language. An editorial transfer check would evaluate a separately collected target archive and report its category mapping, rather than quietly adding target pages to the benchmark test set.

## Distinguish pixels from optional OCR joins

The [author's Hub card](https://huggingface.co/datasets/aharley/rvl_cdip) exposes image and label fields, with fixed train, validation and test partitions. The original release preserves a file structure compatible with its parent collection, which the authors identify as a route to additional OCR and metadata. Those external records are not automatically supplied by an image classifier loader. If added, document their join keys and missing coverage. Compare image-only and text-assisted systems under explicitly different input conditions.

## Make errors interpretable at the page boundary

Inspect confusions such as form versus questionnaire alongside examples, rather than treating every error as a failed reading operation. Record the original artifact, preprocessing and complete label map; the authors' site lists archive checksums, while the checked Hub page has its viewer disabled. A viewer state does not prove archive unavailability. Preserve the documented partitions and follow [document split controls](/journal/document-level-data-split-leakage/) for any added corpus. The [provenance guide](/journal/document-markdown-json-provenance/) explains how to retain source identifiers without confusing a derived OCR record with the original scan.
