NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Data Augmentations for Improved (Large) Language Model Generalization

Amir Feder, Yoav Wald, Claudia Shi, Suchi Saria, David Blei

Machine learning models are notorious for taking "shortcuts." In text classification, a model might achieve high accuracy by latching onto spurious correlations—features that are associated with a label in the training data but aren't actually the cause of it.

A classic example occurs in healthcare: certain doctors (caregivers) might specialize in specific conditions. If a model is trained on notes from one hospital, it might learn to predict a diagnosis based on a specific doctor's writing style rather than the patient's actual symptoms. When that model is deployed at a different hospital with different doctors, its performance collapses. This is a critical failure of Out-of-Distribution (OOD) generalization. Collecting enough diverse data to naturally break these correlations is often impossible due to privacy concerns or the rarity of certain conditions.

To address this, researchers have developed CATO (Causal-structure Driven Augmentations), a method that uses Large Language Models (LLMs) and causal inference to "rewrite" training data and break spurious correlations. By simulating counterfactual scenarios—such as "how would a different doctor have written this medical note?"—the method significantly improves how well models generalize to new, unseen environments.

Methodology: CATO and Causal Modeling

The authors propose treating data augmentation as a formal causal inference problem. Instead of simple text perturbations (like swapping synonyms), CATO uses auxiliary metadata to guide an LLM in generating targeted counterfactual examples.

1. Causal Modeling

The foundation of CATO is formalizing the data-generating process using a causal graph.

Causal graph illustrating the relationship between the true signal, spurious attributes, and observed text.

In this structure, the observed text ($X$) is influenced by both the true, underlying signal ($X^*$) and a spurious attribute ($C$, such as a caregiver's ID or writing style). The goal of the augmentation is to simulate an intervention: "What would $X$ look like if we changed $C$ while keeping the true label $Y$ constant?"

2. Diff-in-Diff (Difference-in-Differences) Estimation

To figure out how to isolate and swap these spurious styles, the researchers borrow from econometrics, utilizing "panel data" (observations taken over time).

Difference-in-Differences (Diff-in-Diff) matching strategy using patient progress and discharge notes.

For clinical notes, they compare a patient's initial progress note to their final discharge summary. By matching patients who had the same initial caregiver but different final caregivers, they can isolate the specific "style" of a caregiver. This diff-in-diff methodology allows them to mathematically represent the style transfer needed to break the correlation.

3. LLM as a Causal Simulator

Once the mathematical relationships are established, LLMs are used to perform the actual rewriting. By prompting the LLM with "matched examples" (e.g., "Here is a note by Doctor A; rewrite this note by Doctor B in the style of Doctor A"), they generate counterfactual versions of the training set. The paper provides mathematical proofs showing that this counterfactual augmentation has better "sample complexity" than standard methods like importance re-weighting, meaning it needs less data to achieve the same level of robustness.

Datasets and Evaluation

The study evaluates CATO across three distinct domains to prove its versatility:

  1. Clinical Narratives: Using MIMIC-III (a massive database of health records) for training, and evaluating on i2b2-2006 and i2b2-2010 benchmarks to test OOD performance across different hospital settings.
  2. Restaurant Reviews: Using the CEBaB dataset, researchers intentionally introduced a spurious correlation (e.g., mentioning specific food types correlated with high ratings) to see if CATO could force the model to ignore food mentions and focus on actual sentiment.
  3. Synthetic Data: Gaussian-distributed data was used to precisely control the strength of spurious correlations and test sensitivity to "noisy" augmentations.

Key Findings and Insights

  • Significant Performance Gains: In predicting clinical conditions OOD, CATO improved precision by over 7% and recall by over 8% compared to the observational baseline. It also outperformed specialized OOD algorithms like Invariant Risk Minimization (IRM) and GroupDRO. On the CEBaB dataset, CATO achieved 0.75 accuracy, significantly beating the baseline (0.64) and re-weighting strategies (0.68).
  • Metadata is a Goldmine: Metadata (timestamps, IDs, demographics) is often viewed as secondary. This paper demonstrates that metadata is actually the key to unlocking the causal structure of a dataset, allowing for targeted interventions.
  • LLMs Excel at Style Transfer: While LLMs can hallucinate facts, they are remarkably adept at capturing and mimicking the "style" or "texture" of text when provided with few-shot examples, making them ideal causal simulators.
  • Resilience to Noise: Synthetic experiments showed that even if the counterfactuals generated by the LLM aren't perfect (i.e., they are "corrupted"), the model still gains significant robustness compared to not using augmentations at all.

Limitations and Future Directions

While powerful, CATO has limitations. It requires researchers to correctly specify the causal graph; if the assumed relationship between variables is wrong, the augmentations might be harmful. Furthermore, the method relies heavily on having access to rich metadata (like caregiver IDs or timestamps) during the training phase, which isn't always available in legacy datasets. Finally, the effectiveness is tied to the LLM's ability to follow complex style-transfer instructions without altering the core meaning of the text.

Future work will likely focus on methods that can automatically discover the causal structure from the data itself, reducing the reliance on manual definitions by domain experts.

Summary updated

BibTeX
@inproceedings{feder2023data,
  author = {Amir Feder and Yoav Wald and Claudia Shi and Suchi Saria and David Blei},
  title = {{Data Augmentations for Improved (Large) Language Model Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
}
Figure