arXiv

From Unfamiliar to Familiar: Detecting Pre-training Data via Gradient Deviations in Large Language Models

Title: From Unfamiliar to Familiar: Detecting Pre-training Data via Gradient Deviations in Large Language Models

Abstract:

Identifying pre-training data within Large Language Models (LLMs) is a critical step for resolving copyright issues and preventing benchmark contamination. Current detection techniques primarily rely on likelihood-based statistical indicators or heuristic signals observed before and after the fine-tuning phase. However, these approaches have notable limitations: likelihood-based metrics are often skewed by word frequency biases present in the training corpora, while heuristic methods are heavily contingent on the similarity between the fine-tuning and pre-training datasets.

From an optimization standpoint, we note that samples evolve from being unfamiliar to familiar during the training process, a transition that manifests as systematic variations in gradient behavior. Specifically, familiar samples are characterized by reduced update magnitudes, distinct update locations within model components, and more intensely activated neurons. Leveraging this observation, we introduce GDS, a novel approach that detects pre-training data by analyzing Gradient Deviation Scores.

GDS operates by constructing gradient profiles for each sample, which encapsulate the magnitude, location, and concentration of parameter updates across both Feed-Forward Network (FFN) and Attention modules. These profiles highlight consistent differences between member and non-member data. The extracted features are subsequently processed by a lightweight classifier to execute binary membership inference.

Evaluations across five public datasets demonstrate that GDS delivers state-of-the-art results, offering substantially better cross-dataset transferability compared to strong baseline methods. Additionally, interpretability studies uncover disparities in gradient distributions, while semi-supervised experiments provide a viable, practical solution for pre-training data detection.


Source: arXiv Generated at: 2026-06-02 00:00:00 UTC

Related Articles

Law’s Billable Hour Is Being Shredded by AI
Bloomberg

Law’s Billable Hour Is Being Shredded by AI

AI is dismantling the billable hour by automating routine legal tasks. This technological shift threatens the traditiona...

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026
Bloomberg

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026

SoftBank in Early Talks to Back $800 Million Agile Robots Round
Bloomberg

SoftBank in Early Talks to Back $800 Million Agile Robots Round

SoftBank is in early talks to back Agile Robots’ $800 million funding round. The Japanese tech giant is currently in pre...

Amundi Is Diversifying Risk Via Commodity Currencies, Gold
Bloomberg

Amundi Is Diversifying Risk Via Commodity Currencies, Gold

Amundi diversifies risk by investing in commodity-linked currencies and gold. This strategy hedges against market volati...

Reuters

Marvell Technology surges after Nvidia's Huang calls it 'next trillion-dollar company'

Marvell Technology shares surged after Nvidia CEO Jensen Huang labeled the firm the “next trillion-dollar company.”

Russia Says It Found Foreign Spyware on Top Officials’ Phones
Bloomberg

Russia Says It Found Foreign Spyware on Top Officials’ Phones

Russia’s FSB claims to have discovered foreign spyware on senior officials’ phones. Moscow attributes the intrusion to h...