Skip to content

Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language ModelsAdversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Models

arXiv· arXiv:2111.02840· Boxin Wang, Chejian Xu, Shuohang Wang, Zhe Gan, Yu Cheng, Jianfeng Gao, Ahmed Hassan Awadallah, Bo LiUniversity of Illinois at Urbana-Champaign; Zhejiang University; Microsoft CorporationIndexed by this site · 20 days ago· Originally publishedSelected EvaluationSelectedAttention40

Quick read

Evaluation and benchmarks

Based on the paper PDF (AI-generated); refer to the original

The authors build AdvGLUE, a multi-task robustness benchmark, systematically annotate 14 text adversarial attacks, and report that 10 models score far lower on it than on GLUE.

Questions
Large pretrained language models are easily fooled by text adversarial examples, but robustness evaluation lacks unified standards: existing toolkits struggle to guarantee perturbation quality, and human-crafted datasets have limited coverage; the authors believe a systematic, manually validated multi-task benchmark is needed.
Methods
Apply 14 word-level and sentence-level attacks to five GLUE tasks and incorporate human-constructed data; after generating samples with surrogate models, filter through transferability and fidelity automatic filtering and crowdsourced human filtering to build AdvGLUE, and evaluate 6 pretrained models and 4 robust training methods.
Experiments and results
The authors report that about 90% of generated samples were filtered out; all tested models score far lower on AdvGLUE on average than on GLUE, e.g., ELECTRA (Large) drops from 93.16 to 41.69, and the gap for SMART (BERT) reaches 55.41; models are most vulnerable to human-constructed samples.
Limitations and future work
The authors note that computational constraints prevented evaluating all models, and list few-shot robustness of large autoregressive models as future work; the experiments cover 5 GLUE tasks and 10 models, and adversarial examples are generated based only on BERT/RoBERTa-family surrogate models.
Experimental setupBERT (Large)、ELECTRA (Large) et al. · AdvGLUE、GLUE(SST-2、QQP、QNLI、RTE、MNLI) · AdvGLUE 各任务得分及宏平均(acc.,QQP 另报 F1)、ASR et al.
Threat model
Attackers apply perturbations imperceptible to the human eye to input sentences (word-level replacement, sentence-level rewriting, distractor sentences, human-constructed examples), causing the language model to output wrong answers; word-level and some sentence-level attacks use surrogate models (BERT, RoBERTa, RoBERTa ensemble) to generate adversarial samples, among which CompAttack and T3 are whitebox attacks.
Evaluated models
BERT (Large)ELECTRA (Large)RoBERTa (Large)T5 (Large)ALBERT (XXLarge)DeBERTa (Large)SMART (BERT)SMART (RoBERTa)FreeLB (RoBERTa)InfoBERT (RoBERTa)
Benchmarks
AdvGLUEGLUE(SST-2、QQP、QNLI、RTE、MNLI)
Metrics
AdvGLUE 各任务得分及宏平均(acc.,QQP 另报 F1)ASRCurated ASRFilter RateFleiss KappaHuman Accuracy
AI summaryand selection rationaleIn the paper, the researchers propose the Adversarial GLUE (AdvGLUE) benchmark, systematically applying 14 text adversarial attack methods to five GLUE tasks: SST-2, QQP, QNLI, RTE, and MNLI, and validating sample quality through manual annotation. Analysis shows that about 90% of the adversarial samples generated by existing attack algorithms change the original semantics or mislead human annotators; after filtering, the Curated Attack Success Rate (Curated ASR) of each attack is below 11%. The tested pretrained language models and robust training methods all score significantly lower on AdvGLUE than their regular accuracy, with ELECTRA (Large)'s average score dropping from 93.16 to 41.69, and BERT falling below random guessing on all tasks. The diagnostic report shows that models are most vulnerable to manually constructed adversarial samples, and TextBugger is the most effective and highest-sample-quality method among the tested attacks. The benchmark has been released at https://adversarialglue.github.io.

In the paper, the researchers propose the Adversarial GLUE (AdvGLUE) benchmark, systematically applying 14 text adversarial attack methods to five GLUE tasks: SST-2, QQP, QNLI, RTE, and MNLI, and validating sample quality through manual annotation. Analysis shows that about 90% of the adversarial samples generated by existing attack algorithms change the original semantics or mislead human annotators; after filtering, the Curated Attack Success Rate (Curated ASR) of each attack is below 11%. The tested pretrained language models and robust training methods all score significantly lower on AdvGLUE than their regular accuracy, with ELECTRA (Large)'s average score dropping from 93.16 to 41.69, and BERT falling below random guessing on all tasks. The diagnostic report shows that models are most vulnerable to manually constructed adversarial samples, and TextBugger is the most effective and highest-sample-quality method among the tested attacks. The benchmark has been released at https://adversarialglue.github.io.

