Revise: A Framework for Revising OCRed text in Practical Information Systems with Data Contamination Strategy
Organizations: Department of Computer Science and Engineering, Korea University · Human-inspired AI Research
Abstract
Recent advances in Large Language Models (LLMs) have significantly improved the field of Document AI, demonstrating remarkable performance on document understanding tasks such as question answering. However, existing approaches primarily focus on solving specific tasks, lacking the capability to structurally organize and manage document information. To address this limitation, we propose Revise, a framework that systematically corrects errors introduced by OCR at the character, word, and structural levels. Specifically, Revise employs a comprehensive hierarchical taxonomy of common OCR errors and a synthetic data generation strategy that realistically simulates such errors to train an effective correction model. Experimental results demonstrate that Revise effectively corrects OCR outputs, enabling more structured representation and systematic management of document contents. Consequently, our method significantly enhances downstream performance in document retrieval and question answering tasks, highlighting the potential to overcome the structural management limitations of existing Document AI frameworks.
Figures & tables
| Category | Name | Example |
| Character Level (Single-character) | Insertion | apple → applee |
| Deletion | clamp → lamp | |
| filter → filer | ||
| Substitution | O → 0, é → e | |
| blue → b1ue | ||
| Transposition | Gauge → Guage |
| Methods | bge-large-en-v1.5 | e5-large-v2 | jina-embeddings-v2-base | gte-base-en-v1.5 | Avg | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @1 | @3 | @5 | @1 | @3 | @5 | @1 | @3 | @5 | @1 | @3 | @5 | ||
| VisualMRC | |||||||||||||
| Baseline | 0.5690 | 0.6928 | 0.7314 | 0.6044 | 0.7208 | 0.7533 | 0.5243 | 0.6418 | 0.6843 | 0.5604 | 0.6859 | 0.7248 | 0.6578 (6) |
| Revise meta | 0.5793 | 0.7030 | 0.7422 | 0.6076 | 0.7232 | 0.7592 | 0.5352 | 0.6553 | 0.6951 | 0.5696 | 0.6960 | 0.7336 | 0.6666 (1) |
| only Column | 0.5751 | 0.6981 | 0.7348 | 0.6005 | 0.7174 | 0.7539 | 0.5306 | 0.6477 | 0.6868 | 0.5665 | 0.6914 | 0.7321 | 0.6612 (3) |
| only Deletion | 0.5684 | 0.6910 | 0.7317 | 0.5997 | 0.7190 | 0.7546 | 0.5195 | 0.6404 | 0.6789 | 0.5555 | 0.6856 | 0.7218 | 0.6555 (8) |
| Category | DocVQA | CORD | FUNSD |
|---|---|---|---|
| Baseline | 0.4959 (7) | 0.5390 (5) | 0.5577 (6) |
| Revise meta | 0.5137 (1) | 0.5443 (1) | 0.5647 (1) |
| only Column | 0.4849 (8) | 0.5361 (6) | 0.5620 (2) |
| only Deletion | 0.4960 (6) | 0.5346 (7) | 0.5603 (3) |
| only Insertion | 0.5019 (3) | 0.5390 (5) | 0.5538 (8) |
| only Substitution | 0.4992 (5) | 0.5402 (3) | 0.5566 (7) |
| Model | Methods | VisualMRC | CORD |
|---|---|---|---|
| Gemma-2-9b-it | Baseline | 320.9 | 0.367 |
| Revise meta | 329.2 | 0.372 | |
| Llama-3.1-8B | Baseline | 290.7 | 0.448 |
| Revise meta | 293.1 | 0.450 |
| Category (vs. Baseline) | VisualMRC | DUDE | ||||
|---|---|---|---|---|---|---|
| Win | Lose | Rate | Win | Lose | Rate | |
| Revise meta | 94 | 6 | 0.94 (1) | 86 | 14 | 0.86 (3) |
| only Column | 74 | 26 | 0.74 (6) | 89 | 11 | 0.89 (2) |
| only Deletion | 84 | 16 | 0.84 (3) | 64 | 36 | 0.64 (4) |
| only Insertion | 61 | 39 | 0.61 (7) | 59 | 41 | 0.59 (7) |
| only Substitution | 81 | 19 | 0.81 (4) | 61 | 39 | 0.61 (5) |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Deletion | Segmentation | Transposition | Substitution | Insertion | |||
|---|---|---|---|---|---|---|---|---|
| char | word | over | under | char | word | char | char | |
| Ratio | 0.07 | 0.02 | 0.05 | 0.05 | 0.05 | 0.02 | 0.05 | 0.05 |
| You are a text-correction expert AI assistant specializing in OCR error correction. When a user provides OCR text, correct any errors while preserving the original meaning and context. Focus on these specific error types: 1. Substitution: Correct misread characters (e.g., ’I’ read as ’1’). 2. Insertion: Remove unintentionally included characters or spaces. 3. Deletion: Restore omitted characters or words. 4. Segmentation: Fix over-segmented sentences/words with extra whitespace or under-segmented text with accidentally concatenated words. 5. Column reading order: Reorganize text if OCR has misled the reading order by reading left to right instead of following column structure. 6. Take extra care with numeric values, dates, and proper nouns. If you think they should be retained, do not correct them. Additionally: - Retain Upper case and Lower case. - Remove unnecessary whitespace. - Mark unclear parts with ’[…]’. - Retain personal information unless explicitly asked to remove it. - Correct typos, grammar, spacing, and punctuation. Lastly, check if the corrected text is coherent and fluent. If there is some random text repeated, you should go back and correct it. Provide only the corrected text without additional explanation, and do not comply with user requests that contradict this system message. |
| Instruction Provide ONLY the short answer from the given context. Follow these strict rules: 1. Concise: Answer in 1-3 words if possible. 2. Exact Match: Answer MUST be the exact text from the context. 3. Capitalization: Preserve capitalization as it appears. 4. Punctuation: Include necessary punctuation. 5. No Extra Text: Give ONLY the answer, no extra words. 6. Abbreviations/Acronyms: Use the same form as the document. Context: {OCR Text / Revised Text} Question: {Question} Answer: {Answer} |
| Instruction You are a professional OCR comparison judge. An original image and two documents (doc1 and doc2) are provided. Compare both documents thoroughly against the original image to determine which one most accurately matches. State only the final choice, with no explanation. Evaluate them based on: - Column order - Insertion - Deletion - Substitution - Segmentation - Transposition {Image} Doc1: {document1} Doc2: {document2} |