Technical companion · bicyclic-kinship

Deriving Composition Laws, and Trying to Break Them

A model that derives its own rules is only as good as the effort spent trying to prove those rules wrong. This is the record of that effort.

The technical companion to Who Is Your Daughter's Grandfather?, which explains the model in plain language. This page gives the mathematics, the measurements, and the process behind them: what was tried and dropped, how the model was stress-tested, which assumptions were audited, which claims were corrected, and how the published literature was used to place the work.

Why this work exists

A system that reasons over relations (chaining A is B's mother and B is C's brother into a new fact) needs rules for how relations combine. There are three ways to get them.

This project tests the third route, and it exists because the third route gives something the other two don't: answers that can be audited on inputs nobody has seen. A derived rule is a claim about every chain, including ones never observed, so it can be read, tested against new data, and falsified by a single counterexample. The explanation of an answer is the computation that produced it, not a story told afterwards. And when the rules don't settle a question, the model returns every answer they allow, instead of picking one and sounding sure.

CLUTRR (Sinha et al., 2019) is the right first test for three reasons. It was built to separate systems that learn rules from systems that fit the training distribution, by testing on longer chains than any in training. Its answers are checkable, with no room for a plausible-sounding story. And it comes with two kinds of ground truth: published results from the best learned systems, and an algebra that anthropologists built by hand, which a derivation should recover if it has found something real.

The thesis the evidence here supports is narrow: on a problem that has a composition law, the law can be derived rather than learned or written, and the derived model reaches the level of the best trained systems while reporting what it does not know. What it does not settle is how many problems have such a law. That is an empirical question, and the method is cheap enough to ask it one domain at a time. This page is the evidence for the narrow claim, and the record of how it was checked.

The claims, and where each is checked

Every claim this work makes is listed here, with the measurement behind it and the command or test that reproduces it. Everything else on the page is support for one of these rows, or an attempt to break one.

ClaimEvidenceReproduced by
The answer set contains the true answer on every held-out CLUTRR story100% sound on 2,929 stories across five datasets, and on the sixthbenchmark; test_clutrr_soundness_is_total_on_every_instance
It reaches the level of the best published systems on chains longer than any in training99.80% top-1 at lengths 4–10; 99.39% at 5–10 on the second splitbenchmark; results
It sits at the ceiling any chain-only method can reachExactly at it on four of six datasets; 0.17% and 1.4% below on the other twobenchmark; test_clutrr_sits_at_the_ceiling
No domain knowledge is in the codeThe same code runs on six synthetic algebras, deriving the right laws or, where none exist, nonethe first half of tests/
It recovers the kinship algebra anthropology built by handThe derived coordinates are Read's (1984) ascent and descenttest_clutrr_the_cone_coordinates_are_the_anthropological_ones
Chain length does not degrade it100% at 1,000 steps; exact addresses at 10,000worlds; three depth tests
False input facts are flagged, not answered wrongly0.0% silently wrong with up to ten false facts per storynoise; two noise tests

Two things are deliberately not claimed. The rules are audited against the data, not proved true of the world (section 11 shows exactly where that difference bites). And the model composes relation symbols; it does not read text.

The four commands are python -m bicyclic_kinship.benchmark, .noise, .worlds and .stress. Nothing is averaged over runs, because nothing is random: the derivation is deterministic, and every seeded experiment fixes its seeds.

The model, stated precisely

Let Σ be a finite set of opaque symbols (relation words, with no meaning attached) and let composition be a partial operation on them. The evidence is a set of triples T ⊆ Σ × Σ × Σ, where (a, b, c) ∈ T asserts a ∘ b = c. The task: given a chain w = r₁r₂…r_k, name the composite r₁ ∘ … ∘ r_k. On CLUTRR, |Σ| = 20 and |T| = 62 of a possible 400, read off 9,074 training chains of length two and three.

Two facts shape everything that follows. Composition is partial: most pairs are never observed, and some composites have no name in Σ. And the answer is not always a function of the chain, because two chains of the same words can denote different people. Any method that returns one name is therefore sometimes wrong by construction.

The usual approach is to choose a representation (a vector space, a network) and fit its parameters until T is reproduced. This model takes the other approach: fix a small menu of law shapes, and return every law of each shape that is consistent with every observation. The model is that solution set. There is nothing to initialise and nothing to tune. The only design decision is the menu, which is stated rather than hidden.

Definition 1 — a law

A law is a map φ : Σ → V into a set with an associative operation ⊙, such that φ(a) ⊙ φ(b) = φ(c) for every (a, b, c) ∈ T. It is valid if the identity holds for every true product, not just the observed ones.

Associativity is what makes a law usable on a chain. The fold φ̂(w) = φ(r₁) ⊙ … ⊙ φ(r_k) doesn't depend on bracketing, so a law derived from pairs applies at every length with no extension. That is the whole mechanism behind length extrapolation. There is no separate story for it.

Definition 2 — address and admitted set

Given laws φ₁ … φ_m, the address of a chain is α(w) = (φ̂₁(w), …, φ̂_m(w)), and the admitted set is A(w) = { s ∈ Σ : φᵢ(s) = φ̂ᵢ(w) for all i }.

Proposition 1 — soundness

If every law is valid and composition is single-valued, the true composite of w, when it has a name, is in A(w).

By induction on length. If the prefix r₁…r_{k−1} has true composite c′ with φ̂ = φ(c′), validity applied to the true product c′ ∘ r_k = c* gives φ(c′) ⊙ φ(r_k) = φ(c*), and the left side is φ̂(w).

The proposition carries two preconditions, and both are treated as things to check rather than assume. Validity is a property of the world, which can only be audited against the data in hand (section 5). Single-valuedness matters because where a pair has two true composites, the induction step has nothing to apply validity to. It is checked: table_conflicts reports zero conflicting products on all five CLUTRR instances. Section 11 measures what happens in a world where it fails.

Proposition 2 — monotonicity

Removing a law can only widen A(w), since the set is defined by a conjunction of equality tests. Every subset of a sound derivation is sound, so an ablation can cost precision and never soundness.

Definition 3 and Proposition 3 — preference

