betaFeedback

WorksComputer Science

SAVIOR: Sample-efficient Adaptation of Vision-Language Models for OCR Representation

Abstract

Optical Character Recognition (OCR) pipelines and vision-language models exhibit high accuracy on standard OCR and document-understanding benchmarks, yet they systematically underperform on document patterns that are operationally critical in financial workflows. These patterns include vertical or rotated text, logo-embedded vendor names, fine-print regulatory clauses, degraded scans, and complex multi-column layouts. While underrepresented in public datasets, they constitute a substantial portion of real-world failure cases. We introduce SAVIOR, a sample-efficient data curation methodology that targets such high-impact failure scenarios to adapt vision-language models for robust financial OCR. We further propose PaIRS, a structure-aware evaluation metric that measures layout fidelity by comparing pairwise spatial relationships between tokens. Fine-tuning Qwen2.5-VL-Instruct with SAVIOR-Train achieves a word recall of 0.93. When the resulting layout-aware OCR output is used as context for document question answering, it attains an F1 score of 0.89, outperforming both open- and closed-source models such as GPT-4o, Mistral-OCR, PaddleOCR-VL, and DeepSeek-OCR.

Introduction

Modern document-processing pipelines rely heavily on OCR, using it either as a standalone text-extraction component or as part of larger information-retrieval and question-answering workflows. As these applications have expanded to include increasingly varied document types, traditional modular OCR pipelines have been gradually replaced by standalone transformer-based vision–language models, including both closed-source systems (e.g., GPT-4o [22], Mistral OCR1, Gemini-2.5-Flash) and open-source models (e.g., PaddleOCR 3.0 [4], PaddleOCR-VL [3], Nanonets-OCR-s [20]), which generate text directly from images and jointly learn visual and textual representations. These models achieve strong performance on public benchmarks and general-purpose documents, yet they often struggle with domain-specific visual patterns that occur only rarely in their training data. As a result, they typically capture most of the content but frequently miss or misinterpret the specialized visual tokens characteristic of many real-world documents.

These challenges become especially visible in financial documents, where domain-specific visual patterns are both common and critical. Invoices, receipts, statements, and compliance forms contain visual elements that are essential for accurate interpretation but appear infrequently in the datasets used to train most OCR and vision–language models. These include vertical or rotated field labels, logo-embedded vendor names, dense multi-column layouts, fine-print regulatory clauses, handwritten annotations, and degraded scans produced by legacy systems. Figure 1 shows a document which contains different failure cases. Errors in these elements can break reading order, disrupt key–value extraction, and weaken downstream reasoning in accounting or auditing workflows, even when most of the surrounding content is transcribed correctly. As a result, reliable OCR performance in financial settings requires robustness to a set of domain-specific visual tokens that standard models consistently fail to handle.

Example document illustrating several failure scenarios targeted in SAVIOR-Train

Figure 1. Example document illustrating several failure scenarios targeted in SAVIOR-Train, including vertical text, logo embedded fields, fine print, multi-column layout, and handwritten annotations.

A key reason for these persistent errors lies in how existing OCR and vision–language models represent document structure. Many systems rely on layout-aware outputs that inject bounding boxes, markup tags, or special formatting tokens to encode spatial arrangement. Figure 2 illustrates the failure of Nanonets-OCR-s on a synthetic sample representative of a typical financial document. While this captures structure explicitly, it often disrupts natural reading order and requires additional post-processing to recover a human-readable sequence. Other models favor plain reading-order output, which preserves human interpretability but may lose fine-grained spatial relationships that are important for downstream extraction. Neither approach alone is sufficient for financial documents, where accurate interpretation depends on both correctly transcribed text and the preservation of meaningful spatial cues.

Comparison of the original document with the OCR output

Figure 2. Comparison of the original document (left) with the OCR output (right). The OCR result fails to capture several critical elements such as vertical text, logo-embedded entities and fine-print clauses.

To address these challenges, we introduce SAVIOR, a sample-efficient data curation strategy for adapting pretrained vision language models to the visual and structural patterns that frequently disrupt OCR in financial documents. SAVIOR focuses on the targeted selection of documents that contain recurring failure-inducing elements such as vertical text, logo-embedded fields, fine print clauses, noisy scans, and complex layout structures. Instead of expanding training sets indiscriminately, SAVIOR increases the concentration of difficult visual patterns inside a compact dataset so that adaptation is driven by the cases where pretrained models typically fail rather than by dataset scale.

Our contributions are as follows:

  • SAVIOR: a sample-efficient approach for adapting vision–language models to OCR in financial documents, yielding robustness without large-scale corpus expansion.

  • SAVIOR-Bench (509 expert-annotated documents), designed to evaluate transcription robustness and structural fidelity in financial OCR.2

  • PaIRS, a layout-aware evaluation metric that quantifies structural fidelity by measuring pairwise relational similarity between predicted and ground-truth word positions, capturing both spatial correctness and downstream usability.

Related Work

Document understanding has advanced substantially with the development of multimodal and layout aware models. Early OCR based pipelines, including Tesseract [26], Easy-OCR, and PP-OCR [5], follow a modular procedure of text detection, text recognition, and heuristic layout analysis. Although efficient and interpretable, these systems tend to degrade under real world conditions, such as skew, low contrast, occlusions, multilingual footers, and dense stamps [13, 25]. They also have limited contextual reasoning ability, which restricts performance on tasks like key value extraction and document question answering.

Multimodal vision language models (VLMs) were introduced to address these limitations. LayoutLM [29] and LayoutLMv3 [11] encode spatial structure using two-dimensional positional embeddings and achieve strong results on form-centric datasets such as FUNSD [12] and CORD [23], but they remain dependent on external OCR. Encoder-decoder architectures such as Donut [14] remove the OCR component entirely and generate structured outputs directly from pixels. Later work, including UDOP [27] and DocOwl [9], improves visual and textual alignment and supports instruction following for document question answering. More general purpose VLMs such as BLIP 2 [17], LLaVA [18], and InternVL [2] show competitive performance on OCRBench v2 [19] and DocVQA [21] without domain specific training.

