Back to Blog
Articles

From CRNN to DeepSeek-OCR: When Did OCR Learn to Guess?

Swap a page of English for random letters, and DeepSeek-OCR's Tiny mode falls from 88% to 20%. From CTC and attention decoders to TrOCR and whole-page VLMs, we trace how the language prior kept growing stronger, how much it has helped, and which fields should never be left to a model's guesswork.

In October 2025, DeepSeek released the weights and technical report for DeepSeek-OCR. It is a model for reading documents that takes an image of a page and outputs the text in Markdown.

But the paper is about more than OCR. The authors wanted to know whether a page of text, once turned into an image, could be handed to a language model in far fewer tokens than the original text takes.

The numbers in the report are striking. On English pages from the Fox benchmark, with roughly one vision token for every ten text tokens, decoding precision is about 97%; at nearly 20× compression, it is still about 60%. DeepSeek-OCR abstract

Shortly after the release, Andrej Karpathy said on X that it was a good OCR model, but that he was more interested in whether pixels might be better inputs to LLMs than text. While he was at it, he took another swipe at the tokenizer. One of his complaints was that it turns “two characters that look identical to the eye” into two completely different tokens inside the network. Karpathy, 2025-10-20

Keep that line in mind; later on, we'll flip it around.

In January 2026, a group of researchers ran a very simple test. They re-rendered Fox's English paragraphs as images, made a second version with the same length distribution but with the content replaced by random letters, and gave both to DeepSeek-OCR. In Tiny, the most token-frugal mode, precision on ordinary paragraphs was 88.00%; with random letters, it fell to 19.84%. Visual Merit or Linguistic Crutch?, Tables 1 and 4

Same layout, same font, same image resolution. The only difference was whether the letters spelled out familiar English.

So how was the model “reading” the sixty-odd percentage points it lost?

Largely by guessing. When the strokes aren't clear, the model fills in the most likely characters from the surrounding text. With normal English, it often guesses right; when the content follows no pattern, it guesses wrong.

In fact, OCR has been guessing for years. This article starts from CRNN in 2015 and traces how the share of guessing grew step by step, how much progress it brought to OCR, and where it turned into a risk. At the end, we come back to engineering and look at which fields can be left to the model and which need to be verified some other way.

Figure: Timeline compiled for this article. Sources for each event appear in the corresponding paragraphs.

Over ten years, OCR's input has grown from a cropped line of text to a whole page, and its output from a string of characters to Markdown with tables and formulas.

The part responsible for “guessing” has gone from a post-processing step you could switch off to the decoder itself.

One Pickup Slip, Two Blurry Characters

Picture a pickup slip from a convenience store. Your hand shook a little when you took the photo, and two spots came out hard to read:

  • Under the header “Store pickup · by 11/30,” the first line reads “Please pick up your modem.” The last letter is blurred: it could be an m, or an r and an n run together, which would spell modern.
  • The second line has the pickup code K7O2. The third character is the letter O, but in this font, O and the digit 0 look almost exactly alike.
Figure: Illustration created for this article. We'll keep coming back to this pickup slip.

A person reading the first line wouldn't hesitate. After “pick up your,” the word has to be modem; “pick up your modern” isn't English. Here we're using more than our eyes; we're also drawing on the experience of having read a great deal of English.

The second line gets no such help. The pickup code is generated at random by the system, and the K7 in front can't tell you what the third character is.

It's easier to talk about these two kinds of clues separately. Visual evidence is which reading the strokes themselves support; the language prior is the expectation, built up from reading lots of text, of “what usually goes here.”

Let's look at some made-up numbers, multiplying the two clues together and normalizing the result into proportions. In the first example, the image gives modem 0.55 and modern 0.45, leaning only slightly toward modem; the context gives modem 0.95 and modern 0.05. After normalizing, modem is at 96%. The model reads it correctly, and confidently.

In the second example, the image gives O 0.52 and the digit 0 0.48, actually leaning slightly toward the correct O; but the context gives O 0.20 and 0 0.80, and after normalizing, 0 is at 79%. The model has seen too many codes in its training data where “digits follow digits,” so it pushes the answer toward 0 and outputs K702. The result looks perfectly normal. It's just wrong.

