---
title: "Conceptualizing Treatment Leakage in Text-based Causal"
description: "How treatment leakage in text can distort causal estimates, and how removing treatment-related passages changes the results in a simulation."
canonical: "https://research.elamur.ai/free/en/papers/daoud-2022-conceptualizing-treatment-leakage-text-based/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/daoud-2022-conceptualizing-treatment-leakage-text-based/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / Conceptualizing Treatment Leakage in Text-based Causal Inference

# Conceptualizing Treatment Leakage in Text-based Causal Inference

Paper · 2022 · Adel Daoud, Connor Jerzak and Richard Johansson

**Authors:** Adel Daoud, Connor Jerzak and [Richard Johansson](https://md.research.elamur.ai/free/en/authors/richard-johansson/) · **Year:** 2022 · **Venue:** Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Cited by **3** papers in our library of more than 163,000 papers whose bibliographies we read · Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2022.naacl-main.413/)
- [PDF](https://aclanthology.org/2022.naacl-main.413.pdf)
- [DOI 10.18653/v1/2022.naacl-main.413](https://doi.org/10.18653/v1/2022.naacl-main.413)

## Summary

A policy document can describe the conditions that led to a decision and record what the decision put into effect. The conditions may help explain why some countries received a program and others did not. The record of the decision tells the researcher which countries actually received it. Both kinds of information can appear in the same document, even though they play different roles in a causal analysis. Daoud, Jerzak, and Johansson call it *treatment leakage* when the intervention under study influences the text that researchers use to adjust for confounding. If the intervention and a hidden confounder both shape the document, adjusting for the document can introduce a new source of bias.

The authors propose *text distillation* as a preprocessing step. The idea is to remove the signal generated by the treatment while preserving what the document reveals about the confounder. The simplest case is a document in which each signal occupies its own passages. A researcher could retain the passages about the conditions that influenced treatment assignment and discard those whose contents were shaped by the assignment itself. The paper also considers a harder case in which treatment changes the tone of a document throughout. A transformation would then have to preserve information about the confounder without carrying forward the influence of treatment, even where deleting whole passages is impractical.

The authors study this distinction with synthetic documents about a hypothetical International Monetary Fund program. They control which paragraphs carry information about the program, which convey an otherwise unobserved political condition, and which give unrelated background. The true average treatment effect in the simulation is 5. Adjusting for observed covariates alone gives an estimate of -2.3. Adding the full documents to the adjustment procedure moves it to -7.0, farther from the known effect. Removing the treatment paragraphs using their recorded origins yields 3.5, with a reported confidence interval from 1.2 to 5.8. Removing the confounder paragraphs as well gives -2.9.

The results illustrate why predicting treatment assignment accurately can be a poor guide to estimating what treatment does. The full documents make assignment nearly predictable, in part because the generator gives them information produced by the assignment itself. The successful distillation uses knowledge available to the simulation designer. For an observational study with naturally occurring documents, the origin of a passage and the adequacy of the remaining information would both require separate justification.

## Deep dive: Conceptualizing Treatment Leakage in Text-based Causal Inference

How treatment leakage in text can distort causal estimates, and how removing treatment-related passages changes the results in a simulation. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why researchers turn to documents

Suppose researchers want to estimate the effect of an International Monetary Fund program on a country-level indicator. Countries that enter such a program can differ from other countries in ways that also matter for the indicator. A country's political situation in relation to the Fund could influence whether it receives a program and how the indicator develops. A comparison of countries with and without a program can therefore combine the program's effect with differences that were already present when the program was assigned. The political situation is a *confounder* in this example because it helps explain both assignment and outcome.

The authors distinguish confounders that researchers can record directly from ones they cannot readily measure. The former can enter a causal analysis as numerical covariates. The latter may leave traces in policy documents, medical records, or social media posts. A document used for those traces is a *proxy*, an observed source that carries indirect information about an underlying variable. The attraction of text is that it can preserve details that a structured dataset omits. A policy document may describe circumstances surrounding a decision in detail even when the corresponding data record contains only a few fields.

The paper situates this idea within earlier work on observational causal inference and more recent research on using text to adjust for confounding. It points to studies that match observations using their documents and investigate how to judge the quality of text-based matches. It also describes methodological work on bringing high-dimensional text into causal estimation. A document can furnish many potential features, and a statistical procedure can use those features to find similarities between observations or estimate their probabilities of receiving treatment. The problem the authors identify arises before the choice of statistical procedure. It concerns what makes those textual features appear in the first place.

Much of the earlier literature, in the authors' account, gives the document the role of an indirect measurement of confounders. The paper makes an implicit condition of that role explicit. Text used for adjustment ought to convey information about the circumstances associated with treatment without also being shaped by treatment in ways that undermine the causal analysis. A document can satisfy the first part while violating the second. Its usefulness as a proxy and its exposure to treatment are properties of the same source, so there is no reason to infer one from the other.

#### How adjusting for text can introduce bias

The paper uses a directed acyclic graph to describe the problem. A graph of this kind represents variables as nodes and causal relationships as arrows. In the main example, a hidden confounder helps determine the treatment and the outcome. It also influences the document, which is what makes the document a candidate proxy. Treatment has its own effect on the document. These relationships can coexist even when the outcome itself plays no role in producing the text.

In this graph, the document is a *collider*, a node into which arrows from both treatment and the hidden confounder point. Consider comparing treated and untreated cases with similar textual features. If either the treatment or the confounder can help produce those features, knowledge of treatment status gives clues about how much of the observed text is likely to have come from the confounder. Conditioning on the document can thus induce an association through the document between treatment and the confounder. Since the confounder also helps determine the outcome, this association can affect the estimated treatment effect.

One source of bias already exists before the document enters the analysis. It comes from having incomplete measurements of factors that influence both treatment and outcome. Adding the document can introduce another source, created by holding fixed a variable that treatment helped produce. The practical dilemma is that dropping the document leaves researchers with less evidence about the hidden confounder, while using it whole can bring in post-treatment information. The authors propose distillation to address these two problems within the same analysis.

Post-treatment text can also make treated and untreated cases hard to compare. For instance, if program recipients reliably have passages describing the program and other countries lack those passages, the corresponding text features may separate the groups. An estimated probability of receiving treatment can then become very high for recipients and very low for other cases. Weighting methods rely on some overlap in the probabilities of assignment among comparable observations. Features that nearly identify treatment can undermine that overlap even when they are very useful for classification.

The source of an association between text and treatment matters here. Suppose the political situation makes program participation more likely and also changes how officials describe the country's position. The resulting passages can help predict treatment because they measure a confounder. That association is part of their value to the analyst. Leakage is a different relationship. It occurs when the text still varies with treatment after the confounder has been held fixed, as it would if the program generated its own language in the document. The authors' definition captures this distinction by making conditional dependence central.

#### When the place of text in the causal sequence is uncertain

A document may look backward at events, describe conditions around the time of writing, and discuss what is likely to happen next. A retrospective account can include the consequences of a decision in the same passage that explains its background. A public policy document can anticipate a future intervention. An uncertain production date adds another complication because the researcher may have limited evidence about which events could have shaped the text. The authors use these possibilities to explain why documents are difficult to classify by a simple division between material about the past and material about the future.

The graph also changes according to what the document does. The paper considers congressional speech and a roll call vote as an example in which text might be a mediator. In that case, speech can be influenced by treatment and in turn affect the vote. The speech is then part of a possible route by which treatment reaches the outcome. Adjusting for it changes which causal pathways contribute to the comparison. The collider example and the mediation example therefore give different reasons to establish where a document belongs in the sequence of events.

Text recorded before assignment can pose a further problem if it directly affects assignment. The authors discuss circumstances in which adjusting for this component could increase the variance of the effect estimate and worsen root mean squared error, a measure that reflects both systematic error and variability. Prediction, bias, and precision can therefore tell different stories about the value of a textual feature. The paper's central experiment focuses on treatment influencing the text, while these other cases explain why the same preprocessing decision can have different consequences under different causal structures.

The broad concern is that the document is a single observed object that can carry the traces of several processes. Its treatment-related language can reflect an intervention already received, predict one that may occur, or participate in the sequence that produces an outcome. Meanwhile, neighboring material may carry the very evidence researchers need about a hidden confounder. The authors' approach begins by stating which causal relationship they want to remove and which information they want to preserve.

### The method, step by step

#### Describe where each signal comes from

The paper uses X for observed confounders, U for an unobserved confounder, T for treatment, Y for the outcome, and W for the document. It also uses R for residual factors that can contribute background material. Treatment is a binary assignment in the simulation. The outcome is a numerical quantity that can respond both to treatment and to the underlying circumstances. The document is generated separately from the numerical outcome, with its own sources of variation.

The formal definition of leakage is:

```
W ⫫̸ T ∣ U
```

W denotes the text, T denotes treatment status, and U denotes the hidden confounder. The symbol ⫫̸ means that the quantities on either side are dependent, and ∣ introduces the variable held fixed. Here the dependence of interest is what remains between W and T within a given state of U. The main causal explanation studied in the paper is that T influences W directly or indirectly.

The corresponding graph has arrows from T and U into W. Conditioning on W opens a route between T and U through their common effect. From U, that route reaches Y. The graph therefore gives a reason to expect bias even if analysts think of W as an unusually detailed measurement of the circumstances surrounding treatment. The consequence depends on the act of adjusting for the combined document. The raw presence of a passage in an archive and its use as a statistical covariate are different parts of the problem.

The authors consider both localized and diffuse forms of leakage. In the localized case, Wᵀ is the portion of W shaped by treatment, while Wᵁ is the portion that conveys information from the hidden confounder. The amount of treatment material could be described with a simple size-based measure.

```
∣Wᵀ∣ / ∣W∣
```

Wᵀ denotes the treatment-related part, W is the full document, and the vertical bars around either denote its size in a chosen unit, such as words. The slash denotes division. The interpretation depends on treating elements of the text as equally strong contributors to the signal. A short passage can convey decisive information about treatment, so the length-based measure and the strength of the signal are conceptually distinct.

If treatment affects tone throughout a document, there may be no clear set of passages to count. The authors suggest conditional mutual information as a more general way to express the degree of dependence. It asks how much the document tells us about assignment once U is held fixed. This formulation can describe leakage even when treatment is expressed through distributed cues. Its use as a practical measure is complicated by the fact that U is hidden in the observational setting.

#### Specify what the transformation has to preserve

The distillation function f takes the original text and returns a version intended for adjustment. It can represent a person reading and curating passages. Under additional assumptions, it could also be a procedure that changes the text or its representation. The experiment implements the simplest version, in which the origin of each passage is known from the way the documents were generated.

The authors formalize the passage-based case with a separability assumption.

```
Wᵁ ∩ Wᵀ = ∅
```

Wᵁ is the confounder-related portion, and Wᵀ is the treatment-related portion. The symbol ∩ denotes their overlap. The equality to ∅, the empty set, says that these portions share no textual units at the level being used for the partition. In the simulation that level is the paragraph. Outside the simulation, a researcher considering words, sentences, or passages would need to decide which units can plausibly be separated in this way.

The paper denotes the distilled output with a star.

```
W* = f(W)
```

W is the starting document, f is the distillation function applied to it, and W* denotes its output. The star distinguishes that output from the original text. The intended result is a document or representation whose evidence about the hidden confounder survives the transformation.

The idealized partition then satisfies:

```
W* = Wᵁ
```

W* is the distilled output, and Wᵁ here represents the retained confounder signal. The equality expresses equivalence for the purpose of adjustment. In the experimental construction, background paragraphs can remain after the treatment paragraphs are discarded, so the relevant equality concerns the information about U. If the confounder-related text would be a valid adjustment variable, a distilled version carrying the same information can serve that role as well.

The wider formulation allows changes beyond partitioning. The requirement concerning treatment can be written as:

```
W* ⫫ T ∣ U
```

W* is the resulting representation, T is assignment, and U is the underlying confounder. The symbol ⫫ denotes independence, conditional on the variable following ∣. Within a given value of U, the transformed representation should give no additional evidence of T.

The paper states the same requirement in terms of conditional mutual information.

```
I(W*; T ∣ U) = 0
```

I denotes mutual information. The semicolon separates the two variables whose dependence is under consideration, W* and T. The bar again makes the quantity conditional on U, and 0 is the target value expressing conditional independence. Preservation of information about U is a separate substantive requirement. A transformation that erases the entire document would satisfy the independence condition trivially and leave the researcher with no textual help in adjusting for the hidden variable.

This distinction also explains why successful distillation can leave some ability to predict treatment. A useful proxy for U can predict T through the association between U and assignment. The requirement is that there be no extra treatment signal conditional on U. In practice, someone who reads the distilled text can look for obvious evidence of assignment, which the authors see as an advantage of readable data. Establishing conditional independence is more demanding because it involves a variable the investigator cannot directly observe.

#### Generate the numerical records and documents

The simulation builds the causal relationships into the data before any estimation takes place. The investigators start with a numerical record for each observational unit and then create a corresponding document paragraph by paragraph. In the hypothetical policy application, T records whether an IMF program is present, and U describes the country's political situation with respect to the Fund. The simulated outcome stands for a country-level indicator. The design makes the treatment effect and the relevant confounder available to the investigators when they assess the estimates.

How the simulation tests text distillation The steps in order.

The numerical data start with a draw for each type of confounder.

```
Xᵢ ∼ fₓ
```

The subscript i identifies an observational unit and its associated document. Xᵢ is the vector of observed confounders for that unit, fₓ is its generating distribution, and ∼ indicates a draw from that distribution. The simulation uses a 3-dimensional isotropic Gaussian. Isotropy means that its variability has the same scale in each direction.

```
Uᵢ ∼ fᵤ
```

Uᵢ is the hidden confounder for unit i, fᵤ is its generating distribution, and ∼ again signifies a draw. The authors use a fair coin toss for this variable. The two values correspond to different political situations in the hypothetical application.

Treatment is generated after the confounders.

```
Tᵢ ∼ Bernoulli(sigmoid(fₜ(Xᵢ, Uᵢ)))
```

Tᵢ is the treatment assignment for unit i. The function fₜ combines Xᵢ, the observed covariates, and Uᵢ, the hidden confounder, in a linear index. The sigmoid converts the index into a probability. Bernoulli denotes a draw with two possible outcomes, indicating receipt or absence of treatment, and ∼ marks the draw. Assignment can thus vary among cases with the same confounder values, while the probability of assignment depends on those values.

The outcome is generated next.

```
Yᵢ ∼ fᵧ(Xᵢ, Uᵢ, Tᵢ)
```

Yᵢ is the observed outcome for unit i. The symbol ∼ denotes a draw, and fᵧ is the outcome distribution conditional on observed confounders Xᵢ, hidden confounder Uᵢ, and treatment Tᵢ. The authors use a Gaussian with a fixed standard deviation and a mean that is linear in those inputs. The design makes Uᵢ relevant to both assignment and outcome. It also gives the investigators an outcome regression that follows the generating specification when it includes Uᵢ.

Each document contains K = 20 paragraphs. For every paragraph, the investigators first draw a topic.

```
Zᵢⱼ ∼ Categorical(f𝓏(Uᵢ, Tᵢ))
```

Zᵢⱼ denotes the topic of paragraph j in document i. The symbol ∼ indicates sampling. Categorical denotes a distribution over a finite set of topics, and f𝓏 gives their probabilities based on the unit's values of Uᵢ and Tᵢ. There is a topic for each treatment value, a topic for each hidden-confounder value, and a general background topic. Only the treatment and confounder topics corresponding to the unit's own values are eligible for its document.

For a given unit, the probability of drawing its confounder topic for a paragraph is 0.2, the probability of drawing its treatment topic is 0.2, and the probability of drawing the background topic is 0.6. These are probabilities for topic draws. Individual documents can differ in their realized compositions. The background topic is unrelated to U or T and represents the contribution that other residual factors could make to the text.

Next, the topic determines the distribution from which the opening prompt is drawn.

```
Wᵢⱼ⁰ ∼ Categorical(f𝓌₀(Zᵢⱼ))
```

Wᵢⱼ⁰ is the starting prompt for paragraph j in document i, with the superscript ⁰ marking the initial text. The symbol ∼ indicates a draw from the categorical probabilities given by f𝓌₀. The input Zᵢⱼ is the topic already selected for the paragraph. The authors define four prompts per topic for the treatment and confounder topics. For instance, a prompt about program participation can introduce a requirement from the IMF concerning labor-market regulation. Country names are sampled and inserted into prompts with a country slot.

The paragraph is generated by continuing from the prompt under the selected topic.

```
Wᵢⱼ ∼ LM(Wᵢⱼ⁰, Zᵢⱼ)
```

Wᵢⱼ is the generated text of paragraph j for unit i. The symbol ∼ indicates that the paragraph is sampled. LM is the paper's notation for the GPT-2 generation procedure, taking the initial prompt Wᵢⱼ⁰ and the topic Zᵢⱼ as inputs. The authors use an English version of GPT-2 through the HuggingFace implementation. They introduce the topic through both the starting prompt and changes to the probabilities used when continuing it.

The change in the vocabulary distribution is:

```
P′(w ∣ context, Z) ∝ Pₗₘ(w ∣ context) · θ𝓏(w)
```

P′ is the adjusted probability of the candidate word w given the preceding context and topic Z. Pₗₘ is the original probability assigned by the generator given that context. The dot denotes multiplication by θ𝓏(w), the scale factor for word w under topic Z. The symbol ∝ indicates proportionality, since the adjusted weights must be normalized across the vocabulary to form probabilities. This gives topic keywords more opportunities to appear as the paragraph develops.

The authors designate 8 keywords for each topic other than the general one. The entries of log θ𝓏 for these keywords use a strength parameter of 4. For the other vocabulary items, log θ𝓏 is 0. The setting is intended to give the topic a clear effect on the text, which suits the paper's illustrative case. The general topic uses no topic-specific shift. The authors report around 10 hours to generate the 10,000 documents on a single NVIDIA GeForce GTX TITAN X and make the synthetic data generation implementation available in their research repository.

#### Create the variants for causal adjustment

The investigators record which topics produced the paragraphs. They use that information to make different versions of the same documents. This is an *oracle* procedure because it can consult the source of the text as defined by the simulation. The investigators can identify a treatment paragraph by its recorded category even if its final wording is indirect or ambiguous.

The unchanged setting is the identity transformation.

```
f(W) = W
```

The function f is the preprocessing operation, and W on both sides denotes the full document. Every paragraph reaches the estimator. This setting represents both a workflow with no distillation and a distillation attempt that leaves the text unchanged.

For oracle distillation, f discards the paragraphs whose topics depend on T. The confounder and background paragraphs can remain. Because the topic labels are available before the text is analyzed, the experiment can isolate the effect of supplying those retained passages to the estimator. This operation is the simulated counterpart of eliminating the arrow from treatment to the text used for adjustment.

The aggressive setting yields a further output denoted W**. Here the investigators also drop confounder-related paragraphs. That setting illustrates a failure of *proxy faithfulness*, the paper's idea that the text should adequately measure U. In the experiment the treatment and confounder labels determine what is deleted. In an applied setting with less precise deletion rules, the same type of information loss could occur when researchers remove passages that are difficult to assign to one source.

#### Estimate an effect from assignment probabilities

The quantity of interest is the average treatment effect.

```
τ = E[Yᵢ(1) − Yᵢ(0)]
```

The Greek letter τ denotes the average treatment effect. E denotes an expectation, or average over the population of units. Subtracting Yᵢ(0) from Yᵢ(1) gives the difference between unit i’s potential outcome with treatment and its potential outcome without treatment. The values 1 and 0 label the two treatment states. The estimand concerns the outcome difference under those alternatives for the same population.

An observational record gives the outcome under the treatment a unit actually received. Researchers can use inverse propensity weighting, or IPW, to estimate the average effect under assumptions about measured confounding and overlap. A *propensity score* is the probability of receiving treatment at a given set of covariates. For the case with numerical covariates, the paper writes the estimated propensity as:

```
π̂(Xᵢ) = Pr̂(Tᵢ = 1 ∣ Xᵢ)
```

π̂ is the estimated propensity function, and Pr̂ denotes an estimated probability. Tᵢ is assignment for unit i, 1 indicates receipt of treatment, and Xᵢ is the unit's observed covariate vector. The bar means that the probability is conditional on those covariates.

When a document enters the adjustment, the corresponding expression is:

```
π̂(Xᵢ, Wᵢ) = Pr̂(Tᵢ = 1 ∣ Xᵢ, Wᵢ)
```

π̂ and Pr̂ again indicate an estimated propensity and probability. The event Tᵢ = 1 means that unit i receives treatment. Xᵢ contains its observed numeric covariates, Wᵢ is its document for the current text setting, and the bar conditions the assignment probability on both. The distinction between full and distilled documents therefore enters IPW through the estimated probabilities.

For the expression using Xᵢ, the paper's effect estimator is:

```
τ̂ = (1/n) ∑ᵢ₌₁ⁿ [TᵢYᵢ / π̂(Xᵢ) − (1 − Tᵢ)Yᵢ / (1 − π̂(Xᵢ))]
```

τ̂ is the estimate of the average treatment effect, and n is the number of observations included in the sum. The summation runs over unit index i from 1 through n. Tᵢ is binary assignment, Yᵢ is the observed outcome, and juxtaposition in the numerator means multiplication. The first fraction contributes the treated unit's outcome divided by its estimated probability of treatment. In the second fraction, 1 − Tᵢ selects untreated units and 1 − π̂(Xᵢ) is their estimated probability of remaining untreated. The minus sign subtracts the control contribution, and 1/n averages the result. In the text-based runs, the propensity in the denominator comes from the relevant document representation as well as Xᵢ.

The intuition is that an observed outcome counts more when its assignment was relatively uncommon among units with similar adjustment information. A treated unit with a low estimated probability of treatment gets more weight on the treated side. An untreated unit with a high probability of treatment gets more weight on the control side. If the probabilities instead come from text that already reflects assignment, they can be near certainty for the outcomes of assignment that actually occurred. In that case the weighting does little to reorganize comparisons across the groups.

#### Prepare the covariates for propensity estimation

The authors standardize the numerical covariates and express each document using [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/). This representation assigns features to terms based on their occurrence in the document and their frequency across the corpus. Terms that occur throughout the corpus are less distinctive than those concentrated in a smaller set of documents. The implementation uses the 256 most frequent vocabulary terms and applies L₂ normalization to the document vectors, scaling their Euclidean lengths. How the paper removes treatment signal is determined earlier, at the paragraph-selection stage.

The resulting features enter a logistic regression fitted with the glmnet package in R. The regression estimates the probability of the binary assignment. The authors use L₁ regularization, which penalizes the absolute magnitudes of coefficients and can shrink some to zero. The strength of that penalty, denoted λ, is selected automatically through 10-fold cross-validation. In that procedure, the data are divided into folds so that a penalty setting can be assessed on observations held out from the fitting step for each fold.

The use of these features and this estimator gives a common way to compare the text settings. The differences among the settings come from which paragraphs enter the representations, while the propensity procedure itself follows the same specification. The known assignment probabilities generated from X and U supply an additional benchmark. They let the authors ask how weighting behaves when it has direct access to the probabilities that governed assignment in the simulation.

### Experiments and results

#### What the estimates are compared against

The experiment consists of 10,000 synthetic instances, each with a numerical record and a document of 20 paragraphs before preprocessing. All correspond to the same hypothetical question about the effect of an IMF program on a country-level indicator. The simulated average treatment effect is set to 5. That known value gives each reported estimate a substantive target, independent of how useful the documents are for predicting assignment.

The comparisons fall into distinct roles. A correctly specified outcome regression that includes the hidden confounder shows what is possible when the source of confounding is observed. An outcome regression that drops U shows the result of relying on X alone. The weighting comparisons use full text, overly distilled text, or the oracle-distilled text to estimate assignment probabilities. A further weighting comparison uses the true probabilities directly. Together these settings compare omitted confounding, adjustment with leaking proxies, loss of proxy information, and access to the assignment process.

The reported metric is the estimated average treatment effect, in the units of the simulated outcome. A positive estimate represents an increase under treatment, and a negative estimate represents a decrease. Quality here means proximity to the true effect of 5. The chart orders the settings by their role in the comparisons. Its higher direction applies to these reported point estimates, whose movement from the negative values toward the simulated target improves their agreement with that target. The target itself remains the criterion for interpreting the chart.

Estimated average treatment effects in the synthetic IMF experiment Keeping confounder passages while removing treatment passages moves the text-based estimate toward the simulated effect.

**The numbers**

| System or setting | Estimated average treatment effect |
| --- | --- |
| Outcome regression with observed and hidden confounders | 5.5 |
| Outcome regression with observed covariates only | -2.3 |
| IPW with full documents | -7.0 |
| IPW with treatment and confounder passages removed | -2.9 |
| IPW with oracle-distilled documents (this paper) | 3.5 |
| IPW with true assignment probabilities | 4.9 |

#### Directly observing the confounder versus leaving it out

With X and U in the outcome regression, the estimated average treatment effect is 5.5, with a bootstrapped 95% confidence interval from 3.4 to 7.6. The outcome regression follows the simulated linear specification in this setting. The authors explain that without sampling variability it would yield the true effect of 5. The reported point estimate provides a check on what can happen in a finite sample even when the analyst has all the relevant numerical information for that regression.

Leaving U out yields -2.3, with a reported interval from -4.2 to -0.1. The estimate now points in the opposite direction from the simulated effect. This comparison shows what biased adjustment looks like before the documents are introduced. It also supplies a baseline for judging whether adding documents actually helps with the confounder that motivated their use. In this experiment a negative result can arise simply because the political condition is omitted, so the presence of a negative estimate by itself gives little information about which failure produced it.

#### Using the text as generated

With full documents in the propensity regression, the IPW estimate is -7.0, and the reported interval runs from -9.4 to -4.6. The documents carry confounder information by construction. They also carry language generated by assignment, and that language makes it easy for the propensity regression to recognize the groups. The worse result relative to relying on X alone illustrates how a useful proxy signal can coexist with a more damaging signal in the same input.

The paper examines the fitted propensity distributions to understand this result. For the full documents, estimated probabilities cluster near 0 and 1. Treatment status is predicted nearly perfectly in this setting. For recipients, the probabilities in the treated denominator are near 1. For controls, it is the complementary probabilities that are near 1. Many observations therefore receive weights close to their unweighted contribution. The authors relate this behavior to the limited overlap that results when the document gives away assignment.

The fitted distributions are a diagnostic of how the outcome estimator is being used. The propensity score is meant to summarize the assignment process conditional on covariates chosen for causal adjustment. With full documents, it can instead summarize a strong textual trace of the assignment that already happened. A procedure can fit assignment very well in that setting and still fail to produce weights that address the original imbalance in U. The point estimate shows the consequence for the simulated outcome.

#### Removing treatment signal and retaining the proxy

With the oracle-distilled documents, the estimated average treatment effect is 3.5, with an interval from 1.2 to 5.8. Its sign agrees with the simulated effect, and the interval includes the true value of 5. The point estimate still differs from the target. The authors treat the interval and the improvement in the point estimate as evidence of recovery in their simulation, with the result remaining sensitive to the sample and to how estimation is carried out.

The propensities after oracle distillation are closer in distribution to those generated by the assignment process. This diagnostic explains a different part of the improvement from the effect estimate alone. Removing the treatment paragraphs reduces the ease with which treatment can be inferred from its direct textual consequences. Keeping the confounder passages supplies a source of variation that still matters for assignment. The revised features thus give the propensity regression a more appropriate basis for estimating assignment probabilities.

When distillation also discards the confounder paragraphs, the IPW estimate is -2.9, with an interval from -5.1 to -0.6. This result is similar to the observed-covariates-only outcome regression. The remaining text consists of material with a background role in the simulation, so it has lost the feature that made text valuable for adjusting for the hidden political condition. The comparison puts a practical meaning on preservation. Deleting evidence of treatment can improve the causal suitability of the text, while deleting the proxy along with it brings back a different problem.

#### Weighting with the true assignment probabilities

Using the simulated assignment probabilities directly gives an IPW estimate of 4.9 and a reported interval from 2.2 to 7.6. This comparison stays within the weighting approach and gives it access to the probabilities that generated T. It differs from the oracle text comparison because the latter supplies correctly selected paragraphs and still has to estimate probabilities from those paragraphs. In the true-propensity setting, the transformation from observed features to a probability can be bypassed.

The reported intervals describe uncertainty around each effect estimate. Their relationship to the known target helps show how the several procedures behave in this simulation. The methods based on full text, aggressive removal, and omission of U give intervals entirely on the negative side of the effect scale. The full-information outcome regression, oracle-distilled weighting, and true-propensity weighting give positive intervals that include 5. The paper's evidence is organized around these point estimates, intervals, and propensity distributions. Its 10-fold cross-validation serves to tune the propensity fit, while the causal comparisons use the simulated truth as their reference.

### What the ablations show

#### What changes when treatment paragraphs are removed

The paper's controlled comparisons are at the level of document content. It varies which kinds of paragraphs are available to the estimator while keeping the simulated units, assignments, outcomes, and basic weighting procedure in place. The closest counterpart to an ablation is the move from full text to text with the treatment paragraphs removed. The recorded paragraph categories make this a test of removing a specific source of information. An ordinary removal rule based on keywords would leave more uncertainty about what had actually changed.

This comparison tests the causal role of the information made available to the propensity estimator. The full documents contain prompts and vocabulary shifts associated with both U and T. With the treatment paragraphs removed, the capacity of the document to convey U is preserved by construction. A change in the result after this removal is therefore interpretable in terms of the intervention on the text, within the assumptions of the generator. The design is valuable precisely because the researchers know the difference between a passage influenced by treatment and a passage whose topic is correlated with treatment through U.

Removing paragraphs also changes the terms that appear in a document and the relative weights of its retained terms. The effect of removal is consequently evaluated through the whole pipeline, including the construction of the features and the subsequent propensity fit. The experimentally controlled operation is access to the paragraph types. This comparison leaves open which features within the treatment paragraphs do most of the work, such as the opening prompt or the repeated topic vocabulary.

#### What changes when confounder paragraphs are also removed

The aggressive setting takes the same removal strategy further. It drops the confounder paragraphs along with the treatment material. This setting and the oracle-distilled one both exclude treatment paragraphs. Their relevant difference is the availability of the hidden confounder's textual proxy. The ensuing return toward the estimate based on observed covariates alone shows that treatment removal works in conjunction with preserving information about U.

This contrast also clarifies what would count as a misleading success in assessing a distillation procedure. A representation can look clean because it gives few clues about which units were treated, yet give the propensity estimator little information about the political condition. In the aggressive setting the two outcomes follow from the same deletions. The authors' conditions explain why an evaluation focused solely on residual treatment information would miss the loss that matters for confounding.

The observed-covariates-only regression and the aggressively distilled weighting analysis use different estimation routes, so their proximity is best read as a shared consequence of weak access to U. The closer controlled comparison is between the text-based weighting settings themselves. It shows what happens when the confounder material specifically is available or unavailable after treatment text has been removed. The paper can interpret that change because the underlying numerical U remains fixed in the simulated records.

#### What the propensity analysis adds

Comparing the estimated propensity distributions gives an intermediate view of the mechanism. With full text, separation of the groups is visible in the probabilities before any outcomes are weighted. With distilled text, the probabilities look more like those used to generate assignment. The paper thus connects an observable behavior of the estimator to the causal structure it imposed on the documents. It is the character of the information in the propensity input that explains why assignment prediction can improve in one sense while the effect estimate deteriorates.

The true-propensity comparison demonstrates a further distinction between obtaining a useful proxy and converting it into accurate probabilities. Even a perfectly selected set of paragraphs supplies U indirectly. The regression must infer how that evidence, together with X, relates to assignment. True propensities incorporate the actual generating relationship. The difference between the two benchmarks leaves room for better propensity estimation, as the authors suggest, while also encompassing the difference between direct access to the assignment process and access through text. The experiment cannot assign that difference entirely to a particular choice of fitting procedure.

The full-information outcome regression answers a related question through a different estimator. It shows how estimating the effect behaves when the confounder is directly available and the outcome specification follows the generator. The known-propensity run instead checks the weighting procedure when assignment probabilities are available. Reading these as separate benchmarks helps locate the contribution of the distillation comparison. It is a test of how the document changes the inputs to weighting, with direct numerical information serving as a reference on either side of that estimation problem.

### Limitations

#### Limits the authors identify

The authors confine their experimental conclusions to simulated data and call for work with empirical documents. The synthetic setting gives them unusual control over which variable produces a paragraph and over the strength of its trace in the text. That control is what makes the experiment interpretable. In an archive of real policy or health documents, researchers generally have to reason from the wording, production context, and outside knowledge of events to judge why the material is there. The success of the oracle demonstrates the value of correct removal under the setup's assumptions.

The authors also call for evidence across different covariance structures. The relationships among observed covariates, the hidden factor, treatment, and the outcome determine how much confounding there is and how useful a particular proxy can be. The chosen design makes the omitted-confounder problem visible, and the text generation settings make the treatment signal strong. Other relationships among the numerical variables or weaker textual signals could change how the estimates respond to distillation. How these mechanisms behave across such alternatives remains an open empirical question.

A further limitation the authors identify concerns the separation of estimator bias from variance. The reported point estimates and intervals characterize the comparisons in the chosen setup. A larger simulation design could examine how estimates vary across repetitions and how far their average lies from the true effect. This matters when comparing practices that simultaneously change the amount of confounding information, the estimated overlap, and the variability of the weights. The results presented establish a concrete failure case and a successful correction in that case.

The authors acknowledge that the conditions for effective distillation can be difficult to judge. In particular, conditional independence after transformation involves U, which is unobserved in the studies that motivate the method. Reading the text can help investigators find recognizable treatment language, but it gives partial evidence about a conditional relationship. The paper also raises a question about ethically problematic information, such as race, being incorporated in decisions about what a distillation function keeps. The source and role of such information can be difficult to establish when the confounder is itself hidden. [Bias, fairness & safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/)

Finally, the authors restrict their main analysis to leakage from treatment. A document could also reflect the outcome or an instrument, or it could play a mediating role. Each possibility changes the causal reasoning behind adjustment. The proposed generalization would account for documents that reflect several variables in the same causal graph. The present analysis gets its clarity from tracing how assignment and a hidden confounder both reach the same document.

#### Limits visible in the design

The oracle has access to a generating label for each paragraph. This access supplies both a criterion for deletion and a guarantee about the origin of what remains. A reader who wants to know whether a person can reliably make these decisions from naturally occurring prose would need evidence from a different evaluation. For example, a retrospective passage can discuss a preexisting political condition in vocabulary introduced after program assignment. The simulated separability condition sets this mixed-origin problem aside. It allows treatment material to be deleted without editing the confounder content that shares the document.

The treatment topic also has a specific strength and frequency within the simulated generator. Paragraphs can signal program presence or absence through their starting prompts and the probability boost for selected words. The design gives the propensity regression a clear way to detect treatment, which makes the overlap problem visible. It leaves open how results change when cues are weaker, when they occur in unusually short passages, or when they operate through tone across the whole document. The paper offers a general definition for those cases, while the empirical comparison is drawn from the clean paragraph-based case.

There is also a distinction between recovering the intended confounder passages and obtaining a proxy rich enough for adjustment. Each simulated paragraph is sampled, and its content is then represented by a limited TF-IDF vocabulary. Even the oracle-selected document goes through those steps. The experiment establishes the improvement obtained with that chain of operations. It leaves open how much information about U survives each stage and how the answer would change with a different representation. This is one reason the oracle estimate and the true-propensity benchmark answer different questions.

The length-based measure of leakage is likewise conditional on a strong premise. Its denominator and numerator count units of text. Their effectiveness as treatment evidence depends on how informative the specific units are. If passages are short but highly diagnostic, deleting a small part of a document can alter the assignment information considerably. If treatment changes diffuse features, counting affected passages becomes even less informative. The general conditional-information definition addresses those possibilities conceptually, while the experiment does not calibrate a practical measure of leakage for such documents.

Finally, the outcome stands for a hypothetical country-level indicator, and the program scenario supplies a domain for the synthetic text. The true effect of 5 is a design choice used to assess the estimators. Any inference about the consequences of actual IMF participation would require empirical outcomes, real assignment and confounding information, and a defensible account of how the documents were produced. The result supported by the simulation is narrower. A treatment-generated signal can worsen a confounding adjustment even when a useful proxy is present, and recovering the useful proxy can improve the resulting estimate under the conditions the study constructs.

### What came after

The paper closes with a research agenda. Its first proposed extension is a way to estimate how much treatment leakage a document contains. The goal is to inform a real choice faced by an investigator who has a potentially useful corpus and limited means of distilling it. A useful diagnostic would have to distinguish the treatment information carried indirectly through the confounder from information generated by assignment itself. The length-based measure is available in the separable example because the simulator supplies the paragraph origins. The general conditional-information formulation states the target where those origins are harder to establish.

A second direction broadens the question from treatment leakage to what the authors call *node leakage*. The idea is that a document may carry information originating at several positions in a causal graph, including assignment, outcome, confounders, mediators, or instruments. A general account would need to explain when evidence from these different variables helps identify the effect being sought and when using it for adjustment changes the causal comparison. The authors point to work on proxy variables as a basis for that extension. The treatment example provides a case in which the relevant source and the implications of retaining it can be specified explicitly.

The authors also propose developing practical distillation methods for cases where human reading is difficult because of corpus scale or linguistic complexity. They identify earlier work on [debiasing word embeddings](https://md.research.elamur.ai/free/en/papers/bolukbasi-2016-man-computer-programmer-woman-homemaker/) and [iterative nullspace projection](https://md.research.elamur.ai/free/en/papers/ravfogel-2020-null-it-out-guarding-protected/) as possible starting points for removing information from text representations. Their proposed causal use would add a preservation requirement. The transformed representation would have to retain evidence about the hidden confounder while eliminating the signal generated by treatment. Whether such a transformation can be constructed and validated for naturally occurring text is the follow-up question left by the oracle experiment.

## Cite

Cite as Adel Daoud, Connor Jerzak and Richard Johansson. 2022. Conceptualizing Treatment Leakage in Text-based Causal Inference. Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2022.naacl-main.413](https://doi.org/10.18653/v1/2022.naacl-main.413)

```bibtex
@inproceedings{daoud2022conceptualizing,
  title = {{Conceptualizing Treatment Leakage in Text-based Causal Inference}},
  author = {Adel Daoud, Connor Jerzak and Richard Johansson},
  booktitle = {Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.413},
  url = {https://doi.org/10.18653/v1/2022.naacl-main.413}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
