Title: End-To-End Causal Effect Estimation from Unstructured Natural Language Data
Venue: NeurIPS 2024
Accepted: yes
Keywords: treatment effect estimation

unstructured reports

real-world effects
Abstract: Knowing the effect of an intervention is critical for human decision-making, but current approaches for causal effect estimation rely on manual data collection and structuring, regardless of the causal assumptions. This increases both the cost and time-to-completion for studies. We show how large, diverse observational text data can be mined with large language models (LLMs) to produce inexpensive causal effect estimates under appropriate causal assumptions. We introduce _NATURAL_, a novel family of causal effect estimators built with LLMs that operate over datasets of unstructured text. Our estimators use LLM conditional distributions (over variables of interest, given the text data) to assist in the computation of classical estimators of causal effect. We overcome a number of technical challenges to realize this idea, such as automating data curation and using LLMs to impute missing information. We prepare six (two synthetic and four real) observational datasets, paired with corresponding ground truth in the form of randomized trials, which we used to systematically evaluate each step of our pipeline. NATURAL estimators demonstrate remarkable performance, yielding causal effect estimates that fall within 3 percentage points of their ground truth counterparts, including on real-world Phase 3/4 clinical trials. Our results suggest that unstructured text data is a rich source of causal effect information, and NATURAL is a first step towards an automated pipeline to tap this resource.

End-To-End Causal Effect Estimation from Unstructured Natural Language Data

Abstract

Knowing the effect of an intervention is critical for human decision-making, but current approaches for causal effect estimation rely on manual data collection and structuring, regardless of the causal assumptions. This increases both the cost and time-to-completion for studies. We show how large, diverse observational text data can be mined with large language models (LLMs) to produce inexpensive causal effect estimates under appropriate causal assumptions. We introduce NATURAL , a novel family of causal effect estimators built with LLMs that operate over datasets of unstructured text. Our estimators use LLM conditional distributions (over variables of interest, given the text data) to assist in the computation of classical estimators of causal effect. We overcome a number of technical challenges to realize this idea, such as automating data curation and using LLMs to impute missing information. We prepare six (two semi-synthetic and four real) observational datasets, paired with corresponding ground truth in the form of randomized trials, which we used to systematically evaluate each step of our pipeline. NATURAL estimators demonstrate remarkable performance, yielding causal effect estimates that fall within 3 percentage points of their ground truth counterparts, including on real-world Phase 3/4 clinical trials. Our results suggest that unstructured text data is a rich source of causal effect information, and NATURAL is a first step towards an automated pipeline to tap this resource.

1 Introduction

Estimating the causal effects of interventions is time consuming and costly, but the resulting outcomes are precious. Health agencies around the world often require randomized controlled trial (RCT) data to approve medical interventions. Clinical trials are key contributors to large R&D costs for drug developers [30]. Natural experiments are another source of rich interventional data, but they may not always exist or have enough data relevant to a given causal hypothesis [12].

When treatment randomization is infeasible, observational data can be used to identify average treatment effects (ATEs) [48], under common assumptions, e.g. , no unobserved confounding. Such

Observational

structured

experiment

Completely

randomized

experiment

Observational

natural language

experiment

Study

cohort(s)

Financial

cost

X1

X2

T

Y

X3

Y

T

I tried a

drug and it

helped! I

haven't had a

single …

Observed

data

Difference-in-Means

Example estimator &

causal graph

Treatment

assignment

NATURAL

IPW

X

Y

T

X

Y

T

R

X

Y

T

data is abundant but even when the necessary assumptions are satisfied, it must be structured ( i.e. , the outcomes, treatments, and relevant covariates must be defined, recorded, and tabulated) before it becomes amenable to computational analyses.

Yet, unstructured observational data presents unique opportunities for cheaper, more accessible, and potentially even better [32] effect estimation. For example, thousands of people living with diabetes choose to share their experiences with treatments on online patient forums. Some of their posts contain rich descriptions of daily lives, the drugs they have been prescribed, the treatment responses and side effects, as well as pre-treatment information like age and sex. Their posts contain their lived experiences including evidence of an outcome in an observational experiment, albeit in an unstructured form. Other potential sources of rich unstructured, observational data include newspaper classifieds, police reports, social media, and clinical reports. Despite being collected for a myriad of purposes, researchers have often turned to such data to test hypotheses since: (i) unstructured data does not require restrictive data collection designs, e.g. , measurement choice, and can admit many different post-hoc analyses; (ii) the reported outcomes may reflect what matters to subjects better than standard outcome measures; (iii) value may be recovered from outcomes that would otherwise be lost; (iv) there may be more unstructured data available on underserved or marginalized populations. Figure 1 contrasts our setting with previous works using randomized or structured observational data.

This work asks a simple question: How can we use large language models to automate treatment effect estimation using freely available text data? We introduce NATURAL , a family of text-conditioned estimators that addresses this by performing NATural language analysis to Understand ReAL effects .

At a high level, the steps required to compute NATURAL estimators are as follows. Given an observational study design and a dataset of natural language reports, filter for reports that are likely to conform to the experimental design. Then, using a large language model (LLM), extract the conditional distribution of structured variables of interest (outcome, treatment, covariates) given the report. Finally, use the conditionals to compute estimators of the ATE, using classical strategies such as inverse propensity score weighting and outcome imputation.

NATURAL is a data-driven pipeline. It leverages and relies on the LLM in a manner that mimics the learning task it was trained for: providing parametric approximations to conditional distributions. As in all observational studies, the validity of NATURAL also depends on prior causal knowledge about the task. Expert knowledge is required to define appropriate covariates and confirm that they satisfy the necessary assumptions for effect estimation. However, we anticipate that NATURAL estimators could be developed under other structural assumptions (e.g. instrumental variables) as well.

The core contributions of our work are:

We derived NATURAL ATE estimators based on classical estimators of the ATE, like inverse propensity score weighting and outcome imputation. NATURAL estimators operate on entirely unstructured data under two novel data-access assumptions.

We developed six observational datasets to systematically evaluate parts of this pipeline: two semi-synthetic datasets constructed using marketing data, and four clinical datasets curated from public (pre-December 2022) migraine and diabetes subreddits from the Pushshift collection [7].

We implemented NATURAL estimators using an LLM-based pipeline.

For each dataset, we treated the ATE from a corresponding real-world completely randomized experiment (CRE) as ground truth. Remarkably, our predicted ATEs all fell within 3 percentage points of the ground truth ATEs, a potential cost savings of many millions of dollars.

1.1 Related Work

Leveraging natural language data [42] to support causal claims is pervasive in applied research [43, 13]. Our work falls under the broad umbrella of accelerating the identification of real-world evidence (RWE) [40]. For instance, in the context of healthcare, RWE supports not only drug repurposing, but also post-market safety evaluations - its most common application. NATURAL expands the boundaries of how quickly one can obtain and validate such real-world evidence from observational data [41].

The use of natural language data in causal inference comes in different flavors: i) using text to measure confounders [23], ii) using text to measure causal effect outcomes [15], or iii) producing interpretable causal features from text [15, 6], e.g. , what words are more likely to explain the cause of an event. NATURAL distinguishes itself from these lines of research in two ways: i) NATURAL does not require any curated task-specific training data (it is zero-shot), and ii) NATURAL is not interested in how the text itself, i.e. , its words, relate to the causal problem -that is, we are only leveraging the model's ability to predict the distribution of a specified variable conditional on the input text. We highlight that our work lies distinct from research at the intersection of text and causality that combines text and numerical or tabular data [14], the latter of which may be unavailable or incomplete in settings involving neglected diseases, unrecorded abortions, or illicit drug use. Other work has also studied topic modelling approaches [2] or the ability of language models to infer latent variables (that are implied but not explicitly identified in text data) [36, 13]. Rather, we require the precise specification of covariates to condition on - we view this as being crucial to creating a more direct way for an end user to verify the validity of information extracted with our approach.

Prior works have also leveraged LLMs in a black-box fashion for causal tasks by querying the model for causal statements. In the context of causal discovery, users directly ask for the existence of cause-and-effect relationships, e.g. ,'Does changing the age of an abalone causes a change in its length?' [25, 33, 4, 5, 44, 21, 6]. Due to the large amount of training data, it is possible that the model learns to apply a causal model described in the training data and answer causal questions with it [35, 47]. The issue with this approach is i) the user is limited to the causal models observed in training, ii) the user is not aware of which causal model they are using, and iii) the queries tend to present high prompt sensitivity [28]. Finally, we note that a recent work created a benchmark and showed how LLMs struggle to distinguish pairwise correlation from causation [20], while another shows that checking causal relationships in a pairwise manner can lead to invalid causal graphs [45].

2 Preliminaries

We are interested in estimating the causal effect of a treatment relative to either another treatment or no treatment in a population of interest. More precisely, we consider treatments t ∈ { 0 , 1 } and the corresponding potential outcomes Y (1) and Y (0) under each treatment. We wish to compute the quantity τ := E [ Y (1) -Y (0)] , often referred to as Average Treatment Effect (ATE). Sometimes, Y (0) may correspond to no treatment (control). Throughout this work, we assume binary treatments and outcomes in the Neyman-Rubin causal model. We provide a full list of notation in appendix A.

A Completely Randomized Experiment (CRE) with n participants requires no prior causal knowledge. In a CRE, the treatment assignment vector ( ˜ T i ) n i =1 is a random permutation of n 1 ones and n -n 1 zeros sampled independently of the outcomes. In this case, the difference-in-means 1 n 1 ∑ n i =1 ˜ T i Y i (1) -1 n -n 1 ∑ n i =1 (1 -˜ T i ) Y i (0) provides us with an unbiased estimate of τ .

Despite the indisputable necessity of CREs in high-stakes settings, it is often expensive and/or infeasible to have complete control over the treatment assignment. Instead, observational data is more readily available. Observational data often contains spurious correlations between the observed treatment T and the observed outcome Y = TY (1) + (1 -T ) Y (0) through a common cause (confounder). Typically, this confounding is formalized as a variable X , which we assume to be discrete throughout this work, representing covariates associated with each individual. Given i.i.d. samples { ( X i , T i , Y i ) } n i =1 from the target population, standard causal inference techniques can correct for confounding bias and provide consistent estimates of τ under Assumptions 1 and 2:

Assumption 1 (Strong Ignorability.) The potential outcomes are independent of treatment assignments conditional on covariates, i.e., ( Y (0) , Y (1)) ⊥ ⊥ T | X.