A preference is any map with π(A, w) ⊆ A. However preferences are composed or ordered, the result is a subset of A(w), so a preference can cost precision and never soundness.

This is why the model reports two things. solve(w) returns A(w), what the laws admit. best(w) applies preferences and returns one name, labelled as a preference. Keeping them apart was itself a finding: the only genuine errors this project ever had came from merging them, reading a single observed product such as (daughter, grandmother) = mother as a function when longer chains show the same address answering mother-in-law too.

Four families, each solved exactly

Each family is a constraint system with a closed-form or exhaustive solution: the derivation returns every member, or reports that there are none. That property is what separates this from searching for structure. An earlier search for symmetries of the same 62 products returned fifty, none of them the one wanted, because a partial table admits any number of accidental symmetries in its weakly constrained corners.

The additive family: a null space

Take V = ℚ with +. Build an integer matrix M with one row per triple (+1 for a, +1 for b, −1 for c). The additive laws are exactly ker M, computed by exact rational elimination. Its dimension, |Σ| − rank M, is a property of the data, not a setting. It comes out as 1 for kinship (generation: parents +1, children −1), 1 for filesystem paths, 2 for a grid, and 0 for an algebra with no additive structure.

A law that wraps is the sharpest boundary here. ℤ/5 is purely additive, but its rational kernel is zero, because a rational null space sees only torsion-free invariants. The model abstains there and stays sound, and a test pins that behaviour.

The cone: the bicyclic monoid

Kinship composition cancels: a mother's son is a brother, not a "mother-son". The first question was whether any invertible representation (phases, rotations, permutations, invertible matrices) could express that. None can:

Proposition 4 — no group representation

If an algebra has x ∘ x = x and some y ∘ x ≠ y, it has no injective homomorphism into a group.

In a group x² = x forces x = e, so y ∘ x = y for every y.

Both premises are measured in the corpus: brother ∘ brother = brother (67 occurrences, no exceptions) and father ∘ brother = uncle (66, none). Since x ∘ x = x is transitivity, the argument rules out invertible representations for any relational algebra with a transitive relation in it. The knowledge-graph literature had already reached this conclusion (section 13), and this page claims only the check against observed products.

Definition 4 — the cone

V = ℕ², with (u₁, d₁) ⊙ (u₂, d₂) = (u₁ + (u₂ − d₁)⁺, d₂ + (d₁ − u₂)⁺). A symbol carries how far a path rises and how far it falls. Composition translates, and folds back onto the boundary of the quadrant.

Proposition 5 — this is the bicyclic monoid

Map (u, d) ↦ pᵘqᵈ into B = ⟨p, q | qp = 1⟩. Every element has the normal form pᵘqᵈ, and qᵈpᵘ = p^{(u−d)⁺} q^{(d−u)⁺} gives exactly ⊙. So ⊙ is associative, with identity (0, 0). B embeds in no group: qp = 1 would make pq = 1, but pq is in normal form and is not 1.

Proposition 6 — the linear shadow

δ(u, d) = d − u is a homomorphism onto (ℤ, +). So every cone law's shadow is an additive law, and lies in the kernel already computed.

Proposition 6 makes the search finite: rather than search ℕ^{2|Σ|}, the derivation enumerates small integer members of ker M and solves for u alone. It also explains a puzzle from early in the project. Generation, the first law found, was the visible one-dimensional shadow of a two-dimensional structure. That is why it existed, and why it was not enough.

Proposition 7 — gauge

Translating every symbol by (k, k) commutes with ⊙, so assignments are reported up to that translation, pushed down until some symbol touches the boundary.

On CLUTRR the derivation returns four assignments up to gauge. One is the anthropological one (father at (1, 0)). On every depth walk measured, the other three place the endpoint at the anthropological address shifted by exactly (1, 1). They disagree only about whether a chain can cancel all the way back to the identity, which no CLUTRR product settles. All four are kept, and a name is admitted only where all four agree.

Classes: the last step decides, or the first

Take V = Σ/∼ with right projection, (x, y) ↦ y. The law cls(a ∘ b) = cls(b) says some property is carried by the last step alone. Gender is the obvious example: whoever a chain passes through, … ∘ mother names a woman.

Proposition 8 — the finest valid partition

Let ∼ be generated by c ∼ b for each (a, b, c) ∈ T, closed by union-find. Then ∼ satisfies the law, and every partition that satisfies it is a coarsening of ∼.

On CLUTRR the partition has six blocks: {husband, son-in-law}, {wife, daughter-in-law}, {father, father-in-law, grandfather}, {mother, mother-in-law, grandmother}, {brother, son, grandson, nephew, uncle} and {sister, daughter, granddaughter, niece, aunt}. A hand-written male/female split is its two-block coarsening, so the derived law is strictly stronger than the domain knowledge it replaces. The fourth family is the mirror image, left projection (the first step decides). CLUTRR supports no such law and the derivation drops it. On a real family tree it finds one with two blocks (section 11), which is the evidence that the family earns its place on the menu.

Algorithms

Sparse incremental elimination

A row built from a triple has at most three non-zero entries however large Σ is, and there are far more rows than the rank can ever be. Dense elimination spends nearly all its time on zeros, so rows are reduced as they arrive and discarded when they collapse:

pivots : column → fully reduced sparse row
for each row r:
    while r touches any pivot column c:        # every one, not only the leading one
        r ← r − r[c] · pivots[c]
    if r = 0: continue                         # most rows end here
    c ← min(support(r));  r ← r / r[c]
    for each pivot row p with p[c] ≠ 0:        # keep the basis reduced
        p ← p − p[c] · r
    pivots[c] ← r

The arithmetic is exact Fraction throughout, so this is the same reduced echelon form, not an approximation of it. The first version eliminated only a row's leading pivot. It was fast and quietly wrong, and dropped CLUTRR top-1 from 99.4% to 26.1%. The dense implementation is kept in the source for exactly that reason, and a test holds the two to exact equality on six worlds. A fast path needs something that can disagree with it.

Cone search, and how deep to look

For each candidate shadow δ ∈ ker M, assign u symbol by symbol, most-constrained first. Assigning two operands forces their product, so the search is mostly propagation and backtracking stays shallow. Within its depth bound the search is exhaustive, so the result is the complete solution set up to gauge.