The same calculation is at work both times. When the text follows common patterns, it rescues a blurry character; when the text has no pattern of its own, it overrides a character that was reasonably clear.

Next, we'll look at how the language prior's place in OCR systems has shifted, and how its weight has grown.

The Column-by-Column Era

CRNN, from 2015, is the starting point of many OCR systems. It handles a single cropped line of text in three layers:

  1. Convolutional layers turn the image into a left-to-right row of features, with each column corresponding to a narrow vertical strip of the original image.
  2. A bidirectional LSTM lets each column consult the features of its neighbors on both sides.
  3. Each column outputs its own probability distribution over characters, and CTC (Connectionist Temporal Classification) tidies these up into the final string.

CTC first merges adjacent repeated characters, then deletes the blank symbol that means “no character in this column.” Let's try it on the date from the pickup slip, with - as the blank:

text
Per-column output: 1 1 - 1 / / 3 - 0 0
Merge repeats:     1 - 1 / 3 - 0
Delete blanks:     11/30

The blank between the two 1s matters. Without it, 1 1 1 would be merged into a single 1, and the date would become 1/30.

What each column outputs is decided by that column's features. Whatever character the previous column ended up outputting is never fed back as input to the next one. CRNN §2.3 The only way to use context is through the bidirectional LSTM, which glances at the neighbors' features on either side.

Explicit language knowledge, in that era, was usually bolted on separately. CRNN itself offers two modes: lexicon-free, with no dictionary, and lexicon-based, which can only choose answers from a given word list. The CRNN paper also mentions that an earlier method treated whole words as a 90,000-class classification problem, so its output could only be a dictionary word; strictly speaking, that doesn't count as lexicon-free. As late as 2021, TrOCR's abstract still noted that existing approaches usually needed an extra language model for post-processing.

At this stage, the guessing was a visible component. Whether it was switched on or off, and which dictionary it used, was the engineer's call.

When One Character Shapes the Next

Over the next few years, scene text recognition embraced a different kind of decoder that outputs one character after another, feeding the characters it has already output back in as input at every step.

Written as probabilities, the difference is obvious at a glance. xx is the image, and yty_t is the tt-th character:

Column by column:   P(yt∣x)In sequence:   P(yt∣y<t,x)\text{Column by column: }\; P(y_t \mid x) \qquad \text{In sequence: }\; P(y_t \mid y_{<t}, x)

PARSeq §1 uses exactly these two forms to distinguish “context-free” recognition models from “context-aware” ones.

With y<ty_{<t} added, the decoder gets a chance to learn “which characters tend to go together.” Nobody asked it to learn language, but the same words keep turning up in the training data, so it naturally memorizes them.

In 2020, On Vocabulary Reliance in Scene Text Recognition, by researchers at Megvii and elsewhere, put a number on this. Using the same ResNet-50 backbone and SynthText training data, they reimplemented four representative methods of the time, then split the IIIT-5k test images into two groups by whether the word appears in the training vocabulary.

Table: Table 1 of the paper, IIIT-5k recognition accuracy (%).
MethodIn-vocabularyOut-of-vocabulary
CRNN91.168.7
FAN93.175.3
CA-FCN91.676.3
ASTER92.974.6

All four methods lose roughly 15 to 22 percentage points on words they have never seen.

The two groups of images might differ in difficulty, though. To separate “never seen the word” from “harder image,” the authors synthesized two more training sets: one using only words that appear in the test sets, and one made entirely of fake words built from random letters. A model trained on the fake words has no vocabulary to memorize, so its gap between the two groups can stand in for the difference in image difficulty; subtract that from the gap of a model trained on real words, and what remains is vocabulary reliance. Paper §2.4

In this controlled experiment, the sequential attention decoder was the best at memorizing words and the worst at reading unseen ones; trained only on in-vocabulary words, it showed a gap of 32.7 percentage points between the two groups. Column-by-column CTC generalizes well on its own, but put a context module such as a bidirectional LSTM in front of it, and the model learns vocabulary better while generalizing to new words somewhat worse. The authors think CTC decoding itself lacks context modeling, and the module in front supplies it. Paper §3.2–3.3