Assumption 2 (Positivity.) For every treatment t and covariate set x , 0 < P ( T = t | X = x ) < 1 .

Following are two classical estimators of the ATE τ from observational data, each of which rely on X satisfying Assumptions 1 and 2. We refer the reader to Ding [11] for further details.

Inverse Propensity Score Weighting (IPW). The propensity score is the conditional probability of receiving a treatment given the observed features, i.e. , e ( x ) = P ( T = 1 | X = x ) . The IPW estimator is given by where ˆ e ( x ) is an approximation of P ( T = 1 | X = x ) . When ˆ e ( x ) is the true propensity score, ˆ τ IPW is an unbiased estimator of τ . When ˆ e ( x ) is estimated as empirical probability, ˆ τ IPW is consistent.

Outcome Imputation (OI). Outcome Imputation learns a model to impute outcomes from features and treatment and then marginalizes away the features to estimate τ with

where ˆ τ ( x, t ) approximates P ( Y = 1 | X = x, T = t ) . Note that if ˆ τ ( x, t ) is an unbiased estimation of this quantity, ˆ τ OI is an unbiased estimator of τ .

3 NATURAL estimators of the ATE

Both CRE and observational studies require direct access to tabulated data ( X i , T i , Y i ) for every individual i . Our NATURAL estimators on the other hand estimate the ATE from observational, unstructured natural language data in the form of language reports R i . In addition to Assumptions 1 and 2, NATURAL estimators require the following assumptions to guarantee their consistency.

Assumption 3 (Natural language report data.) The target population is described by an observational data-generating process P ( X,T,Y,R ) of data ( X,T,Y ) , which satisfies Assumptions 1 and 2 and is jointly distributed with a random natural language string R , called a report . We assume access to an i.i.d. sample of reports { R i } n i =1 from the marginal of this process.

Assumption 4 (Access to the true observational conditional over ( X,T,Y ) .) We can either (i) compute the conditional P ( X = x, T = t, Y = y | R = r ) of the true data-generating process, or (ii) we can sample from P ( X = x | R = r ) and compute P ( T = t, Y = y | R = r, X = x ) .

Intuitively, these assumptions give NATURAL indirect access to ( X,T,Y ) through R . They can be weak or strong, depending on the definition of the reports R . On the one hand, if reports are copies of the observational data, i.e. , R = ( X,T,Y ) , then Assumption 4 is trivial to satisfy. On the other hand, if reports are all the constant, empty string, R = ϵ , then Assumption 4 guarantees that we have full access to the true observational joint density function over ( X,T,Y ) , which is a strong assumption. In other words, it requires a way to simulate trial outcomes unconditionally (without any data). We consider how we might satisfy these assumptions in practice in the next section. Here, we assume that they hold and develop a series of consistent estimators of the ATE.

NATURAL Full. Given { R i } n i =1 and P ( X = x, T = t, Y = y | R = r ) , we can construct an idealized version of NATURAL. Let us start by noting that the law of total expectation gives us

A Monte Carlo estimate over reports is given by

which further approximates ˆ e N-Full ( x ) from the given conditional. We used eq. (7) below. We note that ˆ τ N-Full above is derived from IPW, but can also be derived from OI, as shown in appendix B.

The estimator ˆ τ N-Full above relies on enumerating all possible values of ( X,T,Y ) , making it computationally expensive for high-dimensional X . Below, we present two hybrid versions of our method which combine sampling of some variables and computation of conditional probabilities of others.

NATURAL IPW. To construct our hybrid estimator, we augment the data { R i } n i =1 by sampling from P ( X | R i ) independently for each report R i . This gives us a dataset { ( R i , X i ) } n i =1 drawn i.i.d. from P ( X,R ) by Assumption 4. Then, our hybrid estimator is derived from the form of IPW as follows:

where ˆ e N-IPW ( x ) is consistently estimated in the following manner:

NATURAL OI. Similarly inspired by the OI estimator in equation 2, we have for t ∈ { 0 , 1 } ,

Thus, for our hybrid OI estimator, we augment the data { R i } n i =1 by sampling from P ( X,T | R i ) independently for each report R i . This gives us a dataset { ( R i , X i , T i ) } n i =1 drawn i.i.d. from P ( R,X,T ) by Assumption 4. Then, our consistent outcome predictor is given by

and the final estimator is given by:

NATURALMonteCarlo. Further in the direction of sampling more variables, we can obtain samples ( X i , T i , Y i ) from P ( X,T,Y | R i ) and compute a Monte Carlo estimate, ˆ τ N-MC. The set of samples { ( X i , T i , Y i ) } n i =1 constitute a tabular dataset which can be plugged into a standard ATE estimator like IPW or OI, as described in section 2. We refer to these sample-only estimators as N-MC IPW and N-MC OI, respectively.

Inclusion Criteria conditioned ATE. We are sometimes interested in ATEs over populations defined by constraints on pre-treatment covariates X i , known as inclusion criteria and denoted by I . This conditional ATE is τ ( I ) = E [ Y (1) -Y (0) | X ∈ I ] and satisfies the following identity.

The conditional version of NATURAL IPW can be estimated by filtering out reports where P ( X ∈ I | R i ) = 0 , sampling X ij ∼ P ( X | R i , X ∈ I ) i.i.d., and finally weighting datapoints by the relative likelihood of matching the inclusion criteria given the report:

where the inner expectation is estimated similar to eq. (6). A complete derivation for eqs. (11) and (12) and related discussion are included in appendix G. In practice, we took m = 1 .

I tried a

drug and it

helped! I

haven't had a

single …

I tried a

drug and it

helped! I

haven't had a

single …

X2

X3

X1

X2

X3

X1

X2

X3

X1

T

Y

X2

X3

X1

relevance

filtered

initial

covariate

extraction

filtered by

inclusion

criteria

conditional

distributions

inferred

final

covariate

extraction

observational

language

data

Is this

report

relevant to

the problem

setting …

LLM PROMPT

Extract

these

attributes

from this

report …

LLM PROMPT

Given these

inclusion

criteria

extract

these…

LLM PROMPT

Which

treatment?

Which

outcome? …

LLM PROMPT

4 Implementing NATURAL estimators with Large Language Models

LLMs are trained on vast datasets of real-world data, e.g. , [3], which likely contain records of data generated by processes that are consistent with Assumption 3. Because LLMs can learn wellcalibrated conditionals [22], our hypothesis is that LLMs can be prompted to approximate the conditionals required by Assumption 4 for real-world causal effect questions of interest. Our LLM implementation of NATURAL estimators is built on this hypothesis to try to satisfy Assumptions 3 and 4 (Assumptions 1 and 2 must be guaranteed by a domain expert). We defer exact prompts for LLM inference to appendix D, a full worked example to appendix C, and a discussion of the limitations of our approach to the next section. Figure 2 summarizes our pipeline.

Filtering to match Assumption 3. For our real-data clinical settings, our first goal is to produce a dataset of i.i.d. reports R i that are very likely to be jointly distributed with the random variables ( X i , T i , Y i ) of a specific observational study of interest. Given a study of interest and a dataset of real-world reports that are potentially relevant to the study, we pass it through a sequence of filters with increasing detail and strictness:

(i) Initial filter. Inspired by other work with social media data [1, 38], we first use deterministic rules to filter out uninformative reports: posts that were removed, are too short, have "bot" in the author's name, have no mention of any keyword related to the study, etc.

(iii) Filter by treatment-outcome. Weensure that each report pertains specifically to the treatments and outcomes of interest. We do so by prompting an LLM to extract only treatment and outcome information, and retaining only the posts that are deemed to both mention one of the treatments in question and also contain outcome information.

(ii) Filter by relevance. Weprompt an LLM to determine whether each report contains information that would make it relevant to the study. We remove reports that are deemed irrelevant.

(iv) Filter known covariates by inclusion criteria. For ATEs conditioned on inclusion criteria, as in our real-world datasets, we included a filter to enforce these criteria. Managing inclusion criteria is complicated by the fact that many reports R i contain no or partial information about covariates that are required to verify inclusion. So, in this filtering step, our goal was to ensure that the final set of reports have non-zero probability of matching the inclusion criteria. We begin by prompting an LLM to extract the full set of covariates X i , following constraints on the possible values each attribute can take, but we allow the LLM to extract Unknown if it is impossible for the LLM to determine the value of a covariate. We then remove reports, if any of the nonUnknown covariates are determined to fail their inclusion criteria. We found the JSON-mode made available for generation by certain LLM APIs, to suffice for this task; however more involved strategies for constrained generation are also possible [46, 50].

Sampling from and computing conditional probabilities to match Assumption 4. Given a set of reports { R i } n i =1 that pass the filtering stage above, our next steps use LLMs to extract the samples and conditionals P LLM ( X,T,Y | R ) , required to compute NATURAL estimators. For each R i , we:

(v) Extract covariates, both known and unknown. We run a final covariate extraction by prompting an LLM to determine the full set of covariates X i from the report R i , subject to the constraint that X i satisfies the inclusion criteria. In contrast to (iv), we ask the LLM to

10

0

KL

( ˆ

P

‖

P

∗

)

P

=

P

(

X,T,Y

)

P

=

P

(

T

= 1

|

X

)

2

5

2

6

2

7

2

8

2

9

2

10

# reports

10

1

10

2

RMSE

(ˆ

τ, τ

∗

)

# reports

guess the values of Unknown covariates. We verified that this second extraction agreed exactly with the first extraction (iv) on the known covariates ( i.e. , the ones that were not extracted as Unknown in the first extraction). We contrast the empirical distributions of these known and unknown/guessed covariates for our experiments in appendix F.1.

(vii) Weight reports according to inclusion criteria match. Similar to item (vi), we compute P LLM ( X i ∈ I | R i ) to obtain the weights in eq. (12), by prompting an LLM with descriptions of the inclusion criteria that must be satisfied and each report R i . It may be possible to skip this weighting step under additional structural assumptions on the data. These assumptions as well as experimental results without the weighting are included in appendix G.

(vi) Infer conditionals. Given { R i , X i } n i =1 from the previous steps, we compute the probabilities P LLM ( T = t, Y = y | R i , X i ) by prompting an LLM that makes log-probabilities accessible. Specifically, we ask an LLM to answer questions about T, Y given access to R i , X i , and we score every possible answer T = t, Y = y using the LLM log-probabilities. We exponentiate and renormalize these scores across the space of possible realizations to obtain a valid probability distribution.

