跪拜 Guibai
← All articles
Artificial Intelligence

Stop Trusting OCR-Specific Small Models: 8 Sub-7B VLMs Put to the Test on Structured JSON Extraction

By lucas_AI ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

For any team doing document digitization under data-residency constraints, this benchmark shows the cheapest reliable path is fine-tuning a general sub-7B VLM, not buying into OCR-specialized models. It also exposes that traditional image preprocessing can silently hurt modern VLM performance, so existing OCR pipelines need re-evaluation.

Summary

Museum digitization faces a hard constraint: documents like handwritten artifact registers can't be uploaded to commercial APIs, so institutions must run local models. Researchers at FAU Erlangen-Nuremberg tested 8 open-source vision-language models (200M to 7B parameters) across three real museum collections, evaluating zero-shot, few-shot, and fine-tuned performance on strict JSON schema compliance.

The results flip the common wisdom. OCR-specific models (Donut, PaddleOCR-VL) get perfect zeros on structured extraction metrics because their outputs can't even parse as valid JSON. General instruction-tuned models, especially Qwen2.5-VL-7B and Phi-3.5-Vision, win after fine-tuning, with Qwen reaching 90+ mAP-F1 on printed cards. The paper introduces mAP-F1, a metric that treats JSON parse failures as zero, cleanly separating content recognition from structural adherence.

Further experiments show classic image preprocessing (CLAHE, denoising) often harms modern VLMs, hyperparameter optimization helps but needs validation, and joint training across collections is model-dependent: Gemma-3 improves, Qwen2.5-VL degrades. The practical takeaway is that fine-tuning a general VLM on a single consumer GPU beats relying on OCR-specialized models for structured output.

Takeaways
— Donut-Base, Donut-CORD, and PaddleOCR-VL score 0.0 mAP-F1 on all three structured extraction datasets because their outputs fail JSON parsing, even after fine-tuning.
— Qwen2.5-VL-7B leads zero-shot with mAP-F1 of 56.2 on handwritten registers, 96.3 on printed jewelry cards, and 33.3 on nested staircase forms.
— After fine-tuning, the top three models are all general instruction models: Qwen2.5-VL-7B (90.0/99.4/62.8), Phi-3.5-Vision (82.2/99.5/72.0), and Gemma-3-4B (83.1/99.4/46.9) across the three datasets.
— Hyperparameter optimization with Optuna improved staircase scores for all three models (Gemma-3 jumped from 46.9 to 77.9) but hurt Gemma-3 on prehistoric registers (83.1 to 65.4).
— Classic image preprocessing (illumination flattening, denoising, CLAHE) mostly degraded performance on modern VLMs: Qwen2.5-VL on stairs dropped from 62.8 to 53.6, Gemma-3 from 46.9 to 43.6.
— Multi-stage training is model-dependent: Gemma-3 improved on all datasets, Qwen2.5-VL degraded on two, with jewelry cards dropping from 99.4 to 90.2.
— Joint training across all three collections helped Gemma-3 (stairs 46.9 to 68.0) but hurt Qwen2.5-VL significantly (stairs mAP-F1 62.8 to 41.4, CER 7.6 to 24.9).
— Fine-tuning improved Gemma-3's field binding: inventory number corrected to 'J.-Nr. Eo 24' and dimension fields filled from empty strings, cutting sample CER from 26.8% to 13.9%.
— The staircase test set has only 25 images and jewelry 89, so small differences may not be statistically significant; the paper doesn't report variance across runs.
— Ground truth for prehistoric register transcriptions was generated by Gemini and manually validated, with inter-annotator agreement not disclosed.
— Constrained decoding for guaranteed valid JSON is listed as future work, so the OCR-specific models' zero scores might change with that addition.
Conclusions

The zero scores for OCR-specialized models expose a design gap: optimizing for character recognition does not produce schema-compliant structured output, and the interface limitations of those models make them useless for JSON-oriented tasks.

The anti-preprocessing results are counterintuitive but logical: modern VLMs pretrain on raw distributions, so classic OCR enhancement steps push inputs outside the learned distribution, negating their intended benefit.

Joint training outcomes being so model-dependent (Gemma improves, Qwen degrades) suggests that catastrophic forgetting and negative transfer are not predictable from model size or family alone, forcing empirical evaluation per deployment.

The small dataset sizes and single-run metrics mean the leaderboard gaps, especially those within a few points, are likely noise; the qualitative improvements after fine-tuning are more trustworthy than precise rankings.

Leaving constrained decoding as future work is a missed opportunity since it directly addresses the parse-failure failure mode, and could potentially revive OCR-specialized models for structured tasks.

Concepts & terms
mAP-F1
A proposed evaluation metric for structured extraction from documents. It flattens predicted and ground-truth JSON into leaf keys, computes per-field overlap as 1 minus character error rate, and averages across thresholds. JSON parse failures score zero, distinguishing recognition accuracy from structural compliance.
Constrained-aware protocol
A benchmarking methodology where models are tested under their native interface capabilities instead of a one-size-fits-all prompt. Fixed-prompt OCR models get minimal post-processing, while custom-prompt models receive natural language instructions, leading to a fair comparison given hardware constraints.
Negative transfer
When training a model on additional data or tasks degrades performance on the original task. In joint training across datasets, Qwen2.5-VL exhibited negative transfer, while Gemma-3 benefited, showing that cross-dataset training can hurt or help depending on the model.
Scalalogy
The study of staircases, a niche academic field applied to historical architecture. The Regensburg survey forms used in the benchmark contain deeply nested schemas with dozens of boolean fields describing stair construction details, making them a stress test for hierarchical JSON extraction.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