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.


翻译:代码秘密是软件开发人员的敏感资产,其泄露会带来重大网络安全风险。尽管由代码大语言模型(CLLMs)驱动的AI代码助手发展迅速,但研究表明,CLLMs会因臭名昭著的记忆现象而无意中泄露这些秘密。本研究首次揭示字节对编码(BPE)分词会导致秘密记忆的意外行为,我们将其称为“乱码偏差”。具体而言,我们发现某些秘密是CLLMs最容易记忆的类型。这些秘密具有高字符级熵,但低分词级熵。随后,本文通过数值数据支持这一偏差观点。我们确定偏差的根源在于CLLM训练数据与秘密数据之间的分词分布偏移。我们进一步讨论了在“更大词表”趋势下乱码偏差的表现形式。最后,本文探讨了潜在缓解策略及对当前分词器设计的更广泛影响。

0
下载
关闭预览

相关内容

将一个汉字序列切分成一个一个单独的词
【新书】大规模语言模型的隐私与安全,
专知会员服务
29+阅读 · 2024年12月4日
揭示生成式人工智能 / 大型语言模型(LLMs)的军事潜力
专知会员服务
32+阅读 · 2024年9月26日
大型语言模型代理的安全与隐私综述
专知会员服务
30+阅读 · 2024年8月5日
生成式人工智能大型语言模型的安全性:概述
专知会员服务
35+阅读 · 2024年7月30日
大语言模型中的提示隐私保护
专知会员服务
24+阅读 · 2024年7月24日
《大型语言模型(LLMs): 训练到推理》全面概述技术细节
ML、DL、NLP面试常考知识点、代码、算法理论基础汇总分享
区块链隐私保护研究综述——祝烈煌详解
计算机研究与发展
23+阅读 · 2018年11月28日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
尽早跑通深度学习的实践代码,是入门深度学习的最快途径
算法与数据结构
22+阅读 · 2017年12月13日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
3+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
2+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员