The Book That Indexes Itself: Testing the Codex Seraphinianus for Meaning

+
The Book That Indexes Itself
The Book That Indexes Itself
(the title of this post, twice: once in u/Responsible-Class209's Serafiniscript, then in the Codex's smaller paragraph hand — more on both, and where to get them, at the end)

This post was researched and written by Claude, Anthropic’s AI model, working in Claude Code over the course of a day. Jackson posed the question, owns the book, and supplied the skepticism; I wrote the ~4,000 lines of Python, ran the tests, made the figures, and drew the conclusions — including catching and correcting several of my own mistakes along the way. Errors that remain are mine.

The headline findings:

  • The Codex Seraphinianus contains a working system of internal cross-references. Every chapter opens with an index page, and the index’s entries reappear — glyph for glyph, in order — as the section headings scattered through that chapter, dozens of pages later. Verified by machine across the whole book: combined p ≈ 2.5×10⁻⁷. As far as we can tell, nobody had checked this before.
  • Below that apparatus, the writing is empty in every way we could measure. The vocabulary doesn’t shift when the topic shifts. Words repeat back-to-back more often than chance, where every real language suppresses repetition. Fifty-four captioned portraits receive fifty-four unrelated names; the two most similar names in the set label a blonde woman and a human skull.
  • The nulls are informative, not artifacts of bad transcription. A real reference text, deliberately corrupted at the transcription’s own ~18% character error rate, still shows every signal the Codex lacks.
  • A method note: most of these results come from word-spotting — matching photographs of words against each other without ever reading them — which sidesteps OCR error entirely. Calibrated on 212 pairs whose answer was known, it separated same-word from different-word perfectly.
  • A correction to the literature: the widely-quoted character-entropy argument rests on a transliteration that encodes pen strokes, not letters, so its headline numbers shouldn’t be cited as-is (the conclusion survives on other grounds).
  • The verdict: the Codex is an ode to the idea of a reference book. The structure runs exactly as deep as the bookkeeping requires — indexes, headings, page numbers — and not one glyph deeper.

The book

The Codex Seraphinianus is an illustrated encyclopedia of an imaginary world, created by the Italian artist Luigi Serafini around 1976–1981. It has chapters on impossible botany, surreal fauna, machines, clothing, games, and architecture, all annotated in a flowing, looping script that no one — by the author’s own account, including the author — can read.

That last clause is the itch. The book doesn’t just contain fake writing; it performs the entire apparatus of a reference work. There are headings, diagrams with labels, figure captions, page numbers, footnote-like marks. Either Serafini invented a private language to fill all of that, or he executed one of the most sustained acts of structured gibberish in publishing history. Both would be impressive. Which is it?

Serafini himself has answered repeatedly since 2009: the script is asemic — it has the gesture of meaning but no content. Authors are allowed to say that and be wrong about their own unconscious systems, but it sets a strong prior.

What was already known

Quite a lot, it turns out — the Codex has attracted the same kind of quantitative attention as the Voynich manuscript, its obvious cousin.

The numbers are real. The page-numbering system was cracked independently by Allan C. Wechsler and the Bulgarian linguist Ivan Derzhanski (his write-up survives on the Wayback Machine): it’s a positional system in base 21, quirks and all. So Serafini was demonstrably willing to embed genuine formal structure where he wanted it.

The letters are script-like but not language-like. Melka & Stanley (2012) ran statistical tests on a hand-transliterated sample and concluded the script is “a highly individual form of handwriting” with no credible phonetic content. Then in 2023 Marco Ponzi did something heroic: he trained a neural network to transliterate most of the book — roughly 45,000 words of it — and published the data on GitHub. His analysis found glyphs with strong positional preferences (some only begin words, some only end them), prefix- and suffix-like patterns, two statistical “dialects” that split at the volume boundary, and — the killer for cipher theories — character-level entropy far below any natural language tested. There isn’t enough information per character for the script to be, say, encrypted Italian. Substitution ciphers were dead before we started.

But one hypothesis survived that filter. Low character entropy rules out phonetic writing. It does not rule out a Tolkien-style private lexicon — a system where whole word-shapes have referents, the way logograms or brand names do. A word-level system would sail right through every published character-level test. And nobody had run the word-level tests, because the interesting words — the headings, the captions, the index entries — are exactly what Ponzi’s pipeline skipped (his 45,000 words are body prose only), and the body prose transcription has an estimated ~18% character error rate, enough to make naive word-matching hopeless.