The bound is read from the data, not fixed, and deciding that was a correction. An early write-up said the evidence left "a family of four" assignments. It doesn't: four was a truncation constant in the search. Search deeper and CLUTRR admits one assignment at depth 2, four at 3, ten at 4, thirty-five at 6 and eighty-four at 8. So the search escalates from depth 1 and stops at the shallowest depth that yields anything: 2 for CLUTRR, 4 for a blood family tree, k for a path world capped at k.

It then consults one depth further, which gives CLUTRR its four assignments. The reason is specific. The single shallowest law says husband ∘ wife = wife, which is false: the truth is self, for which CLUTRR has no word. Neither spouse product is ever observed, so no audit can retire the false law. One depth further, the four admitted assignments disagree on exactly that cancellation, and the answer becomes "none of these twenty". Held-out scores are identical either way. The margin is bought entirely off the benchmark, and a test pins it.

The audit

Laws are derived from products of length two, so validity beyond them is not guaranteed. Each family is checked against every training chain of every length, and retired if a single one contradicts it (an opt-in tolerance relaxes this for noisy labels; section 11).

Proposition 9 — necessary, not sufficient

A valid law passes the audit. A law that passes the audit can still be invalid, and looks exactly as exact as a valid one.

This is not a technicality. Section 10 contains a law that passes its audit on the entire benchmark and is false about families.

Preference

By Proposition 3, anything that only narrows is safe, so the preference layer is allowed to be heuristic. It has two sources. Path rules are the smallest trigger sets whose effect on a derived coordinate separates training chains that share an address. They are found as a hitting-set check with support and coverage floors, and both floors were added after failures measured during development: without them, the rules memorised (189 held-out errors) or were pure on training and wrong held out (25). Frequency at the address counts how often training saw each name at the chain's address, over chains of every length. Ties between equally good triggers break in sorted order; without that, one experiment's numbers varied with Python's string-hash seed (correction 7 in section 15).

How the approach was chosen

The model above is what was left after several other approaches were tried and dropped. Most of the process was removal, and the order matters: each step was forced by a measurement on the previous one.

  1. Before this repository
  2. 1. Invertible representationsrefuted

    Phases, rotations, permutations: composition as a reversible movement. Three lines of arithmetic (Proposition 4) ruled out the whole family before any code was written.

  3. 2. Learned factorisationdropped

    Fitted all 62 products and contained nothing: gender alignment +0.03 against ±0.40 for random pairs; 91.9% interpolating, 35.6% extrapolating.

  4. 3. Searching for symmetriesdropped

    Fifty symmetries of the partial table, none of them gender. Verifying a symmetry is easy; finding the real one among coincidences is not.

  5. 4. Transcribed coordinatesdeleted

    Generation numbers and gender sets typed into the source. It worked, and it was a transcript of the author. Deleted by rule.

  6. The model
  7. 5. Solve for laws, don't fit themkept

    A null space and a union-find: exactly one additive law, six classes, and a derived partition finer than the hand-written one.

  8. 6. The conekept

    Cancellation, as the bicyclic monoid. Single-name answers rose from 54.7% to 88.1% at unchanged soundness.

  9. 7. Geometry, and three extra layersdemoted

    A torus version agreed on every chain and added nothing, so it was demoted. Memory, closure and propagation changed no answer, so they were removed.

  10. Testing it
  11. 8. Leave the benchmarkkept

    A real family tree broke a law CLUTRR cannot falsify. Soundness became an audited property, stated as one.

  12. 9. The prior-art searchreframed

    Static analysis, not verification. Proposition 4 already known. A claim with no source removed.

  13. 10. Sixth dataset, depth, two extensionsadded

    The second extrapolation split, walks of 10,000 steps, route memory and word senses, each passing the synthetic controls first.

  14. 11. A script for every tableadded

    Writing this page found tables no script reproduced. Re-measured, two changed and one claim was false.

A note on provenance. The measurements in the first four steps were made in two earlier research repositories this work grew from, and they cannot be reproduced from this one. They are offered as history, to show how the design was arrived at, not as evidence for any claim in the ledger. Everything from step five on is reproducible here.

Three habits came out of that sequence and shaped everything after it:

Guarding against my own knowledge

The easiest way for a "derived" model to cheat is for its author to know the answer. I know what father means, and every shortcut I take with that knowledge makes the result less meaningful. These are the guards, and the incidents that made each one necessary.

How measurements are made

Results on CLUTRR

CLUTRR (Sinha et al., 2019) has a text setting and a symbolic one. The best systems are measured symbolically, on the relation graph with only the required facts. This model uses the same input. The public release has six datasets.

All six datasets. The model is trained once on gen_train23, except for the second extrapolation split, which is trained on its own data as its published protocol requires.

DatasetStoriesSoundTop-1CeilingMean set
gen_train23, all lengths1,146100%99.39%99.56%1.12
gen_train23, unseen lengths 4–101,003100%99.80%——
gen_train234, all lengths1,048100%98.09%99.52%1.11
gen_train234, unseen lengths 5–10826100%99.39%100%—
rob_train_clean447100%100.00%100.00%1.65
rob_train_disc445100%94.83%94.83%1.65
rob_train_irr444100%93.69%93.69%1.91
rob_train_sup447100%93.74%93.74%1.78

The derived laws are identical on all five gen_train23-style instances, down to the cone assignment: retraining on each one's own data changes nothing. The four rob_* datasets test distracting sentences in the prose. For a model that never reads prose, they are four more independent samples of chains of length two and three, so they test consistency, not extrapolation.

Next to published systems

Top-1 by chain length, trained on 2–3 steps. Published numbers are means over runs, from R5 (Lu et al., 2022), Table 2.

Steps45678910
This model99.599.4100100100100100
R5 (ICLR 2022)98999896979897
CTPA (ICML 2020)99999996948990
GAT91765456545545

Trained on 2–4 steps. Published numbers from EpiGNN (Khalid & Schockaert, 2025), Table 1.

Steps5678910
This model98.410098.7100100100
NCRL (ICLR 2023)1009998989897
R5 (ICLR 2022)9999991009998
EpiGNN (ICLR 2025)999999999698

