Proximal Causal Inference With Text Data

Jacob Morris Chen, Rohit Bhattacharya, Katherine A. Keith

Abstract

Recent text-based causal methods attempt to mitigate confounding bias by including unstructured text data as proxies of confounding variables that are partially or imperfectly measured. These approaches assume analysts have supervised labels of the confounders given text for a subset of instances, a constraint that is not always feasible due to data privacy or cost. Here, we address settings in which an important confounding variable is completely unobserved. We propose a new causal inference method that splits pre-treatment text data, infers two proxies from two zero-shot models on the separate splits, and applies these proxies in the proximal g-formula. We prove that our text-based proxy method satisfies identification conditions required by the proximal g-formula while other seemingly reasonable proposals do not. We evaluate our method in synthetic and semi-synthetic settings and find that it produces estimates with low bias. This combination of proximal causal inference and zero-shot classifiers is novel (to our knowledge) and expands the set of text-specific causal methods available to practitioners.

Introduction

In observational studies, the primary challenge to establishing causality is unmeasured confounding. When a hidden variable $U$ influences both the treatment $A$ and the outcome $Y$, standard statistical adjustments fail, leading to biased estimates of the Average Causal Effect (ACE). While researchers have increasingly turned to unstructured text data—such as clinical notes or social media activity—to serve as proxies for these hidden variables, most current methods rely on supervised learning. These approaches require high-quality, hand-labeled datasets to train classifiers, which are often unavailable in sensitive domains like medicine due to privacy regulations or the high cost of expert annotation.

This paper introduces a novel framework that leverages proximal causal inference in conjunction with zero-shot Large Language Models (LLMs). By utilizing text as a source of "noisy sensors," the proposed method identifies causal effects without requiring any manual labels for the unobserved confounder.

The Proximal Causal Framework

Proximal causal inference provides a mathematical solution to unmeasured confounding by utilizing two separate proxies of the hidden variable $U$: a treatment proxy ($Z$) and an outcome proxy ($W$). If these proxies satisfy specific independence conditions—essentially that their errors are not correlated with each other or with the treatment/outcome except through $U$—the causal effect can be identified using the proximal g-formula.

However, finding two valid, independent proxies in structured data is difficult. This research demonstrates that unstructured text is an ideal medium for extracting these proxies, provided the extraction process avoids systematic dependencies.

Methodology: The P2M Approach

The authors propose a "Two-Text, Two-Model" (P2M) design to ensure the mathematical requirements of proximal inference are met:

  1. Text Splitting: For each subject, the researcher identifies two distinct instances of pre-treatment text. In a clinical setting, this might be an ECG report and a separate Nursing note. This separation is critical; using the same text for both proxies introduces "same-text bias" due to shared linguistic features or recording noise.
  2. Zero-Shot Inference: Two different LLMs (e.g., Flan-T5 XXL and OLMo-7B-Instruct) are employed as zero-shot classifiers. Each model processes one of the text splits to predict the status of the hidden confounder (e.g., "Does this note suggest the patient has heart failure?").
  3. Proximal Estimation: These two noisy, zero-shot predictions are plugged into the proximal g-formula as $W$ and $Z$. Because the models and text sources are distinct, their errors are more likely to be independent, satisfying the conditions for identification.
  4. Falsification Heuristic: To protect against cases where the text contains no information about the confounder, the authors introduce an odds ratio heuristic. This diagnostic measures the association between the two proxies. If the association is too weak, the proxies are likely just noise; if it is too strong, they may be redundant or violating independence. In either case, the heuristic warns the researcher to stop.

Experimental Evaluation

The method was evaluated using both fully synthetic data and semi-synthetic experiments based on the MIMIC-III clinical database. In the MIMIC-III experiments, real clinical notes (Radiology, Nursing, ECG, etc.) were used to proxy for a "hidden" diagnosis like Heart Failure.

Key Findings

  • Bias Reduction: In synthetic trials, the P2M approach reduced bias to 0.043, compared to 0.130 for standard methods that used only a single proxy. This confirms that even "noisy" zero-shot predictions can recover the true causal effect if the proximal structure is maintained.
  • The "Same-Text" Trap: The research proved that extracting two proxies from a single piece of text fails to reduce bias effectively because the errors become correlated, violating the fundamental assumptions of the proximal g-formula.
  • Heuristic Reliability: The falsification heuristic successfully flagged instances where LLMs were unable to extract meaningful information (e.g., trying to predict hypertension from unrelated notes), preventing the reporting of unreliable results.

Discussion and Limitations

While P2M offers a powerful tool for label-free causal inference, it has specific requirements. It necessitates at least two distinct pieces of pre-treatment text per subject, which may not be available in all datasets. Furthermore, the current implementation relies on linear assumptions in the two-stage estimation process; future work may explore non-linear or doubly robust estimators to handle more complex causal relationships.

By combining the theoretical rigor of proximal causal inference with the zero-shot capabilities of modern LLMs, this work provides a practical path forward for causal discovery in data-rich but label-poor environments.

Summary updated

Abstract

Recent text-based causal methods attempt to mitigate confounding bias by including unstructured text data as proxies of confounding variables that are partially or imperfectly measured. These approaches assume analysts have supervised labels of the confounders given text for a subset of instances, a constraint that is not always feasible due to data privacy or cost. Here, we address settings in which an important confounding variable is completely unobserved. We propose a new causal inference method that splits pre-treatment text data, infers two proxies from two zero-shot models on the separate splits, and applies these proxies in the proximal g-formula. We prove that our text-based proxy method satisfies identification conditions required by the proximal g-formula while other seemingly reasonable proposals do not. We evaluate our method in synthetic and semi-synthetic settings and find that it produces estimates with low bias. This combination of proximal causal inference and zero-shot classifiers is novel (to our knowledge) and expands the set of text-specific causal methods available to practitioners.
BibTeX
@inproceedings{chen2024proximal,
  author = {Jacob Morris Chen and Rohit Bhattacharya and Katherine A. Keith},
  title = {{Proximal Causal Inference With Text Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=L4RwA0qyUd},
}
Figure