Why it was selectedThe paper uses manual validation to filter adversarial samples and build a benchmark, showing that about 90% of automatically generated adversarial samples are invalid, and that mainstream models score far below their regular accuracy.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors state that there is a lack of a unified, human-verified robustness benchmark, and propose the multi-task adversarial benchmark AdvGLUE.

    Pretrained language models are easily fooled by text adversarial examples, but robustness evaluation lacks a unified, quality-assured benchmark.

    • Problem setting: the authors state that large pretrained language models perform well on NLU tasks, but carefully crafted text adversarial examples can make models output wrong answers with perturbations imperceptible to humans, posing security risks to real systems (§1).
    • Shortcomings of existing methods: the authors point out that evaluation of robust-training methods lacks unified standards—some use human-crafted datasets (e.g., ANLI), others use automatic attack algorithms—making the robustness of different models hard to compare (§1).
    • Core observation: the authors report that only about 10% of examples generated by automatic attacks can obtain at least 4 of 5 annotator votes in agreement and consistent with the original label, so manual filtering is essential to guarantee benchmark quality (§1, §3.4).
    • What the paper proposes: AdvGLUE, a multi-task robustness evaluation benchmark covering five GLUE tasks, integrating 14 text adversarial attacks (word-level, sentence-level, human-crafted), and systematically crowdsourced-annotated (§1, §3).
    • Threat model (as described in the paper):
      • Attacker goal: make the model output a wrong prediction by perturbing the input sentence (§1).
      • Attacker knowledge: word-level attacks and T3, CompAttack require surrogate models (BERT, RoBERTa, RoBERTa ensemble) to search for perturbations; CompAttack and T3 are whitebox attacks (§3.2, Appendix A.4).
      • Capability: word-level substitution (spelling, synonym, context, knowledge-guided), sentence-level syntactic manipulation and distractor-sentence insertion, human-crafted templates (§3.2).
      • Victim systems: pretrained language models fine-tuned on GLUE and robust-training methods (§4).
  2. What related research exists?

    Related work falls into two categories, evaluation toolkits and benchmark datasets; the authors consider the former's quality hard to guarantee and the latter's coverage limited.

    Evaluation toolkits

    • OpenAttack, TextAttack, TextFlint, Robustness Gym—integrate multiple input transformations and provide programmable APIs to dynamically test models; the authors note that such tools struggle to guarantee transformation quality, and cite existing reports that the effectiveness of adversarial transformations can be as low as 65.5%, i.e., more than one-third of adversarial sentences have incorrect labels (§2).

    Benchmark datasets

    • CheckList, StressTest, AdvFever—construct test cases using human-designed templates or rules; the authors note that the template approach requires language experts to design rules for specific tasks and is difficult to transfer to other tasks (§2).
    • ANLI, Dynabench, Beat the AI—use a human-and-model-in-the-loop approach in which annotators write adversarial examples; the authors note that their scale and coverage are limited by the annotators, and that annotators tend to complete tasks with minimal effort, limiting coverage of linguistic phenomena (§2).

    Text adversarial attack methods (Appendix A.2)

    • Word-level: TextBugger, HotFlip (character-level typo), SememePSO (HowNet sememe knowledge base), TextFooler (GloVe/Word2Vec word embedding synonyms), BERT-ATTACK, BAE (BERT masked language model generates context replacements).
    • Sentence-level: SCPN, T3 (syntactic structure perturbation), StressTest, CheckList (rule-based distractor sentences).

    Defense methods (Appendix A.2)

    • Adversarial training: FreeLB (embedding-space PGD data augmentation), SMART, ALUM (virtual adversarial training regularization); the authors note that their threat models are usually unknown, and their effectiveness is discounted against unseen attacks.
    • Certified defenses: IBP-type methods and randomized smoothing (SAFER); the authors note that IBP relies on model architecture assumptions and is hard to adapt to Transformers, and that randomized smoothing struggles to guarantee completeness of synonym sets.

    Baselines and benchmarks: The robust training baselines evaluated in this paper are SMART, FreeLB and InfoBERT, and the benchmarks are five GLUE tasks (SST-2, QQP, QNLI, RTE, MNLI) (§4).

    The authors position AdvGLUE as a unified benchmark combining the breadth of toolkit coverage with the quality control of human-annotated datasets: covering 14 attack types, systematically crowdsourced and annotated, and compatible with the GLUE evaluation protocol (§1).

  3. How does the paper address this problem?

    Apply 14 attacks to five GLUE tasks, build AdvGLUE through automatic filtering and crowdsourced human filtering, and evaluate using the GLUE metrics.

    Overall approach: using the dev sets of five GLUE tasks as source samples, systematically apply three categories—word-level, sentence-level, and human-constructed—totaling 14 adversarial attacks, then filter through automatic filtering and a two-round crowdsourced human process to select high-quality adversarial samples, forming the AdvGLUE benchmark (§3, Figure 1).

    Tasks and Evaluation Protocol

    • Task selection: SST-2 (sentiment), QQP (paraphrase detection), QNLI, RTE, MNLI (NLI); CoLA was excluded because there is no mature automatic attack, and WNLI was excluded due to insufficient data (§3.1).
    • Metrics follow GLUE: a model is trained once on the GLUE training set, then evaluated separately on the GLUE (IID) and AdvGLUE (adversarial) test sets, comparing the gap between the benign and approximate worst-case scenarios (§3.1).
    • Source samples: 1,000 dev samples each are sampled from QQP, QNLI, and MNLI-m/mm; the remaining tasks use the full dev set (§3.2).

    Generation of Adversarial Perturbations

    • Word-level (5 types): TextBugger (typo), TextFooler (embedding-similarity synonyms), BERT-ATTACK (BERT masked-prediction context replacement), SememePSO (HowNet sememes + particle swarm search), CompAttack (a whitebox attack combining the above perturbations, optimizing to achieve the attack with the fewest word changes) (§3.2.1).
    • Sentence-level (3 types): SCPN (paraphrasing by syntactic templates, taking the 10 most frequent templates from ParaNMT-50M), T3 (whitebox, perturbing the context vector of the syntax tree root node), AdvFever (rewriting with 23 entailment-preserving rules); distractor types: StressTest (appending a true statement at the end of the sentence), CheckList (adding distractor content such as random URLs), distractor types are not used for QQP (§3.2.2, Appendix A.4).
    • Human-constructed (4 types): CheckList (Temporal and Negation capability tests, used for SST-2/QQP/QNLI), StressTest (numerical reasoning, used for MNLI), ANLI (human-in-the-loop NLI, used for MNLI), AdvSQuAD (distractor-sentence reading comprehension, converted to QNLI format) (§3.2.3).
    • surrogate models: word-level and syntactic attacks generate samples against three models trained on GLUE: BERT, RoBERTa, and RoBERTa ensemble (§3.2.1).

    Data Curation

    • Automatic filtering—transferability: only retain samples that can simultaneously fool the other two surrogate models, to exploit biases shared across models (§3.3).
    • Automatic filtering—fidelity: word-level samples with a word modification rate exceeding 15% are filtered out; sentence-level samples use BERTScore to measure semantic similarity with the original sentence, retaining those with the highest similarity (§3.3).
    • Human process: Amazon Mechanical Turk annotators first go through a training phase (20 questions, at least 85% accuracy required to enter the main task, with 100 participants per task); in the filtering phase, each sample is annotated by 5 annotators, and the retention criterion is at least 4 agreeing votes and the majority-vote label matching the original label (§3.3).
    • Attack quality metrics: ASR=(∑ 𝟙[f(A(x))≠ y])/(∑ 𝟙[f(x)=y]), measuring the attack success rate on the surrogate model; Curated ASR additionally requires in the numerator that the sample enters the filtered dataset, measuring the proportion of valid attacks after human verification (§3.4).

    Dataset Finalization

    • Merging: distractor-type and human-constructed samples require no filtering; equal amounts are sampled according to the average sample count per attack in the filtered set, so that each attack has a similar weight (§3.5).
    • Split and release: benign data is split 9:1; samples generated based on 90% are used as the hidden test set, and the rest as the public dev set; the test set is not public, and participants submit models on CodaLab for automatic evaluation (§3.5). The final test set has 4,978 entries (Table 1).
  4. What experiments did the paper conduct?

    The 10 models score 30.29–60.86 on average on AdvGLUE, far lower than on GLUE; about 90% of attack samples were filtered out by the human process.

    Experimental Setup

    • Models tested: 6 pretrained models BERT (Large), ELECTRA (Large), RoBERTa (Large), T5 (Large), ALBERT (XXLarge), DeBERTa (Large), and 4 robust training methods SMART (BERT), SMART (RoBERTa), FreeLB (RoBERTa), InfoBERT (RoBERTa) (Table 4).
    • Benchmark: AdvGLUE test set with 4,978 entries, covering SST-2 (1,420), QQP (422), QNLI (968), RTE (304), MNLI (1,864) (Table 1); the comparison is performance on the GLUE dev set.
    • Metrics: MNLI reports matched/mismatched accuracy, QQP reports accuracy and F1, the rest report accuracy, and a macro-average Avg is also reported (Table 4).
    • Attack evaluation: ASR, Curated ASR, Filter Rate, Fleiss Kappa, Human Accuracy, averaged over the three surrogate models (Table 3).
    • Human annotation: 5 annotators per sample; Human Accuracy is computed as the annotation of one randomly selected annotator against the majority-vote label (§3.4).
    • Note: BERT (Large) and RoBERTa (Large) are fine-tuned with different random seeds, different from the surrogate models that generated the adversarial samples (Table 4 note); the paper does not report the number of repetitions.

    Main Results

    Macro-average scores of the models on AdvGLUE and GLUE (according to Table 4; MNLI and QQP have two metrics each, omitted here):

    Swipe horizontally to read the table

    ModelAvg AdvGLUEAvg GLUE∆↓
    BERT (Large)33.6885.7652.08
    ELECTRA (Large)41.6993.1651.47
    RoBERTa (Large)50.2191.4441.23
    T5 (Large)56.8290.3933.57
    ALBERT (XXLarge)59.2291.8732.65
    DeBERTa (Large)60.8692.6731.81
    SMART (BERT)30.2985.7055.41
    SMART (RoBERTa)53.7192.6238.91
    FreeLB (RoBERTa)50.4792.2841.81
    InfoBERT (RoBERTa)46.0489.0643.02
    • The authors state that all tested models perform far worse on AdvGLUE than on GLUE, with DeBERTa (Large) and ALBERT (XXLarge) having the highest average scores (§4).
    • The authors point out that BERT's performance on every AdvGLUE task is below random-guess accuracy (§4).
    • The authors state that ELECTRA (Large)'s average score is lower than that of RoBERTa (Large), one of the surrogate models, indicating that the filtered samples transfer across architectures (§4).

    Effectiveness of Attack Methods and Human Verification (Table 3)

    • What was measured: ASR, Curated ASR, Filter Rate, and annotation agreement of 8 automatic attacks on 5 tasks.
    • Results: the raw ASR of each attack is mostly 42.28–71.39 (task average), but Curated ASR is below 11% for all; the Filter Rate of most attacks exceeds 85% (e.g., SST-2 average 85.82, QQP average 96.11). After filtering, Fleiss Kappa rises from 0.11–0.38 to 0.44–0.67 (task average).
    • Authors' interpretation: existing attack algorithms tend to generate invalid samples that change the original semantics or mislead annotators; TextBugger has the highest Curated ASR and Curated Fleiss Kappa across tasks, and is the most effective and valid attack observed by the authors (§3.4).

    Model Vulnerability Diagnosis (Table 5)

    • What was measured: macro-average accuracy of 10 models on 11 attack types.
    • Results: human-constructed categories generally score lowest, e.g., BERT (Large) scores 16.33, 23.20, 13.47, 10.53 on C8–C11; among sentence-level, distractor type (C7) is lower than syntactic type (C6), e.g., RoBERTa (Large) 41.89 vs. 50.49.
    • Authors' interpretation: models are most vulnerable to human-constructed samples containing complex linguistic phenomena such as numerical reasoning, negation, and coreference; word-level replacement strategies differ little from each other, among which typo and knowledge-guided types are relatively more effective (§4).

    Effect of Robust Training Methods (Table 4)

    • What was measured: the improvement of SMART, FreeLB, InfoBERT relative to their backbone models.
    • Results: SMART (RoBERTa) scores 3.71 higher on average than RoBERTa (Large) (53.71 vs. 50.21), and also has higher benign accuracy on GLUE; InfoBERT (RoBERTa) has lower benign and adversarial accuracy than RoBERTa (Large).
    • Authors' interpretation: existing robust training methods bring only limited robustness improvement (§4).

    Other Ablations and Analyses

    • Filtering stage breakdown (Table 12): about 60–80% of samples are filtered out due to insufficient transferability or excessive word modification rate; among the remaining samples, about 30–40% are filtered out due to insufficient human agreement and about 20–30% due to label change (§3.4, Appendix A.7).
    • Annotator quality (Table 11): 33–70 qualified annotators per task, with average accuracy of 80.4–89.2 on 100 GLUE dev samples and majority-vote accuracy of 85.0–95.0.
    • Negative results: AdvFever's ASR is only 0.30–6.62, and on QQP Curated ASR is 0.00 with Filter Rate reaching 100.00 (Table 3); the paper does not explain the reason.
  5. What are some points that can be further explored?

    The authors point out compute limitations and the controversy over surrogate bias, and list few-shot evaluation of autoregressive large models as future work.

    Limitations and future directions noted by the authors

    • Model coverage: due to computational resource constraints, a comprehensive evaluation of all existing language models was not possible; the authors hope to let researchers submit models via a leaderboard (Appendix A.8).
    • Future directions: the authors express interest in the adversarial robustness of large autoregressive language models in few-shot settings, leaving it for future work (Appendix A.8).
    • Surrogate bias controversy: the authors cite an existing view that adversarial screening based on surrogate models may not fairly measure robustness—participants could top the leaderboard by making different errors from the surrogate models; the authors believe systematic data screening can mitigate this and cite the large performance gap of ELECTRA (Large) as evidence of transferability (Appendix A.8).
    • Benchmark positioning: the authors emphasize that AdvGLUE focuses on robustness evaluation and should serve as a complementary diagnostic set to GLUE, recommending evaluating both (Appendix A.8).

    Scope of experimental coverage

    • The models evaluated are 6 pretrained models plus 4 robust-training method variants, 10 in total (Table 4).
    • Tasks cover 5 of GLUE: SST-2, QQP, QNLI, RTE, MNLI; CoLA, WNLI, etc. are not included (§3.1).
    • Adversarial examples are generated based only on three surrogate models: BERT, RoBERTa, and RoBERTa ensemble (§3.2.1).
    • Manual annotation uses 5 annotators per example, with 100 workers per task participating in the training phase (§3.3).
    • The paper does not report the number of repetitions or confidence intervals for model evaluation.
  6. Summarize the main content of the paper

    AdvGLUE: an adversarial version of the GLUE benchmark with 14 attack types plus human verification; all 10 models score far below GLUE.

    AdvGLUE is a multi-task benchmark for evaluating language model robustness, addressing the problem that NLU models are easily fooled by adversarial examples while existing evaluations lack unified standards and quality assurance.

    • Method: systematically apply 14 attacks to five GLUE tasks (SST-2, QQP, QNLI, RTE, MNLI)—5 word-level, 3 syntactic plus 2 distractor-type sentence-level, and 4 human-crafted; word-level and syntactic examples are generated against three surrogate models (BERT, RoBERTa, RoBERTa ensemble), then filtered by automatic transferability and fidelity checks and by 5-person crowdsourced annotation (at least 4 votes in agreement with the label unchanged), yielding 4,978 test examples (Table 1).
    • Attack quality findings: about 90% of generated examples are filtered out during screening (they change the semantics or annotators cannot reach agreement), and every attack's Curated ASR is below 11%; on this basis the authors conclude that existing automatic attack generation has limited ability to produce high-quality examples, with TextBugger performing relatively best (Table 3).
    • Model evaluation: for the 10 models (6 pretrained models, 4 robust-training methods), AdvGLUE macro-average scores are 30.29–60.86, versus 85.70–93.16 on GLUE; the largest gap is SMART (BERT) at 55.41, and the highest score is DeBERTa (Large) at 60.86 (Table 4).
    • Diagnostic findings: the authors state that models are most vulnerable to human-crafted examples (numerical reasoning, negation, etc.), and that among sentence-level perturbations, distractor-type perturbations are more effective than syntactic manipulations (Table 5); BERT falls below random guessing on each task.
    • Authors' conclusion: existing models and robust-training methods perform poorly on AdvGLUE, and model vulnerability to adversarial attacks remains unresolved; the authors hope the benchmark will drive research on more subtle, label-preserving attacks and more robust models (§5).
Read originalarxiv.org