The honest reading is the same level as the best published systems, not better. Three reasons. The top systems sit within their own run-to-run spread (±1–5%) of 100%. The published numbers use CLUTRR's original data release, and these runs use the HuggingFace release of the same splits: generated the same way, but not identical test sets. And a difference of one or two stories per length is not a result. What the comparison does support is narrower and still interesting: a model with no weights, reading opaque symbols, reaches the level of trained neuro-symbolic rule learners, and reports which answers it is unsure of.

Where the misses are

Every miss was examined, not just counted. On gen_train23, 7 of 1,146 stories are missed. Five are the corpus contradicting itself: wife · son · grandmother appears in the test set with both answers, and no function of the chain can get both. The other two reduce in the algebra to the same shape (a spouse's child is your child, whose grandmother is your mother or your spouse's). On gen_train234, every miss at every length is the same kind: the answer set is correctly {mother, mother-in-law} or {father, father-in-law}, and the preference picks the blood term when the label is the in-law one.

One result there runs against intuition. On the gen_train234 unseen lengths, the model trained on its own 2–4-step data scores 99.39%, and the model trained on the shorter gen_train23 data scores 100%. The laws are identical, so the difference is entirely in the preference: the extra four-step training chains shift the frequency counts at the two ambiguous addresses. More data made a heuristic slightly worse, and the soundness guarantee was untouched either way. It is reported as observed.

What each part is worth

Proposition 2 predicts that every ablation stays 100% sound, so what ablation measures is precision.

On gen_train23, held-out lengths 2–10. From stress.

LawsSoundTop-1One nameMean set
All families100%99.4%88.1%1.12
Without the cone100%72.3%54.7%1.45
Without the classes100%87.3%0.0%2.39
Without the additive100%98.7%88.1%1.12
The cone alone100%87.3%0.0%2.39
Without the path rules100%98.8%88.1%1.12

The cone is worth 27 points here, and 10.6 across all five instances (97.06% against 86.45%). The classes carry every male/female distinction, so without them nothing is ever pinned to one name. The additive family is nearly redundant once the cone exists, as Proposition 6 predicts, since it is the cone's shadow. The whole preference stack is worth 0.6 points.

Three further layers were measured on all five instances and removed, because they changed no answer once the cone existed: a memory of witnessed transitions, closure over observed composites, and unit propagation of the observed table. More expressive law families were tried and likewise changed nothing on CLUTRR. A layer that has stopped paying for itself is a finding about the model, and it doesn't ship.

Trying to break it

The headline numbers say the model works on the benchmark it was built for. The questions below are the ones a sceptical reviewer would ask next, and each was answered by a measurement designed to make the model fail. Some of them did.

"The training data is basically the answer"

Sixty-two products out of four hundred sounds like a lot of help. So take products away, choosing five seeded random subsets at each size, and see what survives.

0% 25% 50% 75% 100% sound 15 24 31 37 46 55 62 training products kept, of 62 15 products kept: 9.8% sound 24 products kept: 52.7% sound 31 products kept: 74.5% sound 37 products kept: 83.5% sound 46 products kept: 96.6% sound 55 products kept: 100% sound 62 products kept: 100% sound 9.8% 52.7% 96.6% 100%
Soundness needs enough evidence to kill false laws. Each point is the mean of five seeded random subsets of the 62 training products. With 15, the derived laws are exact, confident and wrong on nine chains in ten. Soundness is not a property of the method alone.
Products kept, of 6215243137465562
Sound9.8%52.7%74.5%83.5%96.6%100%100%
Top-19.8%52.2%72.2%82.5%95.9%99.3%99.4%
Chains it can read7679469671,0511,1441,1461,146

This is the most uncomfortable result on the page. With a quarter of the products the derived laws are confidently wrong, and nothing warns you, because a law fitted to too little evidence looks exactly as exact as a true one. Soundness is not a property of the method alone. It is a property of the method plus enough data to falsify the laws that are false. The derivation cannot tell you which regime you are in.

"Exact derivation must be brittle to noisy labels"

It is. Replace a share of training answers with a random word:

0% 25% 50% 75% 100% 0% 0.5% 1% 2% 5% 10% 20% training answers replaced by a random word Tolerant, top-1, 0% corrupted: 99.4% Tolerant, top-1, 0.5% corrupted: 98.8% Tolerant, top-1, 1% corrupted: 98.8% Tolerant, top-1, 2% corrupted: 98.8% Tolerant, top-1, 5% corrupted: 98.8% Tolerant, top-1, 10% corrupted: 98.8% Tolerant, top-1, 20% corrupted: 6.5% Tolerant, top-1 Exact, chains it can read, 0% corrupted: 100% Exact, chains it can read, 0.5% corrupted: 100% Exact, chains it can read, 1% corrupted: 84.8% Exact, chains it can read, 2% corrupted: 71.3% Exact, chains it can read, 5% corrupted: 0.3% Exact, chains it can read, 10% corrupted: 0% Exact, chains it can read, 20% corrupted: 0% Exact, chains it can read Exact, top-1, 0% corrupted: 99.4% Exact, top-1, 0.5% corrupted: 6.5% Exact, top-1, 1% corrupted: 7.7% Exact, top-1, 2% corrupted: 5.2% Exact, top-1, 5% corrupted: 0.1% Exact, top-1, 10% corrupted: 0% Exact, top-1, 20% corrupted: 0% Exact, top-1 tolerant: 98.8% to 10% exact top-1 exact: share readable
Exact laws are brittle; the tolerance is not. One corrupted answer in two hundred retires every exact law. From one in a hundred, corruption also deletes words, and the share of held-out chains the exact model can read at all (dotted) falls to zero by 10%. The opt-in tolerance holds top-1 at 98.8% through 10% and gives up at 20%.
Corrupted0%0.5%1%2%5%10%20%
Exact: words left20201715500
Exact: chains it can read100%100%84.8%71.3%0.3%0%0%
Exact: sound, on those100%100%100%100%100%——
Exact: top-199.4%6.5%7.7%5.2%0.1%0%0%
Tolerant: top-199.4%98.8%98.8%98.8%98.8%98.8%6.5%
Tolerant: sound100%100%100%100%100%100%100%

