Decoding Secret Memorization in Code LLMs Through Token-Level Characterization

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Nie, Yuqing, Wang, Chong, Wang, Kailong, Xu, Guoai, Xu, Guosheng, Wang, Haoyu
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912335955755008
author Nie, Yuqing
Wang, Chong
Wang, Kailong
Xu, Guoai
Xu, Guosheng
Wang, Haoyu
author_facet Nie, Yuqing
Wang, Chong
Wang, Kailong
Xu, Guoai
Xu, Guosheng
Wang, Haoyu
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_08858
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Decoding Secret Memorization in Code LLMs Through Token-Level Characterization
Nie, Yuqing
Wang, Chong
Wang, Kailong
Xu, Guoai
Xu, Guosheng
Wang, Haoyu
Cryptography and Security
Software Engineering
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.
title Decoding Secret Memorization in Code LLMs Through Token-Level Characterization
topic Cryptography and Security
Software Engineering
url https://arxiv.org/abs/2410.08858