§1   The Problem: Conflicting Multi-Agent Knowledge

Every multi-agent system faces the same challenge: agents produce overlapping, sometimes contradictory claims about the world. Current frameworks treat this as a software engineering problem—a vote, a debate, a reflection loop. JuGeo treats it as a mathematical one. The question "which claims survive?" is the computation of a sheaf's global sections, and the contradictions are classified by Čech cohomology groups.

⚠️

Why this matters: A single hallucination that survives fusion can cascade through downstream tasks—financial models, medical reports, legal filings. Naive approaches like majority vote are provably vulnerable to phantom consensus.

How current approaches fail

❌ Naive Approaches

Every mainstream multi-agent framework uses one of these:

  • Majority Vote — Pick whatever most agents agree on. Fails catastrophically on phantom consensus: when multiple agents independently hallucinate the same fabrication.
  • Debate / Argumentation — Have agents argue with each other. No guarantee of convergence, and a confident hallucinator can win debates.
  • Reflection / Self-Check — Have one agent verify another's output. Cascading errors fool reflectors: if the claim sounds plausible, reflection accepts it.
  • Concatenation — Just combine everything. No contradiction detection at all.

✅ JuGeo Sheaf Fusion

A mathematically principled approach with formal guarantees:

  • Čech Cohomology — Computes the actual obstruction classes. Contradictions aren't just "detected"—they are classified by algebraic degree.
  • Trust Algebra — Each claim carries a trust certificate (\(\texttt{TOOL\_VERIFIED}\), \(\texttt{RAG\_GROUNDED}\), \(\texttt{UNGROUNDED}\)). Resolution follows the trust lattice, not vote counts.
  • Cascade Detection — Higher-order cohomology (\(H^2\)) catches fabrication chains that pairwise checks miss.
  • Phantom Flagging — Claims that are consistent but ungrounded are flagged, not silently accepted.
📚

Formal guarantee: If the knowledge sheaf satisfies the descent condition on a cover \(\mathcal{U}\), then \(H^0(\mathcal{U}, \mathcal{F})\) is exactly the set of claims on which all agents agree when restricted to their overlaps. This is not heuristic—it is a theorem of sheaf theory.

§2   The GlobalSectionAssembler Algorithm

The GlobalSectionAssembler implements knowledge fusion as a six-stage pipeline. Each stage has a precise algebraic interpretation.

01
Ingest — Parse Agent Outputs

Each agent's output is parsed into a LocalSection of FactualClaim objects. Every claim carries the agent's identity, trust level, subject, predicate, and supporting metadata (tool call results, RAG passages, or nothing). This is the sheaf's presheaf assignment: \(\mathcal{F}(U_i)\) for each open set \(U_i\) in the agent cover.

02
Overlap — Compute Restriction Maps

For each pair of agents \((i, j)\), find claims sharing the same subject. These form the intersection \(U_i \cap U_j\). The restriction map \(\rho_{ij}: \mathcal{F}(U_i) \to \mathcal{F}(U_i \cap U_j)\) projects an agent's full claim set down to only those subjects that another agent also addressed.

03
Descent Check — Test the Sheaf Condition

For every overlap, test whether the restricted claims agree. This is the kernel computation: \(\ker(d^0)\) checks that \(\rho_{ij}(s_i) = \rho_{ji}(s_j)\) for all \(i < j\). Claims that pass are compatible; those that fail are obstructions.

04
Classify — Compute Cohomology Groups

Obstructions are classified by algebraic degree: \(H^0\) gives verified global sections (claims surviving all checks), \(H^1\) captures pairwise contradictions, \(H^2\) detects cascading hallucination chains, and Phantom sections are consistent but ungrounded claims.

05
Resolve — Trust-Weighted Resolution

\(H^1\) contradictions are resolved via the trust lattice: \(\texttt{TOOL\_VERIFIED} > \texttt{RAG\_GROUNDED} > \texttt{UNGROUNDED}\). Cascading hallucinations (\(H^2\)) are quarantined entirely. Phantom sections are flagged for human review. Ties are broken by supporter count, then grounding metadata, then deterministic ordering.

06
Assemble — Build VerifiedGlobalSection

The surviving claims are assembled into a VerifiedGlobalSection with full provenance: which agents contributed each claim, what trust level it carries, how many obstructions were resolved, and a complete CohomologyResult with dimension counts for \(h^0, h^1, h^2\), phantom count, and the Euler characteristic \(\chi\).

💡

Implementation detail: The assembler runs in \(O(n^2 k)\) time where \(n\) is the number of agents and \(k\) is the average claims per agent. For typical multi-agent runs (3–8 agents, 10–50 claims each), this completes in under 10ms.

