Towards Natural Language-Based Document Image Retrieval: New Dataset and Benchmark
Hao Guo, Xugong Qin, Jun Jie Ou Yang, Peng Zhang, Gangyan Zeng, Yubo Li, Hailun Lin
TL;DR
This work introduces NL-DIR, a natural language–based document image retrieval benchmark designed for fine-grained query semantics over real-world document images. It provides a large-scale dataset (41,795 images with five queries each, totaling 205k queries) and a two-stage retrieval pipeline (recall with cross-modal encoders or OCR-free VDU models, followed by re-ranking with cross-attention) to evaluate zero-shot and fine-tuned performance. The study analyzes a broad range of baselines, reveals key factors in pre-training and alignment, and delivers practical insights on efficiency and robustness, particularly for OCR-free retrieval in challenging conditions. Overall, NL-DIR offers a valuable resource for advancing cross-modal document understanding and building more capable, layout-aware DIR systems.
Abstract
Document image retrieval (DIR) aims to retrieve document images from a gallery according to a given query. Existing DIR methods are primarily based on image queries that retrieve documents within the same coarse semantic category, e.g., newspapers or receipts. However, these methods struggle to effectively retrieve document images in real-world scenarios where textual queries with fine-grained semantics are usually provided. To bridge this gap, we introduce a new Natural Language-based Document Image Retrieval (NL-DIR) benchmark with corresponding evaluation metrics. In this work, natural language descriptions serve as semantically rich queries for the DIR task. The NL-DIR dataset contains 41K authentic document images, each paired with five high-quality, fine-grained semantic queries generated and evaluated through large language models in conjunction with manual verification. We perform zero-shot and fine-tuning evaluations of existing mainstream contrastive vision-language models and OCR-free visual document understanding (VDU) models. A two-stage retrieval method is further investigated for performance improvement while achieving both time and space efficiency. We hope the proposed NL-DIR benchmark can bring new opportunities and facilitate research for the VDU community. Datasets and codes will be publicly available at huggingface.co/datasets/nianbing/NL-DIR.
