In-Context Bias Propagation in LLM-Based Tabular Data Generation

arXiv:2506.09630 · cs.LG · Submitted 2025-06-11 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Hi, I'm Tom.

Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.

Tom: We're looking at the paper: "In-Context Bias Propagation in LLM-Based Tabular Data Generation".

Jane: Here's the gist of the paper. The gist: Statistical biases within in-context examples systematically propagate to LLM-generated tabular data, leading to global statistical distortions and compromising downstream fairness, even when utility metrics remain high.

Tom: In-Context Bias Propagation The paper systematically studies how statistical biases within in-context examples propagate to the distribution of synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions In this paper, we systematically study how statistical biases within in-context examples propagate to the distribution of synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions.

Jane: The authors argue that the same mechanism that allows LLMs to adapt rapidly to new tasks also makes them susceptible to replicating and amplifying demographic disparities present in the context examples.

Tom: Modeling In-Context Sensitivity The authors model in-context learning as approximate Bayesian inference, which suggests that the resulting predictive distribution behaves like a mixture of task-conditional predictors with weights that depend on the prompt.

Title and authors: Tom: We're starting with "In-Context Bias Propagation in LLM-Based Tabular Data Generation." The authors are Pol G. Recasensa, Alberto Gutierreza, Jordi Torresa, Josep Ll. Berralb, Javier Carnerero-Canoc, Anisa Halimic from the Barcelona Supercomputing Center and the Universitat Politècnica de Catalunya and IBM Research Ireland respectively.

Jane: That’s a big team coming together to tackle this problem because they are clearly focused on how these LLMs are used for synthetic data generation, which is a really practical area right now. The title itself suggests that the core issue is not just about creating data, but about how biases move through the in-context learning process.

Lu: It sets up the idea that we need to look beyond just the final output and understand exactly where those statistical distortions originate within the prompt itself. This is reaching for what changes how we think about reliable synthetic data creation.

Meng: So, if I'm shipping a model, I need to know if my input context is safe, and this paper seems to be telling us that it isn't always safe by default. That puts pressure on our data curation pipeline.

Tom: Right. The authors are arguing that the benefits we get from using LLMs for synthetic tabular data augmentation often assume access to unbiased in-context examples, but in the real world, we don't have those unbiased examples readily available.

Jane: They are pointing out that real-world data is often noisy and demographically skewed, which means the assumption of unbiased context rarely holds true when you use these systems. That's a tough reality to face when building production systems.

Lu: They systematically study how statistical biases within those in-context examples propagate to the distribution of synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions, which is a pretty strong finding.

Meng: Global distortions mean the resulting dataset isn't just slightly off; it’s fundamentally shifted across all features, which is a serious issue for model training stability.

Tom: And they go further by introducing an adversarial scenario where a malicious contributor can inject bias into the synthetic dataset via a subset of in-context examples, ultimately compromising the fairness of downstream classifiers for a targeted and protected subgroup.

The paper's summary: Jane: So to summarize what we just heard, this paper is systematically studying how statistical biases in those in-context examples propagate into the distribution of synthetic tabular data, showing that even mild biases cause global statistical distortions and they introduce a threat model where an adversary can inject bias through small sets of examples.

Lu: They are demonstrating that LLMs capture and propagate these biases in a conditional and intersectional manner, which means we have to worry about how those multiple attributes interact in the synthetic output.

Meng: That’s worrying for deployment because if we can't control those conditional or intersectional biases, the fairness issues will show up in our real-world testing.

Tom: They quantify this propagation using linear sensitivity analysis across multiple model families to show exactly how much bias shifts between the reference distribution D0 and the ICL-generated distribution DG.

Jane: They also look at different evaluation datasets, like Adult, Compas, Diabetes, and Thyroid datasets to see how this behavior plays out in real-world health and social contexts.

Lu: They are using a variety of benchmarks including those used for fairness research to test the robustness of these synthetic data generation methods across different domains.

Tom: The core idea is that the same mechanism that lets LLMs adapt rapidly to new tasks also makes them susceptible to replicating and amplifying demographic disparities present in the context examples.

Jane: It suggests that we can't just assume the examples are unbiased when we use ICL, which is a really important realization for anyone using these tools for data augmentation.

The paper's improvements: Tom: The paper proposes several ways to combat this, and they evaluate mitigation strategies based on preprocessing those in-context examples to see what works best against the injected bias.

Lu: They tested correlation-based filtering, Fair-SPD, group balanced prompts, and random subset selection; these interventions are designed to attenuate disparity by cleaning up the prompt before data generation even starts.

Meng: Correlation filtering sounds like it’s trying to surgically remove those specific feature correlations that steer protected group profiles toward attacker-chosen plausible values. That's a targeted approach.

