Joint Modeling for Stochastic Interventions
Implementation & benchmark of arXiv:2609.03697 — Symmetries and Causality: Causal Effect Identification Beyond IID Data
Source paper: Symmetries and Causality: Causal Effect Identification Beyond IID Data arXiv:2609.03697 ⓘ · analyzed Sep 4, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
When an intervention variable is sampled from a distribution rather than fixed to a point, train a predictor on the full joint distribution instead of replacing intervention with conditioning on its realized value. This prevents selection bias caused by conditioning on mediators or downstream observations that reveal information about the random intervention.
Formulas
Mathematical statement
The paper explicitly distinguishes a singular intervention, which takes one fixed value, from a stochastic intervention such as \(\mathcal{X}_{\mathrm{do}}\sim\mathcal{N}(0,1)\). It states that the replacement \(P(\mathcal{Y}\mid\mathrm{do}(\mathcal{X}=x),\mathcal{M}=m)=P(\mathcal{Y}\mid\mathrm{do}(\mathcal{X}=x,\mathcal{M}=m))\) is valid only when \(P(\mathcal{X}_{\mathrm{do}})\) is singular; for a random intervention, conditioning on \(M=m\) generally selects a nonrepresentative subset of intervention values. The required target is therefore the joint or appropriately marginalized law \(P_{\theta}(Y,M)\), where \(\theta\) parameterizes the intervention mechanism. For a neural model, let \(q_{\theta}(x_{\mathrm{do}})\) be the intervention distribution, \(p_{\phi}(m\mid x_{\mathrm{do}},c)\) the mediator model, and \(p_{\phi}(y\mid x_{\mathrm{do}},m,c)\) the outcome model, with context \(c\). The stochastic-intervention prediction is the integral \(p_{\phi,\theta}(y\mid c)=\int q_{\theta}(x_{\mathrm{do}})\int p_{\phi}(m\mid x_{\mathrm{do}},c)p_{\phi}(y\mid x_{\mathrm{do}},m,c)\,dm\,dx_{\mathrm{do}}\), not a predictor trained only on \(p(y\mid m,c)\).
Implementation notes
Integrate this into a world model, offline-RL transition model, or causal representation module whenever actions, perturbations, or latent interventions are stochastic. Add three heads sharing an encoder of context \(c\): an intervention-density head \(q_{\theta}(x_{\mathrm{do}}\mid c)\), a mediator head \(p_{\phi}(m\mid x_{\mathrm{do}},c)\), and an outcome head \(p_{\phi}(y\mid x_{\mathrm{do}},m,c)\). For observed intervention samples, train the joint negative log-likelihood. For prediction under a desired intervention policy, draw \(S\) samples \(x_{s}\sim q_{\theta}\), then draw \(m_{s}\sim p_{\phi}(m\mid x_{s},c)\), and average outcome distributions or samples: \(\hat p(y\mid c)=S^{-1}\sum_{s}p_{\phi}(y\mid x_{s},m_{s},c)\). Pseudocode: encode \(c\); sample or observe \(x_{\mathrm{do}}\); compute mediator and outcome log likelihoods; optimize their sum jointly; at evaluation, Monte Carlo marginalize over the intervention and mediator rather than conditioning on a mediator value alone. The paper contributes the singular-versus-nonsingular distinction; estimate the intervention density empirically with a normalizing-flow or Gaussian head and test calibration using held-out intervention samples. The first cheap experiment should use a synthetic SCM with \(X_{\mathrm{do}}\sim\mathcal{N}(0,1)\), \(M=X_{\mathrm{do}}+U\), and \(Y=M+X_{\mathrm{do}}+V\), where \(U,V\) are independent Gaussian noises. Compare the proposed joint model against a baseline regressor trained on \((M,Y)\) that treats intervention as fixed or ignores it. Evaluate expected outcome under shifted intervention variance and under mediator selection \(M\approx m\). Success is lower interventional negative log likelihood, calibrated uncertainty, and reduced bias in estimated \(E[Y]\) under intervention-distribution shift.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Inconclusive
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a synthetic SCM MVP with an analytic sanity check and neural joint-vs-mediator-only comparison. The math check reproduced mediator selection bias: estimated E[Y|M≈1] shifted from 1.50 under intervention variance 1 to 1.76 under variance 4, close to the analytic 1.8. On shifted-intervention test data, the joint model achieved NLL 1.647 versus 1.968 for the baseline, a 0.320 improvement; the effect is promising, though the experiment is small and the marginal prediction evaluation is limited.
- Agent confidence
- 8/10
- Baseline
- Shifted sigma=2 outcome NLL: 1.9675; mediator-only predicted selected-M mean: 1.6589
- Idea
- Shifted sigma=2 outcome NLL: 1.6475; joint predicted selected-M mean: 2.0122; sampled marginal Y variance: 13.315 versus analytic target variance 18
Limitations: Only one fixed seed and one synthetic SCM were tested. The reported NLL uses observed shifted intervention values rather than a full held-out marginal likelihood; the learned q intervention head was not separately calibrated, and the sampled marginal variance was under-estimated relative to the analytic value. No repeated trials, richer contexts, categorical outcomes, or real offline-RL/world-model data were evaluated.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2609.03697)
Ahead of the baseline (−8.3%) but not statistically significant (p=0.4183, wins 6 / 8 paired seeds).
- Benchmark
- Stochastic_intervention_scm
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 2.4147
- Idea mean
- 2.2138
- Effect (Δ)
- -0.2009 (−8.3%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.4183 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±22.3%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The custom registered track is synthetic rather than a real-world dataset. The official runner uses a custom joint-NLL loop for the idea because the method changes the loss, while the baseline uses bench.train_model; the shared outcome architecture and training budget are matched, but the joint model has additional q and mediator heads required by the idea. Only one registered custom track and one base architecture were tested.
How to run: python3 official_bench_run.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
The registered custom track stochastic_intervention_scm was accepted and evaluated through the official bench APIs. The joint model achieved mean MSE 2.2138 versus the tuned baseline's 2.4147, but the paired delta of -0.2009 had p=0.41835, so the official verdict is no significant win. The trained-model mechanism signature was confirmed, with selected-mediator prediction error 0.0646 for the idea versus 0.1293 for baseline.
- Baseline
- mlp_tiny, tuned lr=0.003; sweep means lr=0.003: 2.4976, lr=0.01: 2.5648, lr=0.03: 2.6781; full 8-seed mean MSE 2.4147
- Comparison
- delta_mean=-0.2009, idea_wins=6/8, permutation p_value=0.41835, verdict=no significant win
- Idea
- Joint model, best lr=0.03; sweep means lr=0.003: 7.9196, lr=0.01: 3.1929, lr=0.03: 2.2138; full 8-seed mean MSE 2.2138
- Mechanism signature
- baseline selected-M absolute error=0.1293; idea selected-M absolute error=0.0646; confirmed=true
Benchmark result
Ahead of the baseline (−8.3%) but not statistically significant (p=0.4183, wins 6 / 8 paired seeds).
- Benchmark
- Stochastic_intervention_scm
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 2.4147
- Idea mean
- 2.2138
- Effect (Δ)
- -0.2009 (−8.3%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.4183 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±22.3%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The custom registered track is synthetic rather than a real-world dataset. The official runner uses a custom joint-NLL loop for the idea because the method changes the loss, while the baseline uses bench.train_model; the shared outcome architecture and training budget are matched, but the joint model has additional q and mediator heads required by the idea. Only one registered custom track and one base architecture were tested.
How to run: python3 official_bench_run.py
Artifacts
- bench_report.json 3.4 KB View Raw
- custom_bench_results.json 5.1 KB View Raw
- custom_stochastic_intervention_track.py 1.3 KB View Raw
- experiment.py 4.9 KB View Raw
- official_bench_run.py 5.6 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-09-04T160954.md 5.6 KB View
- results.json 0.7 KB View Raw
- run_custom_bench.py 6.5 KB View Raw