Nevertheless, while our empirical results are remarkably consistent with the correctness of our pipeline, we cannot formally guarantee that it satisfies Assumptions 3 and 4. The final outcome of this pipeline is a dataset { R i , X i } n i =1 and a set of conditionals P ( T = t, Y = y | R i , X i ) that can be plugged into the hybrid NATURAL estimators in section 3 to predict ATEs. Therefore, we see this as a first implementation of NATURAL estimators, which we anticipate can be improved.

5 Limitations and Broader Impact

In addition to the limitations that NATURAL shares with every observational study, i.e. , the validity of the practitioner's causal assumptions, it comes with an extra dependence on how well one can approximate the desired conditional distributions . While more and more capable LLMs are being continually developed, the extent to which they satisfy NATURAL's assumptions is nearly impossible to formally test. Indeed, while pretraining tends to produce calibrated LLM predictions [22], posttraining techniques can compromise calibration [34]. Therefore, we emphasize that NATURAL was not developed to recommend therapeutics directly to end-users or to directly inform high-stakes public policies. Instead, we envision NATURAL as a powerful tool to help us approximate ATEs at scale and prioritize confirmatory CREs. We strongly recommend that all predictions made by NATURAL estimators be validated experimentally before being used to inform high-stakes decisionmaking. Apart from its dependence on LLM capabilities, NATURAL is also limited by the nature of observational, unstructured natural language data:

Network Interference. In practice, acquiring i.i.d. reports can be challenging. For instance, social network users might talk to each other and influence their treatment choices. This is a well-known issue in causal inference and statistical sciences in general. Existing solutions rely on a known network structure to sample individuals or correct for their neighbors' treatments [10, 26, 17].

Outcome Measurement. Since NATURAL deals with self-reports, subjects need to be able to report the outcomes of interest. For example, this cannot be applied if the outcome is measured with an expensive, inaccessible test. Therefore, the study design implemented with NATURAL must account for the accessibility of endpoints to users.

)

∗

P

‖

P

10

( ˆ

KL

)

∗

τ, τ

