Knowledge Fusion: Assembling Verified Global Sections
The operation no other multi-agent framework can perform: compute the Čech cohomology of a multi-agent knowledge space and extract the largest consistent, trust-certified knowledge base.
§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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
The zeroth cohomology group captures claims where all agents agree on every overlap. These are the kernel of the first coboundary map:
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\).
The first cohomology group captures pairwise contradictions that cannot be resolved by adjusting a single agent's claims:
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.
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.
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 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.
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:
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.
§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:
Resolution Algorithm
Given contradicting claims \(c_1, c_2 \in H^1\):
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.
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.
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.
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
§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
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):
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.