TL;DR
This paper introduces Adversarial Sparse Convex Combination (ASCC) to model word substitution attacks more effectively by using a convex hull representation. Their ASCC-defense method, which leverages this new model, significantly improves robustness against word substitution attacks in NLP tasks like sentiment analysis and natural language inference, outperforming existing state-of-the-art defenses.
What Problem Does This Paper Address?
Deep neural networks (DNNs) in Natural Language Processing (NLP) are vulnerable to adversarial attacks. A particularly challenging type of attack involves substituting words with semantically similar ones, which preserves the sentence's grammaticality and naturalness, making them hard to detect. Existing defense methods often model these substitutions in a continuous vector space using L2-balls or axis-aligned hyper-rectangles. However, these representations are either too inclusive (covering unnecessary space) or not inclusive enough, hindering the ability to precisely mimic worst-case scenarios for robust training. This paper aims to address this by proposing a more accurate and efficient way to model and defend against word substitution attacks.
Methods
The core of this paper is the Adversarial Sparse Convex Combination (ASCC) method. Instead of L2-balls or hyper-rectangles, ASCC models the space of word substitutions as a convex hull of word vectors. This approach offers several advantages:
- Inclusiveness: It guarantees that all possible substitutions are covered.
- Exclusiveness: It's the smallest convex set containing all substitutions, thus avoiding unnecessary space.
- Continuity and Convexity: This makes it amenable to gradient-based optimization for generating adversarial examples.
To align the continuous vector space representation with the discrete nature of text, ASCC incorporates a regularization term that encourages perturbations towards actual substitutions.
Building on ASCC, the authors propose ASCC-defense, which uses ASCC to generate worst-case adversarial examples and then employs adversarial training to improve model robustness. This involves a two-step process: first, generating adversaries using ASCC, and second, training the model on these adversaries. A key aspect of ASCC-defense is its ability to update word vectors during training, making them inherently more robust.
Datasets
The paper evaluates its methods on two standard NLP datasets:
- IMDB: For sentiment analysis.
- SNLI: For natural language inference.
Key Insights and Ideas
- Convex Hull as an Optimal Representation: The paper argues that a convex hull is theoretically the optimal way to represent the space of word substitutions in NLP due to its inclusiveness, exclusiveness, continuity, and convexity.
- Sparsity Regularization for Textual Alignment: The introduction of an entropy-based sparsity regularizer for the convex combination coefficients is crucial for bridging the gap between the continuous vector space and the discrete textual space, ensuring that generated perturbations correspond more closely to actual word substitutions.
- Robust Word Vectors as a General Defense: A significant finding is that ASCC-defense produces word vectors that are inherently robust. These robust word vectors can be plugged into normally trained models (without any other defense techniques) and significantly improve their robustness, suggesting a new, scalable approach to NLP robustness.
- Reduced Perturbation Region: Visualizations show that the convex hull significantly reduces the perturbation region compared to L2-balls and hyper-rectangles, leading to more focused and effective adversarial training.
Key Results
- State-of-the-Art Robustness: ASCC-defense consistently outperforms existing state-of-the-art defense methods on both IMDB and SNLI datasets across various model architectures (LSTM, CNN, BOW, DCOM). For instance, on IMDB, it achieves 79.0% accuracy under Genetic attacks, surpassing the previous best of 75.0%.
- Improved BERT Robustness: ASCC-defense significantly enhances the robustness of BERT models, increasing robust accuracy from 16.4% to 70.2% under Genetic attacks on IMDB.
- Effective Robust Word Vectors: Models initialized with ASCC-defense's robust word vectors achieve substantial robustness gains even without other defense mechanisms. A normally trained LSTM model with ASCC-robust word vectors achieves 73.4% robust accuracy under Genetic attacks, compared to 7.9% with standard GloVe vectors.
- Cross-Architecture Transferability: The robust word vectors generated by ASCC-defense maintain their effectiveness when used to initialize models of different architectures, demonstrating their generalizability.
Limitations and Future Work
- Computational Cost: While ASCC-defense improves robustness, the paper notes that adversarial training is computationally intensive. The runtime analysis indicates that training can take several GPU hours per model.
- Hyperparameter Tuning: The effectiveness of the regularization term (controlled by $\alpha$) is validated, but finding the optimal balance between regularization and perturbation strength is crucial. The paper suggests that increasing $\alpha$ too much can lead to insufficient perturbations.
- Substitution Set Construction: The paper acknowledges that the construction of the substitution set is an important aspect but does not focus on it, leaving it for future exploration.
- Scalability to Other NLP Tasks: While the paper focuses on text classification, sentiment analysis, and natural language inference, its applicability to other NLP tasks could be further explored.
- Broader Robustness: The authors express hope that their work serves as a stepping stone towards broader robustness in NLP, implying that further research is needed to address other types of adversarial attacks beyond word substitutions.
Summary updated