In parallel, pipelines that combine OCR with large language models have demonstrated advantages on tasks requiring compositional or numerical reasoning. Recent studies [10, 28] have shown that high-quality OCR, together with models such as GPT-4o, Claude 3, or Qwen2.5, can outperform VLMs on enterprise workloads involving table fidelity, cross-document reference resolution, and metadata interpretation. These pipelines also benefit from modularity and ease of debugging, which are important considerations in regulated deployment settings.

Despite this progress, both VLM based approaches and OCR plus LLM approaches continue to struggle with enterprise specific visual anomalies. Public benchmarks rarely include vertical or low contrast text, nonstandard fonts, logo interference, legal microtext, or stamps embedded within tables. Datasets such as SynthDoG [14] and IIT CDIP [16] are valuable resources for document understanding research, but they do not reflect the visual noise, layout irregularities, and semantic variability that occur in modern enterprise invoices. Model efficiency research, including quantization [6, 30] and parameter efficient finetuning [1, 8], has improved deployability, yet evaluations still focus primarily on standard layouts.

SAVIOR-Train and SAVIOR-Bench

SAVIOR-TRAIN and SAVIOR-Bench were developed to improve OCR robustness in financial documents by concentrating on layout and transcription patterns that pretrained vision language models consistently fail to handle. Rather than expanding dataset scale broadly, the curation strategy focuses on selecting samples that contain challenging but operationally important visual structures such as rotated field labels, logo-embedded vendor names, multi-column layouts, and fine print regulatory text. The objective is to increase the density of failure-inducing patterns within a compact dataset, enabling efficient adaptation of general-purpose VLMs to financial workflows while keeping annotation and compute costs low.

Identification of Failure Scenarios

To identify the visual patterns that should be represented during dataset construction, annotators manually audited a held-out collection of financial documents and analyzed the

systemic failure modes exhibited by prevailing OCR and vision–language models. Annotators compared the model transcriptions against the ground truth and labeled the underlying cause of each error. This audit revealed a stable set of recurring breakdowns that accounted for the majority of transcription and layout inconsistencies, including vertical text orientation, fine print omissions, multi-column reading order errors, incomplete recognition of logo embedded fields, degraded scan quality, mixed handwritten and printed content, and the loss of hierarchical structural cues such as section headers or bullet lists. These failure scenarios form the basis for the subsequent construction of SAVIOR-Train and SAVIOR-Bench.

Construction of SAVIOR-Train

Although oImOCR-Bench [24] is widely used for evaluating document OCR systems, its distribution of document attributes shows that critical failure modes are severely underrepresented. As shown in Table 1, the benchmark is dominated by standard financial documents and horizontal, multi-column layouts, whereas challenging cases that frequently cause VLM and OCR failures, such as fine print, degraded scans, stylized logos, vertical text, and hierarchical text, constitute only a small fraction of the dataset. This imbalance limits the benchmark’s utility for assessing robustness in real enterprise environments.

LabelPercentage
Financial document50.566572%
Fine print40.014164%
Multi column23.796034%
Degraded image3.966006%
Handwritten text6.161473%
Hierarchical text1.203966%
Stylized logo0.354108%
Vertical text0.283286%
Horizontal text8.569405%

Table 1. Attribute distribution in oImOCR-Bench. Critical failure modes (e.g., fine print, degraded images, stylized logos, vertical text, hierarchical text) make up only a small portion of the dataset.

To mitigate this, we introduce SAVIOR-Train, which contains 2,234 curated documents and OCR pairs selected to ensure broad coverage of the failure scenarios identified during the initial screening of financial documents. A large collection of documents was examined, and samples were added whenever their OCR predictions exhibited at least one of the recurring breakdown patterns described earlier. The selection process followed a balanced strategy in which documents were chosen to maintain representation across all failure scenarios rather than concentrating on any single pattern. Although the dataset is composed primarily of real documents, a small number of controlled synthetic variations were introduced specifically to increase coverage of extreme vertical text, which occurred infrequently in the source data but was consistently associated with severe transcription disruption. These additions affect only text orientation and do not introduce artificial content or change document semantics.

The distribution of these scenarios is summarized in Table 2. Categories are not exclusive because many documents contain more than one source of difficulty, for example, vendor names inside logos, along with small regulatory clauses or handwritten notes added to printed financial tables. This overlap is an intentional characteristic of SAVIOR-Train and reflects the nature of real financial documents, where challenging elements rarely appear in isolation. By concentrating multiple failure-inducing patterns inside a compact dataset and supplementing vertical orientation only when it was underrepresented, SAVIOR-Train provides a training signal that directly targets observed weaknesses without requiring large-scale corpus expansion.

Failure ModeCountPercentage
Vertical text2009.0%
Fine print1004.5%
Multi-column layouts1506.7%
Logo-embedded text50022.4%
Degraded image quality2009.0%
Handwritten content502.2%
Structured headers1,00044.8%
Bold / emphasized text1,03446.3%

Table 2. Distribution of failure modes represented in SAVIOR-Train. Categories are non-exclusive and a single document may exhibit multiple failure modes.

SAVIOR-Bench

SAVIOR-Bench is a test dataset comprising 509 documents drawn from real-world business workflows. Each document is annotated to evaluate not only token-level transcription accuracy but also the preservation of semantic content and structural layout that are essential for downstream LLM-based processing. To capture the distribution of failure scenarios represented in SAVIOR-Train, SAVIOR-Bench incorporates material from five primary sources- UCSF (46.95%)3, inhouse-synthetic (17.88%), miscellaneous real-world public documents (17.49%), Inv3D (9.04%) [7], and FUNSD (8.64%) [12], enabling rigorous evaluation of a model’s ability to handle enterprise-specific challenges such as layout fidelity, semantic segmentation, and regulatory content extraction. Evaluation on SAVIOR-Bench therefore emphasizes the end-to-end impact of OCR quality on downstream tasks, including structured field extraction, compliance analysis, and document classification.

