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

一种用于文本分类器对抗攻击的约束强制奖励

A Constraint-Enforcing Reward for Adversarial Attacks on Text Classifiers

University of Technology Sydney(悉尼科技大学);CSIRO’s Data61(联邦科学与工业研究组织Data61);Rozetta Technology(罗泽塔科技)

Tom Roth, Inigo Jauregi Unanue, Alsharif Abuadbba, Massimo Piccardi

AI总结:

本文针对文本分类器对抗攻击,训练编码器-解码器复述模型并结合强化学习与约束强制奖励生成有效对抗样本,在两个数据集上取得优于竞争攻击的成功率。

摘要:

文本分类器容易受到对抗样本的攻击——所谓对抗样本,是指原本被正确分类的样本经过刻意变换后被错误分类,同时仍满足可接受性约束。寻找对抗样本的传统方法是在允许的变换空间上定义并求解一个组合优化问题。该方法虽然有效,但速度较慢,且受到变换选择的限制。另一种方法是通过微调预训练语言模型直接生成对抗样本,这在其他文本到文本任务中很常见。该方法有望显著加快速度并具备更强的表达能力,但相关研究仍相对不足。为此,本工作训练了一个编码器-解码器复述模型,以生成多样化的对抗样本。在训练方面,我们采用强化学习算法,并提出一种约束强制奖励,用于促进有效对抗样本的生成。在两个文本分类数据集上的实验结果表明,我们的模型相比原始复述模型取得了更高的成功率,并且总体上被证明比其他具有竞争力的攻击方法更有效。最后,我们展示了关键设计选择如何影响生成的样本,并讨论了所提方法的优势与不足。

英文摘要:

Text classifiers are vulnerable to adversarial examples -- correctly-classified examples that are deliberately transformed to be misclassified while satisfying acceptability constraints. The conventional approach to finding adversarial examples is to define and solve a combinatorial optimisation problem over a space of allowable transformations. While effective, this approach is slow and limited by the choice of transformations. An alternate approach is to directly generate adversarial examples by fine-tuning a pre-trained language model, as is commonly done for other text-to-text tasks. This approach promises to be much quicker and more expressive, but is relatively unexplored. For this reason, in this work we train an encoder-decoder paraphrase model to generate a diverse range of adversarial examples. For training, we adopt a reinforcement learning algorithm and propose a constraint-enforcing reward that promotes the generation of valid adversarial examples. Experimental results over two text classification datasets show that our model has achieved a higher success rate than the original paraphrase model, and overall has proved more effective than other competitive attacks. Finally, we show how key design choices impact the generated examples and discuss the strengths and weaknesses of the proposed approach.

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

↑