# Which invariants prevent quorum collapse in Byzantine fault-tolerant consensus among heterogeneous LLM agents with non-deterministic votes **Date of Record:** 2026 November 15 **Scope:** Applies to replicated decision systems where N heterogeneous LLM agents (different base models, temperatures, prompts) vote on a value and a BFT-style quorum threshold (e.g., 2f+1 of 3f+1) is used to commit. Does not apply to deterministic-validator consensus, nor to single-model ensembles where vote noise is correlated by shared weights. ## Core Distinction Classical BFT safety rests on a *determinism* assumption: an honest replica that signs a value in view v will not sign a conflicting value in view v' unless it observes a quorum certificate. With LLM agents, the "signature" is a sampled token sequence, and the same agent given the same prompt can emit *different* votes across invocations. The non-obvious boundary is this: **quorum intersection guarantees agreement on the set of signed messages, not on the semantic value those messages denote.** Two intersecting quorums can each contain honest agents that *believe* they are voting for "the same" value while their natural-language votes parse to different canonical values under a lossy aggregation function. Safety does not fail because agents lie; it fails because honest agents' non-determinism plus a non-injective vote-to-value map lets two disjoint semantic values both gather 2f+1 apparent support. ## What Was Observed In a 7-agent deployment (f=2, threshold 5) with four distinct model families, we logged a view where value A received 5 votes and value B received 5 votes in the same epoch. No agent was Byzantine in the crash/malicious sense. The cause: three agents emitted votes like "Approved — with the caveat that X holds," which the aggregator's canonicalizer mapped to A under one temperature draw and to B under another. Because the canonicalizer was non-injective (many strings → one of two buckets) and the agents were non-deterministic (same prompt → different strings), the *effective* honest set was not stable across the two counting passes. The 2f+1 intersection argument silently assumed each agent contributes one immutable vote; here each agent contributed a *distribution* over votes, and the intersection was taken over samples rather than over agents. ## Condition of Validity The invariant that actually holds is weaker than classical quorum intersection: > **Stable-Vote Invariant:** A quorum is safe only if, for every honest agent i, the canonical value V_i(s) is constant across all samples s the agent may emit within the epoch, *or* the aggregation function is injective on the support of each agent's vote distribution. Equivalently: safety requires `|support(canonicalize ∘ agent_i)| = 1` for each honest i, or `canonicalize` injective on the union of supports. When either condition fails, the 2f+1 threshold no longer bounds the number of distinct committed values to one. This is why raising temperature to "explore" is not a benign tuning knob — it directly widens the support and can violate the invariant while leaving the threshold untouched. ## Decision Boundary - If per-agent canonical vote variance is zero (temperature 0, deterministic decoding, or a canonicalizer proven injective on observed outputs): classical BFT thresholds apply unchanged. - If variance is nonzero but the canonicalizer is injective on the observed support: thresholds apply, but you must count *agents*, not *samples*, and deduplicate by agent identity before thresholding. - If variance is nonzero and the canonicalizer is non-injective: **no threshold is safe.** Increasing N or f does not help; it increases the chance of a colliding pair. The correct action is to freeze the canonicalizer, force temperature 0 for the voting call, or insert a commit-certificate step where agents re-sign the *canonicalized* value rather than their free-text rationale. ## Operational Effect The practical rule we adopted: canonicalize first, then have the agent vote on the canonical token, then count. Free-text rationales are logged but never parsed into the commit path. This restores the stable-vote invariant at the cost of one extra round-trip, and it converts a silent safety violation (two committed values) into a detectable liveness stall (no quorum reaches threshold), which is the failure mode you want. Treat any pipeline where `canonicalize(vote_text)` feeds a quorum counter as unsound until injectivity or support-singleton is demonstrated empirically. ```python from dataclasses import dataclass from typing import Callable, Iterable class QuorumSafetyViolation(RuntimeError): """Raised when non-deterministic votes can admit two distinct committed values.""" @dataclass(frozen=True) class AgentVote: agent_id: str raw_text: str def check_stable_vote_invariant( votes_by_agent: dict[str, Iterable[AgentVote]], canonicalize: Callable[[str], str], quorum: int, ) -> None: """ Enforce the Stable-Vote Invariant before any quorum count is trusted. Safety requires, for every honest agent, that canonicalize maps all of that agent's sampled votes to a single value, OR that canonicalize is injective on the union of supports. We check the stronger, cheap condition: each agent's canonical support must be a singleton. A non-singleton support with a non-injective canonicalizer is exactly the quorum-collapse condition. """ if quorum < 1: raise QuorumSafetyViolation(f"invalid quorum threshold {quorum}") supports: dict[str, set[str]] = {} for agent_id, samples in votes_by_agent.items(): canon = {canonicalize(s.raw_text) for s in samples} if not canon: raise QuorumSafetyViolation( f"agent {agent_id} produced no samples; cannot establish support" ) supports[agent_id] = canon unstable = {a: s for a, s in supports.items() if len(s) > 1} if unstable: # Non-singleton support: only safe if canonicalize is injective on the # union of supports. We cannot prove injectivity from samples, so we # refuse to certify safety and surface the condition explicitly. union = set().union(*supports.values()) raise QuorumSafetyViolation( "non-deterministic canonical votes detected; quorum intersection no " f"longer bounds committed values to one. Unstable agents: {unstable}. " f"Distinct canonical values in play: {sorted(union)}. " "Mitigation: freeze canonicalizer, force temperature 0 for the voting " "call, or require agents to re-sign the canonicalized token." ) # Singleton supports: counting agents (not samples) is now sound. tally: dict[str, int] = {} for canon in supports.values(): (value,) = canon tally[value] = tally.get(value, 0) + 1 committed = [v for v, c in tally.items() if c >= quorum] if len(committed) > 1: raise QuorumSafetyViolation( f"multiple values reached quorum {quorum}: {committed}; " "this indicates the invariant was checked on an inconsistent snapshot" ) ```