To ensure that the benchmark provides reliable reference annotations for these tasks, we measured agreement across annotators who independently transcribed and structured each document. Inter-annotator agreement (IAA) was computed on the OCR transcriptions produced by two annotators per document using fuzzy string similarity based on the normalized Levenshtein ratio. Double annotations were collected for a subset of 187 documents because duplicating annotations across the full benchmark is impractical for long and complex financial documents, and we observed a mean similarity score of 0.761, indicating moderate to strong consistency in transcription quality. A histogram of similarity scores is shown in Figure 3, and summary statistics are provided in Table 3.

Histogram of inter-annotator similarity scores (OCR annotations)

Figure 3. Histogram of inter-annotator similarity scores (OCR annotations).

MetricValue
Number of annotation pairs187
Mean similarity0.761
Minimum similarity0.307
Maximum similarity0.987
Standard deviation0.117

Table 3. Inter-Annotator Agreement (IAA) on OCR annotations using fuzzy string similarity.

Prompt Design for Training

Qwen2.5-VL-3B-Instruct and Qwen2.5-VL-7B-Instruct were fine-tuned using a structured prompt template composed of ten sequential instructions. The template explicitly prompts the model to act as an OCR assistant establishing consistent formatting expectations for all OCR outputs. The prompt guides the model to: (1) perform optical character recognition on the provided input image, (2) preserve relevant formatting and layout cues from the source document, (3) generate clean textual output without meta-level commentary, (4) identify and tag logo text using XML-style delimiters, (5–6) apply Markdown conventions for bold text and header notation, (7) interpret and reproduce multi-column layouts, (8–9) process tables and other forms of structured data, and (10) manage edge cases that arise during text extraction.

Evaluation Metrics

We evaluate models on SAVIOR-Bench and report metrics designed to assess both semantic completeness and structural fidelity.

Word-Level Recall

Word-level recall quantifies the proportion of ground-truth words correctly recovered by the OCR system, counting each occurrence separately. Let GG denote the multiset of ground-truth words and PP the multiset of predicted words. For each w∈Gw \in G, a match is counted if w∈Pw \in P, and one instance of ww is then consumed from PP. Recall is defined as:

Recall⁡=1∣G∣∑w∈G1{w∈P},(1)\operatorname{Recall} = \frac{1}{|G|} \sum_{w \in G} 1\{w \in P\}, \tag*{(1)}

where 1{⋅}1\{\cdot\} is the indicator function.

We adopt word-level recall instead of character-level accuracy, since downstream applications rely on complete tokens. For example, predicting “Totl” instead of “Total” may be close at the character level, but it fails entirely in a key–value extraction task. Word-level recall thus better reflects semantic fidelity in enterprise document workflows.

Word-Level Precision

Word-level precision measures the proportion of predicted words that correctly correspond to ground truth, counting each occurrence separately. Let PP denote the multiset of predicted words and GG the multiset of ground-truth words. For each w∈Pw \in P, a match is counted if w∈Gw \in G, and one instance of ww is then consumed from GG. Precision is defined as:

Precision⁡=1∣P∣∑w∈P1{w∈G},(2)\operatorname{Precision} = \frac{1}{|P|} \sum_{w \in P} 1\{w \in G\}, \tag*{(2)}

where 1{⋅}1\{\cdot\} is the indicator function.

Layout Similarity Metric - PAIRS

While existing metrics capture transcription quality, they do not account for whether the spatial structure of the document is preserved. In enterprise workflows, layout fidelity is critical: an output that contains the correct words but misplaces them can render key–value extraction or tabular parsing unusable. For example, if an invoice contains “Total: $1,500” but the text is misplaced near the amount to be paid instead of the discount amount, word-level recall would still rate the transcription as correct. However, downstream LLMs for key–value extraction would misinterpret the field, resulting in incorrect mappings in enterprise workflows. We therefore introduce a layout similarity metric that quantifies structural accuracy. An example of this spatial encoding is shown in Figure 4.

2D spatial grid representation used in PaIRS

Figure 4. Visualization of the 2D spatial grid representation used in PaIRS. Each word is positioned according to its row and horizontal cell index, enabling structural comparison between predictions and ground truth beyond transcription accuracy.

We represent both ground truth and predictions as 2D arrays. Each document is divided into lines, and within each line, words are placed into horizontal cells. Every word ii is assigned coordinates (xi,yi)(x_i,y_i), where xix_i denotes the index of the cell containing the center character of the word, and yiy_i is the line number.

This representation makes it possible to compare word positions consistently between prediction and ground truth. For each unordered pair $(i,j),$1≤i<j≤N, \$1 \leq i < j \leq N, we compute horizontal, vertical, and Euclidean distances in the ground truth,

hij=∣xj−xi∣,vij=∣yj−yi∣,dij=hij2+vij2,(3)\begin{aligned} h_{ij} &= |x_j - x_i|,\\ v_{ij} &= |y_j - y_i|,\\ d_{ij} &= \sqrt{h_{ij}^{2} + v_{ij}^{2}}, \tag*{(3)} \end{aligned}

and analogously hij′,vij′,dij′h'_{ij}, v'_{ij}, d'_{ij} in the prediction. The relative error for each pair is

