[Paper Review] Interpretable Adversarial Perturbation in Input Embedding Space for Text
This paper proposes interpretable adversarial training in text by restricting perturbations in word embedding space to only point toward existing words, enabling direct reconstruction of adversarial examples as meaningful sentence-level word substitutions. The method maintains or improves model performance while producing human-interpretable adversarial texts and visualizations, restoring interpretability lost in prior gradient-based adversarial training approaches.
Following great success in the image processing field, the idea of adversarial training has been applied to tasks in the natural language processing (NLP) field. One promising approach directly applies adversarial training developed in the image processing field to the input word embedding space instead of the discrete input space of texts. However, this approach abandons such interpretability as generating adversarial texts to significantly improve the performance of NLP tasks. This paper restores interpretability to such methods by restricting the directions of perturbations toward the existing words in the input embedding space. As a result, we can straightforwardly reconstruct each input with perturbations to an actual text by considering the perturbations to be the replacement of words in the sentence while maintaining or even improving the task performance.
Motivation & Objective
- To address the lack of interpretability in gradient-based adversarial training for NLP, where perturbations in continuous embedding space cannot be easily mapped back to real words.
- To develop a method that generates adversarial examples interpretable as actual sentence modifications (e.g., word substitutions) while preserving the regularization benefits of adversarial training.
- To enable researchers to analyze black-box neural models by generating adversarial texts that reveal model vulnerabilities through human-readable perturbations.
Proposed method
- Restrict adversarial perturbations in the input embedding space to only point toward the locations of existing words in the vocabulary.
- For each word in a sentence, compute the perturbation direction that maximizes the loss while selecting the closest existing word embedding as the target direction.
- Use the maximum value of the perturbation vector projected onto each word embedding vector to determine the most relevant word substitution.
- Apply this constraint to both adversarial training (iAdvT-Text) and virtual adversarial training (iVAT-Text), maintaining the same training objective as baseline methods.
- Reconstruct adversarial texts by replacing original words with the nearest existing words in the embedding space based on the perturbation direction.
- Visualize perturbations by selecting the word with the highest cosine similarity to the perturbation vector, enabling interpretable model analysis.
Experimental results
Research questions
- RQ1Can adversarial perturbations in the input embedding space be restricted to point only toward existing words in the vocabulary, enabling interpretable adversarial text generation?
- RQ2Does constraining perturbations to existing word embeddings degrade model performance, or can it maintain or improve generalization as in prior methods?
- RQ3Can the resulting adversarial examples be meaningfully reconstructed as natural sentence modifications (e.g., word substitutions) that mislead the model?
- RQ4How do the interpretable perturbations compare to non-interpretable ones in terms of visualizing model behavior and identifying model weaknesses?
- RQ5Can this method generate adversarial texts that are both semantically plausible and effective in causing misclassification?
Key findings
- The proposed method, iAdvT-Text, achieved state-of-the-art performance on sentiment classification (SEC), category classification (CAC), and grammatical error detection (GED) benchmarks, matching or exceeding the performance of the baseline AdvT-Text.
- iAdvT-Text successfully generated adversarial texts by replacing words with semantically plausible alternatives (e.g., 'this' → 'that'), which caused model misclassification while preserving sentence meaning.
- Visualizations showed that iAdvT-Text perturbations consistently pointed toward meaningful word substitutions (e.g., 'practise' → 'play'), whereas baseline AdvT-Text produced uninterpretable replacements (e.g., '<eos>' → 'Analyze').
- The method maintained or improved model generalization, demonstrating that interpretability does not come at the cost of performance, even under strong constraints on perturbation directions.
- Adversarial examples generated via iAdvT-Text were effective in fooling models—e.g., changing 'Negative' to 'Positive' in sentiment classification—while remaining grammatically coherent and semantically plausible.
- The approach enables researchers to analyze black-box models by generating adversarial texts that reveal model sensitivity to specific word choices, enhancing model interpretability and robustness analysis.
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.