Tom: And Fair-SPD enforcement is described as an iterative selection algorithm that removes the single example contributing most to current disparity until the statistical parity difference, SPD, is below some threshold epsilon.

Jane: So it’s about actively aligning the prompt examples with a desired level of fairness, although they acknowledge that this might not fully eliminate downstream disparities because of those inherent model priors.

Lu: They also suggested using balanced prompt instructions to generate specific combinations of subgroups, like one example for every combination of gender and race, which helps disentangle conditional dependence from frequency effects.

Meng: That sounds like a lot of work for data preparation, but it’s a direct attempt to control the output by explicitly instructing the model on what we want.

Tom: They also look at model selection, suggesting that prioritizing larger models or mixture-of-experts architectures might give greater precision in bias propagation and stronger conditional propagation compared to smaller models within the same family.

Conclusion: Jane: So wrapping things up, the main message of "In-Context Bias Propagation in LLM-Based Tabular Data Generation" is that we have a critical new attack surface where malicious actors can inject bias into synthetic data through prompt manipulation.

Lu: The final conclusion is that in-context pre-processing defenses are insufficient to fully neutralize the injected bias because the inherent sensitivity of LLMs to adversarial prompts remains a persistent challenge.

Meng: So we need more robust safeguards built directly into the generative data pipelines because biases often persist due to model priors, and that's where we have to focus our engineering efforts.

Tom: They show that these synthetic biases are captured by downstream models, which leads to discriminatory predictions on real test data across various architectures and classifiers.

Jane: So for anyone using this technology, the big picture is that fairness can deteriorate substantially while conventional utility metrics remain largely unchanged, which is a really important distinction to remember.

Lu: The susceptibility to in-context bias is a fundamental property of the learning paradigm itself, rather than just something that emerges from model scale or from prompt engineering.

Meng: That means we have to be more careful about where we are injecting data and what kind of context we are using across the board.

Tom: So remember this paper, "In-Context Bias Propagation in LLM-Based Tabular Data Generation," because it establishes adversarial in-context bias injection as a new vulnerability scheme in LLM-based generation pipelines.

Pol G. Recasensa, Alberto Gutierreza, Jordi Torresa, Josep Ll. Berralb, Javier Carnerero-Canoc, Anisa Halimic, Kieran Fraserc

Barcelona Supercomputing Center (BSC) · Universitat Politècnica de Catalunya (UPC) · IBM Research Ireland

cs.LG

Submitted: 2025-06-11

Updated: 2026-10-21

Comments: Accepted for publication at Knowledge-Based Systems

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 92/100

The gist: The gist: Statistical biases within in-context examples systematically propagate to LLM-generated tabular data, leading to global statistical distortions and compromising downstream fairness, even

Key concepts

In-Context Bias Propagation
This describes how statistical biases present in the examples provided to an LLM are amplified as the model generates synthetic tabular data. Even small biases in the input can lead to large, global distortions in the resulting dataset, meaning LLMs faithfully replicate and magnify existing prejudices from their context.
Adversarial Bias Injection
This scenario involves a malicious actor intentionally adding biased examples into the prompt to skew the synthetic dataset for a specific protected subgroup. This manipulation can compromise fairness in any classifier trained on that synthetic data, even if overall utility metrics remain high.
Modeling In-Context Sensitivity
The authors use approximate Bayesian inference to understand how LLMs learn from context. They decompose this learning into components to quantify how much the prompt influences the final output distribution, allowing them to measure the shift in statistical properties between a reference dataset and the data generated by the prompt.

Terminology

Summary

The gist: Statistical biases within in-context examples systematically propagate to LLM-generated tabular data, leading to global statistical distortions and compromising downstream fairness, even when utility metrics remain high.

In-Context Bias Propagation

The paper systematically studies how statistical biases within in-context examples propagate to the distribution of synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions In this paper, we systematically study how statistical biases within in-context examples propagate to the distribution of synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions. The authors argue that the same mechanism that allows LLMs to adapt rapidly to new tasks also makes them susceptible to replicating and amplifying demographic disparities present in the context examples.

Modeling In-Context Sensitivity

The authors model in-context learning as approximate Bayesian inference, which suggests that the resulting predictive distribution behaves like a mixture of task-conditional predictors with weights that depend on the prompt. They introduce a two-component decomposition to study in-context influence on tabular synthesis, defined by DG ≈ (1 − αk) D˜0 + αk ΦM(DP). To quantify bias, they relate the ratio of adversarial examples within the prompt to the bias shift µϕ(DG) − µϕ(D0) observed between the reference distribution D0 and the ICL-generated distribution DG.

Experimental Analysis of Bias Levels

The analysis is structured across three levels of granularity: marginal bias propagation, conditional bias propagation, and intersectional propagation. The authors demonstrate that statistical biases present in ICL examples systematically propagate to the distribution of LLM-generated tabular data, and that LLMs capture and propagate biases in a conditional and intersectional manner. They quantify this propagation via linear sensitivity analysis across multiple model families.

