Decoding Secret Memorization in Code LLMs Through Token-Level Characterization
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 11 Oct 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 5; 2026: 4.
9 papers.
- 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 116
- 2025AdaptiveStep: Automatically Dividing Reasoning Step through Model Confidencecited by 24
- 2025Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearningcited by 7
- 2025Circumventing Safety Alignment in Large Language Models Through Embedding Space Toxicity Attenuationcited by 2
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Codecited by 1
- 2025Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligencecited by 0
- 2026Understanding Secret Leakage Risks in Code LLMs: A Tokenization Perspectivecited by 0
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Awarecited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Modelscited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Models14 Aug 2026
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware13 Aug 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026Understanding Secret Leakage Risks in Code LLMs: A Tokenization Perspective20 Apr 2026
- 2025Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearning17 Sep 2025
- 2025Circumventing Safety Alignment in Large Language Models Through Embedding Space Toxicity Attenuation8 Jul 2025
- 2025Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligence3 Jun 2025
- 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deployment22 Apr 2025
- 2025AdaptiveStep: Automatically Dividing Reasoning Step through Model Confidence19 Feb 2025