One corrupted answer in two hundred retires every law, because a single contradicting chain is enough and there are over nine thousand of them. There is a second effect, found while writing this page. A product whose witnesses disagree is dropped, and a word with no surviving product leaves the vocabulary. At 1% corruption three words are gone; at 10%, all of them. The older writeup said soundness "stays at 100% throughout". That was measured only on the chains the model could still read, which by 5% is three stories. On those it is still sound; on the rest it can't answer at all. The table now shows both, and a test pins the vocabulary loss.

The opt-in tolerance=0.1 settles each product by majority and keeps a law while the share of chains contradicting it stays under 10%. On clean data it changes nothing, to every decimal place. It holds through 10% corruption and gives up at 20%, by abstaining. The default stays at zero, because a tolerance is exactly what lets a false law survive its audit.

"What if the input facts are wrong?"

CLUTRR's own noise lives in the prose, so it was rebuilt on the symbolic side, in a stricter form: extra edges are added to each story's graph, and the model must find every route between the two people itself, compose each, and intersect the answer sets. Intersection is the sound combination, since extra true facts can only narrow.

Extra facts per story012510
True but irrelevant: sound99.8%99.8%99.8%99.8%99.8%
False: answered and sound99.8%68.2%45.6%13.1%2.0%
False: contradiction flagged0.2%31.8%54.4%86.9%98.0%
False: silently wrong0.0%0.0%0.0%0.0%0.0%

Irrelevant facts change nothing, exactly, and the test asserts equality, not a tolerance. False facts can destroy an answer, but two routes that disagree intersect to the empty set, which is a detected contradiction. (The 0.2% baseline is two stories whose graphs revisit a person, which creates a short cut whose composite has no word in the vocabulary.) The rate of confidently wrong answers stays at zero. That was not tuned in; it follows from soundness plus set-valued answers.

"The benchmark is one generator"

So the model was taken somewhere CLUTRR can't follow: a family tree built generation by generation and walked at random. The true relation comes from graph distance (nearest common ancestor, steps up, steps down), never from composing the chain. Walks never meet the same person twice, which is the condition under which the words determine the answer at all.

Chain length2358
Walks1,21198139310
Laws from CLUTRR: sound87.0%78.9%81.7%90.0%
Laws from the tree: sound and top-1100%100%100%100%

This is where "audited, not proved" gets a number. In the entire CLUTRR corpus, train and test, every chain ending in husband answers son-in-law, because the only such chain that ever occurs is daughter · husband. So the class law files husband with son-in-law, passes its audit on every chain the benchmark contains, and is false about families: your mother's husband is your father, and the CLUTRR-derived laws admit nothing there. Trained on the tree's own 48 products, the six classes coarsen to four, a left-projection law appears with two classes, and every answer on walks through a different tree is right.

Is that one lucky tree? Five trees, 500 two-step walks each, from stress.

Tree seed5429912347777
People2,0461,1322,5962,4401,216
Laws from CLUTRR: sound88.2%87.4%85.8%85.0%85.4%
Own laws: sound and top-1100%100%100%100%100%
Classes derived44444

The lesson is general, and it is the most important one in this work: a benchmark's coverage decides which laws can be derived from it, and no audit against that benchmark can see past it. The only defences are cheap ones: take the model somewhere its benchmark can't follow, and remove data on purpose to watch where it breaks.

"How deep can it really go?"

Real family trees run out of new people at around twenty steps, so a deeper test needs a family that grows as it is walked: parents are created the first time anyone asks for one, and a new child can always be born. The truth is still read from the family, never computed by composition.

Chain lengthChainsSoundTop-1Time per answer
10300100%100%0.06 ms
100300100%100%0.25 ms
1,000100100%100%2.3 ms

Those are laws derived from CLUTRR chains of length two and three, never retrained, on walks restricted to relatives CLUTRR has words for. Unrestricted walks of 100, 1,000 and 10,000 steps end on people no word names, such as (2, 10072): two generations up and ten thousand and seventy-two down. The model correctly answers with no name, and the address underneath can be checked directly. On every walk tested it equals the true (ascent, descent) exactly.

"It only works because kinship is bicyclic"

That is true, and the useful question is what happens elsewhere. The same code, unchanged, on worlds with no people in them:

WorldSymbolsProductsDerivedResult
Filesystem paths, one folder name161761 additive, 1 cone100% exact at 10,000 steps
Filesystem paths, two folder names458461 additive, 1 cone100% sound, about 6 names per answer
Movement on a grid491,3692 additive100% exact at 10,000 steps
Kinship, open vocabulary (cousins, removes)361601 additive, 2 cone, 4 + 2 classes100% exact to 10 steps
S₃, the smallest non-abelian group636nothing100% sound, 13.0% top-1, all 6 names
ℤ/4, a clock416nothing100% sound, 31.5% top-1, all 4 names

Each row says something the kinship result can't. Paths are the same monoid (.. pops, a folder name pushes), and because paths contain a full cancellation back to the identity, they pin the cone assignment uniquely where CLUTRR leaves four. That identifies exactly which missing observation CLUTRR would need. Two folder names make a world richer than the law, where x/y and y/x share coordinates; the model widens its answer instead of guessing. The grid needs two additive coordinates, read from the null space without being told. And the two groups fit no family, so the model derives nothing, admits everything, and says so. That is the intended behaviour at the edge of the menu, and the reason the menu is stated as a prior.

"Does it scale?"

It did not, at first. A 225-symbol derivation spent all its time in dense rational elimination, and in a second copy of the same elimination inside the cone search. Sparse incremental elimination (section 5) fixed both.

One run on a laptop, from stress --dense. Absolute times vary between runs; the ratios don't.

WorldSymbolsProductsWhole derivationKernel, sparseKernel, dense
Paths, two names601,8880.18 s0.04 s7.5 s
Grid, span 51218,2811.3 s0.22 s20 s
Grid, span 722528,5611.4 s0.84 s194 s
Grid, span 10441109,5616.5 s3.8 s—
Grid, span 14841398,16127 s17 s—

