Towards Causal Foundation Model: on Duality between Causal Inference and Attention

Jiaqi Zhang, Joel Jennings, Agrin Hilmkil, Nick Pawlowski, Cheng Zhang +1 more
10/1/2023
cs.LGcs.AIstat.ME

Official code: microsoft/causica (533 stars, MIT, last commit 2024-12-16).

Abstract

Foundation models have brought changes to the landscape of machine learning, demonstrating sparks of human-level intelligence across a diverse array of tasks. However, a gap persists in complex tasks such as causal inference, primarily due to challenges associated with intricate reasoning steps and high numerical precision requirements. In this work, we take a first step towards building causally-aware foundation models for treatment effect estimations. We propose a novel, theoretically justified method called Causal Inference with Attention (CInA), which utilizes multiple unlabeled datasets to perform self-supervised causal learning, and subsequently enables zero-shot causal inference on unseen tasks with new data. This is based on our theoretical results that demonstrate the primal-dual connection between optimal covariate balancing and self-attention, facilitating zero-shot causal inference through the final layer of a trained transformer-type architecture. We demonstrate empirically that CInA effectively generalizes to out-of-distribution datasets and various real-world datasets, matching or even surpassing traditional per-dataset methodologies. These results provide compelling evidence that our method has the potential to serve as a stepping stone for the development of causal foundation models.

View on arXivView PDF

Code Implementations(1)

microsoft/causicaOfficial100%
MIT
53368Shell, PythonJun 14, 20221 years agoMIT

Cite this paper

@article{zhang2023towards,
  title  = {Towards Causal Foundation Model: on Duality between Causal Inference and Attention},
  author = {Jiaqi Zhang and Joel Jennings and Agrin Hilmkil and Nick Pawlowski and Cheng Zhang and Chao Ma},
  year   = {2023},
  eprint = {2310.00809},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.00809v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.00809.svg)](https://codeofpaper.com/paper/2310.00809)

Discussion