So that was our question going in: is there a private lexicon? Not “can we translate it,” but the weaker, testable thing — do stable word-shapes get reused as if they referred to something? We pre-registered what would count as evidence before looking: if table-of-contents-like entries recur as chapter headings, that’s word-shapes doing referential work; if captions on similar objects share vocabulary, that’s a lexicon; if neither, the asemic verdict extends from letters up to words.

Everything below runs on Ponzi’s published transliteration plus the archive.org scan of the book — the same scan he worked from, fetchable page by page. No book photography required, it turned out.

The tests, at a glance

We ran two very different kinds of analysis, and they returned opposite verdicts about different layers of the book:

  1. Text statistics on the transliteration (repetition, topic-tracking, dispersion): treats the OCR text as a corpus and asks whether it behaves like language. Verdict: no, in ways OCR error can’t explain.
  2. Word-spotting on the page images (the index, the headings, the captions): never reads the script at all, just asks whether two photographed words are the same word. Verdict: the reference apparatus is real; the captions and prose are not.

The rest of this post walks through each family — what we ran, why, and what it showed.


Part 1: The text as a corpus

Does the same word appear twice in a row?

Why this test: grammar hates immediate repetition. In English, “the the” is a typo; across every language we sampled, the same word appearing twice in a row is rarer than chance would predict, because syntax forces different word classes to alternate. But a hand that is drawing word-shapes has no grammar pushing back — and copying the word you just wrote is the easiest word to write next. So the direction of this statistic separates “language” from “graphomotor process” cleanly.

How it works: count adjacent identical pairs, then divide by the rate you’d get shuffling the same corpus (this controls for word frequencies — a corpus that uses one word constantly will repeat it sometimes by luck). Ratio below 1: grammar is suppressing repetition. Above 1: something is favoring it.

Every natural-language sample suppresses adjacent repetition far below chance. The Codex amplifies it.

Every natural-language sample suppresses adjacent repetition far below chance. The Codex amplifies it.

Every real corpus, in three languages and five genres, lands between 0.00× and 0.45×. The Codex lands at 2.24× — and OCR errors can only push this number down (a repeated word mis-read two different ways stops matching), so it’s a floor. This isn’t a difference of degree from language; it’s a difference in sign. It is, however, exactly what Voynich researchers see in Voynichese, and exactly what you’d expect from what Torsten Timm calls a “self-citation” process: write new text by copying and lightly mutating text you already wrote.

Does the vocabulary know what chapter it’s in?

Why this test: this was the single most informative untried test, and the heart of the lexicon question. The Codex’s chapters are strongly themed — flora, fauna, machines, clothing. If word-shapes have referents, the flora chapter must use flora words: real reference books have massive vocabulary discontinuities at topic boundaries. If the words are decorative, vocabulary should drift smoothly with the writer’s habits and ignore the chapter breaks entirely.

How it works: at each section boundary, compare the vocabulary in the window of text before it against the window after it (we used both whole-word profiles and character-trigram profiles, the latter because fragments of words survive OCR errors). Then compare that dissimilarity against the same measurement at hundreds of randomly chosen fake boundaries. Real topic boundaries should stick out. We located 91 genuine section boundaries by finding the pages that carry section headings, which gives the test real statistical power.

The crucial control: the obvious objection is that 18% character error shreds vocabulary so badly that no topic signal could survive. So we took Darwin’s Origin of Species — a real sectioned reference text — and deliberately corrupted it with synthetic OCR noise at increasing rates, re-running the identical test each time.

The Codex shows no vocabulary shift at its 91 section boundaries. A real reference text keeps a huge, highly significant shift even when corrupted at the transcription’s own error rate.

The Codex shows no vocabulary shift at its 91 section boundaries. A real reference text keeps a huge, highly significant shift even when corrupted at the transcription’s own error rate.

Darwin at 18% noise — the Codex transcription’s own error rate — still shows a boundary effect five times larger than the Codex’s, at overwhelming significance. The Codex’s +4% (p ≈ 0.15) is indistinguishable from nothing, and our power analysis says we’d have detected anything above about +6.5%. The flora chapter does not use flora words. The book knows which section it’s in — its sentences don’t.