Adversarial Bias Injection

The paper introduces an adversarial scenario where a malicious contributor can inject bias into the synthetic dataset via a subset of in-context examples, ultimately compromising the fairness of downstream classifiers for a targeted and protected subgroup. This targeted manipulation can skew the synthetic distribution and compromise the fairness of downstream classifiers, all while maintaining high utility metrics that mask the attack. The adversary controls a fraction π of the k examples in the prompt and injects πk malicious, feature–aligned records into the prompt, while the remaining (1 − π)k examples are sampled i.i.d. from the real dataset.

Mitigation Strategies

The authors evaluate mitigation strategies based on preprocessing in-context examples, demonstrating that while such interventions can attenuate disparity, the inherent sensitivity of LLMs to adversarial prompts remains a persistent challenge. They test four strategies: correlation-based filtering, Fair-SPD, group balanced, and random subset. The results show that Fair-SPD consistently reduces downstream disparity SPDD relative to the unmitigated baseline while preserving comparable F1 in most settings.

Conclusion on Vulnerability

The findings reveal a new attack surface for LLM-based tabular data generation, showing that this manipulation propagates to downstream classifiers, which often amplify the injected bias. The paper concludes that in-context pre-processing defenses are insufficient to fully neutralize the injected bias, highlighting the need for more robust safeguards in generative data pipelines. The susceptibility to in-context bias is a fundamental property of the learning paradigm itself, rather than a behavior emerging solely from model scale or from prompt engineering. The mechanism of in-context bias propagation can be exploited by an adversary to maliciously inject biases for a targeted subgroup, even when the target lies at the intersection of multiple variables. The authors demonstrate that these synthetic biases are captured by downstream models, leading to discriminatory predictions on real test data. The paper shows that fairness can deteriorate substantially while conventional utility metrics remain largely unchanged.

The work reveals a critical vulnerability inherent to the paradigm of using Large Language Models for synthetic tabular data generation, where statistical biases in in-context examples systematically propagate to synthetic distributions and subsequently compromise downstream fairness without degrading standard utility diagnostics. This vulnerability is exploitable by malicious actors who can inject feature-aligned examples to manipulate the output distribution for a targeted subgroup, demonstrating that even small fractions of in-context examples can significantly alter the group-wise label distribution of the synthetic data while preserving macro F1 scores. The research underscores that increasing context window size to improve synthetic data utility inadvertently heightens the risk of replicating historical injustices or adversarial injections, as larger windows faithfully replicate and amplify demographic skews when in-context examples are demographically skewed. Despite evaluating various pre-processing techniques such as correlation-based filtering and Fair-SPD selection, these defenses are insufficient to fully neutralize the injected bias because biases often persist due to the model’s intrinsic priors and the leakage of higher-order correlations not captured by marginal constraints. Ultimately, this research establishes adversarial in-context bias injection as a new vulnerability scheme in LLM-based generation pipelines that affects fairness in synthetic data while maintaining high utility, necessitating more robust safeguards against prompt-level manipulation. The paper shows that these synthetic biases are captured by downstream models, leading to discriminatory predictions on real test data across various architectures and classifiers.

--- Page 1 ---

In-Context Bias Propagation in LLM-Based Tabular Data Generation

Pol G. Recasensa, Alberto Gutierreza, Jordi Torresa, Josep Ll. Berralb, Javier Carnerero-Canoc, Anisa Halimic, Kieran Fraserc aBarcelona Supercomputing Center (BSC), Spain bUniversitat Politècnica de Catalunya (UPC), Spain cIBM Research Ireland Abstract

Large Language Models (LLMs) are increasingly used for synthetic tabular data generation through in-context learning (ICL), offering a practical solution for data augmentation in data scarce scenarios. While prior work has shown the potential of LLMs to improve downstream task performance through augmenting underrepresented groups, these benefits often assume access to a subset of unbiased in-context examples, representative of the real dataset. In real-world settings, however, data is frequently noisy and demographically skewed. In this paper, we systematically study how statistical biases within in-context examples propagate to the distribution of synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions. We further introduce an adversarial scenario where a malicious contributor can inject bias into the synthetic dataset via a subset of in-context examples, ultimately compromising the fairness of downstream classifiers for a targeted and protected subgroup. Finally, we evaluate mitigation strategies based on preprocessing in-context examples, demonstrating that while such interventions can attenuate disparity, the inherent sensitivity of LLMs to adversarial prompts remains a persistent challenge. Our findings highlight a critical new vulnerability in LLM-based data generation pipelines within sensitive domains. Keywords: in-context learning, bias mitigation, synthetic data generation, large language models

