Title OCR-free HDR The dataset Timeline GT · edit distance Retrieval Two tasks Baselines Findings
arXiv 2406.07315 · cs.IR · Jun 2024

Fetch-A-Set

A large-scale, OCR-free benchmark for historical document retrieval — 400K fragments across three centuries of Spain's official gazette, where the text is too damaged to trust.

Authors
Molina · Ramos Terrades · Lladós
Source
Boletín Oficial del Estado (BOE)
Span
XVII century → 1959
400K fragments text ↔ image legibility-aware vision vs OCR
Scroll
The Problem

When the text can't be read,
search has to see.

Historical archives hold millions of pages whose OCR is noisy, partial, or simply wrong. Retrieval that leans only on transcribed text breaks down exactly where heritage collections are richest.

Most historical-document benchmarks chase word spotting — finding exact matches of query words inside a page. FAS aims higher, at topic spotting: fetching the fragment that means what a natural-language query says, even when the characters underneath are degraded. That demands visual insight, not just transcription.

word spotting → does the string "Ferrol" appear?  ·  topic spotting → which fragment is about a naval police appointment?

The damaged condition of the documents, the absence of reliable ground truth, and a tangle of languages and scripts make text-only retrieval unfeasible. FAS reframes the task as multi-modal matching between a human-written query and the pixels of a document fragment.

As transcriptions degrade, they gradually lose meaning. FAS turns that degradation into a measured axis — legibility — and asks how systems hold up across it.
The Dataset

Three centuries of one gazette

FAS draws on the BOE, Spain's Official State Gazette — roughly a million annotated summary–document pairs, distilled into a curated 400K-fragment benchmark with train, test, and a fixed distractor anchor.

384,567
train fragments
42,997
test fragments
1,024
distractor anchor
~100K
from 1939–1959 alone

The temporal breadth is the point. Where most retrieval datasets cluster in a narrow window, FAS stretches from the XVII century to the mid-twentieth, capturing enormous variation in layout, script, and condition — and a real correlation: legibility trends upward with modernity, though plenty of modern pages remain poorly legible. That captured variance is what makes a retrieval system robust.

Temporal Coverage · after Table 1 & Fig. 3

How much history
does one dataset hold?

Each bar is a historical-document retrieval dataset, drawn across the years it covers. Most cluster in a narrow window; FAS (gold) stretches across roughly three centuries while remaining a topic/retrieval corpus — not just dates or writers.

Datasets built for word spotting tend to sit on a single decade or century; those probing writer or date can span a millennium but aren't about content retrieval. FAS occupies the rare middle ground the paper argues for: wide temporal variance and a topic-retrieval task — the variance that makes deployed systems robust to drifting layouts, scripts, and legibility.

Interactive · Building the Ground Truth (Fig. 2)

Match named entities
by minimum edit distance

To verify that a query truly belongs to a fragment, FAS aligns their named entities — and the OCR ones are garbled (E s p a ñ a, Int.ervirelonai). A Hungarian assignment over Levenshtein distance pairs each clean entity to its noisy counterpart. Add your own words to either side and watch the alignment.

Query entities (clean)
OCR entities (noisy)
matched pairs — total edit distance —
Strings are normalised (spaces, accents, punctuation removed) before measuring edit distance — so E s p a ñ a → espana matches España at distance 0. The thick green edge is the minimum-total-distance assignment; leftover OCR entities stay unclaimed, flagging invalid fragments.

This is the noise filter behind FAS's labels. Because fragment presence is human-verified and invalid regions per page are few, aligning named entities by edit distance — rather than trusting raw OCR strings — keeps spurious query–document pairs out of the ground truth. Try adding a badly mangled entity on the right: if nothing clean is close enough, it simply goes unmatched.

Interactive · Standard Retrieval (topic spotting)

Now the retrieval task:
queries to fragments

With ground truth in hand, the actual benchmark is text-to-image retrieval: encode a query and rank document fragments by semantic similarity. Add your own queries and see which fragment each one is matched to under a one-to-one assignment.

Queries q (text)
OCR fragments F (noisy)
matched pairs — total similarity —
Edges show candidate similarities; the thick green edge is the chosen one-to-one match. Add a query that paraphrases an existing one — the weaker of the two is forced to remain unmatched.

This mirrors the evaluation in the paper: the correct query should be the nearest neighbour of its fragment among a set of distractors. A retrieval is a hit when the true pair shows the minimum distance.

Two Directions

One benchmark, both ways

The same matched pairs power two evaluations. Flip between them.

text → image
Topic Spotting
image → text
Information Extraction
natural language query
→
retrieved fragment

Both reduce to the same objective: encode query and fragment so the true pair is the nearest neighbour among a distractor set. Minimise the distance to the correct match while pushing every distractor away.

Baselines · Table 3

Vision when the page is ruined,
text when it isn't

A CLIP-pretrained ViT (fine-tuned with metric/contrastive losses) versus an OCR + Sentence-BERT pipeline. The headline numbers favour OCR — until you look only at the least legible quarter of documents.

ApproachLossAcc@1Acc@5Acc@10AvgRank ↓Acc@1lowAcc@5low
Topic Spotting · text → image
ViT-B/32Triplet.473.639.69552.74.289.419
ViT-B/32SimCLR.509.672.72344.12.296.443
ViT-B/32CLIP.460.657.71932.33.264.447
OCR + sBERT—.657.785.83716.46.124.304
Information Extraction · image → text
ViT-B/32Triplet.523.640.69264.00.326.421
ViT-B/32SimCLR.522.675.72643.05.341.458
ViT-B/32CLIP.482.662.72532.99.326.464
OCR + sBERT—.623.723.76044.19.073.149

Read the last two columns. On the worst-legibility quartile, the picture flips: OCR + Sentence-BERT collapses (Acc@1low as low as .073) while the vision baselines hold (.26–.34). When characters survive, transcription wins easily; when they don't, pixels carry the meaning. The implication is a hybrid — visual when text is unavailable, textual otherwise.

What the vision model learned

It reads a little —
and dates a lot

GradCam on the ViT's visual tokenizer shows it does attend to words, and even tokenizes them toward their stems (Infantería → <infanter>, Cuerpo → <cuerp>) — a sign of robustness to noise. Common keywords are a necessary, not sufficient, cue.

But the more revealing finding is temporal. Probing the ViT's internal representations for date estimation, the deeper the layer, the lower the error — down to an 11–15 year mean absolute error — and it stays low even as the fragment is heavily blurred. The model isn't reading dates off the text; it's reading them off the layout. That temporal bias, learned from era-specific page design, actively helps retrieval in low-legibility regimes.

FINDING 01
Vision is OCR-free insurance
Where transcription fails, the visual encoder still retrieves by meaning — the benchmark's whole motivation.
FINDING 02
Date lives in layout
Era cues survive blur because they're structural, not textual — a beneficial temporal prior.
FINDING 03
Caution on bias
Shared period artefacts ("II/III Victorious Year") warn against over-reading the encoder's "recognition".
FINDING 04
Hybrid is the horizon
Text and vision are niche solutions; FAS is built to evaluate systems that fuse both.