LLM dataset inference: did you train on my dataset?LLM Dataset Inference: Did you train on my dataset?
The authors state that existing LLM membership inference attacks are close to random guessing under the IID setting, and propose dataset inference, distinguishing Pythia's training and validation sets on each Pile subset with p<0.1.
- Copyrighted content in LLM training data has triggered lawsuits, requiring technical means to determine whether a certain dataset was used for training; the authors state that the success of existing membership inference attacks (MIA) mostly stems from distribution shift between members and non-members, and that under the IID setting they are close to random guessing.
- Proposes LLM dataset inference: aggregating 52 MIA features, using linear regression to learn the correlation between each feature and membership, then performing a t-test on the scores of 1000 samples each from the suspect set and the private validation set, and combining the p-values of 10 random seeds by formula.
- On Pythia-12B, the true-positive p-values for all 20 Pile subsets are below 0.1, with no false positives when comparing the two validation subsets; Min-k% Prob has an AUC close to 0.5 on the IID split of the Pile, and close to 0.4 on Arxiv and OpenWebText2.
- The authors point out that the method requires the training set and validation set to be IID, that the validation set be completely private to the victim, and that the output loss of the suspect model be obtained, and that deployment requires a corresponding legal framework. The experiments were conducted only on the Pythia series (410M–12B) and the Pile dataset.
- Threat model
- The victim claims that their dataset was used to train a certain LLM and has only black-box access; a third-party arbiter can obtain gray-box access (model loss, excluding weights or gradients) and executes dataset inference to determine whether the suspect dataset was used for training.
- Evaluated models
- Pythia-410MPythia-1.4BPythia-6.9BPythia-12B
- Benchmarks
- The PileWikiMIA
- Metrics
- AUCp-valuet-test
The researchers propose a dataset inference method for large language models, used to test whether a given dataset was used in model training, and point out that the apparent success of previous membership inference attacks (MIA) stems from the confounding factor of temporal distribution shift. On an in-distribution training/validation split of the Wikipedia subset of the Pile, the AUC of Min-k% Prob drops from about 0.7 on WikiMIA to about 0.5, close to random guessing, and no single MIA is consistently effective across all 20 subsets of the Pile. The method aggregates 52 MIA features to train a linear model, then performs a t-test on the suspected dataset; on the Pythia 410M, 1.4B, 6.9B and 12B models, the p-values for distinguishing training from validation splits are all below 0.1, no false positives occurred when comparing two validation subsets, and only about 1000 texts are needed. The authors position it for copyright dispute scenarios, where rights holders can use unpublished drafts, etc., as a validation set, and the test is carried out by an arbitrator able to obtain model loss values.
Why it was selectedThe paper finds that common membership inference attacks are close to random guessing on in-distribution data, and that its dataset-level inference method requires only about 1000 texts to statistically test training data membership.
Related events and news
0 events · 1 news mentions
News that mentions this paper
- SPY Labcites the paper's id or linkSPY Lab 立场论文:成员推断攻击无法证明模型训练使用了你的数据
An alternative approach for creating training data proofs is LLM Dataset Inference proposed by Maini et al.
Paper analysis
What problem does this paper attempt to solve?
The authors state that the success of MIA stems from distribution shift, and propose dataset inference to determine whether a dataset was used to train an LLM.
Core question: how to reliably determine whether a given dataset was used to train a certain LLM, to support data attribution determinations in copyright and privacy disputes.
- Problem setting: LLMs are trained on unauthorized web data, triggering copyright lawsuits (e.g., The New York Times v. OpenAI). The authors argue that identifying training data is essential to understanding how LLMs work and to ensuring data accountability.
- Shortcomings of existing methods: The authors state that the apparent success of existing membership inference attacks (MIA) is confounded by a factor—non-members and members come from different distributions (e.g., new Wikipedia articles after a temporal shift), and MIA actually detects distribution shift rather than membership; under the same distribution (IID), most MIAs do not outperform random guessing, and different MIAs are only effective on their own different distributions.
- Core observation: In copyright disputes, plaintiffs typically claim that multiple documents by a certain author (e.g., an entire book) were used for training, rather than a single passage; therefore the unit of determination should shift from individual samples to datasets.
- Method proposed in the paper: Proposes a dataset inference method for LLMs—selectively combining multiple MIAs that have positive signal for a given distribution, and after aggregation performing a statistical test on the dataset; and gives experimental norm recommendations for MIA research (IID splits, multiple distributions, multiple random seeds, evaluating false positives).
- Threat model (Section 3):
- Goal: Determine whether a suspect dataset was used to train a suspect LLM.
- Victim: The creator whose content was used without authorization, assumed to have only black-box access.
- Arbiter: A trusted third party (e.g., a law enforcement agency) that can obtain gray-box access (model loss, excluding weights or gradients) and executes the inference procedure.
- Suspect: The LLM provider that may have used the victim's data to train the model.
What related research exists?
Related work covers membership inference, dataset inference, and various LLM MIA metrics; this paper introduces dataset inference to LLMs.
Membership inference (MI) and the dataset inference framework
- Shokri et al. (2017)—proposed the membership inference problem: given a model and a data point, determine whether the point is in the training set; applications include benchmark contamination detection, privacy auditing, and identification of copyrighted text.
- Maini et al. (2021)—proposed dataset inference, giving a statistical claim that a model is a derivative of its private training data, and giving a theoretical result: the larger the training set, the closer the MIA success rate is to random guessing (0.5).
- Dziedzic et al. (2022)—extended dataset inference from supervised learning to self-supervised learning models.
LLM membership inference attacks (the evaluation targets and feature sources of this paper)
- Shi et al. (2024)—proposed Min-k% Prob, using the average negative log-likelihood of the K% tokens with the lowest probability in a sequence for threshold determination, and constructed the WikiMIA dataset; the paper points out that its evaluation has a temporal-shift confounder.
- Mattern et al. (2023)—MIA based on neighborhood comparison (perturbation): trained samples should have lower perplexity on the original version than on the perturbed version.
- Mitchell et al. (2023)—DetectGPT, which constructs perturbations by using an external language model to fill in masked spans; originally for detecting machine-generated text.
- Threshold-based and ratio-based baselines—the loss threshold of Yeom et al. (2018), the perplexity threshold and zlib ratio of Carlini et al. (2021); reference-model-based methods use SILO (Min et al., 2023), Tinystories-1M/33M (Eldan and Li, 2023), and Phi-1.5 (Li et al., 2023) as reference models.
Concurrent work
- Duan et al. (2024)—independently points out that the success of MIA is only due to the temporal shift in such datasets, consistent with the conclusion of Section 4 of this paper (the paper calls it a concurrent observation).
Baselines and benchmarks: The MIA analysis takes Min-k% Prob as the main object, compared against the perplexity threshold and DetectGPT; the evaluation benchmarks are WikiMIA and the 20 subsets of the Pile (using their public training/validation splits).
The authors position this paper as introducing dataset inference to LLMs: rather than determining the membership of individual samples, it selectively combines multiple MIAs and aggregates them into a statistical test to determine whether an entire dataset was used for training.
How does the paper address this problem?
Aggregate 52 MIA features, learn weights with linear regression, then perform a t-test on the scores of the suspect set and the validation set to make the determination.
Overall idea: even if a single MIA is only slightly better than random guessing, the weak signals of multiple MIAs can be aggregated over multiple samples, and a statistical test can be used to distinguish the distributions of the training set and the validation set. The method is named LLM Dataset Inference (Figure 1).
Problem setting and assumptions
- Three roles: the victim V (with only black-box access), the suspect A (the LLM provider), and the arbiter (with gray-box access, i.e., can obtain model loss, excluding weights or gradients), who executes the inference.
- Three assumptions (Section 5.2): the suspect training set and the unseen validation set must be IID; there is no leakage between the two sets, and the validation set is strictly private and accessible only to the victim; the output loss of the suspect LLM must be obtainable to execute each MIA.
Four-stage procedure
- Stage 0: The victim submits the suspect set and a private validation set from the same distribution (val set, e.g., an unpublished manuscript draft); both are each split into two non-overlapping splits, A and B.
- Stage 1: Split A is fed into the suspect LLM, and features are extracted using all MIAs from Section 2.1, yielding one feature vector per sample.
- Stage 2: A linear regression is trained to learn the correlation between each MIA feature and membership—suspect samples are labeled 0 and validation samples 1; the top 5% outliers are first replaced with the mean, to prevent the regression from learning skewed correlations caused by a few outliers.
- Stage 3: On split B (at most 1000 samples), the membership scores output by the regression are computed and a t-test is performed. The null hypothesis is H0: μM(Bsus) ≥ μM(Bval), i.e., the mean membership score of the suspect set is not less than that of the validation set; members' scores should be closer to 0.
Statistical aggregation and preprocessing
- Multiple t-tests are performed with 10 random seeds; because samples overlap across splits, the tests are dependent, and p-values are combined as pcombined = 1 − exp(∑i=1n log(1−pi)).
- Score aggregation has three steps: feature normalization; before training the regression, replacing the top and bottom 2.5% outliers with the mean of that (normalized) feature; and before the t-test, removing the top and bottom 2.5% outliers again.
Key parameters
- Stage 1 aggregates 52 MIA features (many differ only in taking perplexity/log-likelihood, ratio/difference; the full list is in Appendix C).
- The linear regression in Stage 2 is trained for 1000 updates, with 1000 samples (half the data is used in the false-positive experiment).
- The significance threshold is 0.1; perturbation-based MIAs use implementations from the NLAugmenter library (Appendix C).
What experiments did the paper conduct?
MIA is close to random under the IID setting; dataset inference has p<0.1 on all Pile subsets with no false positives.
Experimental setup
- Models tested: Four scales of the Pythia series—410M, 1.4B, 6.9B, 12B (training data known, so membership can be determined exactly).
- Datasets: 20 subsets of the Pile (using their public training/validation splits, no temporal shift); the MIA analysis additionally uses WikiMIA (Wikipedia articles around before and after 2023).
- Sample size: The main experiment compares 1000 training samples and 1000 validation samples for each subset; the false-positive experiment splits the validation set into two subsets of 500 each.
- Metrics and determination: MIA uses AUC; dataset inference uses the p-value of the t-test, with a significance threshold of 0.1, and p-values from 10 random seeds are combined by formula.
- Features: 52 MIAs (threshold-based, Min-k%/Max-k% Prob, perturbation-based, DetectGPT, reference-model-based, zlib ratio), with reference models SILO, Tinystories-33M, Tinystories-1M, Phi-1.5.
- Repetitions: 10 random seeds split the A/B sets; the paper does not report the number of repetitions for the MIA experiments.
Main results
The main results are in Figure 4 (Pythia-12B, 1000 data points per subset):
Test type p-value Source True positive (training set vs validation set, 20 subsets) all < 0.1,多数低至 1e-30 量级或更低 Figure 4、Section 5.4 假阳性(验证集 vs 验证集) 均 > 0.1; Section 1 states all > 0.5 Figure 4, Section 1 - The authors state that dataset inference can reliably identify the training distribution on all Pile subsets, and that the test on the two validation subsets produces no false positives.
- The authors argue that, in contrast to the unreliability of membership inference, dataset inference is promising for future discussions on checking training datasets.
MIA fails under the IID setting (Section 4)
- What was tested: Comparison of Min-k% Prob on WikiMIA and on the Pile IID split. Results: AUC close to 0.7 on WikiMIA, and close to 0.5 on the Pile Wikipedia IID split (Figure 2a); AUC fluctuates between 0.4 and 0.7 across different random subsets; AUC close to 0.4 on Arxiv and OpenWebText2.
- Inversion experiment: After replacing the pre-2023 members in WikiMIA with the Pile Wikipedia validation set (known not to be trained on), Min-k% Prob still labels these validation samples as members with an AUC of 0.7 (Figure 2b). The authors therefore state that such MIAs distinguish concepts from different time periods, rather than the membership of specific data points.
- Cross-distribution experiment: The heatmap of 6 types of MIA on the 20 Pile subsets (Figure 3; full results in Figure 7 of Appendix C) shows that no single MIA is consistently effective across all datasets; for example, synonym substitution has a higher AUC on PhilPapers and below 0.5 on Pubmed Abstracts.
Ablations: feature selection, preprocessing, query count, and model scale
- Feature selection (Figure 5a): The important features selected differ across subsets (e.g., CC requires Perturbation-based, OWT2 requires Perplexity), and the authors state that this is why a linear model is needed to selectively aggregate per distribution.
- Preprocessing (Figure 5b): Removal (Norm.) (removing outliers and normalizing) is the chosen scheme; mean correction and outlier clipping produce false positives on some datasets.
- Query count (Figure 6a): More than half of the datasets require only about 100 points; 1000 points suffice for the p-values of all datasets to fall below 0.1.
- Model scale and deduplication (Figure 6b): The p-value distribution becomes more concentrated below 0.1 as model scale increases; at 500 query points, the p-value distribution of non-deduplicated models is more concentrated below 0.1 than that of deduplicated models. The authors explain these two trends with "memorization strengthening with scale/data repetition."
Other ablations and analyses
- Appendix C: DetectGPT outperforms other metrics on a few datasets such as bookcorpus2 and books3, but remains inconsistent across datasets (Figure 7).
- Appendix Figure 9: Preprocessing techniques have little effect on the p-value curves for median and Wikipedia, and normalization contributes positively to the maximum p-value.
- Appendix Figure 10: The p-value curves for median and Wikipedia vary similarly with model scale, whereas the maximum p-value curve does not; the authors state that most datasets do not depend on large data volumes or large models, while individual datasets may.
What are some points that can be further explored?
The authors point out that the IID and private validation set assumptions and loss access are core limitations; the experiments cover only Pythia and Pile.
Limitations pointed out by the authors and future directions
- Assumption limitations (Section 6 Limitations): dataset inference requires the training set and validation set to be IID, and the validation set to be completely private to the victim; the authors state that such sets can arise naturally (e.g., multiple drafts of a book), but this is a precondition for the method to hold.
- Access and deployment limitations (Section 6 Limitations): the victim or a trusted third party (e.g., a law enforcement agency) needs to run the inference and be able to query the suspect model's loss; the authors state that this requires a corresponding legal framework to be in place, otherwise the suspect party may simply refuse model queries.
- MIA research practice recommendations (Section 4 Guidelines): the authors propose four experimental practices for future membership inference research—IID splits, repetition with multiple random splits, multiple data distributions, and evaluating both false positives and false negatives.
Scope of experimental coverage
- The models tested are 4 sizes in the Pythia series: 410M, 1.4B, 6.9B, and 12B (Section 5.3).
- The datasets are 20 subsets of the Pile and WikiMIA; the main experiment uses 1000 training samples versus 1000 validation samples per subset, and the false-positive experiment uses two validation subsets of 500 each (Section 5.3).
- A total of 52 MIA features are aggregated, and the reference models are SILO, Tinystories-33M, Tinystories-1M, and Phi-1.5 (Section 2.1, 5.3).
- The statistical test combines p-values across 10 random seeds, with a significance threshold of 0.1 (Section 5.1).
- The paper does not report actual experiments on closed-source commercial models (the paper mentions the API access forms of GPT-3, GPT-4, and Gemini only in the introduction), nor does it report the total number of queries for MIA feature extraction.
Summarize the main content of the paper
The authors state that MIA is close to random under IID, and the proposed dataset inference achieves p<0.1 on the Pile with no false positives.
An analysis and methods paper on determining attribution of LLM training data, aimed at copyright dispute scenarios.
- Problem: The authors state that the success of existing LLM membership inference attacks (MIA) is caused by a confounder—members and non-members come from different distributions (e.g., temporal shift), and MIA detects distribution shift rather than membership.
- Evidence: Min-k% Prob has an AUC close to 0.7 on WikiMIA, but close to 0.5 on the Pile Wikipedia IID split (Figure 2a); after replacing members with the Pile validation set known not to be trained on, they are still labeled as members with an AUC of 0.7 (Figure 2b); none of the 6 types of MIA is consistently effective across distributions on the 20 Pile subsets (Figure 3).
- Method: Proposes LLM Dataset Inference—aggregating 52 MIA features, learning feature weights per distribution with linear regression, performing a t-test on the scores of at most 1000 samples each from the suspect set and the private validation set, combining p-values over 10 random seeds, with a threshold of 0.1.
- Main results: On Pythia-12B, the true-positive p-values for all 20 Pile subsets are below 0.1 (most as low as the 1e-30 order of magnitude), and the comparison of the two validation subsets yields no false positives (Figure 4); more than half of the datasets require only about 100 points (Figure 6a).
- Trend: The p-value distribution becomes more concentrated below the threshold as model scale increases, more pronounced for non-deduplicated models than for deduplicated models (Figure 6b); the authors explain this with memorization enhancement.
- Authors' conclusion: The authors argue that the research focus should shift from single-point membership inference to dataset inference, and give experimental norms for MIA; they also acknowledge that the method relies on three assumptions—IID, a private validation set, and loss access—and that deployment requires support from a legal framework.