Table of Contents
Fetching ...

Provably Protecting Fine-Tuned LLMs from Training Data Extraction

Tom Segal, Asaf Shabtai, Yuval Elovici

TL;DR

This work tackles privacy risks from training data extraction in fine-tuned LLMs by introducing SpaRPS, a property describing sparse relative probability shifts, and SCP-$\Delta_r$, a NAF-based defense operating on relative probabilities with base-model smoothing. By enforcing SpaRPS, SCP-$\Delta_r$ achieves substantially tighter protection bounds than traditional CP-based NAF methods and translates small theoretical guarantees into strong empirical resistance against TDE attacks, while preserving downstream utility. The authors provide both theoretical analyses and extensive empirical evaluations, including canary, PII, and token-by-token extraction attacks, demonstrating significant improvements over prior defenses. The approach offers practical, provable privacy guarantees for fine-tuning scenarios and establishes a foundation for extending similar protections to broader training regimes, with implications for safer deployment of private-data fine-tuning in real-world LLM applications.

Abstract

Fine-tuning large language models (LLMs) on sensitive datasets raises privacy concerns, as training data extraction (TDE) attacks can expose highly confidential information. Existing defenses against such attacks either lack formal privacy guarantees or incur substantial utility degradation. We observe that fine-tuning induces widespread probability shifts, yet preserving only a small subset of influential token-level deviations is sufficient; the remaining shifts can be aggressively smoothed with minimal impact on utility. Motivated by this insight, we propose SCP-$Δ_r$, a Near Access Freeness (NAF)-based algorithm that operates on relative probabilities and explicitly smooths low-impact tokens using a base model. SCP-$Δ_r$ achieves orders-of-magnitude better theoretical bounds than existing NAF based methods and provides strong empirical protection against TDE attacks with minimal performance loss.

Provably Protecting Fine-Tuned LLMs from Training Data Extraction

TL;DR

This work tackles privacy risks from training data extraction in fine-tuned LLMs by introducing SpaRPS, a property describing sparse relative probability shifts, and SCP-, a NAF-based defense operating on relative probabilities with base-model smoothing. By enforcing SpaRPS, SCP- achieves substantially tighter protection bounds than traditional CP-based NAF methods and translates small theoretical guarantees into strong empirical resistance against TDE attacks, while preserving downstream utility. The authors provide both theoretical analyses and extensive empirical evaluations, including canary, PII, and token-by-token extraction attacks, demonstrating significant improvements over prior defenses. The approach offers practical, provable privacy guarantees for fine-tuning scenarios and establishes a foundation for extending similar protections to broader training regimes, with implications for safer deployment of private-data fine-tuning in real-world LLM applications.

Abstract

Fine-tuning large language models (LLMs) on sensitive datasets raises privacy concerns, as training data extraction (TDE) attacks can expose highly confidential information. Existing defenses against such attacks either lack formal privacy guarantees or incur substantial utility degradation. We observe that fine-tuning induces widespread probability shifts, yet preserving only a small subset of influential token-level deviations is sufficient; the remaining shifts can be aggressively smoothed with minimal impact on utility. Motivated by this insight, we propose SCP-, a Near Access Freeness (NAF)-based algorithm that operates on relative probabilities and explicitly smooths low-impact tokens using a base model. SCP- achieves orders-of-magnitude better theoretical bounds than existing NAF based methods and provides strong empirical protection against TDE attacks with minimal performance loss.
Paper Structure (65 sections, 9 theorems, 52 equations, 5 figures, 6 tables, 1 algorithm)

This paper contains 65 sections, 9 theorems, 52 equations, 5 figures, 6 tables, 1 algorithm.

Key Result

Theorem 2.3

For any input $x$, $\mathrm{CP}\text{-}\Delta(p(\cdot | x),q(\cdot | x))$ is $k_x$-NAF-tight with respect to $p(\cdot | x)$ and $q(\cdot | x)$ under max divergence, where and $\mathrm{TV}(p,q) := \tfrac{1}{2} \sum_y |p(y)-q(y)|$.

Figures (5)

  • Figure 1: Expected SpaRPS and $k_x$ evaluated using the MathAbstracts dataset (See \ref{['sub:experimental']}). (a) Expected SpaRPS $B$ as a function of $\log_2(m)$ for different $C$ values. (b) $k_x$ bounds log-scale histograms for different CP style algorithms.
  • Figure 2: Log-scale histograms of Theorem \ref{['theorem:scp_tde_tight']} bound $v_x(y_s)$, evaluated at the token $y_s$ corresponding to the extraction target $s$. (a) Extraction of rare tokens (Canaries, see \ref{['subsec:tde_naf']}). (b) Extraction of tokens from the MathAbstracts dataset (see \ref{['sub:experimental']}).
  • Figure 3: (a) Canary score vs (log scale) smoothing parameter $m$ (mean: solid, $99^{\text{th}}$ percentile: dashed). (b) TTE AUC across different memorization levels on the MathAbstracts dataset.
  • Figure 4: Log-scale histograms of Theorem \ref{['theorem:tde_q']} bound $t_x$. (a) Extraction of rare tokens (Canaries, see \ref{['subsec:tde_naf']}). (b) Extraction of tokens from the MathAbstracts dataset (see \ref{['sub:experimental']}).
  • Figure 5: Theorem \ref{['theorem:scp_tde_tight']} bound $v_x(y_s)$ as a function of $p_1(y_s)$ under different smoothing conditions. Error bars denote one standard deviation. (a) $q$ and $p_0$ are uniform, while $p_1$ is uniform except for a spike at $y_s$. (b) $q$, $p_0$, $p_1$ and $b$ are randomly initialized, with $p_1$ additionally spiked at $y_s$. (c) Same as (b), but $q(y_s)$ is scaled so that $y_s$ is smoothed with probability approximately $0.5$. (d) Same as (b), but $q(y_s)=\max_y q(y)$, making $y_s$ very unlikely to be smoothed.

Theorems & Definitions (32)

  • Definition 2.1: $k$-NAF
  • Definition 2.2: CP-$\Delta$
  • Theorem 2.3: CP-$\Delta$ bound
  • Remark 2.4
  • Example 2.1
  • Definition 2.5: RPD
  • Definition 2.6: CP-$\Delta_r$
  • Theorem 2.7: CP-$\Delta_r$ bound
  • Theorem 3.1
  • Definition 3.2: SpaRPS
  • ...and 22 more