arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.08131cs.CL
收藏

语言模型中用于强化学习的通用对抗后缀

Universal Adversarial Suffixes for Language Models Using Reinforcement Learning with Calibrated Reward

Center for Intelligent Cyber Physical Systems, Indian Institute of Technology Guwahati, India(智能网络物理系统中心,印度理工学院古瓦哈提);Department of Computer Science and Engineering, Indian Institute of Technology Guwahati, India(计算机科学与工程系,印度理工学院古瓦哈提)

Sampriti Soor, Suklav Ghosh, Arijit Sur

AI总结:

本文提出了一种基于强化学习的通用对抗后缀生成方法,通过校准交叉熵提升迁移性,并在多个NLP数据集上验证了其有效性。

摘要:

语言模型容易受到短对抗后缀的影响,这些后缀可以可靠地改变预测结果。先前的研究通常通过梯度搜索或基于规则的方法寻找此类后缀,但这些方法易碎且往往局限于单一任务或模型。在本文中,采用了一个强化学习框架,将后缀视为策略,并使用近端策略优化(PPO)在冻结模型作为奖励 oracle 的情况下进行训练。通过校准交叉熵对奖励进行塑造,消除标签偏差,并在表面形式上进行聚合,以提高迁移性。所提出的方法在五个多样化的NLP基准数据集上进行了评估,涵盖情感、自然语言推理、同义词和常识推理,使用了三种不同的语言模型:Qwen2-1.5B Instruct、TinyLlama-1.1B Chat 和 Phi-1.5。结果表明,通过强化学习训练的后缀在准确性上持续下降,并且在跨任务和模型的迁移效果上优于以前的对抗触发器。

英文摘要:

Language models are vulnerable to short adversarial suffixes that can reliably alter predictions. Previous works usually find such suffixes with gradient search or rule-based methods, but these are brittle and often tied to a single task or model. In this paper, a reinforcement learning framework is used where the suffix is treated as a policy and trained with Proximal Policy Optimization against a frozen model as a reward oracle. Rewards are shaped using calibrated cross-entropy, removing label bias and aggregating across surface forms to improve transferability. The proposed method is evaluated on five diverse NLP benchmark datasets, covering sentiment, natural language inference, paraphrase, and commonsense reasoning, using three distinct language models: Qwen2-1.5B Instruct, TinyLlama-1.1B Chat, and Phi-1.5. Results show that RL-trained suffixes consistently degrade accuracy and transfer more effectively across tasks and models than previous adversarial triggers of similar genres.

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

↑