Skip to content

Fifty-Two Readings Fit the Same Thirteen Characters

Cryptographers have a measure for how much text a cipher needs before only one reading fits: the unicity distance. The arithmetic behind it explains why a thin prompt returns a different image every time, and why that is a property of the brief rather than a model failure.

AI-assisted draft. Reviewed and edited by the Phosphene team before publication.

On this page
Thirteen small pale pebbles arranged in a row on a dark slate surface, each casting a different faint shadow

The Zodiac killer's Z13 cipher is thirteen characters long. People have argued about it for more than fifty years, and the argument cannot end, because thirteen characters is not enough to pin down one answer. A project that enumerated the near-best readings exactly, under a frozen five-gram language model, found 52 distinct readings inside a 4-nat band of the best score and 1007 inside an 8-nat band, where a nat is just the log-scale unit the model scores with. That ambiguity is not a weakness of the search. It is a property of the cipher.

There is a name and a formula for this, and it dates to 1949. Claude Shannon called it the unicity distance: the amount of ciphertext needed before only one key, and therefore one plaintext, fits. Roughly, U = H(k) / D, where H(k) is the entropy of the key and D is the redundancy of the language per character. Written English carries far less information per character than a 26-letter alphabet could, which is why the number comes out small for simple ciphers and large for strong ones. It is an estimate that depends on the assumed key space and language model, not a hard boundary, and different cipher classes move it. The solver project puts it at roughly 20 to 30 characters for the homophonic substitution cipher it is working on. Z13 has 13, which is why its near-best set explodes. The same project looked at Z32, thirty-two characters, and found one reading standing 3.44 nats clear of the field, which is suggestive rather than settled, and the project itself treats it that way.

I keep thinking about this when someone tells me a model is inconsistent because the same prompt produced four different images.

The prompt is a ciphertext

Read the analogy in the direction that is actually useful. A prompt is not a specification of an image. It is a short string from which the model has to reconstruct a much larger object, and the reconstruction is only unique when the prompt carries enough constraint to eliminate the alternatives. Below that threshold, several outputs fit equally well, and the sampler will hand you different ones because nothing in the input says which of them is the answer.

Two things follow, and they are both testable without any math.

The first is that you can count the dimensions you left free. "A woman in a red coat on a bridge, cinematic" fixes a subject, a garment colour, a location and a vibe word, and leaves free: her age, her face, her pose, the camera height, the lens, the time of day, the weather, the direction of the light, the palette beyond one garment, the depth of field, the aspect ratio, the background population, the medium. That is a dozen free dimensions. The space they span is enormous, and every image in it satisfies the brief.

The second is that adding constraint does not always help. Constraints interact. Ask for backlit haze, a 24mm lens and a shallow depth of field in the same frame and you have asked for three things that fight, so the model averages them into something that satisfies none. The space does not shrink toward your intent. It moves to a compromise, and the compromise is often the flat, over-lit look people call AI slop. Specificity is not a scale you turn up. It is a set of decisions that have to be consistent with each other.

A four-step loop that finds the free dimension

The practical version of all this fits in one review pass.

  1. Render four outputs at a recorded set of seeds, not one. Four is enough to see what moves.
  2. Diff them. Not impressionistically. Name every dimension that changed between the four: framing, light direction, expression, background density, palette, grain.
  3. Pick the single changed dimension you did not want to be free, and constrain only that one. Re-render.
  4. Stop when the next constraint would remove the quality you actually liked.

The step people skip is 2. Without it, you add constraints that were never the problem, and the image keeps wandering while the prompt grows to two hundred words. With it, four renders tell you exactly which axis is unconstrained, and one clause fixes it. That is also why long prompts fail: length is not the same as constraint, and a hundred adjectives about mood leave pose, lens and light untouched.

For video the dimension list gets longer, and so does the cost of leaving it free. Motion path, motion amplitude, duration, first-frame anchor, what stays still. A clip where the camera drifts without being told to drift is not a model bug. It is an unconstrained axis being filled by the sampler, and the fix is one sentence about the camera, not a new model. The same goes for character consistency: if identity is described by three adjectives, everything else about the face is free, and the face will change. Constraint has to land on the axis you care about.

Where the analogy stops being a metaphor

Here is the part that makes this more than a nice comparison. Some briefs are genuinely below threshold, and no amount of prompt craft changes that. If a client asks for "a poster that feels like summer", the brief has thirteen characters of information in it. There is no unique summer poster. There are hundreds of equally defensible ones, and the productive move is to generate the near-best set and let the person choose, not to keep re-rolling until one feels intended.

That is exactly what the cryptographic version concluded. For Z13, the project's success criterion is a measured ensemble of near-best decodes, not a claimed name. For Z32, where one reading is clearly ahead, it still refuses to call it a solution, because the model's training corpus contains the newspaper phrasing that reading reproduces. Agreement with a known hypothesis is not confirmation.

Applied to a studio, that gives you two honest claims instead of one dishonest one. "These four all satisfy the brief, pick one" is true and useful. "This is the image the brief describes" is false whenever the brief left a dozen axes free, and the client will discover it on the second revision.

What I would actually measure

If you want a number rather than an intuition, count the free axes before rendering and count how many of them moved between your four outputs. Treat the count as a diagnostic starting point, not a verdict. A brief where eight of twelve axes moved is underdetermined, and the fix is the brief. A brief where two moved may be nearly specified, or the other ten may simply have held by chance across four renders, so check the outputs against the brief before choosing a fix. If they match and the two moving axes are not ones you care about, you are done. If they match and the variance is run to run, that is a different problem with a different repair: a fixed seed and a recorded model build.

That count also tells you what to charge for. Discovery work on an underspecified brief is not padding. It is the only step that moves an image from "one of 52 readings" to "the reading", and it happens before the first render, not during the twelfth.

Shannon's formula was about how much text you need before a message becomes determined. The useful translation is that determination is bought with information, and information means decisions. Every decision you leave open is one the sampler makes for you, differently each time, with equal justification. Understanding that turns "why is the model so inconsistent" into "which axis did I forget to decide", and that question has an answer. The same discipline is what a proper brief interrogation is for, and it is the cheapest step in the pipeline.

Sources

Share this guide
X LinkedIn