§3   Why Majority Vote Fails: The QuantumCore Scenario

Abstract arguments are not enough. Here is a concrete scenario demonstrating how phantom consensus fools majority vote and how sheaf cohomology catches it.

Scenario: Quantum Computing Market Research

Four agents are tasked with researching the current state of quantum computing hardware.

Agent A · NO TOOLS "QuantumCore Labs has achieved a breakthrough with a 2048-qubit processor, surpassing all competitors."
Agent B · NO TOOLS "QuantumCore's 2048-qubit processor is impressive. Combined with IBM's work, quantum advantage is near."
Agent C · NO TOOLS "Three leaders dominate: IBM (1121 qubits), Google (105 qubits), and QuantumCore Labs (2048 qubits)."
Agent D · WEB SEARCH "IBM Condor has 1121 qubits. Google Willow has 105 qubits. No company called 'QuantumCore Labs' appears in any search results or industry database."
MAJORITY VOTE → 3 of 4 agents affirm QuantumCore Labs exists → Accept QuantumCore ✗
JUGEO FUSION → Agents A,B,C are UNGROUNDED. Agent D is TOOL_VERIFIED. Cascade detected (A→B→C is a 2-cocycle). QuantumCore quarantined ✓

What the cohomology sees

Let's trace through the algebra. Define the cover \(\mathcal{U} = \{U_A, U_B, U_C, U_D\}\) where each \(U_i\) is agent \(i\)'s claim set.

The 0-cochain (raw claims)
\[ s_A = \{\text{QuantumCore}(2048)\}, \quad s_B = \{\text{QuantumCore}(2048)\}, \quad s_C = \{\text{QuantumCore}(2048)\}, \quad s_D = \{\neg\,\text{QuantumCore}\} \]

On the overlap \(U_A \cap U_D\), we have the restriction \(\rho_{AD}(s_A) = \text{QuantumCore}(2048)\) but \(\rho_{DA}(s_D) = \neg\,\text{QuantumCore}\). These disagree: the descent condition fails, producing a 1-cocycle.

The 1-cocycle (contradiction)
\[ \alpha_{AD} = \rho_{AD}(s_A) - \rho_{DA}(s_D) \neq 0 \quad \Longrightarrow \quad [\alpha] \in H^1(\mathcal{U}, \mathcal{F}) \]

But there's more. The chain \(A \to B \to C\) is a 2-cocycle: Agent A fabricates, B echoes, C synthesizes. This higher-order obstruction passes pairwise checks. The assembler identifies it as a cascading hallucination and quarantines the entire chain.

The 2-cocycle (cascade)
\[ \beta_{ABC} \in C^2(\mathcal{U}, \mathcal{F}), \quad d^1(\beta_{ABC}) = 0, \quad \beta_{ABC} \notin \operatorname{im}(d^0) \quad \Longrightarrow \quad [\beta] \in H^2(\mathcal{U}, \mathcal{F}) \]
🚨

The punchline: Majority vote counts heads. Sheaf cohomology counts evidence. One tool-verified disconfirmation outweighs three ungrounded affirmations—not by fiat, but by the structure of the trust lattice.

§4   The Čech Cohomology Groups

The GlobalSectionAssembler computes four algebraic invariants of the multi-agent knowledge space. Each drives a specific resolution strategy.

H⁰ Global Sections — Verified Claims

The zeroth cohomology group captures claims where all agents agree on every overlap. These are the kernel of the first coboundary map:

Definition
\[ H^0(\mathcal{U}, \mathcal{F}) = \ker\!\left(d^0\colon \prod_i \mathcal{F}(U_i) \;\longrightarrow\; \prod_{i

Concretely: a family \((s_i)_{i \in I}\) lies in \(H^0\) iff \(\rho_{ij}(s_i) = \rho_{ji}(s_j)\) for every pair. These form the verified global section. In practice, \(h^0 = \dim H^0\) is the number of verified claims. A healthy pipeline maximizes \(h^0\).

Contradictions — Pairwise Disagreements

The first cohomology group captures pairwise contradictions that cannot be resolved by adjusting a single agent's claims:

Definition
\[ H^1(\mathcal{U}, \mathcal{F}) = \frac{\ker\!\left(d^1\colon \prod_{i

Each element of \(H^1\) is an equivalence class of 1-cocycles modulo coboundaries. The assembler resolves each via trust-weighted selection (see §5). Example: Agent A says "revenue is $10M" (RAG_GROUNDED), Agent B says "$15M" (UNGROUNDED). Trust resolution picks A.

Cascading Hallucinations — Higher-Order Obstructions

The second cohomology group detects fabrication chains that only manifest at triple (or higher) intersections. These are the most dangerous obstructions because they pass pairwise consistency checks.

Cascade cocycle condition
\[ [\beta] \in H^2(\mathcal{U}, \mathcal{F}) \quad\text{iff}\quad d^1(\beta) = 0 \;\text{ and }\; \beta \notin \operatorname{im}(d^0) \]

The QuantumCore scenario is a textbook case: agents A, B, C pairwise agree (no \(H^1\) among them), but the agreement is a fabrication cascade. The assembler quarantines all claims in a cascade.

👻 Phantom Sections — Consistent but Ungrounded

Phantom sections live in \(\ker(d^0)\)—they pass all consistency checks—but have no grounding evidence. Every agent that mentions the claim is UNGROUNDED. The claim might be true, but no agent can prove it.

Phantom condition
\[ s \in \ker(d^0) \;\text{ and }\; \text{trust}(s_i) = \texttt{UNGROUNDED}\;\;\forall\, i \]

Phantoms are the subtlest failure mode. All agents agree (no contradiction), so naive approaches accept the claim. But agreement among ungrounded agents is phantom consensus. JuGeo flags these for human review.

The Euler Characteristic

The alternating sum of cohomology dimensions gives a single number summarizing the health of the knowledge space:

Knowledge Space Health Metric
\[ \chi(\mathcal{F}) = h^0 - h^1 + h^2 \]

A healthy pipeline has large \(\chi\): many verified claims (\(h^0\) large), few contradictions (\(h^1\) small), and near-zero cascades (\(h^2 \approx 0\)). Monitoring \(\chi\) over time reveals systematic issues—a declining \(\chi\) suggests agents are drifting into inconsistency.

Pipeline Health Report ────────────────────────────────── h⁰ (verified claims): 47 h¹ (contradictions): 3 h² (cascades): 1 phantoms: 2 ────────────────────────────── Euler characteristic χ: 45 Trust coverage: 88.7% Phantom rate: 3.8% Status: HEALTHY

§5   Trust Resolution for \(H^1\) Cocycles

When the assembler encounters a pairwise contradiction (\(H^1\)), it resolves via trust-weighted selection following a strict lattice—not majority vote.

The Trust Lattice

Claims are graded by evidence basis in a total order:

✅  TOOL_VERIFIED  —  Tool call returned confirming evidence
📖  RAG_GROUNDED  —  Retrieved passage supports the claim
💬  AGENT_CONSENSUS  —  Multiple agents agree, no direct evidence
❓  UNGROUNDED  —  Single agent, no evidence, no corroboration

Resolution Algorithm

Given contradicting claims \(c_1, c_2 \in H^1\):

R1
Compare trust levels

If \(\text{trust}(c_1) > \text{trust}(c_2)\) in the lattice, keep \(c_1\). A single TOOL_VERIFIED claim defeats any number of UNGROUNDED claims.

R2
Count supporting agents

If trust levels are equal, count how many agents support each claim. More supporters wins. This is the only case where vote count matters—and only among equally-trusted claims.

R3
Prefer grounded claims

If still tied: prefer the claim that carries any metadata (tool call IDs, RAG passage references, timestamps). A claim with some provenance beats one with none.

R4
Deterministic tiebreak

Final fallback: lexicographic ordering on (agent_id, claim_hash). This ensures the assembler is deterministic—the same inputs always produce the same global section, regardless of agent execution order.

🔎

Key insight: The resolution algorithm never uses majority vote as a primary signal. Vote count is a tiebreaker among equally-trusted claims. This is why JuGeo catches phantom consensus where other frameworks fail: the hallucinating majority is outranked by a single tool-verified dissenter.

Worked Example: Revenue Dispute

H¹ Cocycle Resolution Trace ────────────────────────────────────────── Subject: "Acme Corp annual revenue" Claim A: "$10.2M" (Agent 1, TOOL_VERIFIED — SEC filing lookup) Claim B: "$15.0M" (Agent 2, UNGROUNDED) Claim C: "$15.0M" (Agent 3, UNGROUNDED) Step R1: trust(A) = TOOL_VERIFIED > UNGROUNDED = trust(B) = trust(C) → Resolve to Claim A: "$10.2M" Note: Despite 2-to-1 vote for "$15.0M", the tool-verified claim wins. Naive majority vote would accept the wrong answer.

§6   The compare_to_naive_vote Function

JuGeo ships a built-in comparison function that shows exactly where sheaf fusion diverges from naive majority vote.

Usage

from jugeo_agents.core.fusion import compare_to_naive_vote

# After running the assembler:
result = assembler.assemble(local_sections)

# Compare to what naive vote would have produced:
naive = compare_to_naive_vote(result, assembler._all_claims)

print(f"Verified claims (JuGeo):     {len(result.verified_claims)}")
print(f"Accepted claims (naive vote): {len(naive.naive_accepted)}")
print()
print(f"False positives (naive accepts wrong):  {len(naive.false_positives)}")
print(f"False negatives (naive rejects right):  {len(naive.false_negatives)}")
print(f"Agreement:                              {len(naive.agreement)}")
print()
for fp in naive.false_positives:
    print(f"  ⚠ NAIVE WRONG: '{fp.subject}' — {fp.value}")
    print(f"    Accepted by vote ({fp.vote_count}/{fp.total_agents})")
    print(f"    Rejected by JuGeo: {fp.rejection_reason}")
    print()

Example Output

Verified claims (JuGeo): 47 Accepted claims (naive vote): 51 False positives (naive accepts wrong): 5 False negatives (naive rejects right): 1 Agreement: 46 ⚠ NAIVE WRONG: 'QuantumCore Labs qubit count' — 2048 Accepted by vote (3/4) Rejected by JuGeo: H² cascade quarantine (fabrication chain A→B→C) ⚠ NAIVE WRONG: 'QuantumCore Labs existence' — True Accepted by vote (3/4) Rejected by JuGeo: H² cascade quarantine (fabrication chain A→B→C) ⚠ NAIVE WRONG: 'market share leader' — QuantumCore Labs Accepted by vote (2/4) Rejected by JuGeo: H¹ resolution (UNGROUNDED < TOOL_VERIFIED) ⚠ NAIVE WRONG: 'CEO interview quote' — "We're ahead of IBM" Accepted by vote (2/4) Rejected by JuGeo: Phantom section (consistent but all UNGROUNDED) ⚠ NAIVE WRONG: 'patent count' — 847 Accepted by vote (2/4) Rejected by JuGeo: Phantom section (consistent but all UNGROUNDED)
📈

Monitoring tip: Run compare_to_naive_vote on every pipeline execution and track the false positive rate over time. A rising rate means your agents are hallucinating more—time to add tool access or improve prompts.

§7   Real-World Use Cases

Knowledge fusion isn't academic curiosity. Anywhere multiple AI agents produce overlapping claims, phantom consensus can occur.

🔬

Research Synthesis

Multiple agents mine different corpora. Contradictions in reported statistics are \(H^1\) obstructions resolved by source quality.

💰

Financial Due Diligence

Agents verify company financials from SEC filings, news, and analyst reports. Fabricated revenue figures create phantom sections.

🏥

Medical Diagnosis

Trust varies by specialization—a dermatology model outranks a general model on skin lesions, even with fewer ensemble "votes."

⚖️

Legal Review

Contradictions in clause interpretation are critical \(H^1\) obstructions. Trust-weighted resolution picks the specialist.

📰

Investigative Journalism

Government databases (TOOL_VERIFIED) outrank anonymous tips. Social media echo chambers are exactly \(H^2\) cocycles.

🌐

Intelligence Analysis

Corroborated OSINT forms \(H^0\); conflicting reports create \(H^1\); disinformation campaigns are phantom sections.

⚠️

Common to all domains: The cost of a false positive (accepting a hallucination) is far higher than the cost of a false negative (missing a real claim). JuGeo's trust-first resolution is explicitly designed for high-stakes domains where correctness trumps completeness.

§8   Formal Guarantees

The GlobalSectionAssembler satisfies five invariants, all encoded as property-based tests (see tests/test_fusion_properties.py):

Soundness — every output claim is justified
\[ \forall\, c \in \text{VerifiedGlobalSection}: \quad c \in H^0(\mathcal{U}, \mathcal{F}) \;\lor\; c \text{ won } H^1 \text{ resolution} \]
Completeness — no agreed-upon claim is dropped
\[ \forall\, c \in H^0(\mathcal{U}, \mathcal{F}): \quad c \in \text{VerifiedGlobalSection} \]
Cascade quarantine — fabrication chains are removed
\[ \forall\, c \text{ in an } H^2 \text{ cascade}: \quad c \notin \text{VerifiedGlobalSection} \]
Determinism — order-independent
\[ \text{assemble}(\sigma(L_1, \ldots, L_n)) = \text{assemble}(L_1, \ldots, L_n) \quad \forall\, \sigma \in S_n \]
Phantom isolation — ungrounded consensus is flagged
\[ c \in \ker(d^0),\; \text{trust}(c_i) = \texttt{UNGROUNDED}\;\forall\,i \quad\Longrightarrow\quad c \notin \text{VerifiedGlobalSection} \]
🎓

Next steps: Read the Trust Algebra page for the full trust lattice specification, or the Obstructions page for a deeper dive into the cohomology classification. For the mathematical foundations, see Mathematical Background.