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

在大型语言模型中遗忘木马:自然语言与源代码的比较

Unlearning Trojans in Large Language Models: A Comparison Between Natural Language and Source Code

University of Houston(休斯顿大学)

Mahdi Kazemi, Aftab Hussain, Md Rafiqul Islam Rabin, Mohammad Amin Alipour, Sen Lin

AI总结:

本研究提出了一种结合梯度上升和弹性权重巩固的机器遗忘方法 LYA,用于消除大型语言模型中的木马攻击影响,并在自然语言和代码领域的模型上验证了其优于传统方法的有效性。

摘要:

本研究探讨了机器遗忘(MU)在缓解嵌入于传统自然语言大型语言模型(Text-LLMs)和代码大型语言模型(Code-LLMs)中的木马影响的应用。我们提出了一种新颖的遗忘方法 LYA,该方法结合了梯度上升和弹性权重巩固(一种基于 Fisher 信息矩阵(FIM)的正则化技术),以从被投毒的模型中遗忘木马。我们将 LYA 与微调、重训练和普通梯度上升等传统技术的有效性进行了比较。我们研究的主体模型分别是用于情感分析的 BERT 和用于代码缺陷检测的 CodeBERT。我们的研究结果表明,LYA 中结合梯度上升和基于 FIM 的正则化方法,在从被投毒模型中消除木马影响方面优于现有方法,同时保留了其原始功能。据我们所知,这是首项在自然语言和代码领域比较和对比 LLMs 中木马 MU 的工作。

英文摘要:

This work investigates the application of Machine Unlearning (MU) for mitigating the impact of trojans embedded in conventional large language models of natural language (Text-LLMs) and large language models of code (Code-LLMs) We propose a novel unlearning approach, LYA, that leverages both gradient ascent and elastic weight consolidation, a Fisher Information Matrix (FIM) based regularization technique, to unlearn trojans from poisoned models. We compare the effectiveness of LYA against conventional techniques like fine-tuning, retraining, and vanilla gradient ascent. The subject models we investigate are BERT and CodeBERT, for sentiment analysis and code defect detection tasks, respectively. Our findings demonstrate that the combination of gradient ascent and FIM-based regularization, as done in LYA, outperforms existing methods in removing the trojan's influence from the poisoned model, while preserving its original functionality. To the best of our knowledge, this is the first work that compares and contrasts MU of trojans in LLMs, in the NL and Coding domain.

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

↑