Causal Structural Equation Research Vault (At1uri/causal-structural-equation-vault)
A cryptographic research repository containing foundational algorithms for Structural Causal Models (SCMs), Pearl's d-Separation Theorem, Backdoor Adjustment Estimators, and Counterfactual Abduction-Action-Prediction Solvers.
Mathematical Foundations
1. Pearl's Causal Hierarchy (PCH)
| Tier | Formulation | Operational Semantics | Example Query |
|---|---|---|---|
| Rung 1: Association | $P(Y \mid X)$ | Seeing, Observing correlations | "What is the expected wage given education level $X$?" |
| Rung 2: Intervention | $P(Y \mid \text{do}(X))$ | Doing, Graph surgery | "If we mandatorily raise education $X$, what is the effect on wage?" |
| Rung 3: Counterfactual | $P(Y_{X=x'} \mid X=x, Y=y)$ | Imagining, Retrospection | "Given Alice had education $X=0$ and wage $Y=1$, what would her wage have been if she had education $X=1$?" |
2. d-Separation Criterion (Conditional Independence in DAGs)
A path $p$ is blocked (d-separated) by conditioning set $Z$ iff:
- $p$ contains a chain ($A \to B \to C$) or fork ($A \leftarrow B \to C$) such that $B \in Z$.
- $p$ contains a collider ($A \to B \leftarrow C$) such that neither $B$ nor any descendant of $B$ is in $Z$.
3. Backdoor Adjustment Formula
If a set of variables $\mathbf{Z}$ satisfies the Backdoor Criterion relative to treatment $X$ and outcome $Y$:
- No node in $\mathbf{Z}$ is a descendant of $X$.
- $\mathbf{Z}$ blocks every backdoor path between $X$ and $Y$ (paths entering $X$).
Then the interventional distribution is identifiable from observational data:
Vault Contents & Modules
vault_causal/
βββ MANIFEST.json # Cryptographic SHA-256 integrity manifest
βββ README.md # Mathematical foundations and API documentation
βββ src/
β βββ causal_dag.py # Graph representation, d-separation engine, backdoor identification
β βββ scm_engine.py # Topological SCM solver, graph surgery & counterfactuals
β βββ treatment_effects.py # ATE graph surgery evaluator & OLS backdoor adjustment
βββ benchmarks/
βββ eval_causal_invariance.py # Verification suite (d-sep junctions, Simpson's Paradox, consistency)
Verification & Execution
Run the research verification benchmark:
python benchmarks/eval_causal_invariance.py
Verified Benchmark Outputs:
- d-Separation Junctions: Correctly blocks chains/forks and unblocks colliders.
- Simpson's Paradox Resolution: True ATE $+0.8517$ recovered despite naive observational slope of $-0.6406$.
- Counterfactual Consistency Axiom: $Y_{X=x^{\text{obs}}}(u) \equiv y^{\text{obs}}$ to machine precision ($0.00 \times 10^0$).
Developed by Ramprasad Atluri (At1uri).
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support