MOCA: A Transformer-based Modular Causal Inference Framework with One-way Cross-attention and Cutting Feedback
About
Causal effect estimation from observational data requires careful adjustment for confounding. Classical estimators such as inverse probability weighting and augmented inverse probability weighting are effective under favorable model specification, but may become unstable when treatment assignment and outcome mechanisms are complex, non-linear, and high-dimensional. Machine learning and representation learning approaches improve flexibility, yet joint training can allow outcome-related information to influence treatment-side representations, which is undesirable from a causal perspective. We propose MOCA (Modular One-way Causal Attention), a transformer-based framework that separates treatment and outcome modeling through a modular design, and performs confounder adjustment using a one-way attention mechanism. A cutting-feedback strategy, implemented via gradient detachment, prevents the outcome loss from updating the treatment module. This design preserves directional information flow while retaining the representational power of transformer architectures for causal inference. Across multiple simulated scenarios, including linear, nonlinear, heavy-tailed, hidden confounding, and high-dimensional settings, MOCA shows competitive or improved performance relative to IPW, AIPW, X-learner, TARNet, and DragonNet. We further illustrate the method on the Infant Health and Development Program dataset and the Dehejia-Wahba dataset as real-world benchmarks. These results suggest that modular attention with one-way information flow provides a promising and interpretable direction for causal inference with modern deep learning models.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Average Treatment Effect Estimation | Simulation Linear scenario sample size 100 (test) | ATE Bias (Mean)0.001 | 14 | |
| Average Treatment Effect Estimation | Simulation Non-linear scenario sample size 100 (test) | ATE Bias (Mean)-0.166 | 7 | |
| Average Treatment Effect Estimation | Simulation Hidden confounding scenario sample size 100 (test) | ATE Bias (Mean)1.687 | 7 | |
| Average Treatment Effect Estimation | Simulation t distribution scenario sample size 100 (test) | ATE Bias Mean0.094 | 7 | |
| Average Treatment Effect Estimation | Simulation Non-linear (test) | ATE Bias (Mean)-0.009 | 7 | |
| Average Treatment Effect Estimation | Simulation t distribution (test) | ATE Bias (Mean)0.087 | 7 | |
| Average Treatment Effect Estimation | Simulation Hidden confounding (test) | ATE Bias (Mean)2.369 | 7 | |
| Treatment Effect Estimation | IHDP Data | ATE3.961 | 6 | |
| Treatment Effect Estimation | DW Data | Average Treatment Effect (ATE)852.5 | 6 | |
| CATE estimation | Simulation Hidden confounding MultiU (size 1000) (test) | CATE Bias Mean2.169 | 5 |