Compatibility of worlds: encoding facts as binary vectors
Two fictional universes with incompatible physics rarely feel inconsistent read side by side — except, occasionally, when they do. Leibniz had a word for whether two states of affairs can coexist: compossible. This traces that question through three centuries of philosophy of language and logic, and asks whether it can be checked mechanically, using binary vectors borrowed from hyperdimensional computing.
Some years ago — the team’s best reconstruction puts it around 2018 — one of us was reading toward a cognitive-science paper on a narrower question: why does a reader’s model of a story not seize up when two incompatible fictions sit side by side? Darth Vader enters a room and someone shouts “Avada Kedavra!” Nothing about the sentence stops a reader. The Force and a wand-cast killing curse are never reconciled — no explanation is offered for why a galaxy with lightsabers also permits incantations — the two are simply both held true of the moment being described. The paper was never finished, but the question under it did not go away: is that a fact about readers, who are forgiving, or a fact about the two possible worlds themselves — compatible, in a sense that could in principle be checked rather than merely felt? This piece returns to the question with a mechanism that did not exist in convenient form eight years ago — a way to fit everything a possible world asserts into a vector of fixed size, cheap enough to compare by counting disagreeing bits.
A short history of possible worlds
The word for this is three hundred years old. Leibniz held that God chose the actual world from infinitely many possible ones, but not every combination of possibilities is a candidate: a possible individual — a particular Caesar, a particular kingdom — can appear in a world only alongside other possibles it does not conflict with. Leibniz called two such possibilities compossible, and held that a world just is a maximal collection of compossible things — not even God, on this view, can put a contradiction between two members of the same world (see the Stanford Encyclopedia’s entry on Leibniz’s Modal Metaphysics). Incompossibility is the old name for exactly what a crossover risks: two things, each possible enough on its own, that cannot both be true of one world at once.
The phrase “state of affairs” is younger, and comes from a different direction. Wittgenstein’s Tractatus Logico-Philosophicus (1921) opens by identifying the world with the totality of facts, and a fact with the holding of a Sachverhalt — usually translated “state of affairs” — a possible combination of objects. A world, on this account, is settled once every state of affairs is settled one way or the other; nothing further needs saying about it.
Carnap made that idea literal. In Meaning and Necessity (1947), he defined a state description as a complete assignment of truth or falsity to every atomic sentence of a fixed vocabulary — one entry per basic fact, no more, no less. Carnap was explicit that a state description is close kin to a Leibnizian possible world, adapting the idea directly from Wittgenstein’s Sachverhalt (see the Stanford Encyclopedia’s account of Carnap’s semantics). It is also, item for item, the checklist in the next section: a fixed vocabulary, one bit of information per entry, one string per world.
Kripke supplied the part Carnap’s state descriptions lack: a relation between worlds. In Semantical Considerations on Modal Logic (1963), a model is a set of worlds, an accessibility relation between them, and a valuation assigning each world a truth value per atomic proposition — so a world just is a valuation vector once the propositions are fixed, exactly as Carnap had it, but now sitting inside a structure that can say which worlds are reachable, or relevant, from which. Computer science later borrowed the machinery wholesale: a Kripke structure, in model checking, is a set of states and a transition relation, where each state literally is the subset of atomic propositions true there — the same object under a different name, used to verify hardware and protocols rather than to interpret sentences with “necessarily” in them.
Twenty years later, David Lewis needed a way to compare worlds, not just enumerate them. His semantics for counterfactuals — if Caesar had commanded in Korea, would he have used the bomb — evaluates a conditional by looking to the closest worlds where the antecedent holds, and closeness is a similarity ordering that Lewis measured, informally, by how much particular fact two worlds share and how few violations of natural law separate them (see the Stanford Encyclopedia’s entry on Counterfactuals). He conceded he never fully formalised the metric. Hamming distance between two binary vectors — the count of positions where they disagree — is one principled way to make a similarity ordering computable, at the cost of everything Lewis’s informal notion could weigh that a bit vector cannot.
From a state description to a checklist that scales
Carnap’s state description already is the checklist: fix a vocabulary of atomic questions, answer each true or false, and a world is the resulting string. Suppose the vocabulary for one corner of a story is is there a king, is he alive, is he young, does he have an heir, is the crown contested, is he at the coronation. One quest’s version of the world might read:
World A: 1 1 0 0 1 1
A rival quest’s version, after an assassination the first quest does not know about, might read:
World B: 1 0 0 0 1 1
The two strings disagree in exactly one position — the second, “is he alive” — which is both the Hamming distance between them and a precise pointer at what the two quests actually disagree about. Comparing worlds this way is exact, and fast: a machine compares millions of such strings a second, because comparing bit strings is close to the cheapest operation a computer does.
The checklist breaks on anything open-ended, which fiction is. Carnap could fix his vocabulary once because he was building a formal semantics for a formal language; a story keeps introducing questions nobody thought to ask — is this character Force-sensitive, can this substance be transfigured, does this bloodline carry a curse. Each new kind of fact either goes unrepresented or forces the checklist — and every vector already built against the old one — to be redesigned. A workable mechanism needs the fixed size of the state description without its fixed vocabulary.
Binding, bundling, and vectors that need no dictionary
Hyperdimensional computing, also called vector symbolic architecture, supplies exactly that (Kanerva, 2009; Kleyko et al., 2022). Its vectors are long — thousands of bits — and drawn independently at random, which means two of them are, with overwhelming probability, nearly uncorrelated: agreeing on about half their bits by chance, no more. That slack is what makes room for facts. A role vector (say, for “is alive”) and a filler vector (say, for “the king”) combine by bind, bit-wise exclusive-or, into a third vector unlike either input — but recoverable, because exclusive-or undoes itself:
A concrete instance, shortened to 8 bits for print — production vectors run to thousands: let ALIVE = 10110010 and KING = 01101001. Binding is bit-by-bit exclusive-or: bind(ALIVE, KING) = 11011011. Binding that result with ALIVE a second time recovers KING exactly — 11011011 ⊕ 10110010 = 01101001 — which is the self-inverse property the second line states.
bundle is how several bound facts share one vector: add them and take the majority bit at each position. The result stays close, by Hamming distance, to everything that went into it, in proportion to how much else was bundled alongside — which is also the mechanism’s one real cost, a slowly degrading signal as more facts share a vector, rather than a hard collision.
Bundling three 8-bit facts — 11011011, 01100101, and 11010110 — by majority vote at each position gives 11010111, which sits closer, by Hamming distance, to each of the three (2, 4, and 1 bits away respectively) than a random 8-bit string would be expected to sit to any of them (4, on average). At real dimensionality, with vectors independently random over thousands of bits rather than these three hand-picked ones, that margin is what keeps a bundle of many facts readable.
Neither vector needs to be stored anywhere. A symbol’s hypervector can be generated on first use by hashing its name into a random seed — the trick used decades earlier by random indexing, a corpus-vector-space technique that generated word vectors by hashing rather than by lookup table (Kanerva, Kristoferson & Holst, 2000). The same string always produces the same vector, so “Gandalf” hashes identically whether it turns up in a canon wiki or in a scene written independently of it, and a new character or a new predicate never requires touching an existing vector or agreeing on a shared vocabulary in advance. The checklist’s fixed schema is gone; its fixed size is not.
Where a language model does the work
Hashing supplies the vectors; it does not supply the facts. Something still has to decide that “Darth Vader entered a room and heard someone shout ‘Avada Kedavra!’” contains, among others, the atoms:
enters(Vader, room)hears(Vader, utterance-1)denotes(utterance-1, killing-curse)casts(unnamed-caster, killing-curse)
Deciding what counts as an atomic fact in an arbitrary sentence — resolving what a pronoun refers to, normalising a predicate so “shouted a curse” and “cast a spell” land on the same role, judging which details matter enough to bind explicitly — is a fuzzy, open-domain task. It is also, at this point, a solved-enough one: it is what language models are already used for in extraction and retrieval pipelines elsewhere, and what rule-based parsers were never good at outside narrow domains. Each atom becomes a bound role-filler pair; the pairs for one scene bundle into one scene vector, the scenes for one story into one world vector, all at the same fixed width regardless of how long the story runs.
What resists a predicate
Not everything reduces cleanly to a predicate. A mood, an implied allegiance, the sense that a scene is building toward a betrayal — extraction can force these into atoms, but at the cost of asserting a precision the text does not actually have. A second, schema-free mechanism covers this remainder: take a passage embedding from a language model and binarise it by random hyperplane projection, one bit per random direction, biti = sign of the embedding’s projection onto direction i (Charikar, 2002), or by a learned binarisation trained to keep semantically close passages close in Hamming distance (Salakhutdinov & Hinton, 2009).
A minimal instance: an embedding (0.8, −0.3, 0.5) and three fixed directions, one per axis, give three bits — sign(0.8) = 1, sign(−0.3) = 0, sign(0.5) = 1 — for a code of 101. Real systems use thousands of random, not axis-aligned, directions, but the arithmetic per bit is exactly this: one sign per direction.
Either way, the result is a fixed-width binary code for whatever an embedding model can consume, without naming a single predicate — at the cost of being unable to point at which bit means what. The two mechanisms are complementary rather than competing, because both terminate in the same kind of object: a fixed-width binary vector, compared the same way. A world vector can bundle explicit role-filler bindings for the handful of facts worth naming — the ones a canon actually polices — with an embedding-hash code for everything surrounding them, and the combination is still one vector, still comparable to any other world’s by Hamming distance, regardless of which tier produced which part of it.
Two worlds, one bundle
Bind the one fact a Star Wars scene treats as load-bearing — force-sensitive(Vader) = true, say — and let everything else in the passage fall into the background code from the previous section; the result is one vector for that world. Do the same for a Harry Potter scene, binding can-cast(killing-curse) = true explicitly. Bundle the two world vectors into one crossover vector, and query either explicit fact: each still resolves cleanly, because the two role-filler slots involved are different addresses. Nothing in the Star Wars vector ever bound anything to the Harry Potter slot, or vice versa — there is no shared address for the two physics to disagree at, so nothing can conflict. That is the formal shape of the opening anecdote: reading two fictions together does not strain a compatibility check, because almost none of what either asserts shares a slot with the other — the two are compossible for the trivial reason that they never speak to the same question.
The mechanism is not vacuous, though, and a second example shows where it does fire. Middle-earth’s laws bind returns-from-death(Gandalf) = true; a setting like Westeros binds something close to a universal returns-from-death(*) = false. Splice Gandalf into that setting and both facts now bind the identical slot — returns-from-death, filled by Gandalf — with opposite values. Bundling them and querying the slot returns a result roughly equidistant from the true and false codewords:
Concretely: let TRUE = 11110000 and FALSE be its complement, 00001111 — eight bits apart, as far as two 8-bit vectors can be. A clean, uncontested reading of a role might unbind to 11110010: distance 1 from TRUE, distance 7 from FALSE, no ambiguity. A contested one, where Gandalf’s slot has been bound to both values, unbinds to something like 11000011: distance 4 from TRUE, distance 4 from FALSE — exactly half of 8, the maximum possible ambiguity for vectors this length. The gap between 1-and-7 and 4-and-4 is the entire detection mechanism.
That equidistance is a large, specific, and localised disagreement, rather than a vague sense that a crossover feels wrong — and it is, concretely, the similarity ordering Lewis’s counterfactual semantics needed and never fully formalised, made computable at the cost of collapsing his rich, informal notion of match onto a count of disagreeing bits. It is also, not incidentally, the same problem Continuum solves for a shared game world under continuous edit — one quest asserting the king dead, another the king alive — by walking a graph and a set of laws instead of comparing vectors. Whether the two approaches are actually doing the same work under different names, or only resemble each other from a distance, is not yet something we can answer.
None of this is implemented, and it is not established that a reader’s cognition works this way rather than merely being compatible with a system that could. What exists is a mechanism that takes a three-hundred-year-old question seriously enough to make it checkable: a fixed-width vector per world, built the same way regardless of which world, compared by counting bits, that stays quiet on a crossover with nothing shared to disagree about and lights up, specifically, on the one slot two settings actually contest — a working, if narrow, test for compossibility. Where it leads from here — a diagnostic layer under a system like Continuum, a way to grade how well a piece of fan fiction fits its canon, something not yet thought of — is genuinely open. We do not know yet. We think there is something real down this road, and this piece is the record of finding a framework worth pointing at it.
References
- Leibniz’s account of compossibility, via the Stanford Encyclopedia of Philosophy’s Leibniz’s Modal Metaphysics.
- Wittgenstein. Tractatus Logico-Philosophicus. 1921 (trans. Ogden).
- Carnap’s state descriptions, via the Stanford Encyclopedia of Philosophy’s Rudolf Carnap: Semantics. Original: Meaning and Necessity. 1947.
- Kripke. Semantical Considerations on Modal Logic. Acta Philosophica Fennica, 1963.
- Kripke structure (model checking). Wikipedia — the computer-science descendant, where a state literally is a subset of atomic propositions.
- Lewis’s similarity semantics for counterfactuals, via the Stanford Encyclopedia of Philosophy’s Counterfactuals. Original: Counterfactuals. 1973.
- Kanerva. Hyperdimensional Computing: An Introduction to Computing in Distributed Representation with High-Dimensional Random Vectors. Cognitive Computation, 2009 (2022 tutorial).
- Kleyko, Rachkovskij, Osipov & Rahimi. A Survey on Hyperdimensional Computing aka Vector Symbolic Architectures, Part I. ACM Computing Surveys, 2022.
- Kleyko, Rachkovskij, Osipov & Rahimi. A Survey on Hyperdimensional Computing aka Vector Symbolic Architectures, Part II. ACM Computing Surveys, 2023.
- Frady, Kleyko, Kymn, Olshausen & Sommer. Computing on Functions Using Randomized Vector Representations. 2021.
- Plate. Holographic Reduced Representations. IEEE Transactions on Neural Networks, 1995.
- Kanerva, Kristoferson & Holst. Random Indexing of Text Samples for Latent Semantic Analysis. Proceedings of the 22nd Annual Conference of the Cognitive Science Society, 2000.
- Charikar. Similarity Estimation Techniques from Rounding Algorithms. STOC, 2002.
- Salakhutdinov & Hinton. Semantic Hashing. International Journal of Approximate Reasoning, 2009.
- de Kleer. Problem Solving with the ATMS. Artificial Intelligence, 1986. The nearest historical precedent for holding many simultaneously contradictory contexts and checking them fast, via assumption-set labels rather than binary vectors as such.