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的攻击面。本工作丰富了深度神经网络模型(尤其是代码相关任务领域)关于模仿攻击与防御的认知体系。