(ˆ

RMSE

-

10

1

1

2

5

2

6

2

7

2

8

P

P

=

=

2

P

P

9

(

(

X,T,Y

T

= 1

|

)

X

)

2

10

Selection Bias. Results might be biased towards individuals' choice of reporting an outcome given their experience with the treatment. Luckily, outcome missingness is a widely studied problem in causality research, see e.g. , how to test [9] or how to mitigate [31] it. Note, however, that solutions will often accumulate assumptions on top of NATURAL and should always be critically evaluated by practitioners. Finally, apart from individuals' choice of reporting, selection bias might also arise from which individuals participate in online forums, i.e. , our framework is only capable of estimating local ATEs -external validity is not guaranteed a priori. We demonstrate this challenge in section 6 by simulating systematic bias in semi-synthetic settings.

6 Empirical Evaluation

Evaluating an end-to-end pipeline for causal inference from unstructured real-world text data to ATEs presents challenges regarding access to data, ground truth ATEs and insightful intermediate metrics. We used two semi-synthetic datasets where we augmented randomized data to mimic real-world observations, while continuing to have access to ground truth evaluation. In addition, we study four real datasets, curated from publicly available Reddit posts from the PushShift dataset, as described in section 4. These six datasets allowed us to systematically evaluate NATURAL.

Semi-synthetic Datasets. Causal effect estimation is typically evaluated using synthetic datasets with one or more relationships between the observed covariates, treatment and outcome being contrived. We instead synthesized unstructured observational text data from real randomized tabular datasets, using an LLM. Specifically, we (i) introduced confounding bias by sampling datapoints according to an artificial propensity score, (ii) randomly dropped covariates, (iii) described covariates, treatment and outcome in shuffled orderings, (iv) simu-

lated realism by sampling a persona from the the Big Five personality traits [27] for each datapoint and finally, (v) prompted the LLM to generate a realistic report describing the provided information in the style of someone with the given traits (see appendix D for the full prompt). We used two standard, publicly available randomized datasets: Hillstrom [19] and Retail Hero [49], and plan to open-source scripts to generate our data. Step (i) above is in a similar vein as Keith et al. [24], in that our subsampling strategy does not modify the marginal distribution over covariates and the ATE remains identifiable from observational data.

Real-world Datasets. To study how our framework may be deployed to test hypotheses using real data from online forums; we considered two medical conditions for which there exist abundant Reddit posts in the PushShift collection [7], with individuals' personal experiences: the effect of diabetes medications (e.g. Semaglutide) on weight loss and the tolerability of migraine treatments. For each condition, we picked two clinical trials which performed head-to-head comparisons of two treatments that we expected to find references to in relevant subreddits. Moreover, to mitigate selection bias we selected pairs of similar treatments, e.g. , comparable availability, where we believe the probability of a user reporting their experience is approximately equal in both. As we will discuss, our results suggest external validity as well, meaning that the probability of a user reporting their experience with the treatments seems to be (approximately) equal to the prior probability of a user reporting any experience. We limited our data collection to posts that were written before December 2022 and made publicly available in the PushShift archives. We curated four datasets for comparison between different treatments, each of which has a ground truth RCT: Semaglutide vs. Tirzepatide [18] and Semaglutide vs. Liraglutide [8] for their effect on weight loss and Erenumab vs. Topiramate [37] and OnabotulinumtoxinA vs. Topiramate [39] for their tolerability. We used the first of these to validate implementation choices NATURAL (like filtering, imputations, prompt specifications) and

the other three as held-out test settings, see appendix C. We include further details for all our datasets in appendix E, including the definitions of covariates and outcomes.

Next, we investigate several questions about the performance of NATURAL empirically. We used GPT-4 Turbo for sampling and LLAMA2-70B for computing conditional probabilities.

How well does NATURAL estimate observational distributions from self-reported data? Our semi-synthetic datasets give us access to the true joint distributions P ( X,T,Y ) and true propensity scores P ( T = 1 | X ) . The top row of fig. 3 shows the KL divergence between these distributions and those estimated by NATURAL Full, for Hillstrom (left) and Retail Hero (right). We find that these KL divergences decrease steadily as the number of reports used in the estimation increases. The bottom row shows corresponding root-mean-squared error (RMSE) between NATURAL and the true ATE. This corroborates the insight that as the joint distribution and propensity scores are estimated more accurately, the predicted ATE gets closer to its true value. In particular, we observe a clear correlation between the quality of estimated propensity scores and estimated ATEs.

How do NATURAL methods compare to one another and to trained baselines? We present our estimated ATE and its RMSE on semi-synthetic datasets in table 1. Further, we evaluate two trained baselines, which use a Bag-of-Words model and a sentence encoder respectively, to train representations of text data with their labels. Here, for each attribute in the set of covariates, treatments, and outcomes, we train a MLP model with 5-fold cross validation to predict that attribute. We then use these predicted attributes as a tabular dataset of samples that can be plugged into any causal inference estimator. We find that our methods are competitive with or outperform these baselines, despite not being trained with any labels. In particular, the sentence encoder baseline collapsed to an ATE of zero for Hillstrom, having learned the constant predictor for outcomes. IPW (Structured) is an oracle estimator, which assumes full access to structured data. Selection-biased N-IPW demonstrates the challenge of ATE estimation in the presence of bias which was systematically simulated as a function of covariates 'channel" and 'zip code" for Hillstrom and 'age" for Retail Hero.

Table 2 compares NATURAL methods to estimate the ATEs in real-world clinical settings using self-reported data from the PushShift collection of Reddit posts. Remarkably, our predicted ATEs (a) depict the same direction of effect , and (b) fall within 3 percentage points of their corresponding ground truth clinical trial ATEs. For both semi-synthetic and real data experiments, NATURAL IPW outperforms other versions across datasets, except for the Semaglutide vs. Liraglutide setting, where NATURAL OI performed the best. Both N-MC versions perform similarly on all datasets.

This result is significant. Clinical trials can take on the order of years and costs in the tens to hundreds of millions of dollars. Going from the raw language observational data to ATE in our framework takes on the order of days and costs at most a few hundred dollars of compute. For problems in medicine, economics, sociology, and political science where randomization is infeasible or expensive, NATURAL provides a tractable way to leverage observational data to rank potential experiments prior to conducting them.

How do different choices in the NATURAL pipeline effect ATE prediction? We assess the impact of key choices in our pipeline described in section 4, by ablating them one-by-one. We investigated and selected these choices on the Semaglutide vs. Tirzepatide experiment. Figure 4 (left) compares the RMSE of predicted ATEs when data is not filtered according to inclusion criteria and LLM imputations are replaced with samples from an uniform distribution.

2

5

2

6

2

7

2

8

2

9

2

10

# reports

2

4

6

8

RMSE

(ˆ

τ, τ

∗

)

No filtering + LLM imputations

Inclusion weighting + Uniform imputations

Inclusion weighting + LLM imputations

2

5

2

6

2

7

2

8

2

9

2

10

# reports

2

.

5

5

.

0

7

.

5

10

.

0

12

.

5

RMSE

(ˆ

τ, τ

∗

)

Uniform

LLAMA2-7B

LLAMA2-13B

LLAMA2-70B

It shows that both inclusion-based filtering and imputations from a pretrained LLM are crucial for the performance of NATURAL. We also compared performance of our method when the conditional probabilities in eq. (6) are evaluated using models of different scales in fig. 4 (right), and found that performance improves at larger scales and with greater quantity of data.

How well do different estimates of propensity score balance covariates? Aproperty of accurate propensity score estimates is that they balance covariates across treatment cohorts (see Ding [11] for details and proofs), i.e. the average treatment effect on each covariate, corrected using propensity scores, is close to zero. Figure 5 visualizes this quantity for different covariates of the Semaglutide vs. Tirzepatide experiment and shows that propensity scores

-

1

.

50

-

1

.

25

-

1

.

00

-

0

.

75

-

0

.

50

-

0

.

25

0

.

00

0

.

25

Balance across treatment groups

age

sex

bmi

start HbA1c

start weight

duration days

Covariates

Uniform

LLAMA2-7B

LLAMA2-13B

LLAMA2-70B

estimated using LLAMA2 conditional distributions balance the covariates far better than a uniform distribution does, with the 70B model consistently estimating the treatment effect on each covariate as close to zero. Similar visualizations for the test settings are shown in fig. 10 of appendix F.2.

7 Conclusion

In this work, we introduced NATURAL , a family of text-conditioned estimators, to automate treatment effect estimation using free-form text data. We demonstrated NATURAL's efficacy with six semisynthetic and real datasets for systematic evaluation of its pipeline. We exposed the ability of LLMs to extract meaningful conditional distributions over structured variables and how their combination with classical causal estimators can predict real-world causal effects with remarkable accuracy. Given this promising performance, exciting directions for future work include (i) incorporating automatic prompt tuning methods into the pipeline, (ii) extending our methods to real-valued ( X,T,Y ) , (iii) exploring whether our assumptions can be weakened, (iv) exploring other domains in applied research, e.g. , social sciences, (v) performing a more extensive evaluation of NATURAL on different study designs to better understand what type of treatments, outcomes, and reports show better or worse practical performance with NATURAL or (vi) deploying the pipeline to test hypotheses at even larger scales.

NATURAL estimators have numerous use cases with potentially far-reaching impact. As long as patients have access to treatments and report their experiences, NATURAL can be used to compare two treatments in new indications or new populations. Therefore, our pipeline can in principle support efforts to prioritize trials for repurposed drugs or supplements in under-served diseases or populations. Further, a crucial step after drug approval is post-marketing surveillance for side effects (positive or negative) that may not have been measured or may have been too rare to identify in a smaller trial. NATURAL can leverage the diversity of available language data to detect these effects. While our motivations largely stem from the challenges of drug development, our NATURAL estimators are applicable to any effect estimation setting for which there exists relevant natural language data.

References

Adiwardana, D., Luong, M.-T., So, D. R., Hall, J., Fiedel, N., Thoppilan, R., Yang, Z., Kulshreshtha, A., Nemade, G., Lu, Y., et al. (2020). Towards a human-like open-domain chatbot. arXiv preprint arXiv:2001.09977 .

Ahrens, M., Ashwin, J., Calliess, J.-P., and Nguyen, V. (2021). Bayesian topic regression for causal inference. arXiv preprint arXiv:2109.05317 .

AI@Meta (2024). Llama 3 model card.

Antonucci, A., Piqué, G., and Zaffalon, M. (2023). Zero-shot causal graph extrapolation from text via llms. arXiv preprint arXiv:2312.14670 .

Arsenyan, V. and Shahnazaryan, D. (2023). Large language models for biomedical causal graph construction. arXiv preprint arXiv:2301.12473 .

Ban, T., Chen, L., Wang, X., and Chen, H. (2023). From query tools to causal architects: Harnessing large language models for advanced causal discovery from data. arXiv preprint arXiv:2306.16902 .

Baumgartner, J., Zannettou, S., Keegan, B., Squire, M., and Blackburn, J. (2020). The pushshift reddit dataset. In Proceedings of the international AAAI conference on web and social media , volume 14, pages 830-839.

Capehorn, M., Catarig, A.-M., Furberg, J., Janez, A., Price, H., Tadayon, S., Vergès, B., and Marre, M. (2020). Efficacy and safety of once-weekly semaglutide 1.0 mg vs once-daily liraglutide 1.2 mg as add-on to 1-3 oral antidiabetic drugs in subjects with type 2 diabetes (sustain 10). Diabetes & metabolism , 46(2):100-109.

Chen, J. M., Malinsky, D., and Bhattacharya, R. (2023). Causal inference with outcomedependent missingness and self-censoring. In Evans, R. J. and Shpitser, I., editors, Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence , volume 216 of Proceedings of Machine Learning Research , pages 358-368. PMLR.

Cotta, L., Bevilacqua, B., Ahmed, N., and Ribeiro, B. (2023). Causal lifting and link prediction. Proceedings of the Royal Society A , 479(2276):20230121.

Ding, P. (2023). A first course in causal inference. arXiv preprint arXiv:2305.18793 .

Dunning, T. (2012). Natural Experiments in the Social Sciences: A Design-Based Approach . Strategies for Social Inquiry. Cambridge University Press.

Egami, N., Fong, C. J., Grimmer, J., Roberts, M. E., and Stewart, B. M. (2022). How to make causal inferences using texts. Science Advances , 8(42):eabg2652.

Falavarjani, S. M., Hosseini, H., Noorian, Z., and Bagheri, E. (2017). Estimating the effect of exercising on users' online behavior. In Proceedings of the International AAAI Conference on Web and Social Media , volume 11, pages 734-738.

Feder, A., Keith, K. A., Manzoor, E., Pryzant, R., Sridhar, D., Wood-Doughty, Z., Eisenstein, J., Grimmer, J., Reichart, R., Roberts, M. E., et al. (2022). Causal inference in natural language processing: Estimation, prediction, interpretation and beyond. Transactions of the Association for Computational Linguistics , 10:1138-1158.

Flury, B. K. and Riedwyl, H. (1986). Standard distance in univariate and multivariate analysis. The American Statistician , 40(3):249-251.

Forastiere, L., Airoldi, E. M., and Mealli, F. (2021). Identification and estimation of treatment and interference effects in observational studies on networks. Journal of the American Statistical Association , 116(534):901-918.

Frías, J. P., Davies, M. J., Rosenstock, J., Pérez Manghi, F. C., Fernández Landó, L., Bergman, B. K., Liu, B., Cui, X., and Brown, K. (2021). Tirzepatide versus semaglutide once weekly in patients with type 2 diabetes. New England Journal of Medicine , 385(6):503-515.

Hillstrom, K. (2008). The MineThatData E-Mail Analytics And Data Mining Challenge. Challenge Dataset.

Jin, Z., Liu, J., Lyu, Z., Poff, S., Sachan, M., Mihalcea, R., Diab, M., and Schölkopf, B. (2023). Can large language models infer causation from correlation? arXiv preprint arXiv:2306.05836 .

Jiralerspong, T., Chen, X., More, Y., Shah, V., and Bengio, Y. (2024). Efficient causal graph discovery using large language models. arXiv preprint arXiv:2402.01207 .

Kadavath, S., Conerly, T., Askell, A., Henighan, T., Drain, D., Perez, E., Schiefer, N., HatfieldDodds, Z., DasSarma, N., Tran-Johnson, E., Johnston, S., El-Showk, S., Jones, A., Elhage, N., Hume, T., Chen, A., Bai, Y., Bowman, S., Fort, S., Ganguli, D., Hernandez, D., Jacobson, J., Kernion, J., Kravec, S., Lovitt, L., Ndousse, K., Olsson, C., Ringer, S., Amodei, D., Brown, T., Clark, J., Joseph, N., Mann, B., McCandlish, S., Olah, C., and Kaplan, J. (2022). Language models (mostly) know what they know.

Keith, K., Jensen, D., and O'Connor, B. (2020). Text and causal inference: A review of using text to remove confounding from causal estimates. In Jurafsky, D., Chai, J., Schluter, N., and Tetreault, J., editors, Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics , Online. Association for Computational Linguistics.

Keith, K. A., Feldman, S., Jurgens, D., Bragg, J., and Bhattacharya, R. (2023). Rct rejection sampling for causal estimation evaluation. arXiv preprint arXiv:2307.15176 .

Kıcıman, E., Ness, R., Sharma, A., and Tan, C. (2023). Causal reasoning and large language models: Opening a new frontier for causality. arXiv preprint arXiv:2305.00050 .

Leung, M. P. (2022). Causal inference under approximate neighborhood interference. Econometrica , 90(1):267-293.

Lim, A. (2023). Big five personality traits: The 5-factor model of personality. simply psychology.

Long, S., Schuster, T., Piché, A., de Montreal, U., Research, S., et al. (2023). Can large language models build causal graphs? arXiv preprint arXiv:2303.05279 .

Lu, S. and Ding, P. (2023). Flexible sensitivity analysis for causal inference in observational studies subject to unmeasured confounding. arXiv preprint arXiv:2305.17643 .

Mestre-Ferrandiz, J., Sussex, J., and Towse, A. (2012). The R&D cost of a new medicine .

Miao, W., Liu, L., Tchetgen, E. T., and Geng, Z. (2015). Identification, doubly robust estimation, and semiparametric efficiency theory of nonignorable missing data with a shadow variable. arXiv preprint arXiv:1509.02556 .

Mueller, S. and Pearl, J. (2023). Personalized decision making-a conceptual introduction. Journal of Causal Inference , 11(1):20220050.

Naik, N., Khandelwal, A., Joshi, M., Atre, M., Wright, H., Kannan, K., Hill, S., Mamidipudi, G., Srinivasa, G., Bifulco, C., et al. (2023). Applying large language models for causal structure learning in non small cell lung cancer. arXiv preprint arXiv:2311.07191 .

OpenAI, Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., Anadkat, S., Avila, R., Babuschkin, I., Balaji, S., Balcom, V., Baltescu, P., Bao, H., Bavarian, M., Belgum, J., Bello, I., Berdine, J., Bernadett-Shapiro, G., Berner, C., Bogdonoff, L., Boiko, O., Boyd, M., Brakman, A.-L., Brockman, G., Brooks, T., Brundage, M., Button, K., Cai, T., Campbell, R., Cann, A., Carey, B., Carlson, C., Carmichael, R., Chan, B., Chang, C., Chantzis, F., Chen, D., Chen, S., Chen, R., Chen, J., Chen, M., Chess, B., Cho, C., Chu, C., Chung, H. W., Cummings, D., Currier, J., Dai, Y., Decareaux, C., Degry, T., Deutsch, N., Deville, D., Dhar, A., Dohan, D., Dowling, S., Dunning, S., Ecoffet, A., Eleti, A., Eloundou, T., Farhi, D., Fedus, L., Felix, N., Fishman, S. P., Forte, J., Fulford, I., Gao, L., Georges, E., Gibson, C., Goel, V., Gogineni, T., Goh, G., Gontijo-Lopes, R., Gordon, J., Grafstein, M., Gray, S., Greene, R., Gross, J., Gu, S. S., Guo, Y., Hallacy, C., Han, J., Harris, J., He, Y ., Heaton, M., Heidecke, J., Hesse, C., Hickey, A., Hickey, W., Hoeschele, P., Houghton, B., Hsu, K., Hu, S., Hu, X., Huizinga, J., Jain, S., Jain, S., Jang, J., Jiang, A., Jiang, R., Jin, H., Jin, D., Jomoto, S., Jonn, B., Jun, H., Kaftan, T., Łukasz Kaiser, Kamali, A., Kanitscheider, I., Keskar, N. S., Khan, T., Kilpatrick, L., Kim, J. W., Kim, C., Kim, Y., Kirchner, J. H., Kiros, J., Knight, M., Kokotajlo, D., Łukasz Kondraciuk, Kondrich, A., Konstantinidis, A., Kosic, K., Krueger, G., Kuo, V., Lampe, M., Lan, I., Lee, T., Leike, J., Leung, J., Levy, D., Li, C. M., Lim, R., Lin, M., Lin, S., Litwin, M., Lopez, T., Lowe, R., Lue, P., Makanju, A., Malfacini, K., Manning, S., Markov, T., Markovski, Y., Martin, B., Mayer, K., Mayne, A., McGrew, B., McKinney, S. M., McLeavey, C., McMillan, P., McNeil, J., Medina, D., Mehta, A., Menick, J., Metz, L., Mishchenko, A., Mishkin, P., Monaco, V., Morikawa, E., Mossing, D., Mu, T., Murati, M., Murk, O., Mély, D., Nair, A., Nakano, R., Nayak, R., Neelakantan, A., Ngo, R., Noh, H., Ouyang, L., O'Keefe, C., Pachocki, J., Paino, A., Palermo, J., Pantuliano, A., Parascandolo, G., Parish, J., Parparita, E., Passos, A., Pavlov, M., Peng, A., Perelman, A., de Avila Belbute Peres, F., Petrov, M., de Oliveira Pinto, H. P., Michael, Pokorny, Pokrass, M., Pong, V. H., Powell, T., Power, A., Power, B., Proehl, E., Puri, R., Radford, A., Rae, J., Ramesh, A., Raymond, C., Real, F., Rimbach, K., Ross, C., Rotsted, B., Roussez, H., Ryder, N., Saltarelli, M., Sanders, T., Santurkar, S., Sastry, G., Schmidt, H., Schnurr, D., Schulman, J., Selsam, D., Sheppard, K., Sherbakov, T., Shieh, J., Shoker, S., Shyam, P., Sidor, S., Sigler, E., Simens, M., Sitkin, J., Slama, K., Sohl, I., Sokolowsky, B., Song, Y., Staudacher, N., Such, F. P., Summers, N., Sutskever, I., Tang, J., Tezak, N., Thompson, M. B., Tillet, P., Tootoonchian, A., Tseng, E., Tuggle, P., Turley, N., Tworek, J., Uribe, J. F. C., Vallone, A., Vijayvergiya, A., V oss, C., Wainwright, C., Wang, J. J., Wang, A., Wang, B., Ward, J., Wei, J., Weinmann, C., Welihinda, A., Welinder, P., Weng, J., Weng, L., Wiethoff, M., Willner, D., Winter, C., Wolrich, S., Wong, H., Workman, L., Wu, S., Wu, J., Wu, M., Xiao, K., Xu, T., Yoo, S., Yu, K., Yuan, Q., Zaremba, W., Zellers, R., Zhang, C., Zhang, M., Zhao, S., Zheng, T., Zhuang, J., Zhuk, W., and Zoph, B. (2024). Gpt-4 technical report.

Pearl, J. (2023). Judea pearl, ai, and causality: What role do statisticians play? [Online; accessed May-2024].

Pryzant, R., Card, D., Jurafsky, D., Veitch, V ., and Sridhar, D. (2020). Causal effects of linguistic properties. arXiv preprint arXiv:2010.12919 .

Reuter, U., Ehrlich, M., Gendolla, A., Heinze, A., Klatt, J., Wen, S., Hours-Zesiger, P., Nickisch, J., Sieder, C., Hentschke, C., et al. (2022). Erenumab versus topiramate for the prevention of migraine-a randomised, double-blind, active-controlled phase 4 trial. Cephalalgia , 42(2):108-118.

Roller, S., Dinan, E., Goyal, N., Ju, D., Williamson, M., Liu, Y., Xu, J., Ott, M., Shuster, K., Smith, E. M., et al. (2020). Recipes for building an open-domain chatbot. arXiv preprint arXiv:2004.13637 .

Rothrock, J. F., Adams, A. M., Lipton, R. B., Silberstein, S. D., Jo, E., Zhao, X., Blumenfeld, A. M., and Group, F. S. I. (2019). Forward study: evaluating the comparative effectiveness of onabotulinumtoxina and topiramate for headache prevention in adults with chronic migraine. Headache: The Journal of Head and Face Pain , 59(10):1700-1713.

Schurman, B. (2019). The framework for fda's real-world evidence program.

Sheldrick, R. C. (2023). Randomized trials vs real-world evidence: how can both inform decision-making? Jama , 329(16):1352-1353.

Sridhar, D. and Blei, D. (2022). Causal inference from text: A commentary. Science advances .

Sridhar, D. and Getoor, L. (2019). Estimating causal effects of tone in online debates. arXiv preprint arXiv:1906.04177 .

Tu, R., Ma, C., and Zhang, C. (2023). Causal-discovery performance of chatgpt in the context of neuropathic pain diagnosis. arXiv preprint arXiv:2301.13819 .

Vashishtha, A., Reddy, A. G., Kumar, A., Bachu, S., Balasubramanian, V. N., and Sharma, A. (2023). Causal inference using llm-guided discovery. arXiv preprint arXiv:2310.15117 .

Willard, B. T. and Louf, R. (2023). Efficient guided generation for llms. arXiv preprint arXiv:2307.09702 .

Willig, M., Zecevic, M., Dhami, D. S., and Kersting, K. (2023). Causal parrots: Large language models may talk causality but are not causal. preprint , 8.

Winship, C. and Morgan, S. L. (1999). The estimation of causal effects from observational data. Annual review of sociology , 25(1):659-706.

X5 (2019). X5 Retail Hero: Uplift Modeling for Promotional Campaign. Challenge Dataset.

Zheng, L., Yin, L., Xie, Z., Huang, J., Sun, C., Yu, C. H., Cao, S., Kozyrakis, C., Stoica, I., Gonzalez, J. E., Barrett, C., and Sheng, Y . (2023). Efficiently programming large language models using sglang.

Appendix

A Notation

B Deriving NATURAL Full from Outcome Imputation estimator

In section 3, we derived the idealized version of our method, NATURAL Full using the form of the IPW estimator. In fact, any unbiased estimator would lead to same form as eq. (3), which can then be used to derive NATURAL Full using reports R and the law of iterated expectations. Here, we show this using the Outcome Imputation estimator. For discrete X and binary T and Y , we have

which is equivalent to eq. (3).

C Worked Example: Semaglutide vs. Tirzepatide

To make the NATURAL pipeline and its implementation more concrete, we now work through an end-to-end example using the Semaglutide vs. Tirzepatide dataset. We used this setting to develop our evaluation setup and constructed the pipeline as a function of the experiment design. While it is infeasible to exhaustively describe the entire decision space, major decisions that were found to impact ATE prediction are (i) filtering strategy, (ii) prompt tuning for extraction, and (iii) covariates' discretization. The strategies we tried are included in the pipeline description below, with the specific decisions made for each highlighted in this color.

Pipeline for Semaglutide vs. Tirzepatide. Given the experimental design of the clinical trial in Frías et al. [18] (NCT03987919), we defined our experiment as follows:

Treatments: Semaglutide and Tirzepatide

Covariates: Age, Sex, BMI, Start weight, Start HbA1c, Duration

Outcome: Percentage of participants who lost 5% or more of their initial weight

Inclusion criteria:

(b) They must already be on a regime of the treatment called Metformin.

(a) The user must be diagnosed with Type 2 Diabetes with starting HbA1c between 7% and 10.5%.

(c) They must have a BMI of 25 kg/m 2 or more.

(d) Since different treatment dosages can have varying effects, we also included dosage as an inclusion criterion, i.e. we aimed to include only posts that reported taking 1mg for Semaglutide and 5mg for Tirzepatide, as in the clinical trial.

Decisions in the pipeline that are a direct function of an experimental design like the one above are highlighted in this color in the following description.

Next, we implemented the entire pipeline as follows:

Initial filter. We identified nine subreddits relevant to this problem setting: r/Mounjaro, r/Ozempic, r/fasting, r/intermittentfasting, r/keto, r/loseit, r/Semaglutide, r/SuperMorbidlyObese, r/PlusSize. From each subreddit, we downloaded all submissions and comments posted upto December 2022 from the PushShift collection, so as to only use publicly available data. This resulted in a dataset of 577,733 submissions and comments. An initial deterministic, taskagnostic and rule-based filter removed any submission or comment if its content was not a string, if it had no score, if the content was "[deleted]" or "[removed]" , if it was a comment with fewer than ten space-separated strings (presumably, words), if the author's name contained the string "bot" , if there were no spaces in the first 2048 characters, and if less than 50% of all characters were alphabetic. This reduced the dataset size to 380,276. We then formatted this data into dictionary-like datapoints with fields: subreddit, title, date created, post/comment, author replies . We indcluded the last field because comments written by the author as replies to their own post may contain additional relevant information when combined with with original post and other replies. We then passed these through a task-dependent string-matching filters. For this dataset in particular, we listed strings used commonly to refer to the treatments, ["ozempic", "mounjaro", "semaglutide", "tirzepatide", "wegovy", "rybelsus", "zepbound"] , included common misspellings generated with GPT-4 and Perplexity, and filtered out datapoints that did not contain any of these strings. Similarly, we listed keywords relevant to the outcome of interest, ["kg", "kilo", "lb", "pound", "weigh", "drop", "loss", "lost", "gain", "hb", "a1c", "hemoglobin", "haemoglobin", "glucose", "sugar"] and filtered out datapoints that did not contain any of these strings. This filtered dataset now contained 50,654 datapoints.

Filter by treatment-outcome. To further filter the data to points that refer specifically to the treatments and outcome of interest, we prompted GPT-3.5-Turbo to extract only information

Filter by relevance. Next, we wrote a problem setting description and prompted GPT-3.5 Turbo to determine whether the posts, along with auxiliary information from the formatted dictionaries described above, were relevant to the described setting. The description and instructions for this particular dataset are shown in prompt 2. We manually labeled a handful of datapoints as Yes or No and included these as incontext examples to improve the LLM's generations. We removed datapoints that were deemed irrelevant, resulting in a "relevant" dataset of 21,229 datapoints.

required to ascertain the treatment and outcome, as shown in prompt 3. Since the outcome for this dataset, achievement of a target weight loss of 5% or more, may be reported in several ways, we attempted to cover all those possibilities. Specifically, we prompted the LLM to extract the user's starting weight, end weight, change in weight and percentage of change in weight. Several combinations of these attributes allow us to programmatically infer the final outcome. We also extracted the units in which weight was reported, converting all extractions to be in lbs. We filtered out any datapoint for which the extracted treatment was not one of the treatments considered for this task or for which it was not possible to infer the outcome using the above-mentioned extracted information. This finally gave us a natural language dataset of 4619 relevant reports, each of which contained treatment and outcome information pertaining to the defined problem setting.

Extract known and unknown covariates. Treating these 1265 reports as the final dataset from which to estimate an ATE, we extracted the set of covariates given in our experiment definition. We also included the duration of treatment as a covariate since this information is often reported and is likely to influence the outcome. This extraction step was conditioned on inclusion criteria being satisfied, a description of which was included in the extraction prompt, as in prompt 5. We tuned the prompts for extracting attributes, which include general instructions for the task and specific questions for each attribute. This was done by inspecting a handful of reports and corresponding extractions and then modifying prompts to correct any observed errors.

Filter known covariates by inclusion criteria. To evaluate against the clinical trial, we further filtered the dataset according to its inclusion criteria. At a high level, different strategies for this filtering trade-off how strictly we match the criteria with how many datapoints remain in the filtered set. Strict filtering to match every criteria exactly resulted in very few reports. Less strict filtering to match a subset of the criteria resulted in predicted ATEs that varied depending on which criteria we chose to satisfy, with no apparent task-agnostic principle to determine crucial criteria. Finally, we used instructions shown in prompt 4 to extract covariates and aimed for a set of reports with non-zero probability of satisfying these criteria. As described in item (iv) of section 4 and motivated in appendix G, we extracted all covariates including ones related to the inclusion criteria and removed datapoints whose extractions were not Unknown and failed to satisfy the criteria above. This resulted in a dataset of 1265 reports.

Infer conditionals. We inferred conditional distributions from LLAMA2-70B for different versions of NATURAL, with the strategy described in item (vi) of section 4 and LLM inputs of the form shown in prompt 6. Here, "conditioning on covariates" was implemented by adding questions about the covariates and their sampled answers to the input. For instance, for sex , the question "What is the reported sex of the user?" was followed by its previously extracted answer ( Male or Female ). The scoring strategy required enumerating possible options for treatments and outcomes for each input, which were ["Semaglutide like Ozempic or Wegovy or Rybelsus", "Tirzepatide like Mounjaro or Zepbound"] and ["No", "Yes"] , respectively.

Finally, given all the required extractions and conditional probabilities, we required discrete covariates to plug them into our NATURAL estimators. Hence, we converted any continuous covariates into discrete categories. These categories for each dataset are shown in table 4 for all our datasets. Different choices of discretization led to slightly different ATE predictions. We found it most helpful to discretize continuous numerical covariates into intervals such that the number of datapoints were roughly balanced across intervals. This avoided covariate strata with too many or too few datapoints and resulted in ATE predictions from all NATURAL estimators that were sufficiently close to the ground truth.

Weight reports according to inclusion criteria match. We also used LLAMA2-70B to compute the weighting terms described in item (vii) of section 4. Concretely, we constructed a prompt, like prompt 7, describing the inclusion criteria listed in item 4 of the experiment design above, followed by a report, R i and an instruction asking the LLM to determine whether all the described criteria are met. We then scored the possible answers, ["No", "Yes"] , exponentiated and renormalized them to obtain P ( X ∈ I | R i ) . We marginalized over reports to compute the denominator, P ( X ∈ I ) , in the weight. The contribution of each report to the ATE estimates was weighted by this relative likelihood of matching the in inclusion criteria of the experiment given the report.

Adapting the pipeline to test trials. The decisions above in this color directly or indirectly influenced the ATE and we made our choices with access to the ground truth for Semaglutide vs. Tirzepatide. Hence, we call this a "tuned" setting. We fixed these decisions for the three test settings. Note that no other aspect of the pipeline depends on the ATE. All the choices in this color are a

function of the experimental design. Hence, the pipeline can be easily adapted to any new setting, given its experimental design and without knowledge of the true ATE.

D LLMPrompts

Prompt 2: Relevance filtering (Weight Loss)

You are an expert researcher looking around reddit for posts/comments describing the effect of a treatment on weight loss or blood sugar level experienced by the author.

## Problem Setting

> You are interested in self-reported effects of a treatment on a user who took the treatment themselves. You want to be able to answer some or all of the following questions from the text of the post or comment:

Which treatment did the user take?

What change did they observe in their weight due to this treatment, and during what duration did they observe this change?

What change did they observe in their blood sugar, aka HbA1c levels, due to this treatment, and during what duration did they observe this change?

What are other attributes they report, e.g. age, sex, country of residence, diabetes diagnosis, other treatments they have tried, or side effects?

## Your Instructions

I will show you a post or comment, and contextual information about it. Based on the given problem setting and contextual information, you need to judge whether it is relevant to the problem setting described above or not. Answer Yes if the post is relevant and No otherwise; nothing else. Here are a few examples:

Prompt 3: Treatment-outcome filtering (Weight Loss)

You are a medical assistant, helping a doctor structure posts about weight loss treatments found on Reddit. Your task is to use the self-report to interpret accurate information about the following fields and store

Assign a valid value to each key above. If you can't find the required information in the post, assign the value "Unknown". Remember to ONLY

Prompt 4: Covariate extraction (Weight Loss)

As a medical assistant aiding a physician, your role involves examining Reddit posts discussing weight loss treatments and interpreting self-reported information accurately. This data needs to be into a well-structured JSON dictionary, with the most suitable option translated chosen from the choices provided. ## Your Instructions Assume a user shares a post along with related data. Your job will be to create a dictionary comprising of the following keys as well as their matching accurate data: {covariate descriptions} Please ensure you fill all the fields and that you choose a valid value for each key from the provided options. Unfilled fields are not allowed. In instances where certainty is impossible, make your best educated guess, or provide the "Unknown" value. Note that your completed task should ONLY yield a JSON containing ALL the listed keys alongside their accurate values. Here are a few examples: {incontext examples} ## Input {report} ## Output >

Prompt 7: Inclusion weights (Weight Loss)

You are a medical assistant aiding a physician. Based on the following social media post about an individual's experience with a diabetes treatment and its effect on their weight, evaluate whether the person meets ALL of the following criteria:

Type 2 Diabetes: Diagnosed with Type 2 Diabetes and has an HbA1c between 7\ % and 10\%.

Metformin: Has been taking Metformin for at least the past 3 months.

BMI: Has a BMI greater than 25 kg/m^2.

Medication Dosage: If taking Semaglutide (e.g., Ozempic, Wegovy, Rybelsus), the dosage is 1mg; OR if taking Tirzepatide (e.g., Mounjaro, Zepbound), the dosage is 5mg.

After analyzing the post, determine whether the individual meets ALL of the above criteria.

E Dataset Details

We provide further details about the treatments, outcomes and covariates, along with inclusion criteria and discrete categories used in our experiments, for each dataset in tables 3 and 4.

F Further Experimental Results

F.1 Known and Unknown/Imputed covariates for real data experiments

We refer the reader to figs. 6 to 9 for empirical distributions of covariates extracted by an LLM in its first extraction as well as those imputed in its second imputataion conditioned on inclusion criteria.

0

20

40

60

80

100

120

140

Extracted samples

30

40

50

60

70

age

0

100

200

300

400

500

Inclusion-conditional samples

0.00

0.25

0.50

0.75

1.00

sex

30

40

50

60

bmi

6

8

10

12

14

start_HbA1c

200

300

400

500

start_weight

0

500

1000

1500

duration_days

0.0

2.5

5.0

7.5

10.0

12.5

15.0

17.5

Extracted samples

0

20

40

60

age

0

100

200

300

400

500

600

700

Inclusion-conditional samples

0.00

0.25

0.50

0.75

1.00

sex

40

60

bmi

0

5

10

start_HbA1c

0

200

400

start_weight

0

50

100

150

200

duration_days

F.2 Balancing property of propensity scores

We refer the reader to Figure 10 for visualizations of the propensity score corrected average treatment effect on covariates for all test clinical settings. For each setting, our estimated propensity score balances each covariate, far better than a uniform propensity distribution would.

Since covariates may take values at different scales, we computed the standard mean difference (SMD) across cohorts for each covariate X ( i ) [16], given by:

where X ( i ) (1) -X ( i ) (0) estimates the average treatment effect on X ( i ) , using propensity score weighting, and var ( · ) denotes sample variance.

0

2

4

6

8

10

12

Extracted samples

0

20

40

60

age

0

50

100

150

200

250

300

350

400

Inclusion-conditional samples

0.0

0.2

0.4

0.6

0.8

1.0

sex

0

2

4

6

8

10

country

0

10

20

30

0

2000

4000

6000

8000

duration_days

0

2

4

6

8

10

12

Extracted samples

20

30

40

50

age

0

100

200

300

400

500

600

Inclusion-conditional samples

0.0

0.2

0.4

0.6

0.8

1.0

sex

0

2

4

6

country

15

20

25

30

0

100

200

300

400

duration_days

-

0

.

30

-

0

.

25

-

0

.

20

-

0

.

15

-

0

.

10

-

0

.

05

0

.

00

Balance across treatment groups

age

sex

bmi

start HbA1c

start weight

duration days

Covariates

0

.

0

0

.

2

0

.

4

0

.

6

0

.

8

Balance across treatment groups

age

sex

country

baseline MMD

duration days

Covariates

(b) Erenumab vs. Topiramate

-

0

.

02

0

.

00

0

.

02

0

.

04

0

.

06

0

.

08

Balance across treatment groups

age

sex

country

baseline MMD

duration days

Covariates

Uniform

LLAMA2-70B

(c) OnabotulinumtoxinA vs. Topira-

mate

F.3 Sensitivity Analysis

While we rely on domain expertise to define the confounder set for each setting such that necessary causal assumptions are satisfied, unobserved confoundedness remains a challenge. We followed strategies in Lu and Ding [29] to analyze the sensitivity of our ATE estimates to the degree of unobserved confoundedness. Specifically, the idea is to introduce sensitivity parameters,

,

which quantify the degree of unobserved confoundedness. In our case, sensitivity parameters are the density ratio between likelihood of each potential outcome in the treated vs. untreated group. The ATE estimate is non-increasing in the sensitivity parameters. So, for positive ATEs, we are looking for the largest sensitivity parameters that maintain the positivity of the ATE, which tells us the degree of unobserved confoundedness that an estimator is robust to. Table 5 shows that the direction (sign) of

NATURAL IPW ATE estimates for the Semaglutide vs. Tirzepatide dataset change from positive to negative at large values of sensitivity parameters, implying that they are robust to large degrees of unobserved confoundedness.

We further investigated the importance of each confounder as suggested by the leave-one-covariateout approach in Section 4 of Lu and Ding [29], by dropping that covariate as if it is an unobserved confounder and measuring the corresponding worst-case (over all possible values of the remaining covariates) sensitivity parameters with the remaining covariates. Figure 11 shows contour lines depicting NATURAL IPW ATE estimates at different values of sensitivity parameters for all our real-world datasets. Orange regions denote sensitivity parameter values for which the sign of the estimate ATE does not change, while blue regions denote the values that flip the direction of the estimate. Stars show sensitivity parameters for each covariate in the different settings. Hence, this estimator is sensitive to the covariate set and all covariates are important in the case of Semaglutide vs. Tirzepatide, while most are important for Erenumab vs. Topiramate. The direction of ATE estimates is not sensitive to covariates in the case of Semaglutide vs. Liraglutide and OnabotulinumtoxinA vs. Topiramate, implying that the estimated causal effects could only be explained away by an unobserved confounder that is stronger than all observed confounders.

1

.

0

1

.

5

2

.

0

2

.

5

3

.

0

ε

0

1

.

0

1

.

5

2

.

0

2

.

5

3

.

0

ε

1

age

sex

bmi

start HbA1c

start weight

duration days

-75.00

-70.00

-65.00

-60.00

-55.00

-50.00

-45.00

-40.00

-35.00

-30.00

-25.00

-20.00

-15.00

-10.00

-5.00

0.00

5.00

10.00

0

.

5

1

.

0

1

.

5

2

.

0

2

.

5

3

.

0

3

.

5

ε

0

0

.

5

1

.

0

1

.

5

2

.

0

2

.

5

3

.

0

3

.

5

ε

1

age

sex

bmi

start HbA1c

start weight

duration days

-100.00

-90.00

-80.00

-70.00

-60.00

-50.00

-40.00

-30.00

-20.00

-10.00

0.00

10.00

20.00

30.00

40.00

50.00

60.00

1

2

3

4

5

6

ε

0

1

2

3

4

5

6

ε

1

age

sex

country

baseline MMD

duration days

-52.00

-48.00

-44.00

-40.00

-36.00

-32.00

-28.00

-20.00

-16.00

-8.00

-4.00

0.00

4.00

8.00

12.00

16.00

20.00

24.00

(c) Erenumab vs. Topiramate

2

4

6

8

10

12

ε

0

2

4

6

8

10

12

ε

1

age

sex

country

baseline MMD

duration days

-60.00

-54.00

-48.00

-36.00

-30.00

-6.00

0.00

6.00

12.00

18.00

24.00

30.00

36.00

(d) OnabotulinumtoxinA vs. Topiramate

G Inclusion Criteria conditioned Estimator

We are interested in an ATE conditioned on inclusion criteria denoted I ,

Let τ ( X,T,Y ) be a function such that

For example, τ ( I ) can estimated by the IPW estimator,

because the P ( T = 1 | X = x, X ∈ I ) = P ( T = 1 | X = x ) for all x ∈ I . Throughout this section, we operate under Assumptions 3 and 4 and assume that the LLM gives us access to the true data-generating conditionals.

The law of total expectation gives us an estimator that can operate on samples of reports R :

To summarize, we have the identities:

We prompted LLAMA2-70B with descriptions of the inclusion criteria and each report to estimate P ( X i ∈ I | R i ) P ( X i ∈ I ) , similar to other conditional distributions described in section 4, and marginalized over reports for the denominator.

It is also possible to avoid this weight computation at the expense of additional structural assumptions on the data. We discuss these conditions below and show corresponding results for NATURAL estimators in table 6.

Let X ∈ R D and let us make the following assumption on the inclusion criteria:

Assumption 5 (Inclusion criteria specification) The inclusion criterion I defines a box, i.e., it is specified separately for each covariate dimension I d , d ∈ { 1 , . . . , D } and the set of covariates satisfying every inclusion criteria is given by the product of individual criteria over the covariate dimensions, i.e., { X ∈ I } = ∏ D d =1 { X d ∈ I d } where X d is the d -th dimension of X = ( X d ) D d =1 .

Recall from section 4 that inclusion-based filtering leaves us with reports whose covariates are either 'known' and satisfy their criteria or Unknown . We also have the value of the known covariates. Let K ∈ { 0 , 1 } D be the binary vector of variables K d that indicate whether the covariate X d is found to be 'known' for a random report R . Let X K = ( X d : K d = 1) be the vector of length ∑ d K d holding the values of the known covariates. For ease of notation, define the event that the known covariates satisfy their criteria and the event that the unknown covariates satisfy their criteria:

Notice that { X K ∈ I K } ∩ { X 1 -K ∈ I 1 -K } = { X ∈ I } . Thus, after the filtering steps we have

with the guarantee that the knowns satisfy their inclusion criteria, { X K i i ∈ I K i } . Formally, assuming that the LLM computes the true conditional distribution of the data-generating process (Assumption 4), this gives us data sampled i.i.d. from P ( R = r, K = k, X k = x k | X K ∈ I K ) . Note, that we are assuming the existence of an additional ground-truth random variable K in the data-generating process that describes whether a covariate is knowable from a report. Here, we show how to estimate τ ( I ) from this dataset of filtered reports using importance sampling, under the following assumption:

Assumption 6 (Satisfaction of I by Unknown covariates) Satisfaction of inclusion criteria by unknown covariates is conditionally independent of the report and the known covariates given satisfaction of inclusion criteria by known covariates, i.e., for all r, k, x k :

One can derive the following identity in a similar fashion as eq. (25)

From assumption 6, the fraction above simplifies to 1 , leaving us with the following estimator

which can be computed from the information available at the end of filtering. In practice, we do not condition the LLM on K i in the final inference step (vi), which amounts to an additional conditional independence assumption:

Assumption 7 (Conditional independence of knowable covariates) K ⊥ ⊥ ( T, Y ) | ( X,R ) .

Equation (31) above can now be more efficiently estimated by prompting the LLM to extract covariates under the constraints of the inclusion criteria for each report in our filtered dataset, and then following the remaining steps in the pipeline to an ATE estimate.

NeurIPS Paper Checklist

The checklist is designed to encourage best practices for responsible machine learning research, addressing issues of reproducibility, transparency, research ethics, and societal impact. Do not remove the checklist: The papers not including the checklist will be desk rejected. The checklist should follow the references and follow the (optional) supplemental material. The checklist does NOT count towards the page limit.

Please read the checklist guidelines carefully for information on how to answer these questions. For each question in the checklist:

You should answer [Yes] , [No] , or [NA] .

Please provide a short (1-2 sentence) justification right after your answer (even for NA).

[NA] means either that the question is Not Applicable for that particular paper or the relevant information is Not Available.

The checklist answers are an integral part of your paper submission. They are visible to the reviewers, area chairs, senior area chairs, and ethics reviewers. You will be asked to also include it (after eventual revisions) with the final version of your paper, and its final version will be published with the paper.

The reviewers of your paper will be asked to use the checklist as one of the factors in their evaluation. While "[Yes] " is generally preferable to "[No] ", it is perfectly acceptable to answer "[No] " provided a proper justification is given (e.g., "error bars are not reported because it would be too computationally expensive" or "we were unable to find the license for the dataset we used"). In general, answering "[No] " or "[NA] " is not grounds for rejection. While the questions are phrased in a binary way, we acknowledge that the true answer is often more nuanced, so please just use your best judgment and write a justification to elaborate. All supporting evidence can appear either in the main paper or the supplemental material, provided in appendix. If you answer [Yes] to a question, in the justification please point to the section(s) where related material for the question can be found.

1. Claims

Answer: [Yes]

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Justification: We substantiate our claims through empirical evidence in section 6 and explicitly state the assumptions under which they are expected to hold in section 3. Guidelines:

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

2. Limitations

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

Question: Does the paper discuss the limitations of the work performed by the authors? Answer: [Yes]

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

Justification: We discuss the limitations and broader impacts of our work in detail in section 5. We further state the assumptions made by our work in section 3. Guidelines:

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

3. Theory Assumptions and Proofs

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Justification: While this is not a theoretical paper, we provide the full set of assumptions we operate under and method derivations in section 3, with strategies to satisfy these assumptions in section 4 and additional details and derivations about more nuanced steps of our method in appendix G.

Answer: [Yes]

Guidelines:

All the theorems, formulas, and proofs in the paper should be numbered and cross-referenced.

The answer NA means that the paper does not include theoretical results.

All assumptions should be clearly stated or referenced in the statement of any theorems.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Theorems and Lemmas that the proof relies upon should be properly referenced.

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

4. Experimental Result Reproducibility

Answer: [Yes]

The answer NA means that the paper does not include experiments.

Justification: Experimental details to reproduce our datasets and empirical results are provided in section 6 with further details like prompts used to query language models in appendix D. Guidelines:

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

5. Open access to data and code

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material? Answer: [Yes]

Guidelines:

Justification: We plan to release code for reproducing all experimental results, along with scripts for producing each dataset, with the final version of the paper.

The answer NA means that paper does not include experiments requiring code.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/public/ guides/CodeSubmissionPolicy ) for more details.

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https://nips.cc/public/ guides/CodeSubmissionPolicy ) for more details.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

6. Experimental Setting/Details

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Justification: All details for datasets, tuning of the method and impact of different choices are discussed in section 6, with additional details throughout the appendix..

Answer: [Yes]

Guidelines:

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The answer NA means that the paper does not include experiments.

The full details can be provided either with the code, in appendix, or as supplemental material.

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

7. Experiment Statistical Significance

Answer: [Yes]

The answer NA means that the paper does not include experiments.

Justification: We report standard error for all our main results in tables 1 and 2. Guidelines:

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The assumptions made should be given (e.g., Normally distributed errors).

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

8. Experiments Compute Resources

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Justification: We use pretrained models for inference only and discuss the efficiency considerations for different versions of our method in section 4.

Answer: [Yes]

Guidelines:

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The answer NA means that the paper does not include experiments.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

9. Code Of Ethics

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Justification: We conform to all aspects of the NeurIPS Code of Ethics. Guidelines:

Answer: [Yes]

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Justification: We dedicate a section to the limitations and broader impacts of our work in section 5. Guidelines:

Answer: [Yes]

The answer NA means that there is no societal impact of the work performed.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

11. Safeguards

Answer: [Yes]

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Justification: We do not release any large models. We do however plan to release scripts to reproduce our dataset, ensuring they rely on publicly available data.

The answer NA means that the paper poses no such risks.