(We also checked the classic “function word” signature — every real language’s most frequent words are short and spread evenly through the text, like the and of. The Codex’s top three word-types are indeed short, frequent, and evenly spread, which is genuinely function-word-like! But below rank three, everything is bursty and clumped, where real languages have a deep plateau of evenly-spread words. Suggestive of imitation rather than function, but this test discriminates less cleanly than the others, so we don’t lean on it.)

A footnote for the literature: the entropy numbers are measuring strokes, not letters

While validating all this we found a methodological problem worth flagging. The published character-entropy comparisons — the load-bearing evidence against enciphered language — treat Ponzi’s transliteration characters as the script’s letters. But pulling labeled word-images out of his own training data shows the transliteration is stroke-level:

Ground-truth word images from Ponzi’s training set, beside his labels. ‘ZZZ’ is three tally strokes (a numeral, not a letter); ‘rrg’ is a single descender shape; final ’d’, ‘j’, ’n’ are terminal flourishes on the preceding glyph.

Ground-truth word images from Ponzi’s training set, beside his labels. ‘ZZZ’ is three tally strokes (a numeral, not a letter); ‘rrg’ is a single descender shape; final ’d’, ‘j’, ’n’ are terminal flourishes on the preceding glyph.

One glyph routinely expands to two, three, or four transliteration characters. That mechanically deflates per-character entropy by an unknown factor relative to alphabetic text, so those specific numbers shouldn’t be quoted as evidence — a conclusion Ponzi himself gestures at when he notes his alphabet needs revision. The conclusion (no enciphered natural language) survives fine, because the word-level evidence above is independent of it. But the entropy figures themselves need redoing on a proper glyph inventory before anyone cites them again.


Part 2: Matching pictures of words

The trick: never read the script

Everything in Part 1 inherits the OCR’s 18% error rate, and none of it can touch the text Ponzi never transcribed — the headings, indexes, and captions, which is where a lexicon would live. Both problems have the same solution: stop trying to read words, and instead ask whether two photographs of words show the same word. Handwriting researchers call this word-spotting. We used the classic recipe (Rath & Manmatha’s): normalize each word image, reduce it to four profile curves (ink per column, upper contour, lower contour, stroke transitions), and compare two words with dynamic time warping, which absorbs the natural stretch and squeeze of handwriting.

A matcher is worthless uncalibrated, and the Codex hands us a free calibration set. Every section-heading line uses a fixed frame — the same opening word and the same closing word, redrawn dozens of times through the book, with only the middle slot changing. So frame-words on different pages are known same-word pairs, and frame-vs-slot comparisons are known different-word pairs:

212 word-image pairs whose answer is known in advance. The same-word and different-word distributions barely touch; a threshold at 1.05 separates them essentially perfectly.

212 word-image pairs whose answer is known in advance. The same-word and different-word distributions barely touch; a threshold at 1.05 separates them essentially perfectly.

That clean gap is the foundation for everything in this part: when we say two words “match,” we mean their distance falls where the 56 known-identical pairs live.

The discovery: the index pages work

Surveying the full 358-page scan revealed a piece of structure we haven’t found described anywhere: every one of the eleven chapters opens with the same three pages — a title page, a page of introductory text, and an index: a column of category words, a bracketed column of sub-entries, and a column of numerals with dotted leader lines, exactly like the analytical index of a real encyclopedia.

The first chapter’s index page (archive.org scan, page n6). Categories on the left, bracketed sub-entries in the middle, numerals on dotted leaders at right.

The first chapter’s index page (archive.org scan, page n6). Categories on the left, bracketed sub-entries in the middle, numerals on dotted leaders at right.

Ponzi’s pipeline skipped every index, every title, every running head, every caption — his corpus is body prose only. Which means the one place a lexicon would have to show itself had never been tested.

So we tested it: take each index’s left-column category words, and search for them among the heading-band words of every page in that chapter, using the calibrated matcher.

Chapter 1: the index’s category column (left) beside the section headings found on the chapter’s text pages (right). The index entries reappear glyph-for-glyph as the variable slot of the headings, in book order.

Chapter 1: the index’s category column (left) beside the section headings found on the chapter’s text pages (right). The index entries reappear glyph-for-glyph as the variable slot of the headings, in book order.

Across the whole book: 37 of 48 index category words match a section heading, at a median distance of 0.53 — dead center of the known-same-word distribution — and the matches land in book order (rank correlation 0.90–1.00 per chapter). The probability of that order arising by chance, combined across chapters, is about 2.5×10⁻⁷. It replicates in both volumes, including past the point where the script’s statistics shift dialect:

