DocVQA is a benchmark dataset for visual question answering on document images, in which a model receives a scanned page and a natural-language question and must return the answer found on that page. Introduced in 2020 by researchers from the Computer Vision Center in Barcelona and IIIT Hyderabad, it became one of the standard yardsticks in Document AI for measuring how well systems combine text recognition, layout understanding and reasoning.
The dataset contains about 50,000 questions on more than 12,000 document images, and results are reported with the ANLS metric. Because nearly every multimodal model now publishes a DocVQA score, the benchmark functions as a shared reference point for document question answering research and for vendors that sell document understanding products.
How the DocVQA dataset is built
DocVQA is built from real industry documents rather than synthetic pages. The images come from a public archive of corporate documents released through litigation, covering letters, memos, forms, reports, tables, charts and handwritten notes, mostly from the 1960s to the 2000s. Many pages are low-resolution scans with noise, skew and faded typewriter text.
Crowd workers wrote questions about each page and recorded the answers, and a second pass verified them. Most answers are extractive text spans that appear verbatim on the page, which makes the task closer to reading comprehension over a visual document than to open-ended generation. Each question can carry several acceptable answer variants.
The table below summarizes the approximate composition of the official splits.
| Split | Questions | Document images | Answers public |
|---|---|---|---|
| Training | About 39,000 | About 10,200 | Yes |
| Validation | About 5,300 | About 1,300 | Yes |
| Test | About 5,200 | About 1,300 | No, scored by evaluation server |
The hidden test answers are evaluated through the Robust Reading Competition platform, which reduces the risk of models being tuned directly on test labels and keeps the public leaderboard comparable over time.
Question types and the skills they test
Every DocVQA question is tagged with one or more question categories that describe where the answer lives and what kind of understanding it requires. These categories let researchers see whether a model fails on tables, forms or handwriting rather than only reading a single overall score.
| Category | Example question | Main skill tested |
|---|---|---|
| Table or list | What is the total for 1987? | Row and column alignment |
| Form | What is the fax number of the sender? | Key-value association |
| Layout | What is the title of the document? | Use of position, size and font |
| Running text | Which product is mentioned in paragraph two? | Reading comprehension |
| Figure or diagram | Which year has the highest bar? | Chart reading |
| Handwritten | Who signed the memo? | Handwriting recognition |
| Yes or no | Is the form approved? | Short reasoning over content |
Questions about tables, figures and handwriting have historically produced the lowest scores, because they require models to connect visual structure with text instead of reading a linear stream of words.
How DocVQA results are scored with ANLS
DocVQA uses Average Normalized Levenshtein Similarity (ANLS) as its primary metric. For each question, the predicted string is compared with every accepted answer using the normalized edit distance, and the best match counts. If the distance exceeds a threshold of 0.5, the score for that question is set to zero.
This design tolerates small recognition errors, such as a missing hyphen or a misread character, while still penalizing answers that are essentially wrong. Scores range from 0 to 1 and are often reported as percentages. Human performance on the test set is close to 0.98 ANLS, which marks the practical ceiling.
| Accepted answer | Prediction | Approximate score | Reason |
|---|---|---|---|
| Brown & Co | Brown & Co | 1.0 | Exact match |
| Brown & Co | Brovn & Co | About 0.9 | One character differs |
| $2,450 | 2450 | Zero | Distance above threshold |
| March 12, 1986 | Smith | Zero | Wrong answer entirely |
A known weakness is that ANLS penalizes correct answers in a different format, such as a normalized number or date, which matters for generative models that paraphrase instead of copying the span.
Model progress on DocVQA
Progress on DocVQA tracks the main shifts in document understanding architectures. Early baselines ran OCR followed by a text-only reader, which lost layout information. Layout-aware language models such as LayoutLM added two-dimensional position embeddings, and OCR-free models such as Donut and Pix2Struct read pixels directly.
| Approach | Representative models | Typical strength | Typical weakness |
|---|---|---|---|
| OCR plus text reader | BERT-based extractive readers | Simple pipeline | Ignores layout |
| Layout-aware transformers | LayoutLM family | Strong on forms and tables | Depends on OCR quality |
| OCR-free encoders | Donut, Pix2Struct | No external OCR step | Struggles with small text |
| Large vision-language models | General multimodal assistants | Near-human ANLS | Cost, possible data contamination |
Leading large multimodal models now report scores above 0.9 ANLS, so the benchmark is close to saturation. Researchers increasingly turn to harder successors such as InfographicVQA and the multi-page MP-DocVQA variant.
Limitations of DocVQA as an evaluation
A high DocVQA score does not guarantee production accuracy on a specific document type. The benchmark covers only single English pages from one historical archive, and many real workflows involve modern invoices, multi-page contracts or other languages.
- Single-page scope: answers never require combining information across pages.
- Domain bias: the archive is dominated by one industry and one era of office documents.
- Possible contamination: public images may appear in the pretraining data of large models.
- Extractive bias: questions that require calculation or summarization are rare.
Explained without jargon
DocVQA is a large reading test for computers. Each test item shows a scanned page, such as an old letter or a form. It then asks a question like “Who sent this fax?” The computer must find the answer on the page.
The test has tens of thousands of such questions. Researchers use it to compare how well different AI systems read documents. A score near 1 means the system answers almost as well as a careful person.
A typical use case
A logistics company plans to automate questions about scanned delivery notes and customs forms. Its data team shortlists three document understanding models and first checks their published DocVQA scores, which range from about 0.78 to 0.94 ANLS.
The team does not stop there. It builds a small internal test set of 400 questions on its own forms, written in the same style as DocVQA and scored with ANLS. The model with the highest public score drops to 0.81 on internal documents because it misreads stamped handwriting, while a mid-ranked layout-aware model reaches 0.88.
The company selects the second model and uses DocVQA mainly as an initial filter rather than a final decision. The outcome is a reliable extraction pipeline and a reusable internal benchmark for future model updates.