Guidelines:

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

12. Licenses for existing assets

Answer: [Yes]

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Justification: We cite all original owners of code, data, and model used in this work. Guidelines:

The authors should cite the original paper that produced the code package or dataset.

The answer NA means that the paper does not use existing assets.

The authors should state which version of the asset is used and, if possible, include a URL.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Justification: We do not release new assets.

Answer: [NA]

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

The paper should discuss whether and how consent was obtained from people whose asset is used.

14. Crowdsourcing and Research with Human Subjects

Answer: [NA]

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Justification: The paper does not involve crowdsourcing nor research with human subjects. Guidelines:

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Answer: [NA]

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Justification: The paper does not involve crowdsourcing nor research with human subjects. Guidelines:

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work aims to the causal effect estimation from unstructured observational text data, proposing a pipeline based on LLM to extract the treatment, covariate and outcome from the unstructured data by LLM. It's a interesting exploration for causla inference and the pipeline process of the inference method is quite standard.\n\nSTRENGTHS:\n(1) The problem solution for treatment effect estiamtion is quite novel.\n\n(2) The proposed LLM pipeline can address the limitation of the current effect estimation method, i.e., can not deal with the unstructured data.\n\nWEAKNESSES:\n(1) some details are missing, leading to the poor readability.\n\n(2) Some equations are not correct (based on my understanding).\n\n(3) The presnetation of the whole methodology is not good enough, alought I am not an expert of LLM, I know how LLM works. However, i can not imagine how the proposed pipeline work and how it estimate ATE very clearly. \n\n(4) The evaluation part is kind of weak, given that baselines are too limited and simple.\n\nQUESTIONS:\n1.there are some claims that are not well expalined, leading to confuse people. For exampel, \"value may be recouped from outcomes that would otherwise be lost\" this claim sounds good but i don't what does it mean here.\n\n2.the overall idea of this work to utilize LLM to explore the causal effect estimation from unstructured data is good, i like it. But the writing can not match the good idea. For example, line 54-59, i have no idea about what the authors try to express, The transition from sentence to sentence is too stiff \n\n3.The binary and discrete assumption about the outcome Y and covariates X is kind of too strict. Typically, one can assume the teatment assignment is binary but outcome and covariates are continous. It's not clear why this work adopt such assumption. if so, the applying scale of the proposed method would be limited. also, the assumption 4 is also too strong.\n\n4.in the  outcome predictor eq. (9), why it is P(Y=1|R_i,X_i,T_i) instead of P(Y=t|R_i,X_i,T_i)? I don't understand. When t=0, the outcome predictor still ouput the expectation over P(Y=1|xxx)?\n\n5.the description how to extrct the covariates and their corresponding values is not clear.  How to determine the feature values? For each report, the set of covarivates is the same, right? Can you present a specific example? what does each feature value mean in the real-world? The readability of the method section is poor.\n\n6.In the evaluation table 1, the \"IPW (Structured) \" is a baseline or ground truth? there is no any discussion in the main body about this baseline and i am so confused about the discussion below because of it, given that the \"IPW (Structured) \" performs the best.\n\n7.how does the ground truth of ate comes from? Can you clarify this point?\n\nby the way, i like the idea of this work, but the presentation of this paper is really poor. thus if the above questions can be addressed well, i will consider to increase the score.\n\nLIMITATIONS:\nauthors have adequately addressed the limitations.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-08"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a family of causal effect estimators named NATURAL, designed to use LLMs for mining causal effect estimates from observational text data. The authors address the challenge of automating data curation and using LLMs to impute missing information, presenting a method that conditions on structured variables to assist in computation of causal effect estimators. The authors develop six datasets (two synthetic and four real) to evaluate their method, and demonstrate that NATURAL estimators produce causal effect estimates within close range of ground truth from randomized trials.\n\nSTRENGTHS:\n1. Clear and thoughtful use of LLMs to estimate causal effects from text data. The authors present a cool methodology, properly formalized, for using LLMs to extract and impute structured variables from observational text data. \n\n2. Development and evaluation of six datasets, including real-world clinical trial data.\n\n3. Strong results showing causal effect estimates are within a close range of ground truth values.\n\nWEAKNESSES:\n1. The original claims made in the abstract+intro seems to be too grandiose, but in fact it is about the use of LLMs to classify variables of interest from the text. I would change the framing of the paper a bit to better reflect that. It would make the claims of the paper less objectionable and would better demonstrate the usefulness of NATURAL.\n\n2. There is a vast literature in the social sciences on recovering interpretable variables directly from text for estimating causal effects from observational data. Most of these approaches rely on probabilistic approaches like topic models, but recently there’s growing interest in doing so automatically with LLMs. The authors should better address this literature, and compare their approach to relevant methods if possible.\n\n3. The approach is really cool, but like any ML-pipeline approach it surely introduces errors at each step of the process (see for example Egami et al @ NeurIPS 2023). Each error will then bias the causal effect estimation. From the results of the paper I’m convinced empirically your approach works well, but would I be able to understand whether it produces accurate estimates on a new dataset? A deeper analysis and perhaps a way to propagate error/uncertainty to the estimation would be very helpful here.\n\nQUESTIONS:\n1. Authors explain that as part of their process, they “filter for reports that are likely to conform to the experimental design”. Could this introduce bias?\n\n2. All of the “classical strategies” used assume no-hidden confounding. Could you imagine how someone would use an LLM with a more complex identification strategy (say IV, or RDD)? You claim at the end of the intro that you can anticipate someone doing so, I wonder if you can elaborate.\n\nLIMITATIONS:\nThe authors have addressed the limitations of their work, acknowledging the dependency on the quality and calibration of LLMs and the potential inaccuracies in approximating the required conditional distributions. They emphasize that NATURAL estimators should not be used for high-stakes decision-making without experimental validation and stress the need for domain expert involvement to ensure causal assumptions are met.", "TITLE": "Official Review", "RECOMMENDATION": 8, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-12"}

