Less is More: Understanding Word-level Textual Adversarial Attack via n-gram Frequency Descend

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lu, Ning, Liu, Shengcai, Zhang, Zhirui, Wang, Qi, Liu, Haifeng, Tang, Ke
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911837810851840
author Lu, Ning
Liu, Shengcai
Zhang, Zhirui
Wang, Qi
Liu, Haifeng
Tang, Ke
author_facet Lu, Ning
Liu, Shengcai
Zhang, Zhirui
Wang, Qi
Liu, Haifeng
Tang, Ke
contents Word-level textual adversarial attacks have demonstrated notable efficacy in misleading Natural Language Processing (NLP) models. Despite their success, the underlying reasons for their effectiveness and the fundamental characteristics of adversarial examples (AEs) remain obscure. This work aims to interpret word-level attacks by examining their $n$-gram frequency patterns. Our comprehensive experiments reveal that in approximately 90\% of cases, word-level attacks lead to the generation of examples where the frequency of $n$-grams decreases, a tendency we term as the $n$-gram Frequency Descend ($n$-FD). This finding suggests a straightforward strategy to enhance model robustness: training models using examples with $n$-FD. To examine the feasibility of this strategy, we employed the $n$-gram frequency information, as an alternative to conventional loss gradients, to generate perturbed examples in adversarial training. The experiment results indicate that the frequency-based approach performs comparably with the gradient-based approach in improving model robustness. Our research offers a novel and more intuitive perspective for understanding word-level textual adversarial attacks and proposes a new direction to improve model robustness.
format Preprint
id arxiv_https___arxiv_org_abs_2302_02568
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Less is More: Understanding Word-level Textual Adversarial Attack via n-gram Frequency Descend
Lu, Ning
Liu, Shengcai
Zhang, Zhirui
Wang, Qi
Liu, Haifeng
Tang, Ke
Computation and Language
Artificial Intelligence
Cryptography and Security
Machine Learning
Word-level textual adversarial attacks have demonstrated notable efficacy in misleading Natural Language Processing (NLP) models. Despite their success, the underlying reasons for their effectiveness and the fundamental characteristics of adversarial examples (AEs) remain obscure. This work aims to interpret word-level attacks by examining their $n$-gram frequency patterns. Our comprehensive experiments reveal that in approximately 90\% of cases, word-level attacks lead to the generation of examples where the frequency of $n$-grams decreases, a tendency we term as the $n$-gram Frequency Descend ($n$-FD). This finding suggests a straightforward strategy to enhance model robustness: training models using examples with $n$-FD. To examine the feasibility of this strategy, we employed the $n$-gram frequency information, as an alternative to conventional loss gradients, to generate perturbed examples in adversarial training. The experiment results indicate that the frequency-based approach performs comparably with the gradient-based approach in improving model robustness. Our research offers a novel and more intuitive perspective for understanding word-level textual adversarial attacks and proposes a new direction to improve model robustness.
title Less is More: Understanding Word-level Textual Adversarial Attack via n-gram Frequency Descend
topic Computation and Language
Artificial Intelligence
Cryptography and Security
Machine Learning
url https://arxiv.org/abs/2302.02568