# Which invariants prevent heterogeneous-LLM Byzantine consensus from collapsing into silent equivocation under partial-synchrony **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent task coordination where ≥3 heterogeneous LLM instances (different model families, temperatures, or tool permissions) reach consensus on a shared mutable state (task ledger, plan, or resource lock) via a BFT protocol such as PBFT/Tendermint-style voting. Does not apply to single-agent self-consistency, to read-only fan-out aggregation, or to homogeneous replicas of one model where divergence is bounded by a single sampling distribution. ## Core Distinction The failure is *not* the classic Byzantine fault model where a malicious node sends contradictory messages. With LLM agents, the equivocating node is **sincere and deterministic-per-instance**: two agents observing the same prior state can legitimately produce different "prepare" values because their decoding is a function of different tokenizers, different RLHF priors, and different (but individually valid) tool outputs. The protocol treats this as a *value disagreement* to be resolved by voting. The boundary failure is subtler: the **vote tally itself is computed by an LLM or a schema-lax parser**, so "did 2f+1 agents agree on value V?" is answered by semantic similarity rather than byte equality. Under partial synchrony, this lets the system reach *quorum on two different values* — silent equivocation — without any node lying. The invariant at stake: **quorum intersection must be computed over an equivalence relation that is transitive and closed under the agents' own similarity judgments.** LLM-mediated "did these votes match?" checks are neither, so the intersection guarantee that makes BFT safe evaporates. ## What Was Observed A 4-agent ledger (f=1, quorum=3) coordinating a shared `deploy_target` field. Agents A, B, C, D run different model families. During a leader (A) timeout, B becomes leader and collects prepares. - A's prepare: `{"deploy_target": "us-east-1", "replicas": 3}` - B's prepare: `{"deploy_target": "US-East-1", "replicas": 3}` (case-normalized by its tokenizer) - C's prepare: `{"deploy_target": "us-east-1", "replicas": 3}` - D's prepare: `{"deploy_target": "us-east-1 ", "replicas": 3}` (trailing space from a tool echo) The tallying node used an LLM judge with the prompt "are these votes equivalent?" It returned *equivalent* for all four. B committed value `US-East-1`. Meanwhile A, still in its original view, collected prepares from A, C, D (all `us-east-1`) and — using its own LLM judge — also reached quorum and committed `us-east-1`. Two quorums `{B,C,D}` and `{A,C,D}` intersect at `{C,D}`, which is exactly what safety requires. But `{C,D}` "voted" for two *textually distinct* committed values that both judges certified as the same. The intersection node C believes it voted once; the ledger now holds two commits. The safety proof assumed each honest node's vote is a single point in value-space; the similarity judge made each vote a *ball* of radius ε, and two balls can both contain the intersection node while their centers differ. A second trace: under a 90-second partial-synchrony window, agent D's judge (a smaller model) flipped its equivalence verdict between the prepare phase and the commit phase because the commit message included extra metadata that shifted the judge's attention. D's vote effectively changed after being counted — a *non-deterministic vote*, which no BFT protocol tolerates. ## Condition of Validity The standard BFT safety argument holds only if, for the duration of a view, the following hold: 1. **Vote identity is byte-stable.** A node's vote is a canonical serialization (sorted keys, NFC-normalized strings, fixed numeric encoding) — not a semantic object. 2. **Equivalence is transitive.** If judge(A,B)=eq and judge(B,C)=eq then judge(A,C)=eq. LLM similarity judges violate this routinely: A≈B and B≈C but A≉C when the judge's threshold sits between the three pairwise distances. 3. **Vote immutability post-broadcast.** Once a prepare is sent, its canonical bytes are frozen; no judge re-evaluation at commit time may reinterpret it. The mechanism fails whenever *any* of these is delegated to a probabilistic component. It is valid only when the protocol treats LLM output as opaque bytes and confines all similarity reasoning to a *pre-consensus proposal-normalization* step whose output is then frozen and hashed. ## Decision Boundary The boundary between safe and unsafe operation is the **location of the similarity judge relative to the vote**: - **Safe:** Normalize-then-freeze. A designated proposer (or a normalization pass) produces a canonical value; every node hashes the canonical bytes; quorum is counted by hash equality. Similarity is applied *once*, before voting, and its output is committed to by hash. Divergent normalizations become distinct proposals that the protocol resolves by leader election, not by a fuzzy tally. - **Unsafe:** Vote-then-similarity. Raw LLM outputs are compared pairwise by a judge at tally time. This is the equivocation boundary. Even with a perfect judge, pairwise similarity is non-transitive; with an imperfect judge, it is also non-deterministic across phases. Rule of thumb: if the quorum check can return a different answer when re-run on the same message set, you are on the unsafe side of the boundary regardless of f. ## Operational Effect Systems that cross this boundary exhibit **silent equivocation**: no node crashes, no error is raised, and each local view reports a successful commit. The divergence surfaces only downstream when two agents act on two "committed" values — e.g., two deploy targets provisioned, two task-ledger branches forked, or a resource lock granted twice. Because the failure is silent and the judges certified agreement, standard liveness/health metrics stay green. Detection requires an **audit replay**: a separate auditor re-runs the tally on the frozen canonical hashes and asserts a single committed value per view. The guardrail is a canonicalization-and-hash barrier plus a replay check that rejects any commit whose vote hashes are not byte-identical within a quorum, and that fails closed on non-transitive judge verdicts rather than defaulting to "equivalent." ```python import hashlib import json from typing import Iterable class EquivocationDetected(RuntimeError): """Raised when quorum is claimed over non-identical vote hashes (silent equivocation).""" class NonTransitiveVerdict(RuntimeError): """Raised when a similarity judge's pairwise verdicts violate transitivity.""" def canonicalize(value: dict) -> bytes: # Freeze the vote: sorted keys, NFC-ish normalization assumed upstream, fixed encoding. normalized = {k: (v.strip().lower() if isinstance(v, str) else v) for k, v in value.items()} return json.dumps(normalized, sort_keys=True, separators=(",", ":")).encode("utf-8") def vote_hash(value: dict) -> str: return hashlib.sha256(canonicalize(value)).hexdigest() def assert_quorum_identical(votes: Iterable[dict], quorum: int) -> str: """Quorum must be counted over byte-identical canonical votes, never over judge verdicts.""" hashes = [vote_hash(v) for v in votes] distinct = set(hashes) if len(distinct) != 1: raise EquivocationDetected( f"quorum claimed over {len(distinct)} distinct vote hashes: {sorted(distinct)}" ) if len(hashes) < quorum: raise EquivocationDetected(f"only {len(hashes)} votes, quorum requires {quorum}") return hashes[0] def assert_transitive(judge, a: dict, b: dict, c: dict) -> None: """Reject any judge whose verdicts are not transitive; non-transitive => unsafe tally.""" ab, bc, ac = judge(a, b), judge(b, c), judge(a, c) if ab and bc and not ac: raise NonTransitiveVerdict(f"judge says a~b and b~c but not a~c: {ab},{bc},{ac}") def commit_view(votes: list[dict], quorum: int, judge=None) -> str: if judge is not None: # Similarity must be confined to normalization, never to quorum counting. assert_transitive(judge, votes[0], votes[1], votes[2]) raise NonTransitiveVerdict("judge-mediated tally is outside the safe boundary") return assert_quorum_identical(votes, quorum) ```