REVIEW 4 major objections 4 minor 2 cited by
A cubical formalisation of conditional independence, Bayesian conditioning, and Pearl's d-separation soundness
T0 review · 4 major / 4 minor · reviewed 2026-08-02 · deepseek-v4-flash
Pith's one-line read The paper proves that the standard convex-algebra interchange axiom is too weak to support full Bayesian conditioning, supplies a minimal generalized interchange that fixes it, and machine-checks d-separation soundness on arbitrary finite D
desk verdict A serious formalization worth engaging, but the headline 'too weak' claim about the interchange axiom is probably wrong - the generalized law looks derivable in any convex algebra - and the displayed constructor is missing positivity side conditions. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The higher-inductive type of finite distributions, generated by point masses and binary weighted mixing, with distributional equalities as path constructors. The load-bearing piece is the new path constructor, a generalized medial interchange for four leaves with distinct inner weights; it is what lets the recursively defined Bayesian conditioning operator respect the interchange equality of the quotient. Secondary machinery includes conditional independence as a cubical path between kernels and structural Sigma-type witnesses for factorization, which support the constructive intersection proof and the kernel-level do-calculus rules.
What would settle it
Evaluate the displayed generalized-interchange identity at a concrete degenerate assignment, for example p=1/2, q1=0, q2=0, under the paper's division convention: if the two sides reduce to different distributions, the constructor as written is false. More broadly, search the rational simplex for four point masses where the new path constructor forces two distinct distributions to become equal; that would contradict the claimed expectation functional separating point masses.
Extended reading notes
Core claim
The central claim is that the six path constructors usually taken for finite distributions, including the interchange law inherited from convex algebra, are not enough to lift Bayesian conditioning to the full higher-inductive distribution type. When conditioning a four-leaf mixture, the two inner halves of the rearranged tree carry different weights, each a ratio of marginals, while the standard interchange only handles the case where those weights coincide. The paper adds a seventh constructor, a generalized interchange with distinct inner weights, whose new outer weight is the total probability of one side and whose new inner weights are the Bayesian update formulas, and proves the origin
Load-bearing premise
The whole construction rests on the new generalized-interchange equality being a valid, consistent rule for every weight it quantifies over; if at some boundary weights, such as q1=q2=0, the two sides are not equal or the rule needs hidden positivity side conditions, the lifting of Bayesian conditioning to the full distribution type fails.
Editorial extensions
If this is right
- Any HIT-based probability monad that keeps only the six standard convex-algebra constructors cannot support full Bayesian conditioning; to condition on the full equality type it must add a Bayes-shaped interchange or an equivalent axiom.
- The kernel-form do-calculus rules and d-separation soundness are machine-checked for arbitrary finite DAGs, so causal inference tools could compile to a verified substrate instead of relying on informal correctness arguments.
- Because conditional independence is a runnable path rather than an opaque equality, posterior and marginal computations are executable; the paper demonstrates normalizer-reduced posteriors on finite types.
- The abstract weight signature discharges at the rationals with zero analytic postulates, so the results transfer to any ordered field satisfying the interface without rebuilding the proofs.
- The distribution type is verified as a Markov category, so the abstract theorems of categorical probability apply to this concrete constructive instance.
Reading between the lines
- If the generalized interchange is indeed consistent, a similar structural mismatch is likely to appear in any free-algebra setting where a conditioning-like operation changes weights asymmetrically; one should expect a Bayes-shaped medial law whenever the operation is not weight-symmetric.
- The paper's structural-witness formulation of intersection suggests a design pattern: replace positivity hypotheses by inhabitation witnesses and factor kernels by Sigma-types; this could be reused to formalize identifiability in structural causal models beyond the finite DAGs covered here.
- A natural next step is to formalize the completeness direction of d-separation by constructively building distributions that separate every non-d-separated triple on finite types, turning soundness into a full equivalence.
- Because the new constructor is a primitive of the type, every future eliminator on the distribution type must carry a Bayes-interchange coherence case; this raises the cost of extending the HIT and suggests packaging the generalized interchange as an abstract interface.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents a Cubical Agda formalisation of finite distributions as a higher inductive type (FDist), with conditional independence represented as cubical paths, the semi-graphoid axioms, a constructive reduction of intersection to contraction, kernel-form Pearl do-calculus rules, Bayesian conditioning on a full-support fragment, and a claimed soundness proof of Pearl's d-separation for arbitrary finite DAGs. The central conceptual claim is that the standard convex-algebra interchange axiom is 'provably too weak' to support full Bayesian conditioning, and that a new generalized interchange path constructor, mix-bayes-interchange, is the minimal necessary strengthening.
Significance. If the central claims hold, the development would be a substantial machine-checked contribution: a verified probability monad with conditioning, graphoid axioms, do-calculus, Markov-category instance, and d-separation soundness, with zero postulates above an ordered-field interface. The paper ships a large Agda artifact with no termination overrides and explicitly named files, and the machine-checked derivation of ordinary interchange from barycentric axioms is a genuine strength. However, the main novel claim about the interchange axiom is not established as stated: no formal independence or underivability proof is given, and the generalized identity appears to be a derived theorem of the existing barycentric axioms rather than a new primitive. This affects the headline contribution and requires substantial revision.
major comments (4)
- [Section 7; Abstract] The paper's headline claim that the standard interchange axiom is 'provably too weak' to support Bayesian conditioning is not supported by any formal independence result. Section 7 only observes that the standard path constructor cannot be applied directly when the two inner weights differ. Since Section 2 states that ordinary interchange is derivable from skew-commutativity, boundary laws, and skew-associativity (BarycentricMedial.agda), and the displayed generalized interchange is the standard re-association of a four-leaf convex combination, the generalized identity should be derivable from the existing axioms. The assertion 'no amount of further weight algebra alone closes the gap' is therefore unproven and, on its face, contradicted by the paper's own derivation machinery. The authors must either provide a countermodel or formal independence proof, or retract the 'too weak' claim an
- [Section 7, mix-bayes-interchange signature] The displayed constructor mix-bayes-interchange quantifies over all p q1 q2 : Weight with no positivity or domain side conditions. Its right-hand side uses bayesW p q1 q2 = (p*q1)/(p*q1+(1-p)*q2), which has zero denominator at boundary points such as q1=q2=0. The paper's abstract /w is 'unspecified at zero-divisor', so the RHS is not a well-formed term for those inputs unless a totalisation is assumed and shown to make the equation valid. Either add explicit Pos preconditions to the constructor (and adapt the HIT), or prove that the boundary laws make the undefined subterms irrelevant. As written, the axiom's well-formedness and validity are not established.
- [Abstract; Section 11 vs Section 10] The abstract and Section 11 claim d-separation soundness for 'arbitrary n-vertex finite directed acyclic graphs' in both interventional and Bayesian forms. Section 10, however, details only the three elementary patterns (chain, fork, collider), with the general n-vertex result asserted through references to files such as 'n-vertex absorption and DAG-aware closures' without a theorem statement or proof sketch in the text. This is a headline result, so the formal statement and a clear reduction argument for arbitrary DAGs must be included, or the claim must be narrowed to the elementary patterns actually demonstrated.
- [Section 7, coherence discharge] The interchange coherence proof depends on three weight identities (bayesW-cond-outer-convex, bayesW-cond-left-convex, bayesW-cond-right-convex), described only as derived theorems proved by 'multiplying through by the appropriate Z-denominator'. Since the soundness footprint is advertised as zero postulates, at least one representative derivation should be given in the text, or the exact Agda lemma and its location should be cited. Without this, the reader cannot verify that no additional hidden assumptions enter the central coherence argument.
minor comments (4)
- [Title] The title contains spacing typos: 'FORMALISA TION', 'BA YESIAN', 'D-SEP ARA TION'.
- [Section 2] The sentence 'The only generators of FDist not derivable from the barycentric axioms are thus mix-assoc and mix-bayes-interchange' refers to mix-bayes-interchange before it is defined in Section 7. Add a forward reference or move the remark.
- [Section 7] The paper says the previously-postulated identity '+r-bound-convex is false in general' and was deleted. It would be helpful to state explicitly what the false identity was and why it was unsound, since this is part of the soundness footprint narrative.
- [Section 8] The text says the monad laws are proved 'by case-splitting on each of FDist’s ten constructors'. Counting pure, mix, six path constructors, the new bayes-interchange, and trunc gives ten, but the count may confuse readers because the new constructor was introduced only in Section 7. Clarify that the count includes the generalized interchange.
Circularity Check
The central 'standard interchange too weak' finding is discharged by a newly added constructor whose equation is exactly the post-conditioning coherence, so the resolution reduces to its own input by construction.
-
fitted input called prediction
[Section 7, 'The generalized interchange axiom' and 'Discharging the interchange coherence' (mix-bayes-interchange; bayes-cond-mix-interchange-coherent)]
"The minimal stronger axiom that resolves the mismatch is a generalized interchange allowing the inner weights to differ. We add a new path constructor to the HIT FDist ... mix-bayes-interchange ... Step one applies mix-bayes-interchange to the embedded LHS, using the conditioned weights bayesWq ma mc and bayesWq mb md as the two distinct inner weights."
The interchange coherence theorem is proved by a direct instantiation of the newly introduced mix-bayes-interchange constructor, whose equation is exactly the post-conditioning 4-leaf equality with two distinct inner Bayes weights. The 'minimal generalisation' is therefore defined to be the desired coherence, and the discharge is an application of that axiom by construction. The paper's central claim that the standard interchange is 'provably too weak' is not derived from the six original FDist constructors: no derivation of mix-bayes-interchange from mix-assoc/mix-comm/boundary laws and no independence countermodel is supplied. The degenerate-case result proves only the generalized axiom implies the standard one, not the required standard-implies-generalized direction.
full rationale
The paper contains no self-citations or imported uniqueness theorems, and most of the formalized mathematics (monad laws, semi-graphoid axioms, do-calculus rules, Markov-category instance, d-separation soundness) is derived from the stated HIT constructors and does not reduce to its inputs. The flagged circularity is localized to the paper's headline interchange observation. The post-conditioning interchange coherence is discharged by the purpose-built mix-bayes-interchange path constructor; that constructor is exactly the equation needed to make the coherence true, so the 'minimal generalisation' is an input rather than a derived first-principles result. The paper asserts without proof that 'no amount of further weight algebra alone closes the gap,' but no independence proof or countermodel is given, and the accompanying BarycentricMedial derivation shows the ordinary interchange is itself derived from skew-associativity, making the underivability claim particularly sensitive. This is a partial circularity in the central 'too weak' claim, while the surrounding formalization remains independently valuable and machine-checked.
Assumptions & free parameters
assumptions (5)
- standard math Cubical type theory with univalence and higher inductive types, as implemented in Cubical Agda and the cubical library, is consistent.
- domain assumption The abstract Weight signature is an ordered field with decidable order, complement, and a division operator with a defensive /w contract, instantiated at Q.
- domain assumption The full-support predicate and positivity closure laws for abstract Weight are postulated, with proofs deferred to Q.
- ad hoc to paper The mix-bayes-interchange path constructor is a valid equality in the augmented FDist HIT, with a consistency model at the rational simplex.
- standard math The universal-algebra construction of free convex algebras provides consistency for the augmented HIT.
invented entities (1)
-
mix-bayes-interchange path constructor / augmented FDist HIT
independent evidence
Cite this review
Pith. "Pith review of A cubical formalisation of conditional independence, Bayesian conditioning, and Pearl's d-separation soundness." pith.science (2026). https://pith.science/paper/AJBS4QLT
@misc{pith2026260620351,
author = {Pith},
title = {Pith review of: A cubical formalisation of conditional independence, Bayesian conditioning, and Pearl's d-separation soundness},
year = {2026},
howpublished = {\url{https://pith.science/paper/AJBS4QLT}},
note = {Machine review of arXiv:2606.20351}
}
abstract
The standard convex-algebra interchange axiom, common to probability-monad formalisations since Stone, is provably too weak to support full Bayesian conditioning. We make this precise in Cubical Agda: finite distributions as a higher inductive type, conditional independence as a cubical path between kernels, recursive Bayesian conditioning as a total function on a full-support fragment. Lifting conditioning to the full HIT exposes a structural mismatch -- the two halves of the rearranged 4-leaf mix carry distinct Bayesian weights related by Bayes' formula, not the single shared inner weight the standard axiom provides. We exhibit the minimal generalisation that resolves this and prove the standard form is the degenerate case where the two inner weights coincide. Around this observation we verify the algebraic context constructively, with zero postulates above an abstract ordered-field interface: bind commutativity, the four semi-graphoid axioms, intersection (reduced to contraction via structural $\Sigma$-witnesses, without positivity), Pearl's do-calculus Rules~1, 2, and~3 in kernel form, finite-type Bayesian conditioning, and the soundness of Pearl's d-separation theorem on arbitrary finite directed acyclic graphs (DAGs) -- in interventional form for multi-element $X$, $Y$, $Z$, and in Bayesian form for the elementary patterns. The probability monad is also verified as a Markov category; the abstract interface discharges at $\mathbb{Q}$.
Forward citations
Cited by 2 Pith papers
-
A cubical formalisation of topos causal models: intervention, forcing, and a contextuality obstruction
A machine-checked Cubical Agda formalisation of topos causal models proves the intervention classifier, sheaf gluing, forcing clauses, and a corrected Lawvere-Tierney do-calculus, and adds a verified contextuality obs...
-
A cubical formalisation of topos causal models: intervention, forcing, and a contextuality obstruction
A Cubical Agda formalisation verifies the classifier, forcing and modal do-calculus of topos causal models, and adds a machine-checked contextuality obstruction for pairwise-consistent local models.
Reference graph
Works this paper leans on
-
[1]
Formal adventures in convex and conical spaces
[AGS20a] Reynald Affeldt, Jacques Garrigue, and Takafumi Saikawa. Formal adventures in convex and conical spaces. In Christoph Benzm¨ uller and Bruce Miller, editors,Intelligent Computer Mathe- matics: 13th International Conference (CICM 2020), volume 12236 ofLecture Notes in Computer Science, pages 23–38. Springer, 2020.doi:10.1007/978-3-030-53518-6\_2. ...
-
[5]
doi:10.1017/S0960129518000488. [Dob06] Ernst-Erich Doberkat. Eilenberg–Moore algebras for stochastic relations.Information and Com- putation, 204(12):1756–1781, 2006.doi:10.1016/j.ic.2006.09.001. [FGPR23] Tobias Fritz, Tom´ aˇ s Gonda, Paolo Perrone, and Eigil Fjeldgren Rischel. Representable Markov cat- egories and comparison of statistical experiments i...
arXiv 2006
-
[6]
doi:10.1016/j.aim.2020. 107239. 26 K. SARGSYAN [Gir82] Mich` ele Giry. A categorical approach to probability theory. InCategorical Aspects of Topology and Analysis, volume 915 ofLecture Notes in Mathematics, pages 68–85. Springer,
-
[13]
[VMA19] Andrea Vezzosi, Anders M¨ ortberg, and Andreas Abel
doi:10.1145/3290349. [VMA19] Andrea Vezzosi, Anders M¨ ortberg, and Andreas Abel. Cubical Agda: A dependently typed programming language with univalence and higher inductive types. InProceedings of the ACM on Programming Languages (ICFP), volume 3, pages 87:1–87:29, 2019.doi:10.1145/3341691. This work is licensed under the Creative Commons Attribution Lic...
doi:10.1145/3290349 2019
-
[1974]
[SK20] Amit Sharma and Emre Kıcıman. DoWhy: An end-to-end library for causal inference.arXiv preprint arXiv:2011.04216, 2020.arXiv:2011.04216. [SMZ+25] Philipp Jan Andries Stassen, Rasmus Ejlers Møgelberg, Maaike Zwart, Alejandro Aguirre, and Lars Birkedal. Modelling recursion and probabilistic choice in guarded type theory.Proceedings of the ACM on Progr...
arXiv 2011
-
[1982]
[GVP90] Dan Geiger, Thomas Verma, and Judea Pearl
doi: 10.1007/BFb0092872. [GVP90] Dan Geiger, Thomas Verma, and Judea Pearl. Identifying independence in Bayesian networks. Networks, 20(5):507–534, 1990.doi:10.1002/net.3230200504. [H¨17] Johannes H¨ olzl. Markov processes in Isabelle/HOL. InProceedings of the 6th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP), pages 100–111. ACM,
-
[2005]
[SYW+16] Sam Staton, Hongseok Yang, Frank Wood, Chris Heunen, and Ohad Kammar. Semantics for probabilistic programming: Higher-order functions, continuous distributions, and soft constraints. InProceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 525–534. ACM, 2016.doi:10.1145/2933575.2935313. [VKS19] Matthijs V´ ak...
arXiv 2016
-
[2008]
doi:10.1016/j.topol. 2008.07.002. [KW21] Donnacha Ois ´ ın Kidney and Nicolas Wu. Algebras for weighted search.Proceedings of the ACM on Programming Languages, 5(ICFP):72:1–72:30, 2021.doi:10.1145/3473577. [Mah25a] Sridhar Mahadevan. Intuitionistic j-do-calculus in topos causal models.arXiv preprint arXiv:2510.17944,
arXiv 2008
Show all 13 references
-
[2017]
[HJ23] Macartan Humphreys and Alan M
doi:10.1145/3018610.3018628. [HJ23] Macartan Humphreys and Alan M. Jacobs.Integrated Inferences: Causal Models for Qualitative and Mixed-Method Research. Cambridge University Press, 2023.doi:10.1017/9781316718636. [HKSY17] Chris Heunen, Ohad Kammar, Sam Staton, and Hongseok Ya...
2023
-
[2018]
[CJ19] Kenta Cho and Bart Jacobs
doi:10.4230/LIPIcs.TYPES.2015.5. [CJ19] Kenta Cho and Bart Jacobs. Disintegration and Bayesian inversion via string diagrams.Mathe- matical Structures in Computer Science, 29(7):938–971,
2015 doi
-
[2019]
Gordon, and Marcin Szymczak
[BDGS16] Johannes Borgstr¨ om, Ugo Dal Lago, Andrew D. Gordon, and Marcin Szymczak. A lambda- calculus foundation for universal probabilistic programming. InProceedings of the 21st ACM SIGPLAN International Conference on Functional Programming (ICFP), pages 33–46. ACM, 2016.do...
2016
-
[2020]
37.3\_79
doi:10.11309/jssst. 37.3\_79. [BCJ+19] Eli Bingham, Jonathan P. Chen, Martin Jankowiak, Fritz Obermeyer, Neeraj Pradhan, Theofanis Karaletsos, Rohit Singh, Paul Szerlip, Paul Horsfall, and Noah D. Goodman. Pyro: Deep universal probabilistic programming.Journal of Machine Learn...
-
[2025]
Universal causal inference in a topos
[Mah25b] Sridhar Mahadevan. Universal causal inference in a topos. InAdvances in Neural Information Processing Systems 39 (NeurIPS 2025),
2025
Reviewed August 2, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.