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:

  1. $p$ contains a chain ($A \to B \to C$) or fork ($A \leftarrow B \to C$) such that $B \in Z$.
  2. $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$:

  1. No node in $\mathbf{Z}$ is a descendant of $X$.
  2. $\mathbf{Z}$ blocks every backdoor path between $X$ and $Y$ (paths entering $X$).

Then the interventional distribution is identifiable from observational data: P(Y=y∣do(X=x))=βˆ‘zP(Y=y∣X=x,Z=z)P(Z=z)P(Y = y \mid \text{do}(X = x)) = \sum_{\mathbf{z}} P(Y = y \mid X = x, \mathbf{Z} = \mathbf{z}) P(\mathbf{Z} = \mathbf{z})


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).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support