Lune

ICLR2025Top-tier venue

Fine-tuning can Help Detect Pretraining Data from Large Language Models

Hengxiang Zhang, Songxin Zhang, Bingyi Jing, Hongxin Wei

Abstract

In the era of large language models (LLMs), detecting pretraining data has been increasingly important due to concerns about fair evaluation and ethical risks. Current methods differentiate members and non-members by designing scoring functions, like Perplexity and Min-k%. However, the diversity and complexity of training data magnifies the difficulty of distinguishing, leading to suboptimal performance in detecting pretraining data. In this paper, we first explore the benefits of unseen data, which can be easily collected after the release of the LLM. We find that the perplexities of LLMs shift differently for members and non-members, after fine-tuning with a small amount of previously unseen data. In light of this, we introduce a novel and effective method termed Fine-tuned Score Deviation (FSD), which improves the performance of current scoring functions for pretraining data detection. In particular, we propose to measure the deviation distance of current scores after fine-tuning on a small amount of unseen data within the same domain. In effect, using a few unseen data can largely decrease the scores of all non-members, leading to a larger deviation distance than members. Extensive experiments demonstrate the effectiveness of our method, significantly improving the AUC score on common benchmark datasets across various models. Our code is available at https://github.com/ml-stat-Sustech/ Fine-tuned-Score-Deviation .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
  • How does Bayesian Sampling help Membership Inference Attacks? cites Membership Inference Attacks Against Machine Learning Models
  • How does Bayesian Sampling help Membership Inference Attacks? cites Provable Training Data Identification for Large Language Models
  • Provable Training Data Identification for Large Language Models cites How does Bayesian Sampling help Membership Inference Attacks?
  • How does Bayesian Sampling help Membership Inference Attacks? cites Extracting Training Data from Large Language Models
  • How Contaminated Is Your Benchmark? Measuring Dataset Leakage in Large Language Models with Kernel Divergence cites LoRA: Low-Rank Adaptation of Large Language Models
  • How Contaminated Is Your Benchmark? Measuring Dataset Leakage in Large Language Models with Kernel Divergence cites Membership Inference Attacks Against Machine Learning Models
  • How Contaminated Is Your Benchmark? Measuring Dataset Leakage in Large Language Models with Kernel Divergence cites Extracting Training Data from Large Language Models
  • Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Language Models are Few-Shot Learners
  • Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Extracting Training Data from Large Language Models
  • Provable Training Data Identification for Large Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Provable Training Data Identification for Large Language Models cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
  • Provable Training Data Identification for Large Language Models cites Extracting Training Data from Large Language Models
  • Detecting Data Contamination from Reinforcement Learning Post-training for Large Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Extracting Training Data from Large Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Extracting Training Data from Large Language Models cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Detecting Data Contamination from Reinforcement Learning Post-training for Large Language ModelsYongding Tao, Tian Wang, Yihong Dong, Huanyu Liu et al.ICLR 2026 · 5 citations
  2. How does Bayesian Sampling help Membership Inference Attacks?Zhenlong Liu, Wenyu Jiang, Feng Zhou, Hongxin WeiICML 2026 · 3 citations
  3. ICAS: Detecting Training Data from Autoregressive Image Generative ModelsHongyao Yu, Yixiang Qiu, Yiheng Yang, Hao Fang et al.ACM MM 2025 · 2 citations
  4. How Contaminated Is Your Benchmark? Measuring Dataset Leakage in Large Language Models with Kernel DivergenceHyeong Kyu Choi, Maxim Khanov, Hongxin Wei, Yixuan LiICML 2025
  5. Provable Training Data Identification for Large Language ModelsZhenlong Liu, Hao Zeng, Weiran Huang, Hongxin WeiICML 2026

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  3. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  4. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
  5. Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations

Related papers

  1. Identifying Pre-training Data in LLMs: A Neuron Activation-Based Detection FrameworkHongyi Tang, Zhihao Zhu, Yi YangEMNLP 2025
  2. Pretraining Data Detection for Large Language Models: A Divergence-based Calibration MethodWeichao Zhang, Ruqing Zhang, Jiafeng Guo, Maarten de Rijke et al.EMNLP 2024 · 7 citations
  3. Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain DetectionRheeya Uppaal, Junjie Hu, Yixuan LiACL 2023 · 9 citations
  4. Controllable Contamination Detection for Reliable LLM Evaluation with Statistical GuaranteesZheng Zhang, Qi Liu, Siyuan Liang, Ning Li et al.ACL 2026
  5. Detecting Pretraining Data from Large Language ModelsWeijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang et al.ICLR 2024 · 365 citations
Dusk over the sea between two cliffs drawn in fine vertical lines