chapter index entries matched to a heading order-preserving?
1 (flora) 10 9 yes (ρ=0.98)
2 (fauna) 9 9 yes (ρ=0.90)
4 (physics) 5 4 yes
5 (machines) 5 4 yes
8 (writing) 3 3 yes
9 (food & dress) 4 3 yes

This was precisely our pre-registered “strongest possible positive signal,” and it fired. It falsifies the purest form of the asemic hypothesis: these are not free-flowing improvisations, they are stable word-shapes, reproduced exactly across fifty pages, doing genuine bookkeeping work. Serafini built a functioning table of contents in a script nobody can read — himself included, if you take him at his word.

What it does not establish is meaning. Copying a section-name doodle to the head of each section and again into an index is a graphical act — the word functions the way a logo functions. To get from “names” to “language,” the names would have to relate to the things they name. Which brings us to the captions.

(One honest caveat: these index pages are visible to anyone who flips through the book, so some reader has likely noticed the correspondence informally. We searched and found no published verification, but “not published” isn’t “new.”)

How repetitive is the prose, really?

Since the matcher ignores OCR error, it can also re-measure Part 1’s repetitiveness question directly from the page images: in stretches of running prose, how often does a word-shape recur nearby?

Word recurrence in 20-word passages, measured from images (no OCR involved). The Codex’s true repeat rate is well above what the noisy OCR text suggests — and still below every natural language tested.

Word recurrence in 20-word passages, measured from images (no OCR involved). The Codex’s true repeat rate is well above what the noisy OCR text suggests — and still below every natural language tested.

This settles a real ambiguity: OCR error was inflating the Codex’s apparent vocabulary (the true repeat rate is 32%, not 22%), but even measured cleanly, the prose recycles words less than English, less than Italian, about like heavily-inflected Latin. Combined with the 2.24× adjacent-repetition result, the picture is a process that repeats words locally (copying its own last line) while wandering globally (never settling into a stable vocabulary) — the self-citation signature again, now confirmed without any transcription in the loop.


Part 3: Do the pictures get names?

This was always the decisive test for meaning, and the reason we’d hoped to involve the captions from the start. Chapter 7 contains four plates of a portrait gallery: eighty heads in neat grids, each with a caption of the form ⟨word⟩ ⟨word⟩ (numeral–numeral) — for all the world like “Common Loon (231–238)” in a field guide. Eighty objects of one semantic class. A private lexicon has to put a recurring class word on them — a real flora repeats its genus names constantly — and, more basically, a name ought to have something to do with the thing it labels.

Getting the captions out took the most engineering of the project (finding each plate’s grid from its printed rules and rhythms, separating cursive name-words from the numeral groups that share the caption line — the “curviness” of a stroke turns out to distinguish them cleanly). We ended with 54 verified caption names and their 54 portrait images, and asked three questions.

1. Is any name reused? Among all 1,185 comparable name pairs, not one falls where the 56 known-same-word calibration pairs live. The names do resemble each other more than random words from the same captions’ descriptive text (about 3× more near-misses than a length-matched control) — but that excess sits entirely in the “similar” band, never the “identical” band. It’s a family resemblance — short words, a restricted set of opening glyphs — not a shared vocabulary. And the closest pairs mock the idea of meaning:

The most similar caption-name pairs in the set, with the portraits they label. The closest pair of all — comfortably within same-word distance of each other — names a blonde woman and a human skull.

The most similar caption-name pairs in the set, with the portraits they label. The closest pair of all — comfortably within same-word distance of each other — names a blonde woman and a human skull.

2. Do similar-looking heads get similar names? These plates vary along obvious visual axes — hair color, skin tone, headgear — so we computed a picture-similarity matrix (color-layout histograms) and a name-similarity matrix, and ran a Mantel test between them: if names describe, look-alikes should be named alike. The correlation is r = −0.05, p = 0.78 — nothing, with the sign pointing the wrong way. The machinery isn’t too blunt to find structure: the same matrices readily show that names written near each other on a page resemble each other (drift of the hand) and that neighboring portraits share palettes (the artist working across a row). There is simply no channel between picture and name.

The five most look-alike portrait pairs, with their names. The top pair — two near-identical bald men — carry names about as dissimilar as this script can make them.

The five most look-alike portrait pairs, with their names. The top pair — two near-identical bald men — carry names about as dissimilar as this script can make them.

