[Paper Review] TextDecepter: Hard Label Black Box Attack on Text Classifiers
TextDecepter proposes a novel hard-label black-box attack framework for text classifiers, where only final predictions (not confidence scores) are accessible. It uses POS-tagged synonym selection and sentence importance heuristics to generate semantically similar, grammatically correct adversarial examples that achieve over 50% attack success rates against state-of-the-art models like BERT.
Machine learning has been proven to be susceptible to carefully crafted samples, known as adversarial examples. The generation of these adversarial examples helps to make the models more robust and gives us an insight into the underlying decision-making of these models. Over the years, researchers have successfully attacked image classifiers in both, white and black-box settings. However, these methods are not directly applicable to texts as text data is discrete. In recent years, research on crafting adversarial examples against textual applications has been on the rise. In this paper, we present a novel approach for hard-label black-box attacks against Natural Language Processing (NLP) classifiers, where no model information is disclosed, and an attacker can only query the model to get a final decision of the classifier, without confidence scores of the classes involved. Such an attack scenario applies to real-world black-box models being used for security-sensitive applications such as sentiment analysis and toxic content detection.
Motivation & Objective
- Address the gap in adversarial attacks for NLP under the hard-label black-box setting, where only final predictions are accessible.
- Develop a method to identify important words and generate perturbations without gradients or confidence scores.
- Ensure generated adversarial examples maintain semantic similarity, syntactic correctness, and fluency.
- Reduce memory overhead compared to prior word-level perturbation-based attack frameworks.
- Validate the robustness of state-of-the-art text classifiers against realistic, real-world attack scenarios.
Proposed method
- Use sentence importance ranking based on the additivity assumption of class intensities to identify critical sentences.
- Apply coarse- and fine-grained Part-of-Speech (POS) tagging to filter synonyms that preserve grammatical correctness.
- Employ synonym aggregation from the original class to guide replacement decisions without confidence scores.
- Use a heuristic-based selection process to iteratively replace words with synonyms that push the input toward the decision boundary.
- Introduce a two-stage filtering: first, identify important words via sentence importance; second, select valid synonyms using POS and aggregate constraints.
- Leverage only the final model prediction (hard label) to guide the attack, avoiding reliance on confidence scores or model architecture.
Experimental results
Research questions
- RQ1Can adversarial examples be effectively generated in the hard-label black-box setting for text classifiers, where only final predictions are accessible?
- RQ2How can grammatical correctness and semantic similarity be preserved during word-level perturbations without confidence scores?
- RQ3What role does POS tagging granularity (coarse vs. fine) play in maintaining fluency and attack effectiveness?
- RQ4How does the use of synonym aggregates improve attack success rate in the absence of gradient or confidence information?
- RQ5To what extent does the proposed method reduce memory usage compared to existing black-box attack frameworks?
Key findings
- TextDecepter achieves an attack success rate of 50% or higher on state-of-the-art models like BERT across both IMDB and MR sentiment analysis datasets.
- On the IMDB dataset, the attack reduces BERT’s accuracy from 88.3% to 30.9% when using synonym aggregation, and to 63.2% without it, demonstrating the critical role of aggregates.
- The method reduces memory usage compared to prior word-level perturbation frameworks, improving efficiency.
- Human evaluation confirms that adversarial examples maintain high grammatical correctness and semantic similarity to original texts.
- Using fine-grained POS tags improves grammaticality but offers diminishing returns in human understanding compared to coarse tagging, suggesting trade-offs in practical deployment.
- Ablation studies show that removing the aggregate-based synonym selection increases attack success rate (e.g., +32% on IMDB), indicating that aggregates are essential for effective boundary navigation in the absence of confidence scores.
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.