EPS
← All batches·2605.15248

Probing Privacy Leaks in LLM-based Code Generation via Test Generation

topic: current_projecttop score: 100released: 2026-05-18first surfaced: 2026-05-18arXivPDFlinked_to_results2026-05-18

Authors: Yifei Ge, Zhenpeng Chen, Weisong Sun et al.

arXiv · PDF

Summary

arXiv:2605. 15248v1 Announce Type: cross Abstract: The widespread availability of large-scale code datasets has fueled the rapid development of large language models (LLMs) for code-related tasks.

Relevance

Read next because Probing Privacy Leaks in LLM-based Code Generation via Test Generation overlaps with clean result "LoRA persona trained on alone emits at 23.5% when a co-trained partner learns ..., vs 0% control on Qwen2.5-7B-Instruct (MODERATE confidence)", clean result "Leakage rate is a usable signal for recovering trigger-shaped phrases on Gaperon-1125-1B without knowing the hidden trigger itself (MODERATE confidence)", clean result "Language-mismatch LoRA SFT on Qwen2.5-7B leaks the trained completion language into bystander directives the model was never trained on, absent under same-language SFT (LOW confidence)". Matching terms: code, text, persona, line, rate, compare, leakage, contexts. Source: arxiv cs.CR (Cryptography and Security).

Abstract

arXiv:2605.15248v1 Announce Type: cross Abstract: The widespread availability of large-scale code datasets has fueled the rapid development of large language models (LLMs) for code-related tasks. These datasets may include sensitive personally identifiable information (PII), which can lead to privacy leakage when LLMs memorize and reproduce it. However, existing privacy-leakage detection methods rely on ad-hoc prompt construction (manually or automatically designed). Therefore, they do not adequately approximate the real-world contexts in which PII appears in code corpora, making it difficult to extract realistic privacy leakage. In this paper, we propose a pipeline that simulates practical privacy-related code generation scenarios and adopts a test-driven strategy to elicit the memorized information from the generated test cases. We further introduce an automatically constructed privacy feature library that replaces manual prompt engineering by providing realistic templates and examples to guide test case generation. Large-scale experiments on 5 widely used LLMs show that our pipeline exposes more confirmed privacy leakage, achieving a 2.56 times increase in detected leakage compared to existing baselines.