Topos-TheoreticProbability
Descent as Epistemic Coherence
Every instrument is sure of its own room and wrong about the building. Keep each belief local, price the disagreement where instruments overlap, and glue — fusion as descent, not averaging.
§0Abstract
Two thermometers in adjacent rooms will happily disagree about the doorway they share.
The usual fix is to fit one global model and treat the disagreement as noise, which throws away exactly the structure that says who should win where. This paper keeps every belief local instead: each sensor, region, or time window holds its own distribution, overlaps carry an explicit compatibility price, and descent — the sheaf-theoretic gluing condition — does the work a global model used to do. Bayesian updating becomes “make the locals compatible, then glue.”
§1Minimal Background
Sheaf
Assign data to pieces of a space — regions, time windows, sensor footprints — with restriction maps that say what each piece's data looks like on an overlap. (That much is really a presheaf; the gluing law below is what earns the name sheaf.)
Topos
A category of sheaves that behaves enough like the category of sets to interpret logic inside it. In this note the topos is mostly backdrop: everything we actually compute with lives at the level of sheaves and gluing.
Descent
If local pieces agree wherever they overlap, they glue to a unique global section. Epistemically: sensors that agree wherever their views overlap can be fused into one consistent global belief.
§2Why This Reframes Fusion
Classic Fusion
Sheaf Fusion
§3A Practical Recipe
- Base space: Choose your cover (e.g., rooms in a house × time windows, or sensor fields of view).
- Local sections (data): On each patch of the cover, store a belief object: a Gaussian, Dirichlet parameters, a credal set, a subjective-logic opinion.
- Restrictions: Maps that push beliefs down to overlaps: marginalize out variables, project coordinates, convert units.
- Compatibility loss: Measure mismatch on overlaps: symmetrized KL divergence KL(P ‖ Q) + KL(Q ‖ P), a Wasserstein distance, or an interval/credal distance.
- Inference = sheaf gluing: Minimize total incompatibility while each patch stays faithful to its own likelihood and prior. In the linear-Gaussian case this is a sheaf-Laplacian least-squares problem; in general it is the optimization analogue of gluing, and the minimizer is the fused belief.
- Bayesian updates: A new observation updates one patch locally; then re-solve the coherence problem, warm-starting from the previous solution.
- Diagnostics: Overlap residuals that survive optimization point at bad sensors, drift, or miscalibration. In the cohomological picture, a nonzero obstruction class is a contradiction no local adjustment can remove.
§3.1Concrete Choices That Work
Belief Types
Overlap Loss Functions
- Gaussian: Symmetrized KL or 2-Wasserstein (both in closed form)
- Discrete: Jensen-Shannon divergence
- Subjective logic: Map to the equivalent Dirichlet, then use Jensen-Shannon or KL
Solver
§4Worked Sketch: Gaussian Case
Setup
- Patches: Uᵢ (e.g., 'kitchen during minute k'), each carrying a Gaussian belief Pᵢ = N(μᵢ, Σᵢ)
- Overlap Uᵢ ∩ Uⱼ: Both beliefs restrict to the shared variables via linear maps Rᵢ, Rⱼ
ℓᵢⱼ = W₂²(Rᵢ#Pᵢ, Rⱼ#Pⱼ)
min over {Pᵢ}: Σᵢ KL(Pᵢ ‖ P̃ᵢ) + λ Σ₍ᵢ,ⱼ₎ ℓᵢⱼ
where Rᵢ#Pᵢ is the pushforward of Pᵢ along the restriction map and P̃ᵢ is the locally updated posterior on patch i. The minimizer is a family Pᵢ* as compatible as the data allow; when every overlap residual vanishes, that family is exactly a global section.
§4.1Connection to Epistemic Transport
- Transport: Beliefs move between contexts by restriction and pushforward; the cost of a move is your transport metric (Wasserstein or KL).
- Epistemic: Beliefs may be second-order — uncertainty about the parameters themselves. Encode that with richer local data: credal sets, intervals, or hyperpriors.
- Objective: Transport cost across overlaps plus data-fidelity terms; the gluing constraint is what forces the transported beliefs to agree.
§4.2Implementation Sketch (Python)
# A sketch, not a library: build_cover, converged,
# update_beliefs, etc. are yours to supply.
# Represent the cover and restrictions (graph or poset)
cover = build_cover(rooms, time_windows)
# Pick a belief carrier
# NumPy/SciPy for Gaussians; Dirichlet for discrete
beliefs = {node: GaussianBelief(mu, cov) for node in cover}
# Build overlap list with restriction matrices
overlaps = compute_overlaps(cover)
restrictions = {(i, j): linear_restriction_map(i, j)
for (i, j) in overlaps}
# Solver: ADMM over overlaps
def sheaf_glue(beliefs, overlaps, restrictions, lambda_reg):
while not converged(beliefs):
# Measure disagreement on every overlap
mismatch = {}
for (i, j) in overlaps:
Ri, Rj = restrictions[(i, j)]
mismatch[(i, j)] = compute_wasserstein(Ri @ beliefs[i],
Rj @ beliefs[j])
# Proximal/gradient step toward compatibility
beliefs = update_beliefs(beliefs, mismatch, lambda_reg)
return beliefs§5Where This Shines
Heterogeneous Sensors
Different units, frames, and modalities — encode the conversions in the restriction maps, and the sheaf structure handles the translation.
Partial Observability
Overlaps can be small and still suffice to glue. Even with limited shared context, a coherent global belief emerges.
Drift Detection
Overlap residuals that persist no matter how the local beliefs adjust are the numerical shadow of a cohomological obstruction — a built-in alarm that the disagreement is structural, not noise.
§6Quick Starter Roadmap
Gaussian Sheaf Fusion
Room-by-room temp/pressure network; symmetric KL on overlaps; ADMM solver.
Subjective Logic Bridge
Subjective-logic ↔ Dirichlet bridge; Jensen-Shannon overlap loss; outlier-robust penalties.
Wasserstein Transport
Wasserstein-regularized transport + topology-aware diagnostics (flag loops with persistent residuals).
Streaming Updates
Streaming updates with incremental gluing; per-edge health scores for monitoring.
§7Further Reading
Robinson (2017), Sheaves Are the Canonical Data Structure for Sensor Integration
The manifesto for this whole picture: why sheaves, not ad hoc schemas, are the right bookkeeping for multi-sensor data — with worked examples.
Hansen & Ghrist (2019), Toward a Spectral Theory of Cellular Sheaves
Where the sheaf Laplacian of §3 comes from: harmonic sections, diffusion, and the graph-Laplacian analogy done carefully.
Mac Lane & Moerdijk (1992), Sheaves in Geometry and Logic
The standard route into sheaves and topoi, if you want the real definitions behind the cartoons above.
- Robinson 2017Michael Robinson, Sheaves Are the Canonical Data Structure for Sensor Integration (Information Fusion 36)
- Hansen & Ghrist 2019Jakob Hansen & Robert Ghrist, Toward a Spectral Theory of Cellular Sheaves (Journal of Applied and Computational Topology 3)
- Mac Lane & Moerdijk 1992Saunders Mac Lane & Ieke Moerdijk, Sheaves in Geometry and Logic: A First Introduction to Topos Theory
- Jøsang 2016Audun Jøsang, Subjective Logic: A Formalism for Reasoning Under Uncertainty
- Peyré & Cuturi 2019Gabriel Peyré & Marco Cuturi, Computational Optimal Transport (Foundations and Trends in Machine Learning)