Lune

ICSE2025顶会

Decoding Secret Memorization in Code LLMs Through Token-Level Characterization

Yuqing Nie, Chong Wang, Kailong Wang, Guoai Xu, Guosheng Xu, Haoyu Wang

摘要

Code Large Language Models (LLMs) have demonstrated remarkable capabilities in generating, understanding, and manipulating programming code. However, their training process inadvertently leads to the memorization of sensitive information, posing severe privacy risks. Existing studies on memorization in LLMs primarily rely on prompt engineering techniques, which suffer from limitations such as widespread hallucination and inefficient extraction of the target sensitive information. In this paper, we present a novel approach to characterize real and fake secrets generated by Code LLMs based on token probabilities. We identify four key characteristics that differentiate genuine secrets from hallucinated ones, providing insights into distinguishing real and fake secrets. To overcome the limitations of existing works, we propose DESEC, a two-stage method that leverages token-level features derived from the identified characteristics to guide the token decoding process. DESEC consists of constructing an offline token scoring model using a proxy Code LLM and employing the scoring model to guide the decoding process by reassigning token likelihoods. Through extensive experiments on four state-of-the-art Code LLMs using a diverse dataset, we demonstrate the superior performance of DESEC in achieving a higher plausible rate and extracting more real secrets compared to existing baselines. Our findings highlight the effectiveness of our token-level approach in enabling an extensive assessment of the privacy leakage risks associated with Code LLMs.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearning 引用了 The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligence 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Membership Inference Attacks From First Principles 引用了 The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Membership Inference Attacks From First Principles 引用了 Extracting Training Data from Large Language Models
  • Extracting Training Data from Large Language Models 引用了 The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine UnlearningZhaoyang Chu, Yao Wan, Zhikun Zhang, Di Wang 等ICSE 2026
  2. Contamination Means Overestimation? A Fine-Grained Empirical Study in Code IntelligenceZhen Yang, Hongyi Lin, Yifan He, Junqi Wang 等ISSTA 2026
  3. AdaptiveStep: Automatically Dividing Reasoning Step through Model ConfidenceYuliang Liu, Junjie Lu, Chaofeng Qu, Zhaoling Chen 等ICML 2025

它引用的 Paper21

  1. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski 等USENIX Security 2021 · 2,866 次引用
  2. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  3. The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural NetworksNicholas Carlini, Chang Liu, Úlfar Erlingsson, Jernej Kos 等USENIX Security 2019 · 1,386 次引用
  4. Membership Inference Attacks From First PrinciplesNicholas Carlini, Steve Chien, Milad Nasr, Shuang Song 等S&P 2022 · 1,049 次引用
  5. Are We on the Right Way for Evaluating Large Vision-Language Models?Lin Chen, Jinsong Li, Xiaoyi Dong, Pan Zhang 等NeurIPS 2024 · 1,029 次引用

相关 Paper

  1. CoSec: On-the-Fly Security Hardening of Code LLMs via Supervised Co-decodingDong Li, Meng Yan, Yaosheng Zhang, Zhongxin Liu 等ISSTA 2024 · 10 次引用
  2. Unlocking Memorization in Large Language Models with Dynamic Soft PromptingZhepeng Wang, Runxue Bao, Yawen Wu, Jackson Taylor 等EMNLP 2024 · 1 次引用
  3. Understanding Secret Leakage Risks in Code LLMs: A Tokenization PerspectiveMeifang Chen, Zhe Yang, Huang Nianchen, Yizhan Huang 等ACL Findings 2026
  4. NOIR: Privacy-Preserving Generation of Code with Open-Source LLMsKhoa Nguyen, Khiem Ton, NhatHai Phan, Issa Khalil 等USENIX Security 2026 · 2 次引用
  5. R.R.: Unveiling LLM Training Privacy through Recollection and RankingWenlong Meng, Zhenyuan Guo, Lenan Wu, Chen Gong 等ACL Findings 2025 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