The Canary's Echo: Auditing Privacy Risks of LLM-Generated Synthetic Text

Matthieu Meeus, Lukas Wutschitz, Santiago Zanella-Béguelin, Shruti Tople, Reza Shokri

Abstract

How much information about training samples can be leaked through synthetic data generated by Large Language Models (LLMs)? Overlooking the subtleties of information flow in synthetic data generation pipelines can lead to a false sense of privacy. In this paper, we assume an adversary has access to some synthetic data generated by a LLM. We design membership inference attacks (MIAs) that target the training data used to fine-tune the LLM that is then used to synthesize data. The significant performance of our MIA shows that synthetic data leak information about the training data. Further, we find that canaries crafted for model-based MIAs are sub-optimal for privacy auditing when only synthetic data is released. Such out-of-distribution canaries have limited influence on the model's output when prompted to generate useful, in-distribution synthetic data, which drastically reduces their effectiveness. To tackle this problem, we leverage the mechanics of auto-regressive models to design canaries with an in-distribution prefix and a high-perplexity suffix that leave detectable traces in synthetic data. This enhances the power of data-based MIAs and provides a better assessment of the privacy risks of releasing synthetic data generated by LLMs.

Introduction

Synthetic data generation is often touted as a privacy-preserving silver bullet: instead of sharing a sensitive dataset, you share a "fake" version that looks statistically similar. However, Large Language Models (LLMs) are notorious for memorizing their training data. While researchers have developed Membership Inference Attacks (MIAs) to check if a specific record was used to train a model, most of these attacks assume the attacker can query the model directly or see its internal confidence scores. This paper addresses a more realistic and dangerous "black-box" scenario: What if the attacker only has access to the synthetic text corpus?

Methodology

The authors evaluate two main types of adversaries:

  1. Model-based ($A^\theta$): The traditional attacker who can query the fine-tuned LLM.
  2. Data-based ($A^D$): A new, more constrained attacker who only sees the generated synthetic dataset.

To audit these risks, they use canaries—artificial records inserted into the training data. The paper introduces two novel data-based attack strategies: n-gram models, which identify sequences with higher-than-expected probabilities in the synthetic corpus, and similarity metrics, which look for synthetic records that are lexically or semantically close to the target record.

Crucially, they propose a hybrid canary design. Standard canaries are usually high-perplexity (random-looking) strings. However, the authors found these are rarely "echoed" in synthetic data. Their solution is a hybrid canary consisting of an "in-distribution" prefix (to trigger the model's generation) followed by a high-perplexity suffix (to ensure it is unique and memorized).

Key Insights: The Perplexity Paradox and Repetition Gap

The study reveals a fundamental tension in privacy auditing. For model-based attacks, higher perplexity (more randomness) makes a canary easier to detect. For data-based attacks, the opposite is true: if a canary is too "weird," the model won't "echo" it into the synthetic dataset, making the attack fail. This creates a "false sense of privacy" if one only audits the model and not the data it produces.

The Perplexity Paradox: MIA AUC vs Canary Perplexity

Furthermore, there is a significant "repetition gap." To be as vulnerable in a data-only attack as they are in a model-access attack, canaries need to be repeated 8 to 16 times more often in the training set. This suggests that leakage in synthetic data is far more subtle than direct model leakage.

The Repetition Gap: ROC curves for varying canary repetitions

Results and Conclusion

Data-based MIAs significantly outperformed random guessing, achieving AUC scores of 0.74 (SST-2), 0.68 (AG News), and 0.77 (SNLI). The proposed hybrid canaries were significantly more effective at auditing synthetic data than standard random canaries. Importantly, the authors confirmed that Differential Privacy (DP-SGD) is a robust defense; when models were trained with $\epsilon=8$, attack performance dropped to near-random levels.

While this work highlights the risks of private "echoes" in synthetic text, future research will explore how to detect the leakage of records that appear only once and how different generation prompts influence the strength of these leaks.

Summary updated

Abstract

How much information about training samples can be leaked through synthetic data generated by Large Language Models (LLMs)? Overlooking the subtleties of information flow in synthetic data generation pipelines can lead to a false sense of privacy. In this paper, we assume an adversary has access to some synthetic data generated by a LLM. We design membership inference attacks (MIAs) that target the training data used to fine-tune the LLM that is then used to synthesize data. The significant performance of our MIA shows that synthetic data leak information about the training data. Further, we find that canaries crafted for model-based MIAs are sub-optimal for privacy auditing when only synthetic data is released. Such out-of-distribution canaries have limited influence on the model's output when prompted to generate useful, in-distribution synthetic data, which drastically reduces their effectiveness. To tackle this problem, we leverage the mechanics of auto-regressive models to design canaries with an in-distribution prefix and a high-perplexity suffix that leave detectable traces in synthetic data. This enhances the power of data-based MIAs and provides a better assessment of the privacy risks of releasing synthetic data generated by LLMs.
BibTeX
@inproceedings{meeus2025canary,
  author = {Matthieu Meeus and Lukas Wutschitz and Santiago Zanella-Béguelin and Shruti Tople and Reza Shokri},
  title = {{The Canary's Echo: Auditing Privacy Risks of LLM-Generated Synthetic Text}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=f3mQ0xYA1I},
}
Figure