The paper's first figure has a very intuitive set of examples. The model reads the blurry BEAUTY and everyday correctly, yet a sign clearly printed with UNIVERSITI gets read as UNIVERSITY. A pinyin street sign reading QINGYUANLU comes out as AINGYUANLU. The authors call this memory mechanism a double-edged sword.

Compare each sign with the recognized word beneath it; red letters mark errors.

The blurred familiar words on the left are read correctly, while clearer words on the right are changed. These are the four original examples discussed above. On Vocabulary Reliance in Scene Text Recognition — Figure 1, Wan, Zhaoyi et al..

Their fix was to mix fake words made of random letters into the training data so the model can't pass by memorizing words alone. For the attention model without a context module, IIIT-5k accuracy rose from 77.8% to 84.4%. The authors also noted that, at the time, no standard test set combined real-image complexity with purely random strings as content.

Set that remark aside for now. In 2026, someone filled the gap in a different way.

Around the same time, others simply made the language model a separate component. ABINet, from 2021, splits recognition into a vision model and a language model and blocks the gradient between them, so the language model can concentrate on learning spelling. Like someone doing a cloze test, it looks at the characters on both sides to correct the result, and it can repeat the correction for several rounds.

A year later, PARSeq pointed out a side effect of this design, in which the external language model, unable to see the image, may “correct” a character that was recognized correctly into a wrong one. PARSeq lets a single model choose whether or not to use context when decoding. PARSeq abstract

TrOCR went further. Its decoder is initialized directly from pretrained text models such as RoBERTa and MiniLM, and its output switches to subword units. TrOCR, Model Initialization section The language knowledge learned from vast amounts of text was built into the reading half of the model from the very start.

By this point, the language prior had moved from a post-processing step you could switch off into the decoder itself. Scores on public test sets kept improving, and most of the words in those test sets were real words.

Reading the Whole Page, and Writing It Fluently

All the models so far read only a single cropped line. A full page first needs text detection, separation into paragraphs and tables, and a reading order before recognition even gets its turn. Every extra component adds another seam where things can go wrong.

Meta's Nougat, in 2023, chose to handle the whole page at once, taking a page image from an academic paper and directly outputting markup text with LaTeX formulas. The authors pointed out that line-by-line OCR such as Tesseract can't tell superscripts and subscripts from ordinary text, so math falls apart the moment it goes in.

Once the whole page is handed to one decoder, failures look different, too. The paper itself records several kinds:

  • The model can fall into repetition, outputting the same sentence over and over, unable to stop on its own. This happens on about 1.5% of the pages in the test set, and more often on documents outside the training domain.
  • Languages in non-Latin scripts fall into repetition almost immediately; special characters in other Latin-script languages are replaced with the closest English letter.
  • Reference numbering sometimes skips, or picks up numbers the original doesn't have.

One of the authors' countermeasures was to randomly replace some tokens with wrong ones during training, so the model learns to recover from its own mistakes. This cut failed conversions on out-of-domain documents by 32%. Nougat §5.4–5.5

Replacing special characters with English letters and filling in reference numbers are both ways of outputting what's “more common.” Whole-page generation gives the model more preceding text to draw on, and more room to make the writing flow.

GOT, in 2024, used a single 580-million-parameter model to read formulas, tables, charts, and even sheet music as “characters.” Then general-purpose VLMs caught up at reading documents, and more and more people started using them directly as OCR.

In February 2025, Ai2 released olmOCR, with the aim of turning large numbers of PDFs into training data for language models. They first used GPT-4o to generate training labels, but found that on text-dense or complex-layout pages, GPT-4o working from the page image alone tended to omit content, rewrite or complete the original, and caption images when nobody had asked. The appendix states more specifically that, given only the image, the model finishes sentences cut off at the edge of the page, and when the image is ambiguous, it invents even longer passages. olmOCR §2.2 and Appendix A

Their solution, called document anchoring, uses pypdf to pull text blocks and their coordinates out of the PDF's internals and puts them into the prompt along with the image. This text layer is messy, with no preserved reading order and the body text mixed in with all kinds of boilerplate. But it gives the model characters it can copy. For a typical page, the image takes about 1,000 tokens and the anchor text about 1,800.