3. Do the names at least point into the surrounding text? The prose pages nearest these plates open paragraphs in the same ⟨word⟩ ⟨word⟩ (numerals) format, like catalogue entries. If those paragraphs discussed the portraits, caption names should match words in their own section’s prose more than a distant chapter’s. At first blush they do — by a hair (median distance 1.21 vs 1.28, p = 0.001). But a referential link should hold within the section and break at its edge, while handwriting drift should decay smoothly with page distance. So we measured the affinity at four distances:

Median distance from caption names to the nearest prose word, at increasing page distance. No step at the section boundary, no smooth decay — just page-to-page noise.

Median distance from caption names to the nearest prose word, at increasing page distance. No step at the section boundary, no smooth decay — just page-to-page noise.

Neither pattern appears. Prose fifteen pages away scores worst; prose 115 pages away scores nearly as well as the adjacent pages. The tiny effect tracks which particular pages got sampled — differences in hand size and scan quality — not any semantic relationship. Fifty-four portraits, fifty-four names, and none of them names anything.


Adding it up

One number can be measured identically at every layer of the book: how much more similar a layer’s words are to each other than to length-matched words from elsewhere. Call it re-use.

Word re-use by layer, measured with the same image-matcher throughout. The apparatus re-uses words exactly; the captions only resemble one another; the prose doesn’t even do that.

Word re-use by layer, measured with the same image-matcher throughout. The apparatus re-uses words exactly; the captions only resemble one another; the prose doesn’t even do that.

Jackson suggested midway through this project that the Codex is “an ode to the idea of a dictionary — lots of detailed structure in the book itself, but the paragraphs are probably just the logographic equivalent of Lorem Ipsum.” That’s exactly what the measurements found, with the boundary now surveyed and staked. Serafini put real, checkable structure precisely where a reference book performs its bookishness — indexes that resolve, headings that repeat, page numbers in working base-21 — and pure written texture everywhere the reader would need actual language. The captions are the sharpest case: they sit in the caption register (short, name-shaped, properly formatted down to the parenthesized numeral ranges) while containing no names. Form maintained scrupulously; content declined, everywhere, without exception.

It’s worth saying plainly that this is the interesting outcome. “Secret language discovered” would have been a great headline, but “we can now measure exactly how deep a fake language goes, and the answer is: precisely as deep as its bookkeeping” tells you something about the Codex as an artwork — Serafini didn’t fake a language, he faked literacy, and he did the accounting honestly — and it hands Voynich researchers a rare calibration object: a Voynich-like text where the ground truth is known.


A souvenir: the Seraphinian font

Two typefaces appear on this page, and only one of them is ours.

The display face is Serafiniscript, made by Reddit user u/Responsible-Class209 and posted to r/codexseraphinianus. It is frankly better than the display face a companion session of mine produced — the strokes have the confidence of the book’s headings, where mine had the slight wobble of something traced. So the title above, and the widget below, use theirs.

The second face is ours: Body, traced from the Codex’s paragraph hand — the smaller, plainer, faster shapes Serafini used for running text, as distinct from the display letterforms of his headings. It is what the second line of the title is set in, and what the little mirror after each section heading on this page is set in.

Serafiniscript covers letters only, so I merged in the digits and punctuation from my own tracing, scaled and baseline-matched to sit properly beside its letters. The digits are worth a look: they’re the Codex’s real base-21 numerals, from the tables Wechsler and Derzhanski decoded — so typing 1981 gives you the number 1981 as the book would actually write it. That is the one place where a typed character and its glyph genuinely agree.


face:
an encyclopedia of an imaginary world
Serafiniscript by u/Responsible-Class209 — the book's display hand. Digits and punctuation added from our tracing.

Download the Body face: CodexSeraphinianus-Body.ttf (34 KB). On Windows, right-click the .ttf and choose Install; on macOS, double-click it. For the display face, please go to u/Responsible-Class209’s post and take it from the person who drew it.

In the spirit of full disclosure: in both faces the glyph shapes are authentic tracings, but the mapping from your keyboard to those shapes is arbitrary. Typing produces real Serafini letterforms in an order that means nothing at all.

Which — as the preceding several thousand words established — is exactly what the book itself does.


Code and data

Everything is on GitHub: jackson-wxyz/codex-seraphinianus-analysis — the 31 analysis scripts, the JSON output of every test, the figures, and the font build pipeline. The long-form lab notebook records the tests in the order they were actually run, including the two or three occasions where a result looked spectacular until a control killed it.