At 225 symbols the sparse kernel is over two hundred times faster than the dense one, with identical output. The arithmetic is still exact over the rationals, so this is a constant-factor result, not a complexity one. Answering was never the bottleneck: it is linear in chain length and independent of vocabulary size.

A feature that won on validation and lost held out

The remaining CLUTRR misses tempt a fix. The model already computes whether a symbol at cone coordinate (0, 0) (a spouse, though the code never calls it that) appears in the chain, and "spouse anywhere, so answer the in-law name" looks like it should help at the two ambiguous addresses. It was selected by the protocol in section 8:

Rule at the ambiguous addressesFit (59)Validation (15)Held out (136)
Always the blood name72.9%80.0%89.7%
Spouse anywhere → in-law name89.8%93.3%87.5%
The shipped preference——94.9%

The feature beats the baseline on the data it was fitted on and on honest validation, and is worse than doing nothing held out. That is distribution shift, not overfitting, and the cause is measurable. A marriage crossing can be absorbed by a later step down (your wife's daughter is your daughter), and chains of length two and three rarely show it: a spouse appears in 35.1% of these training chains and 22.8% held out. The distinction the rule needs is longer than any training chain of that shape. This is exactly the trap CLUTRR was built to set, and a standard train/validation protocol walks into it. The experiment is kept as a test, so the feature can't be rediscovered and shipped on its validation number.

The audit and the margin catch different failures

Two defences protect soundness, and it would be easy to assume one covers the other. Both were measured on a case built to break each:

CaseThe auditThe depth margin
A multi-valued world (a sibling's sibling may be yourself)Decisive: 34 cone laws retired, soundness 19.2% → 100%Blind: 19.2% at every margin
A product never observed (husband ∘ wife)Blind: nothing contradicts the false lawDecisive: "none of these" instead of a wrong name

In the multi-valued world, the unaudited cone laws agree with every surviving product and disagree freely where the conflicting ones were dropped. Since a name must satisfy every law, their intersection excludes the true answer, and the lane returns nothing on 78% of held-out chains. That is the counterexample to "more laws can only narrow, so more is always safe": narrowing can exclude the truth as easily as a falsehood. The audit refutes laws the data contradicts; the margin covers a law the data is silent about. Neither subsumes the other, and both are tested.

A worked investigation: the in-law gap

One open problem was followed from first observation to resolution, and my own conclusions about it were wrong twice. It is the clearest example of the process.

  1. Observation. CLUTRR never uses an in-law word inside a chain. All four appear only as answers, so nothing in the corpus shows how an in-law relation composes, and whatever the derivation does with one is invented. On a family tree, the invention is wrong.
  2. First hypothesis: a data gap. Walk a tree with marriages, where 70 of 182 observed products have an in-law word as an operand. Confirmed: soundness returns to 100% at every length.
  3. Second hypothesis: a structural limit. Precision did not return. At length five only 54.3% of answers were right, and only 24.6% of in-law answers. father and father-in-law share an address, and in-law-ness looked like a property of the path (did it cross a marriage, and was that crossing later absorbed?) rather than of the endpoints, which is all any family on the menu can express. I wrote that up as a structural limit.
  4. Test one: is the decay real? Those numbers came from training on products alone. Trained on walks of length two and three, as CLUTRR itself trains, the preference gets in-law answers 100% right at lengths three and five. Most of the decay was a training artifact. What stayed open was knowledge: the laws alone pinned one name on only 9–35% of chains.
  5. Test two: build the missing kind of law. If in-law-ness is path state, the model needs a family that carries state. Route memory derives the smallest automaton consistent with every training chain, audited like the other families. It found real structure: on this tree its two states split the vocabulary exactly at "-in-law", a string the code never reads. But it helped far less than predicted, raising single-name answers from 9% to 24% at length two and from 13% to 19% at length three. A more expressive variant overfit and fell to 65% sound; given longer training chains, the audit retired it. On CLUTRR the audit retires route memory entirely, on 52 contradicting chains.
  6. Test three: a different explanation. English uses one word for two relations. Brother-in-law is both a sister's husband and a spouse's brother, and one word at two addresses collapses the class lane for every in-law term. Word senses let a word that appears only as an answer split into the fewest senses its products require. On the tree it split six in-law words into exactly English's two meanings, found from data alone, and single-name answers went to 100%, still 100% sound, across nine pairs of training and test trees. On CLUTRR nothing splits, and every number is unchanged.
0% 50% 100% 2 steps laws alone 2 steps, laws alone: 9% of chains pinned to one name 9% + route memory 2 steps, + route memory: 24% of chains pinned to one name 24% + word senses 2 steps, + word senses: 100% of chains pinned to one name 100% 3 steps laws alone 3 steps, laws alone: 13% of chains pinned to one name 13% + route memory 3 steps, + route memory: 19% of chains pinned to one name 19% + word senses 3 steps, + word senses: 100% of chains pinned to one name 100%
The predicted fix helped a little; the unexpected one closed the gap. Share of chains on a family tree with marriages that the laws alone pin to one name, all at 100% soundness. Route memory was built because the gap looked like path state. Word senses showed it was mostly polysemy.

The gap turned out to be mostly two words hiding in one, not a missing kind of law. The "structural limit" was retracted and the record says so (correction 8). The same senses mechanism, tested on English-style cousin names where "first cousin once removed" means both a parent's cousin and a cousin's child, took single-name answers from 0% to 100% at every length from 2 to 10. Two caveats remain. Tree walks never revisit anyone, so every answer there is fully determined; on CLUTRR, where some chains genuinely have two answers, senses rightly split nothing. And a word that is ambiguous and used inside chains is not yet handled.

Placing the work

After the model worked, I went looking for what it already was. The honest answer is: mostly things with names in other fields. That search changed the claims more than any experiment did, and it is recorded here in full.

The method: static analysis, not verification

The first framing called this verification. It isn't. Verification checks a given system against a given specification; this infers a specification from observed behaviour, which is the static-analysis tradition. Every write-up now names that lineage.

A result that turned out to be known

Proposition 4 was going to be the basis of a short note arguing that group-shaped knowledge-graph embeddings can't represent transitive relations. The prior-art search killed the note. Knowledgebra (Yang et al., 2022) makes exactly that argument, that relation composition is a semigroup rather than a group, and proposes a semigroup embedding on that basis. Rot-Pro (Song, Luo & Huang, 2021) had hit the same wall in practice and fixed transitivity with an idempotent projection. What remains of Proposition 4 is a two-line argument and a criterion checkable against observed products. The white paper was updated to say so before anything was published.

The algebra: prior art as ground truth

The bicyclic monoid was first described by Lyapin (1953) and is textbook material (Clifford & Preston, 1961). The algebraic study of kinship goes back to Weil's 1949 appendix for Lévi-Strauss. The closest match is Dwight Read's algebra of American kinship terms (Read, 1984), built by hand, which defines a kin-term product with a marker for products that have no term. Its generating equations include parent of child = self and child of parent = sibling, as quoted in Read, Fischer & Leaf (2013). The first is the bicyclic relation qp = 1; the second is the order that does not cancel.

That makes Read's algebra a ground truth, and a better outcome than novelty would have been. A method that recovers, from 62 products over opaque symbols, a structure a field established by hand has found something real, and the prior art is what it can be checked against. An earlier draft said the kinship literature calls this structure a "bicyclic semigroup". No source for that could be found, so the sentence was replaced with Read's own equations (correction 6).

The comparison: reading the baselines' input format

An early draft said comparing with published systems was meaningless, because they must find the reasoning path in a graph while this model is handed a chain. Reading the papers corrected that. The Edge Transformer paper (Bergen, O'Donnell & Bahdanau, 2021) specifies "the noiseless (only the required facts are included) graph-based version", and R5 likewise consumes symbolic triples. With only the required facts present, the graph is the chain. The second extrapolation split was added because NCRL and EpiGNN report on it, which let the comparison use the protocol the most recent systems publish. The data-release difference (original versus HuggingFace) was found the same way, and is stated wherever the comparison appears.

Every citation in both write-ups was checked against Crossref or arXiv before publication. Where a claim could not be sourced, it was removed rather than softened.

What is new, and what isn't

Each claim this work could make is set against the closest prior work I found, with a status. "New" means only that I have not found it; it is the claim most likely to be wrong, and corrections are welcome.

ClaimClosest prior workWhat differsStatus
The kinship algebra is derived from observed products over opaque symbols, with no domain knowledgeRead (1984) built it by hand. KAES (Read & Behrens, 1990) builds such algebras interactively, with the analyst choosing the generators and equations. Yang, Ishay & Lee (2023) write the family rules as a logic program. Hinton's family-trees network (1986) and linear relational embedding (Paccanaro & Hinton, 2001) learn kinship from triples, as does FOIL's rule learning (Quinlan, 1990)Nothing is supplied: no generators, no equations, no meanings. The result is exact, and it is the same algebra the hand-built work arrived atnew, as far as I found
Rules that are neither trained nor written by hand reach the level of the best published CLUTRR extrapolation resultsR5, NCRL and EpiGNN learn their rules; Yang et al. are given theirsNeither training nor supplied rules. The level is the same as the best systems, not highernew result, as far as I found
The model is the complete set of consistent laws, and a name is admitted only where they all agreeVersion spaces (Mitchell, 1982) keep every hypothesis consistent with the data and classify only when all agree. Abstract interpretation intersects sound approximationsThe hypothesis spaces are algebraic shapes solved in closed form (a null space, the bicyclic monoid, union-find), so the complete set is computed rather than boundedknown idea, new instance
Sound, set-valued answers, reported with set size as the headlineConformal prediction (Vovk, Gammerman & Shafer) returns sets with a statistical coverage guarantee. Static analysers report soundness routinelyThe guarantee here is conditional on the laws being valid, not on exchangeable data. None of the CLUTRR systems I found reports soundness or set sizenew to this benchmark, not a new idea
Deriving the laws audits the benchmark: its ceiling, and a law its coverage cannot falsifyYang et al. found 16 faulty instances in CLUTRR 1.3 by hand, one of them labelled mother where mother-in-law was right. Path-of-Thoughts (Zhang et al., 2024) notes questions with several correct answers and one labelHere the ambiguity is derived rather than found by inspection, measured exactly on all six datasets as a ceiling, and shown to be always a blood/in-law pair. The husband coverage artifact is, as far as I found, not reported elsewherepartly known
Completing a composition table from part of it: 62 observed products answer 190 of 400Grokking (Power et al., 2022) learns binary-operation tables from a fraction of their entries. Semi-automatic methods compute composition tables from a known semantics (Liu & Li, 2011)Exact derivation instead of learning. It also fails where grokking succeeds: modular addition is outside the menuknown problem, different method
No invertible representation can express a transitive relation (Proposition 4)Knowledgebra (Yang et al., 2022); Rot-Pro (Song, Luo & Huang, 2021)Only that it is checked against observed productsknown
Route memory and word sensesAutomaton inference (Gold, 1978; Angluin, 1987); splitting states until a partition is consistent is the Myhill–Nerode constructionUsed as audited lanes that must derive nothing on worlds without the structureknown techniques, applied

Taken together, the contribution is an assembly, plus one result. The assembly: standard algebraic structures, each solved exactly so that the model is the complete set of consistent laws; a strict separation between what those laws admit and what the evidence prefers; and soundness and set size reported where the literature reports only accuracy. A reader who concludes this is a version space over algebraic hypotheses, read as direct-product abstract interpretation with a mined specification, is close enough to right that it should be the starting point rather than something to argue with. The result: that assembly, given nothing but 62 products over symbols it cannot read, recovers the kinship algebra anthropology built by hand and matches trained systems on the benchmark built to test extrapolation. What is not claimed: any new mathematics, any advantage over the best systems beyond their error bars, or generality beyond the worlds tested.

Corrections, and what caught each

Eleven claims were withdrawn or corrected. They are listed because how each was caught is the best evidence of how the work was checked.

#What was claimedWhat caught itNow
1A gender resultReviewing where the pairing came from: word pairs listed male-firstWithdrawn; gender is whatever the class lane derives
2Comparing with published systems is meaninglessReading the baselines' input specificationSame symbolic input; the comparison stands, "same level"
3The data leaves "a family of four" coordinate systemsReading the search: four was a truncation constantDepth read from data; one at the least depth
4Proposition 4 as a new resultPrior-art search (Knowledgebra, Rot-Pro)Credited as known
5The method framed as verificationPrior-art searchNamed as static analysis
6Kinship literature calls it a "bicyclic semigroup"Citation check found no sourceReplaced with Read's equations
7Published in-law numbersRe-running under eight hash seedsTie-break fixed; numbers deterministic
8The in-law gap is a structural limitThe experiments in section 12Narrowed twice; mostly polysemy
9Under label noise, soundness "stays at 100% throughout"Writing a script for a table that had noneTrue only on words that survive; both now reported
10Evidence-removal, tree-seed and cost tablesThe same: no script reproduced themRe-measured by stress; with 15 products, sound 9.8%, not 20.7%
11Every published CLUTRR system is trainedWriting the novelty comparison: Yang et al. (2023) are given hand-written rules"Learned or written by hand; none derived"

None of these changed a headline number. Several changed what the headline numbers mean, and four (1, 3, 9 and 11) had made the work look stronger than it was.

Threats to validity

What would test it further

The explainer lists the open questions. These are the experiments that would most strengthen or weaken the claims on this page, in order of how much they would tell us.

  1. GraphLog (Sinha et al., 2020): 57 logical worlds, each with its own rules, built by others. A model that derives its rules should re-derive them per world with no changes. This directly addresses the "worlds I built" threat.
  2. Set-valued answers. Spatial and temporal relation algebras, where the true answer is often "one of these three", and where published rule learners are reported to struggle.
  3. Independent replication on CLUTRR's original data release, so the comparison is on identical test sets.
  4. A real, large vocabulary with naturally occurring composition data, to see whether the audit still retires false laws when coverage is uneven.

Reproducing everything

pip install -e .
export CLUTRR_DIR=/path/to/clutrr/gen_train23_test2to10   # the other datasets alongside it
python -m bicyclic_kinship.benchmark    # all six datasets, the ablation
python -m bicyclic_kinship.noise        # false and irrelevant input facts
python -m bicyclic_kinship.worlds       # family trees, in-laws, depth, paths, grid
python -m bicyclic_kinship.stress       # evidence, labels, tree seeds, refusals, cost
pytest                                  # 59 tests

Zero dependencies, pure Python 3.10+. The synthetic algebras come first in the test file on purpose, as the guard that fails if domain knowledge ever leaks into the source. For the plain-language account, start with Who Is Your Daughter's Grandfather?

References

Benchmark and published systems. Sinha, Sodhani, Dong, Pineau & Hamilton (2019), CLUTRR, EMNLP, arXiv:1908.06177. Minervini et al. (2020), CTP, ICML, arXiv:2007.06477. Bergen, O'Donnell & Bahdanau (2021), Systematic Generalization with Edge Transformers, NeurIPS, arXiv:2112.00578. Lu et al. (2022), R5, ICLR, arXiv:2205.06454. Cheng et al. (2023), NCRL, ICLR, arXiv:2303.03581. Khalid & Schockaert (2025), Systematic Relational Reasoning with Epistemic Graph Neural Networks, ICLR, proceedings. Sinha, Sodhani, Pineau & Hamilton (2020), GraphLog, arXiv:2003.06560.

Kinship algebra. Weil (1949), appendix to Lévi-Strauss, Les structures élémentaires de la parenté. Read (1984), An Algebraic Account of the American Kinship Terminology, Current Anthropology 25(4), link. Read, Fischer & Leaf (2013), What Are Kinship Terminologies, and Why Do We Care?, Social Science Computer Review, doi.

Mathematics. Lyapin (1953), first published description of the bicyclic semigroup. Clifford & Preston (1961), The Algebraic Theory of Semigroups, vol. 1.

Program analysis. Cousot & Cousot (1977), Abstract interpretation, POPL, doi. Ernst, Cockrell, Griswold & Notkin (1999), Dynamically discovering likely program invariants to support program evolution, ICSE, doi. Cousot, Cousot & Mauborgne (2011), The Reduced Product of Abstract Domains and the Combination of Decision Procedures, FoSSaCS, doi. Wang, Anderson, Dillig & McMillan (2018), Learning Abstractions for Program Synthesis, CAV, doi.

Learning relations and rules. Hinton (1986), Learning distributed representations of concepts, Proceedings of the Eighth Annual Conference of the Cognitive Science Society. Quinlan (1990), Learning logical definitions from relations, Machine Learning 5, doi. Paccanaro & Hinton (2001), Learning distributed representations of concepts using linear relational embedding, IEEE TKDE 13(2), doi. Mitchell (1982), Generalization as search, Artificial Intelligence 18(2), doi. Gold (1978), Complexity of automaton identification from given data, Information and Control, doi. Angluin (1987), Learning regular sets from queries and counterexamples, Information and Computation, doi. Power, Burda, Edwards, Babuschkin & Misra (2022), Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets, arXiv:2201.02177.

Symbolic systems and benchmark audits. Read & Behrens (1990), KAES: An Expert System for the Algebraic Analysis of Kinship Terminologies, Journal of Quantitative Anthropology 2(4), link. Yang, Ishay & Lee (2023), Coupling Large Language Models with Logic Programming for Robust and General Reasoning from Text, Findings of ACL, arXiv:2307.07696. Zhang et al. (2024), Extracting and Following Paths for Robust Relational Reasoning with Large Language Models (Path-of-Thoughts), TMLR 2026, arXiv:2412.17963. Liu & Li (2011), On a Semi-Automatic Method for Generating Composition Tables, arXiv:1105.4224. Vovk, Gammerman & Shafer (2005; 2nd ed. 2022), Algorithmic Learning in a Random World, Springer, doi.

Knowledge-graph embeddings. Song, Luo & Huang (2021), Rot-Pro: Modeling Transitivity by Projection in Knowledge Graph Embedding, NeurIPS, arXiv:2110.14450. Yang, Wang, Sha, Engelbrecht & Hong (2022), Knowledgebra: An Algebraic Learning Framework for Knowledge Graph, arXiv:2204.07328.