Around the same time, Hacker News had a thread titled “Replace OCR with Vision Language Models.” A few comments spelled out the engineering worries clearly. One user said that when traditional OCR can't read something, it spits out low-confidence gibberish, whereas a VLM confidently makes things up; they had used a VLM on handwritten genealogical records, and the model invented names and dates that “fit the vibe of the document.” Another said they would rather have gibberish, because gibberish is easier to catch. Someone else mentioned that VLMs “helpfully” complete half-sentences cut off at headers and footers. Hacker News, 2025-02-26/27

These are personal experiences, not statistics. Still, judging from them, when traditional OCR fails, it looks like an error; when a VLM fails, it looks like text. Some of the former can be caught by eye; the latter takes other methods.

How Much Text Does One Vision Token Carry?

Now back to DeepSeek-OCR. First, let's see how a page becomes vision tokens.

Figure: Compiled for this article from the configuration in §3.2 of the paper.

Its encoder has three stages. DeepSeek-OCR §3.2

  1. SAM-base, with 80 million parameters, first reads the image in 16×16-pixel patches. A 1024×1024 page yields 64×64 = 4,096 patches. This stage mainly uses local window attention, so it can still cope with that many patches.
  2. Two convolutional layers with stride 2 each halve the height and width, going 64×64 → 32×32 → 16×16 and leaving 256 tokens.
  3. CLIP-large, with 300 million parameters, applies global attention to these 256 tokens, which then go to a 3-billion-parameter MoE decoder that activates about 570 million parameters per inference.

By the same arithmetic, Tiny mode shrinks the page to 512×512 and goes from 32×32 patches down to 8×8, just 64 vision tokens; Small mode uses 640×640 and gets 100.

The paper measures compression on 100 English pages from the Fox benchmark. Each page's ground truth is first split into text tokens with DeepSeek-OCR's tokenizer, giving lengths between 600 and 1,300. A few rows:

Table: Excerpted from Table 2 of the paper. Compression ratios are in parentheses: the number of text tokens divided by the number of vision tokens.
Text tokens64 vision tokens100 vision tokensPages
600–70096.5% (10.5×)98.5% (6.7×)7
900–100085.9% (15.1×)96.8% (9.7×)14
1200–130059.1% (19.7×)87.1% (12.6×)4

The “about 60% at 20× compression” comes from the last row, and that row has only 4 pages. The authors also explain that the model's output format doesn't fully match Fox's ground truth, so actual performance should be somewhat higher than the table shows.

Let's roughly estimate how much content each vision token is responsible for. Suppose a page has 1,000 text tokens; at about 4 characters per token for English (our assumption; the paper doesn't give this number), that's around 4,000 characters. Fit them into Tiny mode's 512×512 image, and each character gets about 65 pixels on average, roughly an 8×8 square.

After all the compression, 64 vision tokens have to carry 1,000 text tokens, about 15.6 each on average.

One vector has to remember nearly a whole line of text.

Where does the rest of the information come from? Part of it really is compressed into the vectors; the remainder has to be filled back in by the decoder from what it knows about language. In their conclusion, the authors also write cautiously that OCR alone is not enough to fully validate this kind of “optical compression,” and that they still plan pretraining on interleaved digital and optical text, needle-in-a-haystack tests, and other evaluations. DeepSeek-OCR §6

Now look back at Karpathy's complaint. A tokenizer treats two characters that look identical to the eye as completely different tokens. OCR runs into the opposite problem. Once text becomes pixels, characters with similar shapes are close in pixels too, and the lower the resolution, the harder they are to tell apart. To separate them again, the handiest clue the model has is context.

Take Away the Meaning, and How Much Is Left?

In January 2026, researchers from the Chengdu Institute of Computer Applications of the Chinese Academy of Sciences, Tohoku University in Japan, and other institutions uploaded Visual Merit or Linguistic Crutch? The title asks it outright: is the model succeeding on what it sees, or is language propping it up?

Using Fox's 112 English pages, they re-rendered the ground truth as clean images, then made several perturbed versions, keeping the letterforms, layout, and rendering pipeline the same:

  • Sentence level: key nouns and verbs are replaced with words that are spelled like English but make no sense.
  • Word level: 5% or 10% of the words are chosen at random, and either two letters are swapped or all the letters are scrambled.
  • Zero prior: the whole page is replaced with “words” of 2 to 10 random upper- and lowercase letters, with the same length distribution as the original.

