Source-linked AI summary

Measure and Improve Robustness in NLP Models: A Survey

Xuezhi Wang, Haohan Wang, Diyi Yang

arXiv:2112.08313v2cs.CLcs.LG

TL;DR

NLP robustness research is fragmented despite the need for reliable deployment under unseen or challenging conditions. This survey unifies definitions, failure identification, evaluation, and improvement strategies, while highlighting limitations in generation metrics and transfer across distribution shifts. It provides a systematic view of existing directions and open challenges for improving robustness in NLP.

  • Problem

    NLP models are widely deployed but remain vulnerable to unseen or challenging scenarios, while robustness research uses varied definitions and evaluation approaches across communities.

  • Method

    The survey unifies robustness definitions, failure-identification and evaluation methods, benchmarks, and data-driven, model-driven, and inductive-prior-based improvement strategies.

  • Results

    The survey organizes robustness around performance on shifted test distributions, including synthetic perturbations and natural distribution shifts, and connects robustness failures with spurious-feature learning.

  • Takeaways & Limitations

    Robustness should be studied across complementary label-preserving and label-changing perturbations, while connections between synthetic and natural shifts require further systematic investigation.

  • Takeaways & Limitations

    Robustness remains less well defined for text generation because reliable metrics for evaluating open-ended generated text are lacking.

Abstract

from arXiv · show

As NLP models achieved state-of-the-art performances over benchmarks and gained wide applications, it has been increasingly important to ensure the safe deployment of these models in the real world, e.g., making sure the models are robust against unseen or challenging scenarios. Despite robustness being an increasingly studied topic, it has been separately explored in applications like vision and NLP, with various definitions, evaluation and mitigation strategies in multiple lines of research. In this paper, we aim to provide a unifying survey of how to define, measure and improve robustness in NLP. We first connect multiple definitions of robustness, then unify various lines of work on identifying robustness failures and evaluating models' robustness. Correspondingly, we present mitigation strategies that are data-driven, model-driven, and inductive-prior-based, with a more systematic view of how to effectively improve robustness in NLP models. Finally, we conclude by outlining open challenges and future directions to motivate further research in this area.

1 Introduction

NLP models have advanced and are widely deployed, but remain fragile to out-of-domain data, adversarial attacks, and small input perturbations. The survey unifies scattered robustness research by defining, evaluating, and improving robustness in NLP.

  • NLP models remain fragile to out-of-domain data, adversarial attacks, and small input perturbations despite major performance gains.These failures can hinder safe real-world deployment and affect users’ trust in NLP models.
  • Robustness research spans diverse definitions and many NLP tasks across multiple research communities.
  • The survey provides a unifying overview of robustness definitions, failure identification, evaluation, and systematic improvement strategies.
  • The paper organizes ongoing research directions conceptually, identifies gaps, and discusses possible paths forward.

2 Definitions of Robustness in NLP

Robustness can be framed as performance on test data from a distribution different from training, including synthetic perturbations and naturally occurring shifts. Important boundaries remain for generation, perturbation validity, and transfer between shift types.

  • A common definition: Robustness measures model performance on D′ ≠ D, often using robust accuracy E_(x′,y′)∼D′[f(x′) = y′].Existing work distinguishes synthetic perturbations from naturally occurring distribution shifts when constructing D′.
  • Task-dependent definitions: For text generation, robustness is less well defined because reliable metrics relating f(x′) to open-ended y′ remain lacking.Generation failures can include positional bias and hallucination.
  • Synthetic distribution shifts: Adversarial robustness evaluates predictions on meaningful perturbations around x, often designed to deceive models while preserving human-meaningful content.
  • Evaluation caveats: Perturbed examples may fail to preserve labels or may receive substantial disagreement from human raters, limiting evaluation validity.
  • Synthetic distribution shifts: Some perturbations intentionally change the gold label, requiring f(x′) = y′ rather than retaining the original prediction f(x′) = y.This label-changing line is presented as complementary to label-preserving robustness evaluation.
  • Connections and open challenges: Synthetic and natural distribution shifts share a framework, but their transferability remains under-explored and requires more systematic study.Evidence cited in the survey suggests robustness to synthetic shifts may not improve robustness to natural shifts.
  • Connections and open challenges: Controlling spurious features has been associated with improved performance under distribution shifts and with connections between adversarial robustness and spurious-feature learning.

3 Robustness in Vision vs. in NLP

NLP robustness differs from vision because text uses a discrete search space and perceptible, meaning-preserving changes, while distribution differences also involve distinct support and density considerations. Both fields nevertheless seek generalization from D to D′, and direct transfer between approaches remains incomplete.

  • Search space: Text’s discrete search space prevents simple gradient-based vision attacks from directly producing meaningful NLP attacks.This difference has motivated novel attack methods for discrete text.
  • Human perception: NLP adversarial attacks are typically perceptible but bounded by preserving sentence meaning, unlike imperceptible image perturbations in vision.
  • Distribution structure: Vision training and test distributions often share support while differing in density, whereas NLP distribution differences involve additional support and density considerations.
  • Shared theme: Both vision and NLP robustness research aims to generalize models from D to D′, but human perception creates barriers to directly transferring methods.
  • Shared theme: How embedding-space methods and interpretable discrete-text attacks transfer or complement each other remains insufficiently explored.

