코드 LLM의 보안 취약점 분석: 토큰화 관점
Understanding Secret Leakage Risks in Code LLMs: A Tokenization Perspective
코드 비밀은 소프트웨어 개발자에게 중요한 자산이며, 이들의 유출은 심각한 사이버 보안 위협을 초래합니다. 코드 LLM(CLLM)을 기반으로 하는 AI 코드 어시스턴트가 빠르게 발전하고 있지만, CLLM은 악명 높은 기억 현상으로 인해 이러한 비밀을 의도치 않게 유출하는 것으로 나타났습니다. 본 연구에서는 먼저 Byte-Pair Encoding(BPE) 토큰화가 예상치 못한 비밀 기억 현상을 야기하며, 이를 "난해성 편향(gibberish bias)"이라고 명명했습니다. 구체적으로, 일부 비밀 정보가 CLLM이 기억하기 가장 쉬운 정보에 속한다는 것을 확인했습니다. 이러한 비밀 정보는 문자 수준에서는 높은 엔트로피를 갖지만, 토큰 수준에서는 낮은 엔트로피를 갖습니다. 본 논문에서는 수치 데이터를 통해 이러한 편향성을 뒷받침합니다. 편향의 원인은 CLLM 학습 데이터와 비밀 정보 데이터 간의 토큰 분포 변화에 있다는 것을 확인했습니다. 또한, 본 논문에서는 "더 큰 어휘" 추세 하에서 난해성 편향이 어떻게 나타나는지 논의합니다. 마지막으로, 본 논문에서는 잠재적인 완화 전략과 현재 토크나이저 설계에 대한 광범위한 함의를 논의합니다.
Code secrets are sensitive assets for software developers, and their leakage poses significant cybersecurity risks. While the rapid development of AI code assistants powered by Code Large Language Models (CLLMs), CLLMs are shown to inadvertently leak such secrets due to a notorious memorization phenomenon. This study first reveals that Byte-Pair Encoding (BPE) tokenization leads to unexpected behavior of secret memorization, which we term as \textit{gibberish bias}. Specifically, we identified that some secrets are among the easiest for CLLMs to memorize. These secrets yield high character-level entropy, but low token-level entropy. Then, this paper supports the biased claim with numerical data. We identified that the roots of the bias are the token distribution shift between the CLLM training data and the secret data. We further discuss how gibberish bias manifests under the ``larger vocabulary'' trend. To conclude the paper, we discuss potential mitigation strategies and the broader implications on current tokenizer design.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.