arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.16896cs.CRcs.LGcs.SE
收藏

代码大语言模型中的木马签名研究

On Trojan Signatures in Large Language Models of Code

University of Houston(休斯顿大学)

Aftab Hussain, Md Rafiqul Islam Rabin, Mohammad Amin Alipour

AI总结:

本文针对代码大语言模型,研究基于权重的木马签名检测技术,发现该方法无法推广到代码大模型,仅靠权重检测其木马存在较大难度。

摘要:

木马签名由Fields等人(2021)提出,指被植入木马的模型中,木马类参数(权重)与非木马类参数的分布存在显著差异,可用于检测被植入木马的模型。Fields等人(2021)在图像模型的计算机视觉分类任务中发现了木马签名,涉及的模型包括Resnet、WideResnet、Densenet和VGG。本文研究了源代码大语言模型分类器层参数中的此类签名。\n 研究结果表明,木马签名无法推广到代码大语言模型。我们发现,即使在更明确的设置(冻结预训练权重进行微调)下对模型投毒,被植入木马的代码模型也难以检测出此类签名。我们针对克隆检测和缺陷检测这两个二分类任务,分析了9个被植入木马的模型。据我们所知,这是首个针对代码大语言模型研究基于权重的木马签名揭示技术的工作,并且进一步证明了仅通过权重检测此类模型中的木马是一个难题。

英文摘要:

Trojan signatures, as described by Fields et al. (2021), are noticeable differences in the distribution of the trojaned class parameters (weights) and the non-trojaned class parameters of the trojaned model, that can be used to detect the trojaned model. Fields et al. (2021) found trojan signatures in computer vision classification tasks with image models, such as, Resnet, WideResnet, Densenet, and VGG. In this paper, we investigate such signatures in the classifier layer parameters of large language models of source code. Our results suggest that trojan signatures could not generalize to LLMs of code. We found that trojaned code models are stubborn, even when the models were poisoned under more explicit settings (finetuned with pre-trained weights frozen). We analyzed nine trojaned models for two binary classification tasks: clone and defect detection. To the best of our knowledge, this is the first work to examine weight-based trojan signature revelation techniques for large-language models of code and furthermore to demonstrate that detecting trojans only from the weights in such models is a hard problem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