Textual Manifold-based Defense Against Natural Language Adversarial Examples
Nguyen, Dang Minh, Tuan, Luu Anh
–arXiv.org Artificial Intelligence
Recent studies on adversarial images have shown that they tend to leave the underlying low-dimensional data manifold, making them significantly more challenging for current models to make correct predictions. This so-called off-manifold conjecture has inspired a novel line of defenses against adversarial attacks on images. In this study, we find a similar phenomenon occurs in the contextualized embedding space induced by pretrained language models, in which adversarial texts tend to have their embeddings diverge from the manifold of natural ones. Based on this finding, we propose Textual Manifold-based Defense (TMD), a defense mechanism that projects text embeddings onto an approximated embedding manifold before classification. It reduces the complexity of potential adversarial examples, which ultimately enhances the robustness of the protected model. Through extensive experiments, our method consistently and significantly outperforms previous defenses under various attack settings without trading off clean accuracy. To the best of our knowledge, this is the first NLP defense that leverages the manifold structure against adversarial attacks. Our code is available at \url{https://github.com/dangne/tmd}.
arXiv.org Artificial Intelligence
Nov-5-2022
- Country:
- Oceania > Australia
- North America
- Dominican Republic (0.04)
- United States
- Oregon (0.04)
- Texas > Dallas County
- Dallas (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Hawaii > Honolulu County
- Honolulu (0.04)
- California > San Diego County
- San Diego (0.04)
- Puerto Rico > San Juan
- San Juan (0.04)
- Canada
- Quebec > Montreal (0.04)
- British Columbia > Metro Vancouver Regional District
- Vancouver (0.04)
- Alberta > Census Division No. 15
- Improvement District No. 9 > Banff (0.04)
- Europe
- Asia
- Singapore (0.04)
- Vietnam (0.04)
- Middle East > Israel (0.04)
- China > Hong Kong (0.04)
- South Korea > Seoul
- Seoul (0.04)
- Africa > Ethiopia
- Addis Ababa > Addis Ababa (0.04)
- Genre:
- Research Report > New Finding (0.48)
- Industry:
- Information Technology > Security & Privacy (0.86)
- Government > Military (0.68)
- Technology: