document-understanding-eval
Leveraging Distillation Techniques for Document Understanding: A Case Study with FLAN-T5 — Lamott et al. (2024) (arXiv:2409.11282, 2024)
What this evaluates
Evaluates a model's capability to perform document understanding tasks, including key information extraction, visual question answering, table question answering, and structural reading comprehension, using textual layout representations derived from OCR and spatial verbalization.
Datasets
- DocVQA — total ?; splits: train (-1), test (-1)
- InfographicsVQA — total ?; splits: train (-1), test (-1)
- WikiTableQuestions — total ?; splits: train (-1), test (-1)
- TabFact — total ?; splits: train (-1), test (-1)
- SROIE — total ?; splits: train (-1), test (-1)
Metrics
ANLS (primary) — range: [0, 1]
- Average Normalized Levenshtein Similarity; computes the normalized Levenshtein distance between predicted and ground truth text, averaged across samples.
accuracy (primary) — range: [0, 1]
- Exact-match accuracy; proportion of samples where the model's prediction exactly matches the ground truth answer.
type-aware accuracy — range: [0, 1]
- Accuracy measure for SROIE that requires both the correct entity value and the correct entity type to be predicted.
Input / output format
Input: Textual layout representations generated via LAPDoc SpatialFormat, combined with OCR text (microsoft_cv or tesseract), formatted as task-specific prompts.
Output: JSON-formatted answers or extracted information matching the task instructions.
Scoring recipe
def score(predictions, gold, task):
if task in ['DocVQA', 'InfographicsVQA']:
return compute_anls(predictions, gold)
elif task in ['TabFact', 'WikiTableQuestions']:
return exact_match_accuracy(predictions, gold)
elif task == 'SROIE':
return type_aware_accuracy(predictions, gold)
else:
raise ValueError('Unknown task')
Common pitfalls
- Models frequently fail to follow task instructions and generate the requested JSON output format, resulting in 0.0 scores.
- Datasets with very high page counts (e.g., DeepForm, Kleister Charity, PWC) are explicitly excluded, so performance does not generalize to multi-page documents.
- Curriculum learning temperature schedules significantly impact convergence and final scores; improper scheduling can degrade performance.
Evidence (verbatim from paper)
The evaluation is performed following the procedure presented in Lamott et al.: For the DUE datasets, we use the official evaluation repository with its given metrics: ANLS for DocVQA and InfographicsVQA and accuracy for TabFact and WikiTableQuestions. For SROIE, we use a type-aware accuracy measure.
Citation
@misc{lamott2024leveraging,
title={Leveraging Distillation Techniques for Document Understanding: A Case Study with FLAN-T5},
author={Lamott et al. (2024)},
year={2024},
note={arXiv:2409.11282}
}
1---2name: document-understanding-eval3description: Evaluates a model's capability to perform document understanding tasks, including key information extraction, visual question answering, table question answering, and structural reading comprehension, using textual layout representations derived from OCR and spatial verbalization. Use when the user wants to benchmark on DocVQA, InfographicsVQA, WikiTableQuestions, TabFact, SROIE, or asks about evaluating this task. Reports ANLS, accuracy.4---56# document-understanding-eval78> Leveraging Distillation Techniques for Document Understanding: A Case Study with FLAN-T5 — Lamott et al. (2024) (arXiv:2409.11282, 2024)910## What this evaluates1112Evaluates a model's capability to perform document understanding tasks, including key information extraction, visual question answering, table question answering, and structural reading comprehension, using textual layout representations derived from OCR and spatial verbalization.1314## Datasets1516- **DocVQA** — total ?; splits: train (-1), test (-1)17- **InfographicsVQA** — total ?; splits: train (-1), test (-1)18- **WikiTableQuestions** — total ?; splits: train (-1), test (-1)19- **TabFact** — total ?; splits: train (-1), test (-1)20- **SROIE** — total ?; splits: train (-1), test (-1)2122## Metrics2324- `ANLS` **(primary)** — range: [0, 1]25 - Average Normalized Levenshtein Similarity; computes the normalized Levenshtein distance between predicted and ground truth text, averaged across samples.26- `accuracy` **(primary)** — range: [0, 1]27 - Exact-match accuracy; proportion of samples where the model's prediction exactly matches the ground truth answer.28- `type-aware accuracy` — range: [0, 1]29 - Accuracy measure for SROIE that requires both the correct entity value and the correct entity type to be predicted.3031## Input / output format3233**Input**: Textual layout representations generated via LAPDoc SpatialFormat, combined with OCR text (microsoft_cv or tesseract), formatted as task-specific prompts.3435**Output**: JSON-formatted answers or extracted information matching the task instructions.3637## Scoring recipe3839```python40def score(predictions, gold, task):41 if task in ['DocVQA', 'InfographicsVQA']:42 return compute_anls(predictions, gold)43 elif task in ['TabFact', 'WikiTableQuestions']:44 return exact_match_accuracy(predictions, gold)45 elif task == 'SROIE':46 return type_aware_accuracy(predictions, gold)47 else:48 raise ValueError('Unknown task')49```5051## Common pitfalls5253- Models frequently fail to follow task instructions and generate the requested JSON output format, resulting in 0.0 scores.54- Datasets with very high page counts (e.g., DeepForm, Kleister Charity, PWC) are explicitly excluded, so performance does not generalize to multi-page documents.55- Curriculum learning temperature schedules significantly impact convergence and final scores; improper scheduling can degrade performance.5657## Evidence (verbatim from paper)5859> The evaluation is performed following the procedure presented in Lamott et al.: For the DUE datasets, we use the official evaluation repository with its given metrics: ANLS for DocVQA and InfographicsVQA and accuracy for TabFact and WikiTableQuestions. For SROIE, we use a type-aware accuracy measure.6061## Citation6263```bibtex64@misc{lamott2024leveraging,65 title={Leveraging Distillation Techniques for Document Understanding: A Case Study with FLAN-T5},66 author={Lamott et al. (2024)},67 year={2024},68 note={arXiv:2409.11282}69}70```7172- arXiv: 2409.11282