LeapAttack: Hard-Label Adversarial Attack on Text via Gradient-Based Optimization
Authors:
Open Access
- 14 August 2022
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 2307-2315
Abstract
Generating text adversarial examples in the hard-label setting is a more realistic and challenging black-box adversarial attack problem, whose challenge comes from the fact that gradient cannot be directly calculated from discrete word replacements. Consequently, the effectiveness of gradient-based methods for this problem still awaits improvement. In this paper, we propose a gradient-based optimization method named LeapAttack to craft high-quality text adversarial examples in the hard-label setting. To specify, LeapAttack employs the word embedding space to characterize the semantic deviation between the two words of each perturbed substitution by their difference vector. Facilitated by this expression, LeapAttack gradually updates the perturbation direction and constructs adversarial examples in an iterative round trip: firstly, the gradient is estimated by transforming randomly sampled word candidates to continuous difference vectors after moving the current adversarial example near the decision boundary; secondly, the estimated gradient is mapped back to a new substitution word based on the cosine similarity metric. Extensive experimental results show that in the general case LeapAttack can efficiently generate high-quality text adversarial examples with the highest semantic similarity and the lowest perturbation rate in the hard-label setting.Keywords
Funding Information
- National Science Foundation (1953893, 1951729, 2119331)
This publication has 7 references indexed in Scilit:
- Generating Natural Language Attacks in a Hard Label Black Box SettingProceedings of the AAAI Conference on Artificial Intelligence, 2021
- Defense against Synonym Substitution-based Adversarial Attacks via Dirichlet Neighborhood Ensemble2021
- On Evaluation of Adversarial Perturbations for Sequence-to-Sequence Models2019
- Adversarial Examples in the Physical World2018
- Black-Box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers2018
- Convolutional Neural Networks for Sentence Classification2014
- Long Short-Term MemoryNeural Computation, 1997