The sentence-level example paints a vivid picture. The original reads “has already been published in other issues of the Speaker,” and the researchers changed it to “has already been breadboxed in other whispers of the Squeaker.” The image clearly says Squeaker, and the model outputs Square; rebound gets “corrected” to rebroadcast. The word level is no different: ayreadl is read as already, and eepetadr becomes expected. Paper, Figure 1 and Table 5

In the bottom row, compare the perturbed image text on the left with the yellow output highlights on the right.

Squeaker becomes Square and rebound becomes rebroadcast. The side-by-side input and output make each rewrite visible. Visual Merit or Linguistic Crutch? A Close Look at DeepSeek-OCR — Figure 1, Yunhao Liang et al..

It's the same thing that turned UNIVERSITI into UNIVERSITY back in 2020.

The overall numbers:

Table: Average precision (%) from Tables 1 and 4 of the paper. All three kinds of input were rendered with the same pipeline.
Mode (vision tokens)Ordinary paragraphsSentence perturbationRandom letters
Tiny (64)88.0076.7519.84
Small (100)95.2391.5642.12
Base (256)97.9397.3161.70

The fewer the vision tokens, the bigger the drop. With 256 vision tokens, sentence perturbation has almost no effect, but on random letters it still manages only about 60%.

They also tested other models on the same random-letter data.

Figure: Redrawn for this article from the averages in Tables 6–7 of the paper. MinerU is not shown: its layout detection treats the whole image as one block, and it scores below 10% on both inputs.

On ordinary paragraphs, apart from DeepSeek-OCR Tiny at 88%, these models all score above 94% and are hard to tell apart. Switch to random letters, and the gaps open up.

The smallest drop belongs to PaddleOCR-v5, a traditional pipeline that first detects text lines and then recognizes them one by one: from 94.44% to 89.53%. The end-to-end models drop anywhere from 17 to 68 percentage points; even the 72-billion-parameter Qwen2.5-VL is left at 56.78%.

This preprint has its limits, of course. It tests only dense English paragraphs, and the authors state in their limitations section that they didn't test at scale on formulas, code, tables, and other content where the language prior helps less to begin with. Random letters are also an extreme condition: real documents rarely contain whole pages without meaning.

What about milder perturbations? In 2026, researchers at Amazon introduced FaithC4, which uses 1,455 documents in English, Chinese, and Korean and perturbs only a small share of the characters by scrambling them, replacing them at random, or swapping in look-alike characters. For English, word error rate rises by up to 6.9 percentage points for general-purpose VLMs, by 0.1 to 3.4 for OCR-specialized VLMs, and by less than 0.8 for traditional OCR.

They give prbolem as an example, which VLMs often just output as problem. Sort the misreadings of scrambled words by type, and not a single traditional-OCR error is a word “changed back to the original”; among VLMs, the share varies widely. Even within general-purpose VLMs, Gemini 3 Flash almost never rewrites, whereas InternVL3.5 changes 46% of its misread words back to the original; the OCR-specialized olmOCR 2 goes even higher, at 59%. FaithC4 Table 5

Read Rewritten as a share of perturbed words that were transcribed incorrectly.

Each row sums to 100%. For olmOCR, 58.63% of those errors restore the original word; the denominator is the erroneous perturbed words. Do VLMs Read or Rewrite? On Transcription Faithfulness in Vision-Language Models — Table 5, Gwang Gook Lee et al., CC BY 4.0.

Errors also spread. For Qwen3-VL-4B, perturbing just 5% of the characters raises the error rate on the remaining, unperturbed words to 7.3 times its original level. FaithC4 Table 6

The two papers' setups differ a great deal, so their numbers aren't directly comparable. Overall, the increase in word error rate is roughly largest for general-purpose VLMs, next for OCR-specialized VLMs, and smallest for traditional OCR; but individual models differ more than the categories do. To decide which model should read your documents, it's best to test on your own data.

When the Leaderboard Nears a Perfect Score

