Modeling Adversarial Attack on Pre-trained Language Models as Sequential Decision Making

Xuanjie Fang, Sijie Cheng, Yang Liu, Wei Wang
5/27/2023
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Pre-trained language models (PLMs) have been widely used to underpin various downstream tasks. However, the adversarial attack task has found that PLMs are vulnerable to small perturbations. Mainstream methods adopt a detached two-stage framework to attack without considering the subsequent influence of substitution at each step. In this paper, we formally model the adversarial attack task on PLMs as a sequential decision-making problem, where the whole attack process is sequential with two decision-making problems, i.e., word finder and word substitution. Considering the attack process can only receive the final state without any direct intermediate signals, we propose to use reinforcement learning to find an appropriate sequential attack path to generate adversaries, named SDM-Attack. Extensive experimental results show that SDM-Attack achieves the highest attack success rate with a comparable modification rate and semantic similarity to attack fine-tuned BERT. Furthermore, our analyses demonstrate the generalization and transferability of SDM-Attack. The code is available at https://github.com/fduxuan/SDM-Attack.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{fang2023modeling,
  title  = {Modeling Adversarial Attack on Pre-trained Language Models as Sequential Decision Making},
  author = {Xuanjie Fang and Sijie Cheng and Yang Liu and Wei Wang},
  year   = {2023},
  eprint = {2305.17440},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.17440v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.17440.svg)](https://codeofpaper.com/paper/2305.17440)

Discussion