Adapting Text Embeddings for Causal Inference

Victor Veitch, Dhanya Sridhar, David M. Blei
5/29/2019
22 citations
cs.LGcs.CLstat.ML

Official code: vveitch/causal-text-embeddings-tf2 (73 stars, Python, last commit 2023-11-05). Most starred: blei-lab/causal-text-embeddings, a community implementation (125 stars, Python, MIT, last commit 2020-09-23, 1.7× the official stars). 1 more implementation below.

Abstract

Does adding a theorem to a paper affect its chance of acceptance? Does labeling a post with the author's gender affect the post popularity?

Show full abstract

This paper develops a method to estimate such causal effects from observational text data, adjusting for confounding features of the text such as the subject or writing quality. We assume that the text suffices for causal adjustment but that, in practice, it is prohibitively high-dimensional. To address this challenge, we develop causally sufficient embeddings, low-dimensional document representations that preserve sufficient information for causal identification and allow for efficient estimation of causal effects. Causally sufficient embeddings combine two ideas. The first is supervised dimensionality reduction: causal adjustment requires only the aspects of text that are predictive of both the treatment and outcome. The second is efficient language modeling: representations of text are designed to dispose of linguistically irrelevant information, and this information is also causally irrelevant. Our method adapts language models (specifically, word embeddings and topic models) to learn document embeddings that are able to predict both treatment and outcome. We study causally sufficient embeddings with semi-synthetic datasets and find that they improve causal estimation over related embedding methods. We illustrate the methods by answering the two motivating questions---the effect of a theorem on paper acceptance and the effect of a gender label on post popularity. Code and data available at https://github.com/vveitch/causal-text-embeddings-tf2}{github.com/vveitch/causal-text-embeddings-tf2

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
vveitch/causal-text-embeddings-tf2Official73Python–2023-11-05
blei-lab/causal-text-embeddingsCommunity125PythonMIT2020-09-23

Tensorflow 2 implementation of Causal-BERT

7320Python, Jupyter NotebookDec 19, 20193 years ago
MIT

Software and data for "Using Text Embeddings for Causal Inference"

12517Python, Jupyter NotebookMay 28, 20196 years agoMIT

Similar Papers

Cite this paper

@article{veitch2019adapting,
  title  = {Adapting Text Embeddings for Causal Inference},
  author = {Victor Veitch and Dhanya Sridhar and David M. Blei},
  year   = {2019},
  eprint = {1905.12741},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1905.12741}
}

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/1905.12741.svg)](https://codeofpaper.com/paper/1905.12741)

Discussion