The More You Tune, the More They Spill?

Abstract Although previous research has established that pre-trained code models can regurgitate their training data via extraction attacks, the privacy implications of the increasingly common practice of fine-tuning remain underexplored. Fine-tuning enables entities to adapt models to specialised tasks using smaller, curated datasets that may contain proprietary assets or sensitive information. This study provides a comparative investigation into data extractability, before and after this fine-tuning stage. We develop a benchmark to systematically assess the vulnerability of pre-training and fine-tuning samples to extraction attacks. Our experiments on the Starcoder2 models yield two key findings. First, fine-tuning significantly reduces the extractability of the model’s original pre-training data, decreasing the extraction rate from 54.9% to 23.5%. Second, this benefit is offset by the increased vulnerability in the fine-tuning data. Smaller models, in particular, show a strong propensity to leak this data. Extending this analysis, we find that moderate model compression generally preserves the same memorization patterns, whereas int4 quantization reduces absolute pre-training memorization but amplifies relative fine-tuning leakage. We further find that parameter-efficient fine-tuning mitigates fine-tuning data memorization compared to full fine-tuning, while exhibiting smoother forgetting of pre-training data. A qualitative analysis of 2,000 samples reveals that data structures and licensing information are the most frequently memorized categories. Our work highlights that fine-tuning introduces a privacy trade-off, shifting the risk from vast public pre-training data to smaller, higher-value proprietary fine-tuning data. Model deployers should evaluate these risks and explore strategies to mitigate leakage while preserving performance.

Authors

Institutions

Publication Details

Journal
Empirical Software Engineering
Published
2026-11-03
DOI
https://doi.org/10.1007/s10664-026-10966-5
Primary Topic
Privacy-Preserving Technologies in Data
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The More You Tune, the More They Spill?

Ali Al-Kaswan, Maliheh Izadi, Fabio Salerno
Empirical Software Engineering
Privacy-Preserving Technologies in Data
article

The More You Tune, the More They Spill?

Ali Al-Kaswan, Maliheh Izadi, Fabio Salerno
article en

Abstract

Abstract Although previous research has established that pre-trained code models can regurgitate their training data via extraction attacks, the privacy implications of the increasingly common practice of fine-tuning remain underexplored. Fine-tuning enables entities to adapt models to specialised tasks using smaller, curated datasets that may contain proprietary assets or sensitive information. This study provides a comparative investigation into data extractability, before and after this fine-tuning stage. We develop a benchmark to systematically assess the vulnerability of pre-training and fine-tuning samples to extraction attacks. Our experiments on the Starcoder2 models yield two key findings. First, fine-tuning significantly reduces the extractability of the model’s original pre-training data, decreasing the extraction rate from 54.9% to 23.5%. Second, this benefit is offset by the increased vulnerability in the fine-tuning data. Smaller models, in particular, show a strong propensity to leak this data. Extending this analysis, we find that moderate model compression generally preserves the same memorization patterns, whereas int4 quantization reduces absolute pre-training memorization but amplifies relative fine-tuning leakage. We further find that parameter-efficient fine-tuning mitigates fine-tuning data memorization compared to full fine-tuning, while exhibiting smoother forgetting of pre-training data. A qualitative analysis of 2,000 samples reveals that data structures and licensing information are the most frequently memorized categories. Our work highlights that fine-tuning introduces a privacy trade-off, shifting the risk from vast public pre-training data to smaller, higher-value proprietary fine-tuning data. Model deployers should evaluate these risks and explore strategies to mitigate leakage while preserving performance.

Empirical Software EngineeringVol. 32(2)
Delft University of Technology (NL)
Openalex Percentile: Top 16%
Privacy-Preserving Technologies in Data
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon