Copy and Perturb: A String Likelihood Ratio-Based Membership Inference Attack on LLM In-Context Table SynthesisCopied and Perturbed: A String-Based Likelihood-Ratio Membership Inference Attack on LLM In-Context Table Synthesis
The authors propose the no-box membership inference attack String-LRA, which audits LLM in-context table synthesis on 9 generators and 34 datasets, with an average AUC of 0.688, higher than LevAtt's 0.643.
The no-box attacker only observes the released synthetic table S, the target record x★ and a reference sample R from the same population disjoint from the private context table; it cannot inspect or query the generator G, observe prompts or logits, modify the context or obtain additional releases. The goal is to determine whether the target record entered the generator's context.
- When LLMs generate synthetic data for small private tables via in-context learning, they may copy verbatim or slightly perturb categorical values and numbers in the context. The authors argue that privacy audits that only check feature-space density or verbatim whole-row copying will miss this string-level membership information.
- String-LRA fits character and digit Witten–Bell tries on the reference sample, estimates the probability of the target value and its numerical neighborhood in the population, then compares a non-member alternative model with a target-influenced release model, aggregating evidence across fields, neighborhood levels and released rows into a log-likelihood ratio.
- The experiments cover 9 generators, 34 OpenML-CTR23 datasets and 4,088 releases. String-LRA has an average AUC of 0.688, LevAtt 0.643 and DCR 0.661; the authors also report that different generators behave differently on exact copying versus numerical perturbation, and that post-processing perturbation defenses reduce attack AUC by at most 0.045.
- The scope listed by the authors is context generation, contexts of at most 128 rows and 82 columns; fine-tuned generators are not studied; the reference sample is assumed to be from the same population and disjoint; scores are not calibrated into probabilities, and leakage across multiple rows is not evaluated. Defense experiments use a non-adaptive attacker, post-processing only with seed 0, and generation-time defenses only on Gemma-4-E4B.
- Evaluated models
- Llama-3.3-70BGPT-4o-miniTabPFN-v2Gemma-4-E4BQwen3.6-27BGemma-4-31BOLMo-3.1-32Bgpt-oss-120bLlama-4-Scout
- Benchmarks
- OpenML-CTR23
- Metrics
- AUCTPR@FPR=10%correlation distanceTSTR balanced accuracymarginal W1
The paper proposes String-LRA, a no-box membership inference attack on LLM in-context table synthesis that exploits string signals from LLMs memorizing and reproducing categorical values and numeric patterns in context, often with small numeric perturbations. The method fits Witten-Bell Character Tries for characters and digits on reference samples to estimate likelihood ratios, determining whether a synthesized row's values are reproduced from a target record or randomly drawn from the population. On a benchmark of 9 generators and 34 datasets, its AUC outperforms existing string-space attacks and the strongest of ten feature-space attacks on every generator; ablations show it is insensitive to hyperparameters, model-agnostic, requires only a small reference sample, runs in about one second of CPU time, and under the tested shadow budgets matches shadow-model attacks that assume access to the generator and have a much larger compute budget. The authors also find that different LLMs behave differently in exact copying versus perturbing numeric values, and that many common defenses have little effect against this attack.
Related events and news
1 events · 0 news mentions
- This event's paper
String-LRA:LLM上下文表格合成的成员推断攻击
Paper analysis
What problem does this paper attempt to solve?
Design a membership inference audit requiring no generator access, targeting string copying and numerical perturbation in LLM context tabular synthesis.
The core question is how to audit whether LLM context tabular synthesis leaks context membership using only the synthetic release table, the target record and a reference sample.
- Scenario and importance: a data holder places a small number of private records into a prompt and lets an LLM generate a synthetic table with the same schema, without training. The authors argue that in a small table each record accounts for a large share of the context, and membership itself may also expose an individual's association with datasets such as clinics or welfare programs.
- Shortcomings of existing methods: the authors state that feature-space MIA mainly looks for over-dense regions near the target, which may dilute the evidence of a single copied field; LevAtt uses minimum edit distance but does not distinguish numerical closeness from character closeness, nor consider whether a value is common in the population.
- Core observation: LLMs serialize tables as text and may retain rare categorical values, digit strings or several fields, and make small perturbations to memorized numbers. Therefore, the absence of a complete verbatim row copy cannot be used to infer that the release table has no membership privacy risk.
- Proposed method: String Likelihood Ratio Attack (String-LRA) uses the reference sample to estimate the population probability of character and digit strings, constructs an alternative likelihood ratio for exact reproductions and reproductions within numerical neighborhoods, and expresses evidence in bits; it is also used to analyze generator behavior and evaluate defenses.
- Threat model:
- Goal: determine whether the target record x★ belongs to the generator's private context table T, rather than necessarily reconstructing the full record.
- Knowledge: the main attacker is no-box and knows only the release table S, x★ and the reference sample R; R is disjoint from T, comes from the same population and was not used to generate S.
- Capability limits: cannot inspect or query the generator G, cannot observe prompts or logits, modify the context or obtain additional releases.
- Victim system: generators performing in-context tabular synthesis with private tables of numerical and categorical attributes; a Shadow-box attack that can access or run the generator is also used for comparison.
What related research exists?
Related work is divided into LLM table synthesis, membership inference on synthetic data, string evidence and record linkage, and the corresponding defenses.
LLM table synthesis
- GReaT (2023), REaLTabFormer (2023): Fine-tune pretrained models on private tables and then sample synthetic rows; this paper focuses on in-context generation without updating parameters.
- Byun et al. (2025) and EPIC, Curated LLM, etc.: Place private table examples in the prompt to generate tables; Byun et al. also used an existing feature-space MIA to evaluate the privacy of in-context table generation.
- TABGEN-ICL (2025), Han et al. (2026): Study in-context example selection and improvements in fidelity and privacy under limited training data, respectively; TabPFN-v2 (2025) represents a Transformer-based tabular foundation model.
Membership inference on synthetic data and in-context learning
- DCR, DOMIAS (2023), Gen-LRA (2025): Use nearest-record distance and density or likelihood ratios over full feature vectors, respectively, to find anomalous concentration of a release relative to the population.
- Groundhog (2022), TAPAS (2022), LiRA (2022), RMIA (2024): Use shadow releases or reference models to calibrate member and non-member behavior; the paper notes that such methods require knowledge of the generator and often require many shadow models.
- Duan et al. (2023), Wen et al. (2024), etc.: Study membership inference against private demonstrations in deployed models; Carvalho and Cordy (2026) study prediction confidence and attention representations of tabular foundation models. This paper instead observes a single static synthetic release.
String evidence and record linkage
- LevAtt / Ward et al. (2026): Serialize target and synthetic records and score by minimum Levenshtein distance; the paper states that its edit cost does not distinguish the tendency toward numeric perturbation and is not calibrated by population commonness.
- Fellegi–Sunter (1969): The evidence of field agreement varies with the rarity of that agreement; this paper borrows this idea, but the goal is to determine whether a candidate record influenced the generator, not entity record linkage.
- Ippolito et al. (2023): Discuss that suppressing only verbatim reproduction may let paraphrased or transformed copies bypass filtering; this paper studies a similar phenomenon for numeric perturbation in tables.
Baselines and defenses
- Comparison baselines: The string attack LevAtt, and DCR, DCR-diff, DOMIAS, Gen-LRA, Classifier, MC, Density, LOGAN, DPI and Local neighborhood with Synth-MIA default configurations; the data are the 34 regression datasets of OpenML-CTR23. The shadow comparison includes LiRA, Groundhog and TAPAS.
- Defense sources: Digit Modifier and Tendency-based Logit Processor from Ward et al., and token clipping inspired by Vyas et al. (2023).
The authors position this paper as retaining LevAtt's focus on released strings, but replacing uniform edit cost with a population-normalized likelihood ratio, and covering both exact copying and numeric perturbation under a no-box setting.
How does the paper address this problem?
String-LRA estimates string rarity from the reference sample and aggregates exact matches and numerical neighborhood matches into a release-level log-likelihood ratio.
The overall approach frames membership inference as a likelihood ratio test between two alternative release models: String-LRA does not estimate the true generator distribution, but fits a population model on the reference sample and assigns extra probability to string reproductions near the target record.
Membership inference game and alternative test
- The private context table T is sampled from population P, and the generator outputs S; the membership bit b is drawn from Bernoulli(1/2). When b=1 the target is chosen uniformly from T, when b=0 it is sampled independently from P.
- Each release uses a balanced evaluation set of n members and n independent non-members. The ideal ratio is Λ⋆(x⋆;S)=pG(S∣ H1,x⋆)/pG(S∣ H0,x⋆), but a no-box attacker cannot estimate these two true release distributions.
- The alternative null hypothesis lets each row come independently from the population model Q fitted on the reference sample; the alternative hypothesis randomly selects one row as the signal row influenced by the target, with the rest still population samples.
Field, row and release-level evidence
- The signal row first selects a neighborhood level uniformly, then samples each column with probability 1−q_c from Q_c and with probability q_c from the target neighborhood conditional distribution. The smaller the neighborhood population mass, the greater the evidence a hit provides; a miss contributes 1−q_c.
- The row ratio is averaged over neighborhood levels, then averaged over the N released rows, and finally log2 is taken to obtain L. The authors note that averaging over rows discounts single-row evidence by the number of rows searched.
- With equal member and non-member priors, L>0 can be used under the alternative model as a Bayes rule requiring no labeled calibration; but it does not control FPR, so experiments use AUC and TPR at fixed FPR.
Character and digit tries
- Text columns use an interpolated Witten–Bell character trie with an end-of-string symbol; an exact hit on a rare full string contributes about −log2 Q_c(x_c★) bits, and a miss contributes log2 ε.
- Numerical columns are aligned to fixed-point digit strings at the reference column precision D_c≤10 and a digit trie is built. The neighborhood is an interval on both sides of the target fixed-point value, not a prefix match, so it can include nearby values across digit boundaries.
- Radius levels take 1, 2, 5 units across 7 consecutive decimal places, plus radius zero, for |L|=22 in total. Each column starts from its own anchor place, so the same level has comparable width relative to each column's distribution.
- Neighborhood mass is estimated by a smoothed proportion of reference hits; Appendix A gives precision and boundary rules, and Appendix B gives a consistency proposition for the alternative score as the reference sample grows, but does not claim Neyman–Pearson optimality against the true generator.
Parameters, variants and computation
- The numerical unit is q_c=0.5 and the text unit is ε=2^-6; q is selected from {0.3, 0.5, 0.7, 0.9} based on aggregate AUC on the evaluation releases, and the authors disclose this selection process.
- String-LRA-exact treats all columns as text and accepts only exact matches of the original string; another variant keeps only the largest term in the released-row ratio. Figure 1 and Appendix A.1 use a single-column example to illustrate neighborhood mass, per-level evidence and row averaging step by step.
- On 25 datasets with n=128 context rows, fitting the tries and scoring 256 targets for one release takes 0.20 CPU seconds on average, with median 0.11 and maximum 0.96; no generator queries or internal access are needed.
Defense evaluation protocol
- Post-processing defenses directly modify the completed release corresponding to the same private table; generation-time defenses require logits and regenerate on Gemma-4-E4B. The attack still uses the same reference sample and does not know which defense was applied.
- Privacy is measured by the change in String-LRA AUC and TPR@FPR=10% before and after defense; utility includes correlation distance, TSTR, quantile-scale W1, and the appendix additionally reports category TV.
- The row-deletion defense is paired with a control that randomly deletes the same number of rows; the regeneration pipeline additionally runs identity controls to distinguish defense effects from changes due to resampling.
What experiments did the paper conduct?
The main experiments on 4,088 releases support the AUC advantage of String-LRA; the shadow attacks, perturbation mechanisms and defense experiments give the applicable boundaries.
Experimental setup
- Generators: Llama-3.3-70B, GPT-4o-mini, TabPFN-v2, Gemma-4-E4B, Qwen3.6-27B, Gemma-4-31B, OLMo-3.1-32B, gpt-oss-120b, Llama-4-Scout, 9 in total; the first three reuse the releases of Byun et al.
- Data and releases: 34 regression datasets from OpenML-CTR23, at most 82 columns; n∈{8,16,32,64,128}, three seeds, N=n. 419–480 releases per generator, 4,088 in total (Table 1, Table 8).
- Generation parameters: The prompts of Byun et al. are used uniformly, temperature 1, at most 32 rows per call, and at most 5 retries on format errors. Llama-4-Scout and gpt-oss-120b are quantized to FP8 and FP4 respectively; the others are not quantized.
- Baselines: LevAtt and the 10 feature-space attacks with Synth-MIA default configurations; all attacks use the same releases, reference samples and 2n balanced targets per release. Some density attacks return no score on releases that do not converge.
- Metrics and statistics: Per-release AUC, TPR@FPR=10%; utility is Spearman correlation distance and TSTR balanced accuracy of a 100-tree random forest. Attack comparisons use two-sided paired t-tests per release.
- Low FPR note: The authors choose 10% FPR because the test set size is limited; many releases do not have n=100 test samples, and the authors believe TPR@FPR=1% would require too much ROC interpolation.
Main results
According to Table 1; values are means over all releases of each generator. "Best baseline" is the one with the highest mean for the corresponding metric among the 10 Synth-MIA attacks for each generator.
Swipe horizontally to read the table
Generator String-LRA AUC LevAtt AUC Best baseline AUC String-LRA TPR@10% LevAtt TPR@10% Best baseline TPR@10% Llama-3.3-70B 0.705 0.670 0.666 (DCR) 0.389 0.328 0.343 (Classifier) GPT-4o-mini 0.582 0.560 0.559 (DOMIAS) 0.190 0.166 0.174 (DCR) TabPFN-v2 0.640 0.574 0.617 (DCR-diff) 0.253 0.173 0.233 (DCR-diff) Gemma-4-E4B 0.763 0.717 0.736 (DCR) 0.499 0.416 0.470 (DCR) Qwen3.6-27B 0.694 0.650 0.671 (DCR-diff) 0.355 0.272 0.345 (Gen-LRA) Gemma-4-31B 0.776 0.715 0.757 (DCR-diff) 0.488 0.373 0.496 (DCR-diff) OLMo-3.1-32B 0.634 0.585 0.603 (DCR) 0.246 0.182 0.219 (Classifier) gpt-oss-120b 0.715 0.672 0.692 (DCR) 0.411 0.335 0.387 (DCR) Llama-4-Scout 0.675 0.637 0.650 (DCR) 0.318 0.268 0.304 (DCR-diff) - AUC comparison: The paired difference of String-LRA relative to the best baseline for each generator is 0.017–0.039, and relative to LevAtt is 0.023–0.066; except for the baseline comparison on GPT-4o-mini, which is p<0.01, all are p<0.001 (Section 6.1).
- TPR exceptions: The TPR difference relative to the best baseline is −0.008 to +0.047, and is statistically significant on only 6 generators; on Gemma-4-31B, String-LRA is lower than DCR-diff, and the differences on Qwen3.6-27B and Llama-4-Scout are also not significant.
- Overall means: Over all releases, the AUC of String-LRA, LevAtt and DCR is 0.688, 0.643 and 0.661, respectively. The main-text analysis of Figure 2 states that GPT-4o-mini generally leaks the least, the two Gemma models the most, and small-context tables leak the most.
Reference samples, shadow attacks and cost
- Reference size: On the 14 datasets whose reference sets exceed 2,048 rows, there are 1,744 releases for each |R|. At |R|=64, 128, 256, the generator mean AUC is lower than the full-reference value by 0.012, 0.005 and 0.003, respectively (Figure 3).
- Reaching 95% of the gain: 7 generators reach 95% of the above-chance gain under the full reference at |R|=64–128, OLMo-3.1-32B at 256, and GPT-4o-mini at 512 (Table 12).
- Shadow-box comparison: On 3 generators, 10 datasets and n∈{16,32}, each target release uses 32 shadow releases, with 20 releases and 960 targets per generator. The AUC difference of String-LRA relative to Groundhog is +0.151 to +0.241, and relative to the TAPAS-style query attack is +0.047 to +0.062; the logistic score classifier is instead higher by 0.006–0.016, but not significantly (Table 2, Table 15).
- Computational cost: 32 shadow releases require 0.15–0.48 GPU-hours; the median CPU time for String-LRA to audit one release is 0.06–0.10 seconds, and 0.52–0.65 seconds for 82-column wide tables. Distance attacks such as DCR require only milliseconds, so the authors do not claim that String-LRA is the lowest-cost no-box attack (Table 14, 16).
Fixed radius and leakage mechanism
- Radius sensitivity: For Gemma-4-E4B, TPR@10% goes from 0.313 at the equality level to 0.482 at radius 0.5, and for Gemma-4-31B from 0.278 to 0.476; Llama-3.3-70B is already at 0.350 at the equality level, and no radius is higher than it by more than 0.008 (Figure 4, Table 19).
- Share of signal from tolerance: The gain of radius 0.5 relative to equality as a proportion of above-chance TPR is 53% for Gemma-4-31B, 50% for Qwen3.6-27B, 56% for GPT-4o-mini, and 2% for Llama-3.3-70B. The authors therefore argue that generators behave differently on exact copies and perturbed copies.
- No need to know the radius in advance: The hierarchical average of String-LRA is 0.003–0.030 TPR higher than the best fixed radius chosen post hoc, and the difference is significant on 6 of the 9 generators. If the radius is too large, the average TPR falls back to 0.242 at radius 5, below the 0.246 of equality.
Defenses and utility
- Post-processing perturbation: On the seed-0, 1,369 releases of the 9 generators, the undefended AUC is 0.688. Among the strongest settings in Table 4, Digit Modifier (p=0.25–0.5), 0.25 IQR Gaussian noise and 5-bin coarsening change AUC by −0.045, −0.028 and −0.033, respectively; the authors consider the protection provided by perturbing only numeric values to be limited.
- Column shuffling: Independently shuffling each column changes AUC by −0.082, but increases correlation distance by 0.125 and decreases TSTR by 0.113; the average AUC after shuffling is still about 0.61. The authors hypothesize that the remaining signal comes from the private row values still retained in each column.
- Generation-time defenses: Evaluated only on Gemma-4-E4B, seed 0, n∈{16,32}, with undefended AUC of 0.835 and 51–64 releases per setting. Numeric-cell TLP at t=3, 5, 10 changes AUC by −0.133, −0.190 and −0.219, respectively, while the utility cost increases with t.
- Clipping and failure cases: With the population trie as the safe model and k=0, AUC changes by −0.314 and TSTR decreases by 0.156; with the same LLM on a disjoint context T′ as the safe model and k=0, the change is −0.319 and TSTR decreases by 0.038, but the authors note that this shifts the leakage to T′. Temperature 2 no longer produces valid tables.
Other ablations and analyses
- Copy probability q: The average AUC at q=0.3, 0.5, 0.7, 0.9 is 0.685, 0.688, 0.686 and 0.679, respectively (Section 6.4).
- Exact-match variant: String-LRA is on average 0.072 AUC and 0.113 TPR@10% higher than String-LRA-exact; the latter is in turn on average 0.026 AUC lower than LevAtt and 0.045 lower than DCR (Table 3).
- Per-generator differences: The AUC advantage relative to String-LRA-exact ranges from 0.033 for Llama-3.3-70B to 0.130 for Gemma-4-31B (Table 11).
- Maximum row score: Replacing the release average with the maximum row ratio gives an overall AUC difference of +0.002 and a TPR difference of +0.001 (Table 3).
- Row filtering: Removing the half of rows closest to the context decreases AUC by 0.091, while a control that randomly removes the same number of rows decreases it by 0.059; removing exact copies decreases it by only 0.012 more than its control (Appendix F.2).
What are some points that can be further explored?
The authors list limitations such as the alternative model, the same-distribution reference and per-row scoring, and plan to extend to cross-row leakage, fine-tuned generators and adaptive defenses.
Limitations and future directions noted by the authors
- Generation and table scope: Only in-context generation is studied, not fine-tuning; coverage is 34 datasets, contexts of at most 128 rows and 82 columns (Section 9, Limitations).
- Reference sample assumption: The reference samples are assumed to come from the same population as the private tables and to be disjoint from them; reference samples under distribution shift are not studied (Section 9, Limitations).
- Properties of the score: The likelihood ratio is defined on a surrogate model, has no optimality guarantee under the true generator distribution, and is not calibrated as a probability; the authors state that shadow-model attacks have an advantage in this respect (Section 9, Limitations).
- Cross-row leakage: Rows are currently scored individually, and leakage spread across multiple released rows is not evaluated; the authors plan to extend to this kind of leakage (Section 9 Limitations; Section 10 Future Work).
- Tuning and baselines: q and the neighborhood level are selected on the releases used for evaluation rather than on held-out datasets; baselines use library default configurations and may be weaker than carefully tuned attacks (Section 9, Limitations).
- Future defense research: The authors plan to extend to fine-tuned generators and to defenses that can adapt to String-LRA (Section 10, Future Work).
Scope of the experiments
- The main experiments cover 9 generators, 34 OpenML-CTR23 datasets, 5 context sizes and 3 seeds, for 4,088 releases in total; each release is scored with n members and n non-members (Section 5, Table 8).
- The shadow attack comparison covers only Gemma-4-E4B, gpt-oss-120b and Qwen3.6-27B, with n∈{16,32} and 32 shadow releases per target release; the authors state that this cannot bound the capability of attackers with more resources (Section 6.3, Section 9).
- The defense evaluation uses String-LRA that does not know the defense type and does not adapt; post-processing uses only seed 0, and generation-time defenses use only Gemma-4-E4B (Section 8, Section 9).
- Each release has only n non-members, and the authors did not estimate TPR at very low FPR; the main text uses TPR@FPR=10% (Section 5, Section 9).
- The paper reports no human annotation or human agreement; member labels are determined by the context sampling process, and attack performance is evaluated with per-release paired t-tests (Section 3, Section 5).
Summarize the main content of the paper
String-LRA incorporates string rarity and numeric perturbation into no-box membership inference, and uses large-scale release experiments to audit leakage and defenses.
String-LRA is a no-box membership inference attack for LLM context tabular synthesis, whose goal is to determine whether a record entered the generator's context, not necessarily to reconstruct the full record.
- Problem: the authors argue that feature-space density attacks and uniform edit distance miss rare categorical values, digit strings and slight numerical perturbations in serialized tables; therefore, the absence of a verbatim row copy does not mean there is no membership leakage.
- Method: the attacker only needs the released table, the target record and a disjoint reference sample from the same population. Character and digit Witten–Bell tries estimate the population mass of fields and numerical neighborhoods, and 22 neighborhood levels and averaging over released rows form a log-likelihood ratio, without querying the generator.
- Main results: on 9 generators, 34 datasets and 4,088 releases, String-LRA has an average AUC of 0.688, LevAtt 0.643 and DCR 0.661; in Table 1 its AUC is higher than LevAtt and the best feature-space baseline for each generator.
- Exceptions and ablations: TPR@10%FPR is not superior to all best baselines, being 0.488 on Gemma-4-31B versus 0.496 for DCR-diff. String-LRA-exact, which accepts only exact strings, averages 0.072 lower AUC, supporting the design of retaining numerical perturbation tolerance.
- Mechanism and cost: the authors report that for Gemma models more signal comes from perturbation, whereas Llama-3.3-70B mainly shows exact copying. Under the tested budget of 32 shadow releases, the shadow attack did not significantly exceed String-LRA; auditing one release takes at most about 1 CPU second, but distance attacks are faster.
- Defenses and conclusion: post-processing numerical perturbation reduces AUC by at most 0.045; generation-time TLP and clipping reduce it more, but with utility loss or by shifting leakage to another private table. The authors recommend auditing the specific model and table before release, and plan to study cross-row leakage, fine-tuned generators and adaptive defenses.
Research lineage
2 foundations · 0 follow-ups in libraryNo later in-library follow-ups recorded yet.
Hover or focus a connected paper to inspect the citation context.