eij=∣dij′−dij∣dij+ϵ,(4)e_{ij} = \frac{|d'_{ij} - d_{ij}|}{d_{ij} + \epsilon}, \tag*{(4)}

which we convert into a bounded similarity score

sij=1−eij2,(5)s_{ij} = 1 - e_{ij}^{2}, \tag*{(5)}

where the quadratic penalty ensures that larger deviations are penalized more strongly. The raw layout similarity is then

Sraw=2N(N−1)∑1≤i<j≤Nsij.(6)S_{\mathrm{raw}} = \frac{2}{N(N-1)} \sum_{1 \leq i < j \leq N} s_{ij}. \tag*{(6)}

To normalize across documents with different spatial scales, we compute zz-scored pairwise distances

zij=dij−μσ,zij′=dij′−μσ,(7)z_{ij} = \frac{d_{ij} - \mu}{\sigma}, \qquad z'_{ij} = \frac{d'_{ij} - \mu}{\sigma}, \tag*{(7)}

where μ\mu and σ\sigma denote the mean and standard deviation of the set {dij}\{d_{ij}\} computed from the ground truth. The normalized layout similarity is then defined as

Sz=2N(N−1)∑1≤i<j≤N(1−(∣zij′−zij∣∣zij∣+ϵ)2),(8)S_z = \frac{2}{N(N-1)} \sum_{1 \leq i < j \leq N} \left(1 - \left(\frac{|z'_{ij} - z_{ij}|}{|z_{ij}| + \epsilon}\right)^2\right), \tag*{(8)}

This metric directly evaluates whether relative word positions are preserved, complementing word-level recall by capturing structural fidelity in OCR outputs.

Training Strategy

Our fine-tuning methodology is designed for sample-efficient adaptation by strategically targeting key model components. We apply Low-Rank Adaptation (LoRA) with a rank of 32 and scaling factor α=64\alpha= 64 to two specific areas: the final layer of the vision encoder and the language model decoder. This targeted approach for fine-tuning the last encoder layer allows the model to refine its high-level visual feature extraction for enterprise-specific challenges, such as stylized logos and fine print. Simultaneously, strengthening the decoder is crucial for improving its robustness in generating accurate text from degraded or noisy inputs, such as poor-quality scans.

Implementation Details

The vision encoder and language model are optimized with learning rates of 1×10−41 \times10^{-4} and 5×10−45 \times10^{-4} respectively. Training uses a batch size of 1 with gradient accumulation over 10 steps. The 3B and 7B variants of Qwen2.5-VL-Instruct were fine-tuned for 7 and 5 epochs respectively. All models are trained on 2 NVIDIA H100 80GB GPUs using CUDA 12.3. We evaluate models on SAVIOR-Bench, a 509-document benchmark annotated by domain experts. Inference is performed with top-p =0.9= 0.9 and temperature =0.1= 0.1.

Baseline Models

We include commercial and open-source OCR systems such as Nanonets-OCR-s and PaddleOCR 3.0 as baselines. These systems were evaluated in their native inference settings without fine-tuning on SAVIOR-Train to reflect realistic deployment conditions rather than adapted usage.

Unlike Qwen-based models, which generate a linear sequence of tokens in reading order, PaddleOCR returns a dictionary keyed by bounding boxes. These formats do not provide a strictly ordered word sequence, and they do not expose a controllable decoding interface that ensures one-token-per-cell generation. As a result, their outputs cannot be converted into the consistent 2D token grid required for PaIRS without building substantial custom adapters that would introduce implementation-specific bias. For this reason, layout similarity metrics such as PaIRS are reported only for models that can be prompted to produce sequential text. Nevertheless, markup-based systems are still evaluated to assess how closely their structured outputs resemble the visual layout of documents, providing partial insight into layout fidelity even when full PaIRS compatibility is not possible.

Results and Analysis

We evaluate different OCR models along four axes: transcription accuracy, layout preservation, downstream QA performance, and deployment efficiency under quantization. Corresponding metrics include word-level recall and precision, PaIRS layout similarity, F1 on document QA, and throughput of 4-bit models in constrained environments. Throughout this section, models with the “F” suffix denote variants fine-tuned using the SAVIOR-Train, specifically, Qwen2.5-VL-3B-F (fine-tuned from Qwen2.5-VL-3B-Instruct), and Qwen2.5-VL-7B-F (fine-tuned from Qwen2.5-VL-7B-Instruct).

Recall and Precision

As shown in Table 4, Qwen2.5-VL-7B-F, fine-tuned with SAVIOR, achieves the highest overall performance on

ModelRecallPaIRSPrecision
Prompt-Controlled
GPT-4o0.88540.58260.9322
Gemini-2.5-Flash0.91440.60740.8967
Qwen2.5-VL-7B-Instr.0.90910.56290.9145
Qwen2.5-VL-3B-Instr.0.85470.57640.9120
Non-Prompt-Controlled
DeepSeek-OCR0.77060.50340.9008
Mistral OCR0.86110.53820.8986
dots.ocr0.89920.55400.9290
olmOCR-7B-0725-FP80.74630.58640.9450
PaddleOCR 3.00.8684N/A0.8924
Nanonets-OCR-s0.90390.43540.5336
PaddleOCR-VL0.59550.41800.8194
Qwen2.5-VL-7B-F0.92940.70660.9157
Qwen2.5-VL-3B-F0.91670.70680.9101

Table 4. Performance comparison on SAVIOR-Bench. The PaIRS metric evaluates structure-aware fidelity. Prompt-Controlled models can be prompted to produce structured output compatible with the PaIRS 2D grid, whereas Non–Prompt-Controlled models cannot be prompted due to their fine-tuned, fixed output templates.

SAVIOR-Bench, reaching a word-level recall of 0.9294 and a precision of 0.9157. This substantially exceeds both open-source and commercial baselines, including Nanonets-OCR-s (0.9039 recall / 0.5336 precision) and PaddleOCR 3.0 (0.8684 recall / 0.8924 precision). Despite being trained on only 2,234 curated samples, the model displays strong generalization, underscoring the sample-efficiency of the SAVIOR methodology.

The smaller Qwen2.5-VL-3B-F variant achieves a competitive recall of 0.9167 with a precision of 0.9101, while larger or instruction-tuned variants yield only marginal gains at substantially higher computational cost. These results indicate that the 7B fine-tuned model provides the most favorable balance between accuracy and efficiency for practical deployment in enterprise OCR workflows.

PaIRS metric for layout preservation

Table 5 reports raw layout similarity scores across Euclidean, horizontal, and vertical distances. The fine-tuned Qwen2.5-VL models achieve the strongest structural alignment overall: Qwen2.5-VL-3B-F attains the highest Euclidean similarity (0.8214) and vertical similarity (0.8945), while Qwen2.5-VL-7B-F achieves the best horizontal similarity (0.6978). Gemini-2.5-Flash and GPT-4o form a middle tier, outperforming smaller open-source OCR systems but trailing both fine-tuned Qwen variants. Mistral-OCR exhibits the weakest structural preservation, particularly in the horizontal dimension.

ModelEuclideanHorizontalVertical
DeepSeek-OCR0.61210.45370.6965
Mistral-OCR0.65260.51750.7456
dots.ocr0.69120.54510.7325
olmOCR-7B-0725-FP80.70060.57560.7831
GPT-4o0.71400.54830.7847
Gemini-2.5-Flash0.75600.58030.7781
Nanonets-OCR-s0.52770.51170.4506
PaddleOCR-VL0.49650.42030.4965
Qwen2.5-VL-7B-Instr.0.70680.54030.7489
Qwen2.5-VL-3B-Instr.0.70930.55410.7965
Qwen2.5-VL-7B-F0.82000.69780.8895
Qwen2.5-VL-3B-F0.82140.69400.8945

Table 5. Raw PaIRS layout similarity scores across Euclidean, horizontal, and vertical dimensions (a higher score is better). Fine-tuned Qwen2.5-VL models demonstrate the strongest structural alignment, with Qwen2.5-VL-3B-F and Qwen2.5-VL-7B-F outperforming all baselines across all metrics.

Table 6 reports layout similarity after z-score normaliza-

ModelEuclideanHorizontalVertical
DeepSeek-OCR0.33870.37360.5457
Mistral-OCR0.37040.37320.5702
dots.ocr0.39230.40650.5566
olmOCR-7B-0725-FP80.41980.43400.6057
GPT-4o0.41640.41480.6178
Gemini-2.5-Flash0.45670.45060.6231
Nanonets-OCR-s0.32960.39650.3963
PaddleOCR-VL0.31510.34230.4371
Qwen2.5-VL-7B-Instr.0.40320.41620.5622
Qwen2.5-VL-3B-Instr.0.39930.41760.5819
Qwen2.5-VL-7B-F0.55570.56480.7119
Qwen2.5-VL-3B-F0.55480.56220.7140

Table 6. PaIRS layout similarity scores after z-score normalization to account for scale differences across documents (a higher score is better). Normalized rankings mirror the raw scores, with Qwen2.5-VL-F models maintaining the highest layout fidelity across all dimensions.

tion to account for scale differences across documents. The relative rankings remain consistent: Qwen2.5-VL-3B-F and Qwen2.5-VL-7B-F lead across all dimensions, with the 3B model slightly ahead in Euclidean and vertical similarity and the 7B model leading in horizontal similarity. Vertical alignment remains more stable than horizontal alignment even after normalization, indicating that most OCR systems preserve line ordering more reliably than within-line spacing.

Finally, it is important to interpret cross-model comparisons with caution: models producing different output formats (e.g., JSON, Markdown, or free-form text) yield varying spatial token arrangements when projected into 2D

милаҭ space, which can influence PaIRS scores independent of true recognition quality.

Performance on downstream QA task

Table 7 reports F1 scores on a downstream QA benchmark composed of 105 question–answer pairs across 50 documents sampled from SAVIOR-Bench, with questions specifically targeted toward known OCR failure modes. All predictions were generated using the Meta-Llama-3.3-70B-Instruct-AWQ-INT44 model, which was prompted to provide short, phrase-based answers using only the OCR output as context. Qwen2.5-VL-F models exhibit consistently strong transfer performance, with Qwen2.5-VL-7B-F achieving the highest F1.

ModelF1
DeepSeek-OCR0.6527
Mistral-OCR0.7597
dots.ocr0.8393
olmOCR-7B-0725-FP80.6906
GPT-4o0.7868
Gemini-2.5-Flash0.8582
Nanonets-OCR-s0.8663
PaddleOCR-VL0.7409
Qwen2.5-VL-7B-Instr.0.8393
Qwen2.5-VL-3B-Instr.0.7758
Qwen2.5-VL-7B-F0.8963
Qwen2.5-VL-3B-F0.8418

Table 7. F1 scores on downstream QA task

Performance of 4-bit quantized models

To evaluate performance under memory constraints, we analyze 4-bit quantized variants of Qwen2.5-VL-3B-F and Qwen2.5-VL-7B-F models using merged-weight representations. As reported in Table 8, quantization leads to modest performance reductions. The 7B model shows a decrease in recall of 0.012 with minimal effect on layout similarity, while the 3B model exhibits a recall drop of 0.0303 but remains competitive given its substantially reduced memory footprint.

ModelRecallPrecisionPaIRS
Qwen2.5-VL-7B-F0.91700.91700.7073
Qwen2.5-VL-3B-F0.88640.88270.6843

Table 8. Performance of 4-bit quantized Qwen2.5-VL-3B-F and Qwen2.5-VL-7B-F models.

Deployment of quantized models

To assess the deployment viability of 4-bit quantized Qwen2.5-VL-3B-F and Qwen2.5-VL-7B-F models in latency-sensitive environments, we measured token-level throughput using vLLM [15]. Across both 3B and 7B variants, quantization preserves high throughput (Table 9), with Qwen2.5-VL-3B-F model reaching up to 1085.81 tokens/s on an A100 80GB GPU.

ModelGPUVRAM (GB)Throughput (tokens/sec)
Qwen2.5-VL-7B-FA10075.6977.60
Qwen2.5-VL-3B-FA10074.31085.81

Table 9. Memory (VRAM) and throughput (tokens/sec) for 4-bit quantized Qwen2.5-VL-3B-F and Qwen2.5-VL-7B-F models.

Conclusion and Future Work

SAVIOR is a sample-efficient data curation methodology designed to align Vision–Language Models (VLMs) with OCR tasks in enterprise environments. It targets common VLM failure modes such as vertical text, embedded logos, fine print, and degraded scans, demonstrating that focused high-quality curation can outperform scale-driven training.

We introduce SAVIOR-Bench, a 509-document benchmark with expert OCR annotations from the finance and accounting domain. We further propose PaIRS, a structure-aware evaluation metric that measures pairwise relational similarity between predicted and ground-truth word locations.

Our fine-tuned model surpasses PaddleOCR, PaddleOCR-VL, Mistral-OCR and Nanonets-OCR-s on SAVIOR-Bench while requiring substantially fewer training samples. SAVIOR-trained models also retain accuracy under 4-bit quantization, enabling deployment in low-memory, latency-sensitive settings.

Future work includes expanding SAVIOR to additional document types such as contracts and receipts, automating failure-mode discovery via model introspection, and combining SAVIOR-style curation with multimodal instruction tuning for downstream tasks such as key–value extraction and summarization.

Acknowledgments

This research was conducted at Hyperbots Inc. and annotations were carried out by commerce graduates under expert supervision. We thank the annotators: Aishwarya S. Warad, Ashwin Devkate, Mokshaa M. Omkar, Pavithra Prakash, Pratham Shyam, R. Chaitanya, Rohith M. Dhondaley, Surya Shobhit, and Trisha L. R. for their contributions. Annotators were fairly compensated, and the study adhered to established ethical standards.

References

  1. [1]Alan Chang et al. Dlora-trocr: Efficient ocr with dual lora on encoder-decoder transformers. arXiv preprint arXiv:2402.01935, 2024.
  2. [2]Kan Chen, Zejia Lin, Shuo Wang, Ziyang Wu, Tiejun Huang, Rongrong Ji, Jiebo Luo, Zhiyuan Liu, et al. Internvl 2: A vision-language model for multimodal understanding and generation. arXiv preprint arXiv:2403.16803, 2024.
  3. [3]Cheng Cui, Ting Sun, Suyin Liang, Tingquan Gao, Zelun Zhang, Jiaxuan Liu, Xueqing Wang, Changda Zhou, Hong en Liu, Manhui Lin, Yue Zhang, Yubo Zhang, Handong Zheng, Jing Zhang, Jun Zhang, Yi Liu, Dianhai Yu, and Yanjun Ma. Paddleocr-vl: Boosting multilingual document parsing via a 0.9b ultra-compact vision-language model, 2025.arxiv.org/abs/2510.14528
  4. [4]Cheng Cui, Ting Sun, Manhui Lin, Tingquan Gao, Yubo Zhang, Jiaxuan Liu, Xueqing Wang, Zelun Zhang, Changda Zhou, Hong en Liu, Yue Zhang, Wenyu Lv, Kui Huang, Yichao Zhang, Jing Zhang, Jun Zhang, Yi Liu, Dianhai Yu, and Yanjun Ma. Paddleocr 3.0 technical report, 2025.arxiv.org/abs/2507.05595
  5. [5]Yuning Du, Yingying Xia, Tianlong Liu, Baoguang Li, Shumin Zhou, Qian Liu, Xuefeng Hu, Xiang Bai, et al. Pp-ocr: A practical ultra lightweight ocr system. In Proceedings of the ACM International Conference on Multimedia (MM). ACM, 2020.arxiv.org/abs/2009.09941
  6. [6]Aditya Goyal et al. Nvila: Efficient document understanding with quantized vlms for ocr. arXiv preprint arXiv:2405.01972, 2024.
  7. [7]Felix Hertlein, Alexander Naumann, and Patrick Philipp. Inv3d: a high-resolution 3d invoice dataset for template-guided single-image document unwarping. International Journal on Document Analysis and Recognition (IJDAR), 2023.DOI
  8. [8]Edward Hu et al. Lora: Low-rank adaptation of large language models. In International Conference on Learning Representations (ICLR), 2022.arxiv.org/abs/2106.09685
  9. [9]Rongzhi Hu, Yiheng Xu, Yue Zhang, Lei Cui, Yupan Huang, and Furu Wei. Docowl: Instruction-tuned document understanding with large language models. arXiv preprint arXiv:2403.05530, 2024.
  10. [10]Wenhui Huang, Yijian Li, Lei Cui, Zihan Zhang, Shuai Liu, Xuedong Hu, Furu Wei, and Ming Zhou. Layoutlmv3: Pre-training for document ai with unified text and image masking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023.arxiv.org/abs/2204.08387
  11. [11]Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, and Furu Wei. Layoutlmv3: Pre-training for document ai with unified text and image masking. arXiv preprint arXiv:2204.08387, 2022.arxiv.org/abs/2204.08387
  12. [12]Guillaume Jaume, Hazim Kemal Ekenel, and Jean-Philippe Thiran. Funsd: A dataset for form understanding in noisy scanned documents. In 2019 International Conference on Document Analysis and Recognition (ICDAR), pages 1–6. IEEE, 2019.arxiv.org/abs/1905.13538
  13. [13]Anirudh Kaushik et al. Cc-ocr: A comprehensive benchmark for open-ended ocr. arXiv preprint arXiv:2401.06039, 2024.
  14. [14]Geewook Kim, Taekgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sang-doo Yun, Dongyoon Han, and Seunghyun Park. Donut: Document understanding transformer without ocr. In European Conference on Computer Vision (ECCV), 2022.
  15. [15]Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th Symposium on Operating Systems Principles (SOSP ’23), pages 611–626, New York, NY, USA, 2023. ACM.arxiv.org/abs/2309.06180
  16. [16]David D Lewis et al. Building a large-scale historical document corpus: The iit-cdip collection. Journal of Machine Learning Research, 2006.
  17. [17]Junnan Li et al. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. arXiv preprint arXiv:2301.12597, 2023.arxiv.org/abs/2301.12597
  18. [18]Haotian Liu et al. Visual instruction tuning (llava). arXiv preprint arXiv:2304.08485, 2023.arxiv.org/abs/2304.08485
  19. [19]Yimeng Lu, Wenhu Zhang, Ruisi Xie, Xuezhi Ma, et al. Ocr-bench v2: A comprehensive benchmark for optical character recognition in the wild. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
  20. [20]Souvik Mandal, Ashish Talewar, Paras Ahuja, and Prathamesh Juvatkar. Nanonets-ocr-cs: A model for transforming documents into structured markdown with intelligent content recognition and semantic tagging, 2025.
  21. [21]MInesh Mathew, Dimosthenis Karatzas, and C.V. Jawahar. Docvqa: A dataset for vqa on document images. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 2200–2209, 2021.arxiv.org/abs/2007.00398
  22. [22]OpenAI, :, Aaron Hurst, Adam Lerer, Adam P. Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, Aleksander Madry, Alex Baker-Whitcomb, Alex Beutel, Alex Bozunov, Alex Carney, Alex Chow, Alex Kirillov, Alex Nichol, Alex Paino, Alex Renzin, Alex Tachard Passos, Alexander Kirillov, Alexi Christakis, Alexis Conneau, Ali Kamali, Allan Jabri, Allison Moyer, Allison Tam, Amadou Crookes, Amin Tootouchian, Amin Tootoonchian, Ananya Kumar, Andrea Vallone, Andrej Karpathy, Andrew Braunstein, Andrew Cann, Andrew Codispoti, Andrew Galu, Andrew Kondrich, Andrew Tulloch, Andrey Mishchenko, Angela Baek, Angela Jiang, Antoine Pelisse, Antonia Woodford, Anuj Gosalia, Arka Dhar, Ashley Pantuliano, Avi Nayak, Avital Oliver, Barret Zoph, Behrooz Ghorbani, Ben Leimberger, Ben Rossen, Ben Sokolowsky, Ben Wang, Benjamin Zweig, Beth Hoover, Blake Samic, Bob McGrew, Bobby Spero, Bogo Giertler, Bowen Cheng, Brad Lightcap, Brandon Walkin, Brendan Quinn, Brian Guarraci, Brian Hsu, Bright Kellogg, Brydon Eastman, Camillo Lugaresi, Carroll Wainwright, Cary Bassin, Cary Hudson, Casey Chu, Chad Nelson, Chak Li, Chan Jun Shern, Channing Conger, Charlotte Barette, Chelsea Voss, Chen Ding, Cheng Lu, Chong Zhang, Chris Beaumont, Chris Hallacy, Chris Koch, Christian Gibson, Christina Kim, Christine Choi, Christine McLeavey, Christopher Hesse, Claudia Fischer, Clemens Winter, Coley Czarnecki, Colin Jarvis, Colin Wei, Constantin Koumouzelis, Dane Sherburn, Daniel Kappler, Daniel Levin, Daniel Levy, David Carr, David Farhi, David Mely, David Robinson, David Sasaki, Denny Jin, Dev Val­ladares, Dimitris Tsipras, Doug Li, Duc Phong Nguyen, Duncan Findlay, Edede Oiwoh, Edmund Wong, Ehsan As­dar, Elizabeth Proehl, Elizabeth Yang, Eric Antonow, Eric Kramer, Eric Peterson, Eric Sigler, Eric Wallace, Eugene Brevdo, Evan Mays, Farzad Khorasani, Felipe Petroski Such, Filippo Raso, Francis Zhang, Fred von Lohmann, Freddie Sull, Gabriel Goh, Gene Oden, Geoff Salmon, Giulio Starace, Greg Brockman, Hadi Salman, Haiming Bao, Haitang Hu, Hannah Wong, Haoyu Wang, Heather Schmidt, Heather Whitney, Heewoo Jun, Hendrik Kirchner, Henrique Ponde de Oliveira Pinto, Hongyu Ren, Huiwen Chang, Hyung Won Chung, Ian Kivlichan, Ian O’Connell, Ian O’Connell, Ian Osband, Ian Silber, Ian Sohl, Ibrahim Okuyucu, Ikai Lan, Ilya Kostrikov, Ilya Sutskever, Ing­mar Kanitscheider, Ishaan Gulrajani, Jacob Coxon, Jacob Menick, Jakub Pachocki, James Aung, James Betker, James Crooks, James Lennon, Jamie Kiros, Jan Leike, Jane Park, Jason Kwon, Jason Phang, Jason Teplitz, Jason Wei, Jason Wolfe, Jay Chen, Jeff Harris, Jenia Varavva, Jessica Gan Lee, Jessica Shiell, Ji Lin, Jiahui Yu, Jiayi Weng, Jie Tang, Jieqi Yu, Joanne Jang, Joaquin Quinonero Candela, Joe Beutler, Joe Landers, Joel Parish, Johannes Heidecke, John Schul­man, Jonathan Lachman, Jonathan McKay, Jonathan Uesato, Jonathan Ward, Jong Wook Kim, Joost Huizinga, Jordan Sitkin, Jos Kraaijeveld, Josh Gross, Josh Kaplan, Josh Snyder, Joshua Achiam, Joy Jiao, Joyce Lee, Juntang Zhuang, Justyn Harriman, Kai Fricke, Kai Hayashi, Karan Singhal, Katy Shi, Kavin Karthik, Kayla Wood, Kendra Rimbach, Kenny Hsu, Kenny Nguyen, Keren Gu-Lemberg, Kevin But­ton, Kevin Liu, Kiel Howe, Krithika Muthukumar, Kyle Luther, Lama Ahmad, Larry Kai, Lauren Itow, Lauren Work­man, Leher Pathak, Leo Chen, Li Jing, Lia Guy, Liam Fe­dus, Liang Zhou, Lien Mamitsuka, Lilian Weng, Lindsay McCallum, Lindsey Held, Long Ouyang, Louis Feuvrier, Lu Zhang, Lukas Kondraciuk, Lukasz Kaiser, Luke He­witt, Luke Metz, Lyric Doshi, Mada Aflak, Maddie Simens, Madelaine Boyd, Madeleine Thompson, Marat Dukhan, Mark Chen, Mark Gray, Mark Hudnall, Marvin Zhang, Mar­wan Aljubeh, Mateusz Litwin, Matthew Zeng, Max John­son, Maya Shetty, Mayank Gupta, Meghan Shah, Mehmet Yatbaz, Meng Jia Yang, Mengchao Zhong, Mia Glaese, Mi­anna Chen, Michael Janner, Michael Lampe, Michael Petrov, Michael Wu, Michele Wang, Michelle Fradin, Michelle Pokrass, Miguel Castro, Miguel Oom Temudo de Cas­tro, Mikhail Pavlov, Miles Brundage, Miles Wang, Mi­nal Khan, Mira Murati, Mo Bavarian, Molly Lin, Murat Yesildal, Nacho Soto, Natalia Gimelshein, Natalie Cone, Natalie Staudacher, Natalie Summers, Natan LaFontaine, Neil Chowdhury, Nick Ryder, Nick Stathas, Nick Turley, Nik Tezak, Niko Felix, Nithanth Kudige, Nitish Keskar, Noah Deutsch, Noel Bundick, Nora Puckett, Ofir Nachum, Ola Okelola, Oleg Boiko, Oleg Murk, Oliver Jaffe, Olivia Watkins, Olivier Godement, Owen Campbell-Moore, Patrick Chao, Paul McMillan, Pavel Belov, Peng Su, Peter Bak, Pe­ter Bakkum, Peter Deng, Peter Dolan, Peter Hoeschele, Peter Welinder, Phil Tillet, Philip Pronin, Philippe Tillet, Prafulla Dhariwal, Qiming Yuan, Rachel Dias, Rachel Lim, Rahul Arora, Rajan Troll, Randall Lin, Rapha Gongtijo Lopes, Raul Puri, Reah Miyara, Reimar Leike, Renaud Gaubert, Reza Zamani, Ricky Wang, Rob Donnelly, Rob Honsby, Rocky Smith, Rohan Sahai, Rohit Ramchandani, Romain Huet, Rory Carmichael, Rowan Zellers, Roy Chen, Ruby Chen, Ruslan Nigmatullin, Ryan Cheu, Saachi Jain, Sam Altman, Sam Schoenholz, Sam Toizer, Samuel Miserendino, Sand­hini Agarwal, Sara Culver, Scott Ethersmith, Scott Gray, Sean Grove, Sean Metzger, Shamez Hermani, Shantanu Jain, Shengjia Zhao, Sherwin Wu, Shino Jo­moto, Shirong Wu, Shujaqi, Xia, Sonia Phene, Spencer Papay, Srinivas Narayanan, Steve Coffey, Steve Lee, Stewart Hall, Suchir Balaji, Tal Broda, Tal Stramer, Tao Xu, Tarun Gogineni, Taya Christianson, Ted Sanders, Tejal Patwardhan, Thomas Cunningham, Thomas Degry, Thomas Dimson, Thomas Raoux, Thomas Shadwell, Tianhao Zheng, Todd Under­wood, Todor Markov, Toki Sherbakov, Tom Rubin, Tom Stasi, Tomer Kaftan, Tristan Heywood, Troy Peterson, Tyce Walters, Tyna Eloundou, Valerie Qi, Veit Moeller, Vinnie Monaco, Vishal Kuo, Vlad Fomenko, Wayne Chang, Weiyi Zheng, Wenda Zhou, Wesam Manassra, Will Sheu, Woj­ciech Zaremba, Yash Patil, Yilei Qian, Yongjik Kim, You­long Cheng, Yu Zhang, Yuchen He, Yuchen Zhang, Yujia Jin, Yunxing Dai, and Yury Malkov. Gpt-4o system card, 2024.
  23. [23]Seungyul Park, Seung Shin, Bohyung Lee, et al. Cord: A consolidated receipt dataset for post-ocr parsing. In Proceedings of the International Conference on Document Analysis and Recognition Workshops (ICDAR-W), pages 1–8. IEEE, 2019.
  24. [24]Jake Poznanski, Aman Rangapur, Jon Borchardt, Jason Dunkelberger, Regan Huff, Daniel Lin, Aman Rangapur, Christopher Wilhelm, Kyle Lo, and Luca Soldaini. olmocr: Unlocking trillions of tokens in pdfs with vision language models, 2025.arxiv.org/abs/2502.18443
  25. [25]Devansh Rao et al. Videobank: A large-scale benchmark for ocr in video-derived documents. arXiv preprint arXiv:2503.04873, 2025.
  26. [26]R. Smith. An overview of the tesseract ocr engine. In Proc. Ninth International Conference on Document Analysis and Recognition (ICDAR), 2007.DOI
  27. [27]Jing Tang et al. Udop: Unified document pre-training for layout-aware vlms. In Proceedings of the AAAI Conference on Artificial Intelligence, 2023.
  28. [28]Xiaoya Wang et al. Docllm: Instruction-tuned large-scale document language model. In ACL, 2023.
  29. [29]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 (KDD), 2020.DOI
  30. [30]Zifan Yu et al. Mquant: Memory-efficient quantization for multimodal transformers. arXiv preprint arXiv:2502.01684, 2025.

Paper details

vlnc:W_xd9m9j4v
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 6

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents