Abstract
Hidden confounding remains a central challenge in estimating treatment effects from observational data, as unobserved variables can lead to biased causal estimates. While recent work has explored the use of large language models (LLMs) for causal inference, most approaches still rely on the unconfoundedness assumption. In this paper, we make the first attempt to mitigate hidden confounding using LLMs. We propose ProCI (Progressive Confounder Imputation), a framework that elicits the semantic and world knowledge of LLMs to iteratively generate, impute, and validate hidden confounders. ProCI leverages two key capabilities of LLMs: their strong semantic reasoning ability, which enables the discovery of plausible confounders from both structured and unstructured inputs, and their embedded world knowledge, which supports counterfactual reasoning under latent confounding. To improve robustness, ProCI adopts a distributional reasoning strategy instead of direct value imputation to prevent the collapsed outputs. Extensive experiments demonstrate that ProCI uncovers meaningful confounders and significantly improves treatment effect estimation across various datasets and LLMs.
Introduction
In causal inference, the "Gold Standard" for determining treatment effects is the Randomized Controlled Trial (RCT). However, researchers often must rely on observational data where treatment assignment is non-random. The primary obstacle in these settings is hidden confounding: unobserved variables that influence both the treatment and the outcome.
Standard causal estimation methods typically operate under the "unconfoundedness assumption," which presumes all relevant variables have been recorded. In practice, critical factors—such as socioeconomic status or access to specialized care—are frequently missing, leading to biased estimates. This research introduces ProCI, a framework that utilizes the semantic reasoning and world knowledge of Large Language Models (LLMs) to identify these missing variables and impute their values, thereby bridging the gap between observational data and causal reality.
The ProCI Framework
ProCI is a two-phase iterative framework designed to augment datasets with latent confounders that the LLM identifies as missing based on existing covariates.
Phase 1: Confounder Imputation
- Variable Generation: The LLM analyzes the existing feature set (e.g., Age, MRI results) and the outcome (e.g., Recovery) to hypothesize plausible missing confounders. For instance, it might suggest "Economic Status" as a latent variable that influences both the ability to afford surgery and the quality of post-operative care.
- Value Imputation via Distributional Reasoning: To avoid the "collapse" trap—where LLMs provide repetitive or low-variance guesses—ProCI employs distributional reasoning. Instead of direct value prediction, the LLM identifies the distribution type (e.g., Bernoulli for binary variables) and individual parameters based on the patient's known traits.
Phase 2: Unconfoundedness Validation
To ensure the imputed variables are statistically relevant, the framework predicts counterfactual outcomes and performs a Kernel-based Conditional Independence Test (KCIT). If the test indicates that treatment assignment is now independent of potential outcomes given the new variables, the process concludes. Otherwise, the framework loops back to identify additional confounders.
Experimental Evaluation
The study evaluated ProCI across two major benchmarks: the Twins dataset (mortality in twin pairs) and the Jobs (LaLonde) dataset (impact of job training on employment). The framework was tested using several LLM backbones, including GPT-4o and DeepSeek-R1.
Key Findings
- Superior Reasoning with DeepSeek-R1: ProCI-R1 frequently outperformed GPT-4o, suggesting that the chain-of-thought reasoning in R1-style models is particularly effective at connecting disparate data points to infer logical latent variables.
- Error Reduction: On the Jobs dataset, ProCI significantly reduced the error in the Average Treatment Effect on the Treated ($\epsilon_{ATT}$) compared to baseline models that lacked the imputed confounders.
- Robustness to Data Loss: In stress tests where known confounders were intentionally removed, ProCI successfully "re-discovered" the missing information, maintaining stable performance while vanilla models failed.
- Information Gain: Conditional Mutual Information (CMI) metrics confirmed that the LLM-generated variables provided genuine, non-redundant information relevant to the treatment-outcome relationship.
Conclusion and Future Work
ProCI demonstrates that LLMs can serve as powerful semantic proxies in causal inference, moving beyond simple data processing to active knowledge discovery. While the framework shows great promise, future research will focus on its application in highly niche scientific domains where LLM training data may be sparse, and on optimizing the framework for smaller sample sizes where independence tests like KCIT may lose power.
Summary updated