--- Page 2 ---

  1. Introduction

The scarcity of high-quality, labeled data remains a primary bottleneck in deploying machine learning systems in sensitive domains such as healthcare, finance, and criminal justice. Due to strict privacy regulations and the high cost of manual annotation, practitioners increasingly rely on synthetic data augmentation to build robust classifiers [1]. While traditional generative models [2, 3] have been the standard for tabular synthesis, they often require substantial in-domain data to generate reliable data. Recently, Large Language Models (LLMs) have emerged as a powerful alternative, demonstrating remarkable generalization capabilities through in-context learning (ICL). By conditioning on a small set of ICL examples, LLMs can generate realistic, statistically coherent tabular samples without the need for finetuning [1]. This paradigm leverages the model’s strong semantic priors to augment underrepresented groups, offering a resourceefficient solution for data-scarce regimes. Recent studies show that LLM-generated synthetic data can significantly boost downstream task performance, matching or even surpassing traditional data augmentation methods in data-scarce regimes [4, 5]. However, the efficacy of ICL relies on a critical and often unexamined assumption, which is that in-context examples provided in the prompt are unbiased and independently drawn from the real data distribution. In real-world deployment scenarios –such as Retrieval-Augmented Generation (RAG) pipelines or collaborative data platforms –this assumption rarely holds. In-context examples are frequently noisy, skewed, or dynamically retrieved from unverified sources.

--- Page 3 ---

Clean Examples Background PROMPT Poisoned Examples Clean Examples In-context Examples Background PROMPT

Example 1: Black Example 2: White Example 3: White Example 79: Black Example 80: Black LLM-based Tabular Data Generation Downstream Model Adversarial Bias Injection Bias Propagation Race Attrs Label Utility evaluation Macro F1 Score Fairness Evaluation SPD High disparity Figure 1: End-to-end bias propagation. An adversarial user injects biased examples into the prompt for a targeted group. The LLM replicates these statistical patterns via in-context learning, propagating the bias into the synthetic tabular data, and further compromising downstream fairness.

--- Page 4 ---

Race Attrs Label Utility evaluation Macro F1 Score Fairness Evaluation SPD High disparity Figure 1: End-to-end bias propagation. An adversarial user injects biased examples into the prompt for a targeted group. The LLM replicates these statistical patterns via in-context learning, propagating the bias into the synthetic tabular data, and further compromising downstream fairness.

Improvements for AI systems

  1. Adversarial bias injection defense can be implemented by applying correlation-based filtering to in-context examples by removing those with high feature magnitudes weighted by correlation scores si = Pj ρj · zi, j. This aims to remove the injected adversarial correlations that steer protected group profiles toward attacker-chosen plausible values.

  2. Fair Statistical Parity Difference enforcement can be used as a pre-processing strategy where a selection algorithm iteratively removes the single example contributing most to current disparity until SPD(Scurr) <= epsilon is met. This helps attenuate adversarial bias injection by aligning the prompt examples with a desired level of fairness, although it may not fully eliminate downstream disparities.

  3. For complex tasks involving multiple protected attributes, a balanced prompt instruction can be used to generate specific combinations of subgroups, such as one example for each combination of gender and race. This helps disentangle conditional dependence from frequency effects by explicitly instructing the LLM to generate examples that maintain balanced frequency counts across subgroups.

  4. Model selection can prioritize larger models or mixture-of-experts architectures when aiming for precise bias propagation control, as they demonstrate greater precision in bias propagation and exhibit stronger conditional propagation compared to smaller models within the same family.

  5. Downstream model training should be augmented with a consideration of feature importance analysis, such as Mean Decrease Impurity (MDI), to identify when the downstream classifier begins to rely on the protected attribute even when it is excluded from prediction variables, indicating where bias transfer is occurring.

Abstract

Large Language Models (LLMs) are increasingly used for synthetic tabular data generation through in-context learning (ICL), offering a practical solution for data augmentation in data scarce scenarios. While prior work has shown the potential of LLMs to improve downstream task performance through augmenting underrepresented groups, these benefits often assume access to a subset of unbiased in-context examples, representative of the real dataset. In real-world settings, however, data is frequently noisy and demographically skewed. In this paper, we systematically study how statistical biases within in-context examples propagate to synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions. We further introduce an adversarial scenario where a malicious contributor can inject bias into the synthetic dataset via a subset of in-context examples, ultimately compromising the fairness of downstream classifiers for a targeted and protected subgroup. Finally, we evaluate prompt-side mitigation strategies based on preprocessing in-context examples and instruction-based defenses, demonstrating that while such techniques can attenuate disparity, the inherent sensitivity of LLMs to adversarial prompts remains a persistent challenge. Our findings highlight a critical new vulnerability in LLM-based data generation pipelines within sensitive domains.

Sources

Related papers