4 Identify Robustness Failures

Robustness failures are identified through human priors, error analyses, and model-based methods, then organized into challenging or adversarial benchmarks across NLP tasks.

  • Identification approaches: Researchers identify robustness failures through human priors and error analyses, while other approaches use model-based methods.These failures are commonly organized into challenging or adversarial benchmark datasets for evaluation.
  • Human prior and error analyses: NLI error analyses produce stress tests that examine whether models perform genuine inference or rely on pattern matching.Misclassified examples are grouped into error typologies that guide stress-test construction.
  • Task-specific examples: Adversarial QA examples and newly collected SQuAD test sets expose failures to generalize beyond familiar question-answering data.The new test sets motivate evaluation under natural distribution shifts.
  • Task-specific examples: Character-based translation models are brittle to typos and misspellings, while augmentation and input-space restrictions improve robustness to such noise.Synthetic grammatical errors and random noise are among the augmentation strategies discussed.
  • Task-specific examples: Neural semantic parsers remain vulnerable to lexical, stylistic, and meaning-preserving variations, motivating augmentation and adversarial learning.Text generation systems also exhibit positional and layout biases, unfaithfulness, factuality problems, and hallucination.
  • Dataset biases: Dataset collection and annotation biases can distort both model generalization and performance estimates, including through train-test overlap.Question-answering models perform substantially worse on questions that cannot be memorized from training data.

5 Improve Model Robustness

Robustness interventions span data-driven, model- and training-based, inductive-prior-based, and causal approaches. The survey connects these methods through pretraining, invariant learning, and reducing reliance on spurious patterns.

  • Overview: Robustness-improvement methods are categorized as data-driven, model- and training-based, inductive-prior-based, and causal interventions.The categories are organized by where and how the intervention is applied.
  • Data-driven approaches: Data augmentation methods such as Mixup, MixText, CutOut, AugMix, and HiddenCut improve robustness and generalization across settings.Augmentation is also used for low-resource language learning, few-shot learning, and bias mitigation.
  • Data-driven approaches: Counterfactual and shortcut-targeted augmentation makes models less sensitive to spurious patterns by perturbing examples or automatically identified shortcuts.Counterfactually augmented data combines with original data during training; strategic augmentation targets identified shortcuts.
  • Model and training-based approaches: Pretraining improves out-of-distribution robustness, potentially because self-supervision and diverse data encourage generalization beyond spurious correlations.Larger model size and additional factors can also contribute to robust accuracy.
  • Model and training-based approaches: Training strategies emphasize minority or hard-to-learn examples, including fine-tuning first on full data and then on minority examples.Group DRO extends distributionally robust optimization by focusing on subsets that are particularly difficult for the model.
  • Combining approaches: Data-driven and model-based approaches can be combined because robustness failures may reflect either training-data blind spots or intrinsic learning limitations.Some challenging patterns remain difficult even after exposure to small amounts of challenging data.
  • Inductive-prior-based approaches: Inductive-prior methods regularize the hypothesis space to discard spurious features, often using side components that identify misaligned features.Related domain-adaptation methods encourage representations invariant to auxiliary annotations or domain-specific features.
  • Connections between mitigations: The survey connects mitigation methods to pretrained models, invariant representations across environments, and priors that discourage reliance on spurious patterns.Concrete strategies include augmentation, minority reweighting, ensembles, inductive-prior design, and causal intervention.

6 Open Questions

The survey identifies open questions in automatically discovering failures, interpreting and mitigating spurious correlations, evaluating robustness consistently, centering users, and understanding human-like generalization.

  • Identifying unknown robustness failures: Automatically discovering unrobust regions remains challenging because current methods rely heavily on limited, human-defined patterns and extensive expertise.Human or subjective biases may remain even after these analyses.
  • Interpreting and mitigating spurious correlations: Mitigating spurious correlations can trade off shortcut removal against model performance and suffer error cascades from pipeline dependencies.The survey calls for end-to-end frameworks that automate mitigation.
  • Unified framework to evaluate robustness: Unified benchmarks such as CheckList, Reliability Testing, Robustness Gym, and Dynabench are proposed to facilitate faster and easier robustness evaluation.The need arises from the variety of potential spurious patterns in NLP models.
  • User-centered measures and mitigation: User-centered robustness research should investigate how stakeholder test cases and human processing styles can inform measures of systems that perform well for the wrong reasons.The survey specifically contrasts quick heuristic processing with slower, deliberative reasoning.
  • Human-like linguistic generalization: Understanding human information processing and human knowledge may clarify how human-like linguistic generalization should inform NLP generalization.The appropriate extent of human-knowledge use remains under exploration and debate.

7 Conclusion

The paper unifies robustness definitions, evaluation methods, and mitigation strategies in NLP, while highlighting challenges that motivate future research.

  • Conclusion: The survey provides a unifying overview of robustness definitions, evaluations, and mitigation strategies in NLP.It also highlights open challenges and future research directions.
  • Conclusion: Future directions include comprehensive benchmarks, adversarial-example transferability and validity, unified robustness frameworks, user-centered measures, and human-like linguistic generalization.These topics are presented as priorities for further research.
Loading 2112.08313v2…