Papers
Topics
Authors
Recent
Search
2000 character limit reached

Causality and Semantic Separation

Published 23 Apr 2026 in cs.PL | (2604.22041v1)

Abstract: The design of scientific experiments deserves its own variation of formal verification to catch cases where scientists made important mistakes, such as forgetting to take confounding variables into account. One of the most fundamental underpinnings of science is causality, or what it means for interventions in the world to cause other outcomes, as formalized by computer scientists like Judea Pearl. However, these ideas had not previously been made rigorous to the standards of the programming-languages community, where one expects a (syntactic) program analysis to be proved sound with respect to a natural semantics. In the domain of causality, as the relevant "program analysis," we focus on $d$-separation, a classic condition on graphs that can be used to decide when the design of an experiment controls for sufficiently many confounding variables, even though the reason that this condition works is often unintuitive. Our central result (mechanized in Rocq) is that $d$-separation exactly coincides with a novel semantic definition inspired by noninterference from the theory of security. This characterization provides a structural semantic foundation for $d$-separation and helps explain why the graph-theoretic condition is correct, independently of probabilistic assumptions. For each given automated test on the quality of an experiment design, our theorem justifies an associated method for falsifying the world-modeling hypothesis behind the experiment.

Summary

  • The paper establishes a formal equivalence between d‐separation and semantic noninterference in structural causal models.
  • It introduces a function-based semantics with repair sequences, mechanizing causal interventions and deterministic evaluations.
  • The framework justifies automated experimental design by linking structural interference with violations of d‐separation.

Formal Semantics for Causal Inference: A Structural Account of dd-Separation

Introduction and Motivation

The paper "Causality and Semantic Separation" (2604.22041) presents a rigorous semantic foundation for dd-separation in causal models, responding to the persistent need for formally verified experiment design analogous to correctness properties in programs. While dd-separation is widely used as a tractable graph-theoretic criterion for conditional independence in structural causal models (SCMs), its justifications have remained primarily in terms of algebraic probabilistic properties or informal reasoning. This work establishes a compositional, function-based semantics in the style of programming languages, providing exact equivalence between dd-separation and semantic noninterference properties independent of probabilistic or algebraic accidents.

Background: Causality, SCMs, and dd-Separation

Traditional statistical experimental design distinguishes various types of validity and relies heavily on both graphical (e.g., backdoor, dd-separation) and probabilistic (e.g., conditional independence) criteria for identifying valid causal effects. SCMs present the structure as DAGs where edges encode direct causal relationships and interventions are formalized with the do-operator. The graphical dd-separation condition allows experimenters to read off conditional independence relations from DAG structure without repeatedly performing probabilistic algebra. Pearl's results show that dd-separation implies conditional independence under all distributions Markov to the DAG, but do not directly explain the structural semantics underlying the notion.

Function-Based Semantics and Semantic Separation

This paper reconceptualizes causal models as structural, deterministic systems, where each node is given by an unknown deterministic function of its parents and a (potentially latent) individual-specific error term. The values of all nodes in a DAG, with attached node functions and an assignment for the error terms, can be evaluated in topological order. Conditioning on a variable set ZZ is interpreted as explicitly fixing the values for those nodes, yielding a family of possible "worlds" generated by variable assignments and error terms, rather than relying on probabilistic independence.

The semantic separation property specifies that for variables uu and dd0, given any assignment of error terms constrained to maintain values for dd1, altering dd2---and repairing any variables in dd3 that might be inadvertently modified by this change---has no effect on dd4, or vice versa. This notion is a direct structural, nonprobabilistic analogue to noninterference in information-flow security: information about dd5 cannot reach dd6 if the only way would be through variables in dd7 whose values are externally fixed.

The formal definition introduces the concepts of:

  • Unblocked ancestors: ancestors of a node for which there exists a path not passing through dd8.
  • Propagation/repair sequence: a succession of minimal changes to ancestor error terms, ensuring the change to dd9 is realized, and then repair steps to the unblocked ancestors of any violated conditioned variables in dd0, recursively, finally restoring conditioning for dd1. Semantic separation holds if for all such sequences, dd2 is unchanged.

Central Theorem: Equivalence of dd3-Separation and Semantic Separation

The main theorem is that, for any DAG G, two nodes dd4 and dd5 are dd6-separated given dd7 if and only if they are semantically separated in the above sense for all node functions and all conditioning assignments. This equivalence is proved in both directions:

  • Forward (from dd8-connectedness to semantic noninterference): A dd9-connected path allows explicit function construction so that variation in dd0 propagates to dd1 under admissible repair sequences, violating semantic separation.
  • Reverse (from semantic interference to dd2-connectedness): If one can vary dd3 and cause a change in dd4 (with repairs to dd5), then there must exist a dd6-connecting path encoding the structural propagation witnessed in the semantic construction.

The proof closes the explanatory gap between the syntactic rules of path blocking in dd7-separation and the functional, information-flow based semantics of interventions and independence.

Implications and Applications

This result provides several crucial implications for causal inference, experiment design, and program analysis analogies:

  • Justification of dd8-Separation's Soundness and Completeness: dd9-separation is proven to be not just a sufficient, but the structurally exact criterion for the impossibility of influencing dd0 by dd1 without passing through dd2 (under any compatible deterministic functional assignment).
  • Automated Falsification and Test Oracles: The semantic account supports the development of automated experiment design checks and test oracles: if, after controlling for dd3, a change in dd4 can change dd5, the DAG is falsified; if the DAG is dd6-separated, no such falsification is possible by any such experiment.
  • Layers of Experimental Reasoning: The explicit, deterministically mechanizable semantics provide a bridge from deterministic interventions to probabilistic and statistical experimental analysis, laying foundations for machine-verified experimental validity.
  • Software for Mechanized Causal Inference: The entire framework, including the definitions and main theorem, is mechanized in Rocq (a Coq-like proof assistant), ensuring correctness and enabling downstream formal experiments and tool support.

Relation to Prior Work

This work generalizes information-flow noninterference semantics from security to the analysis of experiment design and causality, integrating abstract interpretation and program verification concepts. It advances beyond previous justifications of dd7-separation (e.g., those resting on probability factorization or algebraic conditional independence) to a deterministic, structure-based account. It also strengthens the theoretical foundations underlying practical causal tools (PlanOut, Dagitty, Tisane) that rely on graphical criteria but lack semantically justified, formally verified underpinnings.

Limitations and Future Directions

While achieving a structural deterministic foundation is a substantial conceptual advance, the framework does not directly handle probabilistic interventions, randomness in experimental assignment, or statistical hypothesis testing. The semantics assume precise variable repair and arbitrary functional forms for node dependencies, whereas in empirical work, at least some probabilistic (and possibly parametric) structure is inevitable.

Future directions highlighted include:

  • Probabilistic and statistical extensions to the deterministically verified stack, such as connections with the potential outcomes model, numerical estimands, and hypothesis testing.
  • Scalable mechanization for larger classes of experimental or observational setups, including imperfect or approximate interventions.
  • Domain restrictions on node functions, reflecting scientific constraints such as linearity or specific functional forms, to enable tighter learning and falsification.

Conclusion

The paper establishes an exact, mechanized equivalence between the canonical syntactic criterion for conditional independence (dd8-separation) and a semantic, structural notion based on noninterference, independent of probability. This lays the formal groundwork for verified causal inference, automated experimental design validity checking, and compositionally justified causal reasoning in scientific and AI domains (2604.22041). The approach promises richer integration of program semantics, formal verification, and causal experiment design, with substantial implications for future AI development, formalized statistical science, and machine-verified scientific reasoning.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 5 likes about this paper.