Recent progress in large language code models (LLCMs) has led to a dramatic surge in the use of software development. Nevertheless, it is widely known that training a well-performed LLCM requires a plethora of workforce for collecting the data and high quality annotation. Additionally, the training dataset may be proprietary (or partially open source to the public), and the training process is often conducted on a large-scale cluster of GPUs with high costs. Inspired by the recent success of imitation attacks in stealing computer vision and natural language models, this work launches the first imitation attack on LLCMs: by querying a target LLCM with carefully-designed queries and collecting the outputs, the adversary can train an imitation model that manifests close behavior with the target LLCM. We systematically investigate the effectiveness of launching imitation attacks under different query schemes and different LLCM tasks. We also design novel methods to polish the LLCM outputs, resulting in an effective imitation training process. We summarize our findings and provide lessons harvested in this study that can help better depict the attack surface of LLCMs. Our research contributes to the growing body of knowledge on imitation attacks and defenses in deep neural models, particularly in the domain of code related tasks.
翻译:近年来,大型语言代码模型(LLCMs)的进展导致软件开发的应用急剧增加。然而,众所周知,训练一个性能良好的LLCM需要大量人力来收集数据和进行高质量标注。此外,训练数据集可能是专有的(或部分开源给公众),训练过程通常在昂贵的大规模GPU集群上进行。受近期模仿攻击在窃取计算机视觉和自然语言模型方面取得成功的启发,本研究首次对LLCMs发起模仿攻击:攻击者通过精心设计的查询向目标LLCM发送请求并收集输出,从而训练出一个与目标LLCM行为相近的模仿模型。我们系统性地研究了不同查询方案和不同LLCM任务下模仿攻击的有效性,并设计了新颖的方法对LLCM输出进行优化,从而实现了高效的模仿训练过程。我们总结了研究中的发现与经验教训,有助于更清晰地描绘LLCM的攻击面。本研究深化了深度神经模型中模仿攻击与防御的知识体系,尤其是在代码相关任务领域。