comments: SUMMARY:
Estimating causal effects is costly and time-consuming. The authors propose  to use large language models (LLMs) to mine unstructured text data for causal effect estimation. This paper introduces NATURAL, a family of causal effect estimators using LLMs to process unstructured text data. This seems to be a good application of LLMs for the task of causality.

STRENGTHS:
-  Determine the effects of treatments can be expensive and time-consuming so the paper introduces a novel task of effect estimation using unstructured natural language data.

- This method is adaptable to various domains where textual data is abundant.

- This seems to be a more practical application of LLM for the task of causality.

WEAKNESSES:
- LLMs might inherit biases present in their training data or hallucinate. 

 - Social media users might not reflect the demographics or behaviors of the broader population.

- Finetuning the model to one domain may not lead to good generalisation in others, during fine-tuning does the LLM learn inductive biases regarding the "topic" or task?

QUESTIONS:
-  How do the authors make sure that all of the confounders are accounted ? I can imagine there to be many confounders mentioned in the text.

- There could be a bias in social media text, I thought people would report negative cases more often than positive, did you observe any such biases?

LIMITATIONS:
Mentioned
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-07-13

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper seeks to use LLMs for a workflow that extracts structured variables\nfrom free text, filters the dataset, and then computes a causal estimate using\nthe imputed variables. The paper applies this methodology to two synthetic and\nfour real-world datasets and shows that it produces estimates that are\ncomparable to those from known ground truth or RCT estimates.\n\nSTRENGTHS:\nThis is a very ambitious paper that pulls together a complicated workflow for\nestimating causal effects from real-world natural language datasets. Just\nshowing that this can be done is a significant contribution.\n\nThe paper is clearly written and the main points are easy to follow.\n\nWhile I am somewhat skeptical of any practical applicability of this work, the\npaper is reasonable conservative in highlighting its limitations.\n\nWEAKNESSES:\nThe paper at almost every turn relies on prompting an LLM and implicitly\nassuming that the model returns data from a desired distribution. In general,\nthis will introduce measurement error which could systematically bias the\noverall method's estimates. See for example [1] and [2] below.\n\nThe synthetic data evaluation is fairly limited. It would be nice to at least\nunderstand how performance varies as sample size increases from a few hundred\nexamples to many thousands (especially as the IPW oracle baselines are not\nparticularly good). This would also allow you to stress-test the different\nassumptions being made. If you have synthetic data in which reports for certain\npatients are systematically truncated or censored, or where different groups\nwrite reports in different languages or styles, how does that affect the\ndifferent steps (i-vi)?\n\n[1] Ashwin, Julian, Aditya Chhabra, and Vijayendra Rao. \"Using Large Language\nModels for Qualitative Analysis can Introduce Serious Bias.\" Development\nResearch (2023).\n\n[2] Egami, Naoki, et al. \"Using imperfect surrogates for downstream inference:\nDesign-based supervised learning for social science applications of large\nlanguage models.\" Advances in Neural Information Processing Systems 36\n(2024).\n\nQUESTIONS:\nLine 267-268: What is the point of sampling a persona from Big Five personality\ntraits? How does this simulate realism?\n\nLine 147-149 says \"if all reports are the constant, empty string ... we have\nfull access to the true observational joint density.\" Am I correct that this is\na necessary assumption for the overall method to work in theory, but the actual\nimplementation (steps (v) and (vi) in lines 206-220) would not work if all\nreports are the constant, empty string? This may be obvious, but it could be\nworth clarifying that when you say \"we cannot formally guarantee that [our\nmethod] satisfies Assumptions 3 and 4\" you mean the form of Assumption 4 that\ndoes not involve all reports being empty strings.\n\nIn Tables 1 and 2, which LLMs are used? LLAMA2-70B? Overall, it would be\nhelpful to more clearly label which LLMs are used when. In Line 204, the paper\nsays that the GPT-4 API sufficed for filtering; was GPT-4 used anywhere else?\nHow was the decision made of which LLM to use where?\n\nIt might be helpful to have a figure or appendix that walks through every step\n(the paper does this for many steps, just not all in one place) in which an\nLLM is queried and discusses what assumptions are being made.\n\nLIMITATIONS:\nOverall, the paper does a good job of not overclaiming. However, see weakness 1\nabove. I would also suggest the authors discuss the challenges of using RCT\nestimates to validate observational studies -- there are many reasons why those\nestimates might not align (selection bias, dropout, etc).", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-14"}