[Paper Review] Generating Natural Language Adversarial Examples through An Improved Beam Search Algorithm
This paper proposes an improved beam search algorithm for generating high-quality, low-perturbation natural language adversarial examples in black-box settings. By optimizing search strategy and word replacement scoring using Sentiwordnet similarity, the method achieves 100% attack success rate on BERT and BiLSTM for IMDB with 3–15× fewer queries than state-of-the-art baselines, significantly improving efficiency without sacrificing success rate or transferability.
The research of adversarial attacks in the text domain attracts many interests in the last few years, and many methods with a high attack success rate have been proposed. However, these attack methods are inefficient as they require lots of queries for the victim model when crafting text adversarial examples. In this paper, a novel attack model is proposed, its attack success rate surpasses the benchmark attack methods, but more importantly, its attack efficiency is much higher than the benchmark attack methods. The novel method is empirically evaluated by attacking WordCNN, LSTM, BiLSTM, and BERT on four benchmark datasets. For instance, it achieves a 100\% attack success rate higher than the state-of-the-art method when attacking BERT and BiLSTM on IMDB, but the number of queries for the victim models only is 1/4 and 1/6.5 of the state-of-the-art method, respectively. Also, further experiments show the novel method has a good transferability on the generated adversarial examples.
Motivation & Objective
- Address the inefficiency of existing black-box word-level adversarial attack methods, which require excessive model queries.
- Improve attack success rate, especially on short texts like those in IMDB and SST-2, where prior methods underperform.
- Maintain high semantic similarity and low perturbation in generated adversarial examples to ensure naturalness and quality.
- Enhance transferability of adversarial examples across models, such as from BERT to DistilBERT.
- Design a query-efficient attack strategy that reduces computational cost while preserving high attack effectiveness.
Proposed method
- Introduce an improved beam search algorithm that enhances search efficiency and success rate in black-box text attack scenarios.
- Design a novel word replacement scoring mechanism based on Sentiwordnet to prioritize synonyms with high semantic similarity and low perturbation.
- Implement separate attack strategies for long and short texts to adapt to varying input complexity and improve success on short sequences.
- Use beam width optimization to balance exploration and exploitation, achieving high attack success even at beam width = 1.
- Integrate a confidence-based selection mechanism to guide the search toward adversarial examples that successfully fool the victim model.
- Apply the attack in a black-box setting where only model predictions (not gradients) are accessible, simulating real-world constraints.
Experimental results
Research questions
- RQ1Can an improved beam search algorithm significantly reduce the number of queries required to generate effective adversarial examples in black-box NLP attacks?
- RQ2Does the proposed method achieve higher attack success rates than state-of-the-art baselines, particularly on short-text datasets like IMDB and SST-2?
- RQ3To what extent does the use of Sentiwordnet-based similarity improve the quality and naturalness of adversarial examples?
- RQ4How does the improved beam search compare to standard beam search in terms of attack success rate and efficiency?
- RQ5Do the adversarial examples generated by the proposed method exhibit strong transferability to other models, such as DistilBERT?
Key findings
- The proposed method achieves a 100% attack success rate on BERT and BiLSTM when attacking the IMDB dataset, surpassing all baseline methods.
- On IMDB, the method reduces the number of queries to 1/15 of the baseline SememePSO and 1/3 of PWWS, achieving 3–15× faster attack speed.
- For the SST-2 dataset, the method achieves a 91.6% attack success rate, higher than all compared baselines.
- The improved beam search algorithm outperforms standard beam search even at beam width = 1, exceeding the success rate of standard beam search at width = 6.
- Adversarial examples generated by the method show low perplexity and high grammaticality, indicating strong linguistic quality.
- Transferability of adversarial examples is comparable to the state-of-the-art SememePSO method, with similar success rates on DistilBERT across IMDB, SST-2, YELP, and SNLI.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.