With the rapid growth of research in trojaning deep neural models of source code, we observe that there is a need of developing a benchmark trojaned models for testing various trojan detection and unlearning techniques. In this work, we aim to provide the scientific community with diverse trojaned code models, that cover a variety of state-of-the-art architectures, on which they can examine such techniques. We thus present TrojanedCM, a publicly available repository of clean and poisoned models of source code. We provide poisoned models for two code classification tasks (defect detection and clone detection) and a code generation task (text-to-code generation). We finetuned popular pretrained code models such as CodeBERT, PLBART, CodeT5, CodeT5+, on poisoned datasets that we generated from benchmark datasets (Devign, BigCloneBench, CONCODE) for the above mentioned tasks. The repository also provides full access to the architecture and parameters of the models, allowing practitioners to investigate different white-box analysis techniques. In addition to the poisoned models, we also provide a poisoning framework using which practitioners can deploy various poisoning strategies for the different tasks and models of source code. All the material are accessible via this link: https://github.com/UH-SERG/TrojanedCM.
翻译:随着针对源代码深度神经模型的后门攻击研究快速发展,我们观察到亟需构建标准化的特洛伊模型基准集,用于测试各类后门检测与遗忘技术。本研究旨在为科学界提供涵盖多种前沿架构的多样化特洛伊代码模型,以便研究者检验相关技术。为此,我们推出TrojanedCM——一个公开可用的清洁与中毒代码模型仓库。我们针对两类代码分类任务(缺陷检测与克隆检测)及一项代码生成任务(文本到代码生成)提供了中毒模型。基于上述任务的基准数据集(Devign、BigCloneBench、CONCODE),我们生成了中毒数据集,并对CodeBERT、PLBART、CodeT5、CodeT5+等主流预训练代码模型进行微调。该仓库还提供模型架构与参数的全量访问权限,便于从业者开展各类白盒分析技术研究。除中毒模型外,我们还提供后门注入框架,支持针对不同任务与代码模型部署多种后门策略。所有资源可通过以下链接获取:https://github.com/UH-SERG/TrojanedCM。