The most-cited report card in document parsing today is OmniDocBench. Published at the end of 2024, it collects many kinds of pages, including papers, textbooks, financial reports, newspapers, and handwritten notes, and scores text, formulas, tables, and reading order separately. Since v1.5 in September 2025, the overall score has been defined as:

Overall=(1−text edit distance)×100+table TEDS+formula CDM3\text{Overall}=\frac{(1-\text{text edit distance})\times 100+\text{table TEDS}+\text{formula CDM}}{3}

TEDS compares table structure, and CDM compares how formulas look once rendered. Version 1.6, released in April 2026, added 296 harder sample pages, bringing the total to 1,651.

As of this writing (November 11, 2026), the top five on the v1.6 leaderboard are:

Table: The v1.6 leaderboard from the official OmniDocBench README, captured 2026-11-11.
ModelParametersOverall
OXR-1.01.3B97.03
TeleOCR1.2B96.91
OvisOCR20.8B96.47
PaddleOCR-VL-1.60.9B96.34
MinerU2.5-Pro1.2B95.75

All five are specialized models of around one billion parameters. In the same table, Gemini 3 Pro scores 92.91 and GPT-5.2 scores 86.59.

How did small models climb to the top? There are two main directions.

The first is to split layout analysis back out. PaddleOCR-VL, from October 2025, works in two stages. First, PP-DocLayoutV2 finds the layout elements, detecting blocks with RT-DETR and then using a small pointer network to predict the reading order. Next, a 0.9B VLM recognizes the text, tables, formulas, and charts in each block, one at a time. The authors explain that they split it up because end-to-end models have to generate very long sequences in one go, with high latency and memory use, and on multi-column or mixed text-and-image pages, the layout tends to be unstable and prone to hallucination. PaddleOCR-VL §1 and §2.1

MinerU2.5, another high-scoring system, takes a very similar approach. When the DeepSeek-OCR 2 paper cites OmniDocBench v1.5 results, it puts both of them in the “Pipeline” category. We've come full circle: the pipeline is back, only now the part that reads the characters is a small VLM.

The second direction is to make the model read in a sensible order. DeepSeek-OCR 2, from January 2026, replaces the CLIP in its encoder with a 500-million-parameter language-model architecture and adds a set of learnable query vectors, so that the image tokens can all see one another while the queries read them in sequence, rearranging the image information into reading order before handing it to the decoder. On OmniDocBench v1.5, the overall score rises from the previous generation's 87.36 to 91.09, and the reading-order edit distance falls from 0.085 to 0.057.

The paper also explains how quality is monitored once the model is in production. Inside the company, DeepSeek-OCR powers two services, one reading user-uploaded images for the language models and the other batch-processing PDFs into pretraining data. In production there is no ground truth to compare against, so the authors treat the repetition rate as the primary observable quality metric, which falls from 6.25% to 4.17% for online images and from 3.69% to 2.88% for PDFs. DeepSeek-OCR 2 Table 4

Repetition is easy to detect; when the same passage keeps appearing, a program catches it at once. But when K7O2 is read as K702, nothing repeats, and no trace is left behind.

Leaderboards barely see this kind of error either. OmniDocBench scores text by edit distance, and with several thousand characters on a page, one wrong character hardly moves the score; for a pickup code, one wrong character means you don't get your package.

When Low CER is Not Enough, from July 2026, lays this gap out in the open. The researchers compared traditional OCR with several VLMs on archives from Uruguay's military dictatorship, scanned from microfilm. By character and word error rates, the VLMs all did better; looking page by page, though, these errors turned up:

  • Spelling errors in the original were quietly corrected by the models, and inconsistently at that.
  • In regions of the image where nothing could be read, the models still produced plausible-looking words, even though the prompt explicitly asked them to output [illegible]; different models produced different words for the same region.
  • In lists of names, names that aren't in the original appeared even where the writing was clear.
  • Some words were replaced with another entity of the same type: one person's name became someone else's, one country became another. The sentences still read smoothly, and the character error rate rose only slightly.

For archival research, these errors are far more dangerous than gibberish. Gibberish makes a reader stop and check the original; a fluent wrong name may go straight into a database.

Model developers are working on this too. On October 8, 2026, LightOn released LightOnOCR-3 in three sizes, 0.8B, 1B, and 4B, under the Apache 2.0 license. With grounding mode on, each block's transcription is prefixed with a category label and coordinates. Its reinforcement learning stage also sets a small rule, rewarding the model on a blank page only if it ends its output immediately.

