Echoes of the canary: auditing the privacy risks of LLM-generated synthetic textThe Canary's Echo: Auditing Privacy Risks of LLM-Generated Synthetic Text
The authors propose a membership inference attack that accesses only synthetic data to audit the privacy leakage of LLM synthetic text; on SST-2 the 2-gram attack AUC reaches 0.741 (Table 1).
The adversary infers whether the canary is included in the private dataset D used for synthetic data. There are two threat models: Aθ has query access to the logits output by the fine-tuned target model θ; AD has access only to the synthetic dataset D̃. Both adversaries can train reference models (assuming knowledge of D and the training pipeline), as a worst-case audit method.
- Synthetic text generated after LLM fine-tuning may leak information about its training data, but existing audit methods assume the attacker can access the model itself; when only synthetic data is released, research on how to quantify the privacy risk is still lacking.
- The authors propose a membership inference attack that accesses only synthetic data: train an n-gram model on synthetic data or compute similarity to the nearest synthetic sample as a membership signal, and adapt RMIA scoring; they also design a dedicated canary with an in-distribution prefix and a high-perplexity suffix.
- On SST-2, AG News, and SNLI, the attack AUC using only synthetic data reaches up to 0.74, 0.68, and 0.77 respectively; model-based attacks are near perfect, and canaries need to be repeated 8–16 times more to reach the same vulnerability level under data-based attacks; DP-SGD (ϵ=8) reduces the attack to random level.
- The authors note that the privacy-utility trade-off under DP may depend on the scenario and leave it for future research. The experiments use only one generative model, Mistral-7B, and three English classification datasets; the attack assumes the adversary knows the private dataset and the training pipeline (a worst-case audit setting).
- Evaluated models
- Mistral-7B
- Benchmarks
- SST-2AG NewsSNLI
- Metrics
- ROC AUCTPR at low FPR
The paper designs membership inference attacks and finds that synthetic data generated by LLMs leaks the training data used to fine-tune that model. The authors assume the attacker can obtain part of the synthetic data and mount membership inference attacks against the training data used to fine-tune the LLM, and the attacks perform significantly. The study also finds that canaries designed for model-based membership inference attacks are ineffective when only synthetic data is released: such out-of-distribution canaries have limited influence on the model's outputs when generating in-distribution useful synthetic data, greatly reducing their effectiveness. Leveraging the mechanism of autoregressive models, the authors design canaries with in-distribution prefixes and high-perplexity suffixes so that they leave detectable traces in the synthetic data, thereby strengthening data-based membership inference attacks and more accurately assessing the privacy risk of releasing LLM synthetic data.
Paper analysis
What problem does this paper attempt to solve?
How to audit: when only LLM-generated synthetic text is released, how much membership information about its training data (fine-tuning data) is leaked.
Core question: when the adversary can only obtain LLM-generated synthetic data and not the generative model itself, how to quantify the extent to which synthetic text leaks its fine-tuning training data.
- Setting and importance: LLMs are often fine-tuned on private data and then generate synthetic text for release; the authors argue that the fact that synthetic data cannot be directly traced back to the original records does not mean there is no privacy risk, and ignoring this creates a false sense of security.
- Shortcomings of existing methods: Existing privacy audits insert high-perplexity, out-of-distribution canaries into the training data and then detect them with model-based MIA that assumes access to the model or output logits; the authors state that research in the setting where only synthetic data is released is missing.
- Core observation: The authors find that although high-perplexity canaries are memorized by the model, they have limited influence on the output when generating useful, in-distribution synthetic data, causing their effectiveness under data-based attacks to drop; low-perplexity, in-distribution prefixes can better influence the synthetic output.
- Contributions: Propose a data-based MIA that accesses only synthetic data (two signals, n-gram and similarity, adapted to RMIA), design a dedicated canary with an in-distribution prefix + high-perplexity suffix, and verify on synthetic data generated with DP-SGD that the attack drops to random level.
- Threat model:
- Goal: Infer whether a certain canary record is included in the private dataset D used for synthetic data.
- Knowledge: Both adversaries are assumed to know the private dataset D, the target model training pipeline, and the prompt templates (worst-case audit setting, Appendix E).
- Capability: Aθ can query the output logits of the fine-tuned model θ; AD can only access the synthetic dataset D̃ and can generate synthetic data from reference models.
- Victim system: Mistral-7B fine-tuned with LoRA on D and the synthetic datasets it generates according to label prompt templates.
What related research exists?
Related work falls into four groups: model-based MIA, MIA against language models, data-based MIA for other modalities, and DP synthetic text methods.
Membership inference attacks against ML models
- Shokri et al. (2017)—proposed the MIA framework; subsequent model-based MIA covers threat models such as white-box weights (Sablayrolles et al., 2019; Nasr et al., 2019), output probabilities (Carlini et al., 2022a), and labels-only (Choquette-Choo et al., 2021).
- Ye et al. (2022), Carlini et al. (2022a), et al.—use many reference models to improve the attack; RMIA (Zarifzadeh et al., 2024) achieves high performance with few reference models, and the attack scoring in this paper is adapted from RMIA.
MIA and canary auditing against language models
- Carlini et al. (2021)—perform training data reconstruction on LLMs, sampling synthetic text and then using model-based attacks to identify members; Kandpal et al. (2022) and Carlini et al. (2023) find that training data duplication makes records more vulnerable.
- Carlini et al. (2019) proposed canary auditing; Stock et al. (2022), Wei et al. (2024) use random numbers or token sequences, Meeus et al. (2024c) use synthetic sequences; prior work finds that longer sequences, sequences with more repetition, and sequences with higher perplexity are more easily memorized. The paper points out that these canaries were designed for model-based attacks, and this paper demonstrates that they are not optimal for data-based attacks.
Data-based MIA in other settings
- Hayes et al. (2019), Hilprecht et al. (2019), Chen et al. (2020)—membership inference against GAN-generated images; Yale et al. (2019), Hyeong et al. (2022), Zhang et al. (2022), Stadler et al. (2022), Meeus et al. (2024a), et al. study the privacy risks of synthetic tabular data. The paper points out that this paper targets text generated by fine-tuned LLMs, which brings different challenges in membership signal computation and worst-case canary design.
Synthetic text with formal privacy guarantees
- Training-time methods (Yue et al., 2023; Mattern et al., 2022; Kurakin et al., 2023) fine-tune with DP-SGD; inference-time methods (Xie et al., 2024; Wu et al., 2024; Tang et al., 2024; Amin et al., 2024) add noise during decoding or use DP evolutionary algorithms. This paper instantiates the training-time method (DP-SGD, ϵ=8) to evaluate its defense effectiveness.
Baselines and benchmarks: The baseline attacks are model-based RMIA (Aθ, accessing the target model's logits) and three signal variants of data-based attacks (2-gram, SIMJac, SIMemb); the benchmarks are three text classification datasets: SST-2, AG News, and SNLI. The authors state that this paper is the first systematic study of the factors influencing information leakage in LLM synthetic corpora, and position the auditing tool as an empirical lower bound complementary to the upper bound of DP methods.
How does the paper address this problem?
Adapt RMIA's pairwise likelihood ratio scoring to the setting where only synthetic data can be observed, and design canaries that are both memorized and able to influence the synthetic output.
Overall approach: under the unified membership inference experimental framework of Algorithm 1, the adversary first adversarially constructs canaries and inserts them into the training data with probability 1/2, then is divided into model-based and data-based attacks depending on whether the model can be accessed; membership scoring uniformly uses the RMIA-style reference-model ratio.
Problem setting and formalization
- Synthetic data generation: The private dataset D contains labeled text records; a pretrained model θ0 is fine-tuned on D conditioned on a prompt template p(ℓ) to obtain θ, then the same template is used to sample and generate a synthetic dataset D̃ according to a given label distribution, with N = Ñ by default.
- Membership inference experiment: The adversary constructs a canary x̂, flips a fair coin to decide whether to insert it nrep times into D, and generates D̃ after fine-tuning; the adversary outputs a membership score β based on D̃ (data-based) or θ (model-based).
- RMIA scoring: βθ(x̂) = αθ(x̂) / 1/M∑i=1M αθ′i(x̂), i.e., the ratio of the membership signal on the target model to the mean of the signals from M reference models; the similarity signal is normalized to [0,1] as an empirical proxy for probability (Appendix B).
Data-based membership signals (Sec. 3.1.2)
- n-gram model: Train an n-gram model on D̃ (Laplace smoothing), and use the canary's sequence probability as the signal α; the intuition is that when the canary is in the training set, D̃ better reflects its n-gram co-occurrence patterns.
- Similarity: Compute the similarity between the canary and all synthetic sequences (SIMJac for Jaccard or SIMemb for embedding cosine), and take the mean of the k most similar ones as α.
- Model-based signal: The target model's conditional probability of the canary (product of token-level probabilities) as α.
Canary generation (Sec. 3.2)
- Design motivation: The authors argue that although high-perplexity sequences are easy to memorize, they do not match the model's natural generation behavior and are hard to "echo" into the synthetic data under conventional sampling.
- Construction method: Take a real record truncated to an in-distribution prefix of length F, then use the pretrained model θ0 with raised temperature to generate a high-perplexity suffix; use rejection sampling so that the overall perplexity falls in [0.9 Ptarget, 1.1 Ptarget], and keep the canary length consistent.
- Parameter adjustment: F=0 yields a fully out-of-distribution canary, F=max yields a fully in-distribution canary; each canary is repeated nrep times in the training set to strengthen memorization.
Experimental configuration (Sec. 4)
- Generation settings: Mistral-7B is fine-tuned with LoRA (r=4, 10.7M parameters updated), learning rate 2×10⁻⁵, batch size 128, 1 epoch; sampling uses temperature 1.0, top-p 0.95; prompt templates are customized per dataset (Appendix C).
- Canary settings: 50 words by default, generated with Mistral-7B as θ0; labels are of two kinds, Natural (sampled according to D's label distribution) and Artificial (a new "canary" label added).
- Attack settings: Each target model uses 1000 canaries (about half are members), M=4 reference models (each canary is a member in 2 reference models); data-based attacks default to n=2, k=25, and the embedding model is Sentence-BERT (paraphrase-MiniLM-L6-v2).
- Utility check: RoBERTa-base is fine-tuned on real and synthetic data respectively for downstream classification, confirming that the synthetic data retains high utility (Appendix F).
What experiments did the paper conduct?
On the three datasets, the data-based attack AUC reaches at most 0.74–0.77, far lower than the model-based attack; the dedicated canary and the DP defense are the other two core experiment groups.
Experimental setup
- Model under test: Mistral-7B (LoRA fine-tuned) as the target model generating synthetic data; each setting trains 1 target model + 4 reference models.
- Datasets: SST-2 (43,296 records, binary sentiment), AG News (120,000 records, four news classes), SNLI (first 100,000 records, three classes); samples with fewer than 5 words are removed.
- Baselines: Model-based attack Aθ (RMIA, accessing target model logits); random guessing (AUC=0.5).
- Metrics: ROC AUC and TPR at low FPR (FPR=0.01, 0.1).
- Sample size: 1000 canaries per target model, about half inserted into the training set; standard canaries default to Ptarget=250, F=0, nrep=12.
- Review method: Membership determination is based entirely on RMIA scores and ROC analysis, with no human or LLM review.
Main results
ROC AUC under standard canaries (Ptarget=250, F=0, nrep=12), according to Table 1:
Swipe horizontally to read the table
Dataset Canary source Label Aθ (model-based) AD 2-gram AD SIMJac AD SIMemb SST-2 In-distribution — 0.911 0.741 0.602 0.586 SST-2 Synthetic Natural 0.999 0.620 0.547 0.530 SST-2 Synthetic Artificial 0.999 0.682 0.552 0.539 AG News In-distribution — 0.993 0.676 0.590 0.565 AG News Synthetic Natural 0.996 0.654 0.552 0.506 AG News Synthetic Artificial 0.999 0.672 0.560 0.525 SNLI In-distribution — 0.892 0.718 0.644 0.630 SNLI Synthetic Natural 0.998 0.534 0.486 0.488 SNLI Synthetic Artificial 0.997 0.770 0.602 0.571 - Data-based attacks are effective but weaker than model-based: The authors state that data-based attacks are above random guessing in all settings, showing that synthetic text leaks training data information; model-based attacks are near perfect, and there is an inherent gap between the two.
- 2-gram signal is best: The authors believe membership information is hidden in subtle changes in n-gram co-occurrences of the synthetic data, rather than in lexical or semantic similarity.
- Repetition count gap: On SST-2, AD at nrep=16 performs about the same as Aθ at nrep=2 (at low FPR, equivalent to nrep=1), and AG News is similar; the authors therefore state that canaries need to be repeated 8–16 times more to reach the same vulnerability level under data-based attacks (Figure 1a, 1d).
Dedicated experiments on perplexity and canary design
- Perplexity sweep (Figure 2): Model-based attack AUC rises monotonically with canary perplexity; data-based attack AUC first rises then falls, approaching 0.5 at high perplexity (nrep: 4 for Aθ, 16 for AD). The authors state that model-based audits easily find vulnerable canaries, whereas synthetic data audits need to balance memorization and influence on synthetic data.
- Prefix length ablation (Table 2, Ptarget=31): On SST-2, AUC is 0.760 at F=30, higher than 0.673 at F=0 and 0.741 at F=max; on AG News, 0.716 at F=20, higher than 0.692 at F=0 and 0.676 at F=max. The authors believe the in-distribution prefix serves as a generation starting point, making canary traces more likely to appear in the synthetic data.
- Leaked content analysis (Table 3): As n increases, the number of canary n-grams appearing in the synthetic data decreases, and at n=4 the median is already 0; the count difference between members and non-members is very small. The authors therefore infer that the leakage signal is a subtle shift in the token co-occurrence distribution rather than long verbatim reproduction (the case analysis in Appendix K supports the same conclusion).
DP defense and utility
- DP-SGD defense (Table 4): At ϵ=8, the strongest data-based attack (2-gram) AUC drops to 0.48 (SST-2), 0.52 (AG News), and 0.49 (SNLI), whereas at ϵ=∞ they are 0.620, 0.654, and 0.534 respectively; the authors state this confirms that DP constitutes a strong defense.
- Utility retention (Sec. 5.4, Appendix F): ϵ=8 synthetic data achieves 91.6% downstream accuracy on SST-2, non-DP synthetic data 91.5%, and real data 92.3%; the authors state that DP synthetic data can mitigate data-based MIA while retaining high utility.
Other ablations and analyses
- Synthetic data multiplier m (Figure 5): As m increases, the 2-gram attack AUC rises, while the similarity attack benefits little (SST-2, AG News).
- Hyperparameters (Table 11): n-gram order n=2 and similarity truncation k=25 are both best on the two datasets.
- Per-record correlation (Figure 6): The RMIA scores of the two attacks are positively correlated (SST-2 Pearson 0.20, AG News 0.23), but some canaries differ greatly in vulnerability under the two attacks.
- Utility (Tables 7, 8): Without canaries, synthetic data downstream AUC is 0.968 (SST-2) and 0.978 (AG News); after inserting canaries the utility impact is limited, with the Natural label showing the largest degradation.
What are some points that can be further explored?
The authors only note that the privacy-utility trade-off under DP depends on the setting and leave this for future work; the experiments cover one generative model and three English classification datasets.
Limitations noted by the authors and future directions
- Privacy-utility trade-off of DP: The authors state that achieving an appropriate privacy-utility balance in DP synthetic text generation "is likely to be scenario-dependent," and hope that the audit framework in this paper enables future work to rigorously study this trade-off (Sec. 5.4).
- Apart from this, the paper has no dedicated Limitations section discussing other limitations.
Experimental coverage
- Generative model: All experiments use only Mistral-7B (LoRA fine-tuned) as the target and reference models, and canary suffix generation also uses Mistral-7B (Sec. 4, Appendix D).
- Datasets: Three English text classification datasets, SST-2, AG News, and SNLI; for SNLI only the first 100,000 records are used (Sec. 4).
- Adversary assumptions: Both threat models assume the adversary knows the private dataset D, the training pipeline, and the prompt templates; the authors note this is rare in real attacks but valid as a worst-case audit method (Sec. 4, Appendix E).
- Defense evaluation: The formal privacy defense instantiates only the training-time method DP-SGD (ϵ=8, Opacus implementation); inference-time methods are only discussed in Sec. 5.4 and not experimented on.
- Repetitions and variance: Each target model uses 1000 canaries and M=4 reference models; Table 3 reports the mean and standard deviation of n-gram counts, while the main results tables (Tables 1, 2, 4) do not report confidence intervals over multiple runs.
Summarize the main content of the paper
A privacy audit method for the "release synthetic data only" setting: data-based MIA + dedicated canary design + DP validation.
An attack paper on privacy auditing of LLM synthetic text, answering the question: when the adversary can only access synthetic data, how much membership information about the fine-tuning training data can be inferred.
- Method: The authors adapt RMIA's reference-model likelihood ratio scoring to the data-based setting—training an n-gram model on the synthetic data or taking the similarity to the nearest synthetic samples as the membership signal; they also propose a canary design with an in-distribution prefix + high-perplexity suffix, balancing being memorized and influencing the synthetic output.
- Data-based attacks are effective: On SST-2, AG News, and SNLI, the 2-gram attack using only synthetic data reaches AUC up to 0.741, 0.676, and 0.770 respectively (Table 1); the authors state that synthetic text leaks information about the real data it came from.
- Gap from model-based attacks: Aθ, which accesses model logits, is near perfect (above 0.99 in most settings); on SST-2 and AG News, canaries need to be repeated 8–16 times more for data-based attacks to reach the vulnerability level of model-based attacks (Figure 1a, 1d).
- Reversal in canary perplexity: Model-based attacks strengthen monotonically with canary perplexity, while data-based attacks drop to random level at high perplexity (Figure 2); when overall perplexity is fixed, the hybrid canary with an in-distribution prefix is best (AUC 0.760 at F=30 on SST-2, Table 2).
- DP defense: DP-SGD (ϵ=8) reduces the strongest data-based attack to random level (AUC 0.48–0.52, Table 4), while SST-2 downstream accuracy remains 91.6%.
- Authors' conclusion: The proposed MIA and canary design can be used to audit the privacy risk of synthetic text, providing a risk lower bound for release decisions and complementing the upper bound provided by DP methods; the authors plan to release reproduction code.
Related papers
- Explainable Federated Learning via Global-Local Attribution AlignmentAnalysis / interpretabilityICML 2026
Show 3 more papers
- Auditing Private PredictionAnalysis / interpretabilityarXiv