Saved in:
Bibliographic Details
Main Authors: Zhang, Ruiqi, Wang, Lingxiang, Zhang, Hainan, Zheng, Zhiming, Lan, Yanyan
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2603.04828
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911735523311616
author Zhang, Ruiqi
Wang, Lingxiang
Zhang, Hainan
Zheng, Zhiming
Lan, Yanyan
author_facet Zhang, Ruiqi
Wang, Lingxiang
Zhang, Hainan
Zheng, Zhiming
Lan, Yanyan
contents Pre-training data detection for LLMs is essential for addressing copyright concerns and mitigating benchmark contamination. Existing methods mainly focus on the likelihood-based statistical features or heuristic signals before and after fine-tuning, but the former are susceptible to word frequency bias in corpora, and the latter strongly depend on the similarity of fine-tuning data. From an optimization perspective, we observe that during training, samples transition from unfamiliar to familiar in a manner reflected by systematic differences in gradient behavior. Familiar samples exhibit smaller update magnitudes, distinct update locations in model components, and more sharply activated neurons. Based on this insight, we propose GDS, a method that identifies pre-training data by probing Gradient Deviation Scores of target samples. Specifically, we first represent each sample using gradient profiles that capture the magnitude, location, and concentration of parameter updates across FFN and Attention modules, revealing consistent distinctions between member and non-member data. These features are then fed into a lightweight classifier to perform binary membership inference. Experiments on five public datasets show that GDS achieves state-of-the-art performance with significantly improved cross-dataset transferability over strong baselines. Further interpretability analyses reveal differences in gradient distributions, and the semi-supervised results offer a practical way to detect pre-training data.
format Preprint
id arxiv_https___arxiv_org_abs_2603_04828
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle From Unfamiliar to Familiar: Detecting Pre-training Data via Gradient Deviations in Large Language Models
Zhang, Ruiqi
Wang, Lingxiang
Zhang, Hainan
Zheng, Zhiming
Lan, Yanyan
Computation and Language
Pre-training data detection for LLMs is essential for addressing copyright concerns and mitigating benchmark contamination. Existing methods mainly focus on the likelihood-based statistical features or heuristic signals before and after fine-tuning, but the former are susceptible to word frequency bias in corpora, and the latter strongly depend on the similarity of fine-tuning data. From an optimization perspective, we observe that during training, samples transition from unfamiliar to familiar in a manner reflected by systematic differences in gradient behavior. Familiar samples exhibit smaller update magnitudes, distinct update locations in model components, and more sharply activated neurons. Based on this insight, we propose GDS, a method that identifies pre-training data by probing Gradient Deviation Scores of target samples. Specifically, we first represent each sample using gradient profiles that capture the magnitude, location, and concentration of parameter updates across FFN and Attention modules, revealing consistent distinctions between member and non-member data. These features are then fed into a lightweight classifier to perform binary membership inference. Experiments on five public datasets show that GDS achieves state-of-the-art performance with significantly improved cross-dataset transferability over strong baselines. Further interpretability analyses reveal differences in gradient distributions, and the semi-supervised results offer a practical way to detect pre-training data.
title From Unfamiliar to Familiar: Detecting Pre-training Data via Gradient Deviations in Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2603.04828