Where there's no text, don't write any. That takes deliberate effort to teach.

Back to the Pickup Slip: Which Characters Can't Be Left to Guesswork?

Putting the evidence together:

  • The language prior has always been there. From the bidirectional LSTM in front of CTC, to sequential attention decoders, standalone language models, decoders initialized from pretrained text models, and VLMs that generate whole pages, its weight has kept growing.
  • It has brought real progress. A great deal of blurry, occluded, and low-resolution text gets read back thanks to context, and today's specialized models handle whole-page paragraphs, tables, and formulas very well.
  • Its cost is concentrated in text without patterns. Random strings, rare names, misspelled originals, and all kinds of codes and serial numbers are where the language prior can't help and may even backfire.
  • Errors look different now. People stop to check errors that look like gibberish; errors that look like normal text have to be caught by other means.

So, back to the pickup slip. We don't have to pick one model and use it for everything; we can decide, field by field, how to read and how to verify:

  1. If there's a text layer, use it first. When the PDF already contains text, give it to the model as a reference, as olmOCR does, or use it directly for comparison.
  2. The format itself is a rule. A date field holds only digits; a pickup code has a fixed length and character set. If the output doesn't fit the format, send it back to be read again.
  3. Keep the coordinates. Only when every piece of text maps back to a position in the image can you crop out that small region to recognize it again, or show it to a person.
  4. Let the model say “I can't read this.” Blank and illegible should both be valid outputs.
  5. If a field can be verified, verify it.

The best example of the fifth point is the two or three lines of monospaced characters at the bottom of passports and ID cards, known as the MRZ (Machine Readable Zone). The International Civil Aviation Organization's specification, ICAO Doc 9303, adds check digits to several of its fields, and the specification states that their purpose is to let reading devices confirm that the MRZ data has been read correctly. ICAO Doc 9303 Part 3 §4.9

Digits keep their own values, A through Z map to 10 through 35, and the filler character < counts as 0. Multiply each character in turn by the weights 7, 3, 1, 7, 3, 1, and so on, add up the products, and divide by 10; the remainder is the check digit.

Take the example from the specification's appendix: the document number AB2134, padded out to 9 positions:

CharacterAB2134<<<
Value10112134000
Weight731731731
Product70332794000

The sum is 125 and the remainder is 5, so the full string is written AB2134<<<5.

Suppose the model reads the fourth character, 1, as the similar-looking letter I. I has a value of 18; times the weight 7, that's 126, the sum becomes 244, and the remainder is 4, which doesn't match the 5 printed on the document. The error is caught.

Check digits can miss things, too. G has a value of 16, exactly 10 more than 6; multiplied by any weight, that difference is still a multiple of 10, so the remainder doesn't change. If the number on the document is AB6134 and it's read as ABG134, both have a check digit of 9.

So the job of a check digit is to catch most errors: when it doesn't match, go back and crop, re-read, or have a person confirm. Letting a language model “correct” the text until the check digit matches just brings us back to guessing.

The idea of catching errors through a document's own structure predates VLMs by many years. In 2013, David Kriesel in Germany discovered that some Xerox copier-scanners were swapping digits in the documents they scanned, turning 6 into 8 and 65 on a cost table into 85. The culprit was a mode of the JBIG2 compression used during scanning that treats image patches that look alike as the same patch, storing just one copy and reusing it. The swapped digits looked completely normal; he noticed only because the numbers on that cost table were supposed to run in ascending order. Kriesel, 2013-08-02

That machine had no language model, yet the result was much the same. Once the information was compressed, similar things were treated as one and the same, and the output still looked right. In the end, a rule from outside the image caught the error.

One of Karpathy's reasons for wanting LLMs to look at pixels directly is that a tokenizer splits identical-looking characters into different tokens. Experience on the OCR side runs the other way: once text becomes pixels, look-alike characters end up close together again, and the model has to lean on context to tell them apart.

That is exactly how people read, and exactly how people misread.

So the next time OCR hands you a flawless pickup code, don't rush to praise its eyesight.

It may have been guessing blind.