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 a diverse pool of trojaned code models using which they can experiment with such techniques. We present \textsc{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 weights 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。