Shortcut Learning of Large Language Models in Natural Language Understanding

Mengnan Du, Fengxiang He, Na Zou, Dacheng Tao, Xia Hu

TL;DR

This paper surveys the phenomenon of "shortcut learning" in Large Language Models (LLMs), where models exploit dataset biases and artifacts instead of genuine understanding. It reviews methods for detecting, understanding, and mitigating these shortcuts, highlighting the critical need to move beyond purely data-driven approaches towards incorporating more human knowledge for robust NLU.

What Problem Does This Paper Address?

Large Language Models (LLMs) have achieved remarkable success in Natural Language Understanding (NLU) tasks. However, their impressive performance often falters when faced with out-of-distribution (OOD) data or adversarial attacks. This fragility stems from "shortcut learning," a phenomenon where LLMs learn to rely on superficial patterns, biases, or artifacts present in training data rather than truly understanding the underlying task. This is akin to a student memorizing answers without grasping the concepts, leading to poor generalization and vulnerability. The paper aims to provide a comprehensive overview of this problem, its causes, detection methods, and mitigation strategies, particularly for LLMs with fewer than a billion parameters.

Methods

The paper categorizes methods into detection, characterization, and mitigation of shortcut learning.

  • Detection:
    • Comprehensive Performance Testing: Moving beyond standard IID (Independently and Identically Distributed) test sets, this involves using OOD datasets (like HANS for NLI) and adversarial attacks to expose performance degradation.
  • Randomization Ablation: Testing model sensitivity to crucial linguistic features like word order to see if models rely on them.
  • Explainability Analysis: Employing techniques like feature attribution (e.g., Integrated Gradients) to understand which parts of the input the model focuses on, revealing reliance on spurious cues.
  • Characterization of Reasons: The paper identifies three main sources of shortcut learning:
  • Skewed Training Datasets: Artifacts introduced during data collection (e.g., crowd-sourcing) and annotation lead to imbalanced features and class labels.
  • LLM Models: Model size and pre-training objectives influence robustness. Larger models generally show better generalization, and different pre-training objectives (e.g., BERT vs. RoBERTa vs. ELECTRA) encode different inductive biases.
  • Model Fine-tuning Process: The standard Empirical Risk Minimization (ERM) approach, coupled with a "simplicity bias" where models favor easier features, leads to learning non-robust patterns early in training.
  • Mitigation Approaches:
    • Data-Centric:
      • Dataset Refinement: Improving datasets by filtering biases, providing clearer instructions to annotators, or reorganizing train/test splits.
  • Training Samples Reweighting: Assigning higher weights to "hard" or worst-group samples.
  • Partitioning Data into Environments: Encouraging models to learn invariant features across different data distributions (inspired by Invariant Risk Minimization).
  • Model-Centric (Robust Learning): * Adversarial Training: Training models to be robust against adversarial perturbations.
  • Explanation Regularization: Using human-provided rationales to guide model attention towards correct reasoning.
  • Product-of-Expert (PoE): Ensembling a debiased model with a bias-only model.
  • Confidence Regularization: Encouraging models to be less confident on biased samples.
  • Contrastive Learning: Designing tasks to encourage learning robust features while suppressing non-robust ones.

Datasets

The paper discusses various datasets and benchmarks used for evaluating NLU tasks and shortcut learning:

  • General NLU Datasets: MNLI (Multi-Genre Natural Language Inference), QQP (Quora Question Pairs), GLUE benchmark.
  • OOD/Robustness Evaluation Datasets:
    • HANS (Heuristic Analysis for NLI Systems): Specifically designed to test for syntactic heuristics (lexical overlap, subsequence, constituent) in NLI models.
  • PAWS (Paraphrase Adversaries from Word Scrambling): Used for evaluating robustness in paraphrase identification.
  • ANLI (Adversarial NLI): A dataset created through adversarial human-to-model interactions.
  • New Benchmarks Mentioned: Adversarial GLUE (containing 14 adversarial attack methods).

Key Insights and Ideas

  • The "Clever Hans" Effect in LLMs: LLMs are not always "smart" in the way we intend; they can achieve high scores by exploiting superficial cues rather than genuine understanding.
  • OOD Performance is a Crucial Metric: Superior performance on IID test sets is misleading. True robustness is revealed only when models are tested on data distributions different from their training data.
  • Dataset Artifacts are Pervasive: From simple word overlaps to subtle stylistic patterns, training data is rife with biases that LLMs readily exploit.
  • Model Size Matters, but Not Exclusively: While larger models tend to be more robust, the pre-training objective and fine-tuning process play equally critical roles.
  • Mitigation is Challenging: Existing mitigation methods often provide only limited improvements and can sometimes sacrifice IID performance.
  • The Need for Human Knowledge: Purely data-driven approaches are insufficient. Future progress requires integrating more domain knowledge into LLM architecture, training objectives, and evaluation.

Key Results

  • LLMs can exhibit significant performance degradation (e.g., >20% accuracy drop) on OOD test sets compared to IID test sets.
  • Models like BERT can be heavily influenced by simple lexical cues (e.g., negation words like "not") for prediction in NLI tasks.
  • Reading comprehension models often rely on lexical matching between questions and passages rather than true comprehension.
  • Ablation studies show that LLMs can perform well even when word order is randomized, indicating they might ignore syntax.
  • While prompt-based LLMs (like GPT-3) show some improvements in OOD generalization compared to standard fine-tuned models, they still exhibit biases (e.g., majority label bias, position bias).

Limitations and Future Work

  • Limitations:
    • Refining datasets can only mitigate a limited number of recognized biases; subtle statistical biases may remain.
  • Existing mitigation methods often provide limited improvements in generalization and can sometimes hurt IID performance.
  • A deep theoretical understanding of why LLMs learn shortcuts is still lacking.
  • Current research on prompt-based methods primarily focuses on standard benchmark performance, with robustness needing more investigation.
  • Future Work:
    • Introducing More Domain Knowledge: Integrating linguistic structures, common sense reasoning, and task-specific knowledge into model architectures and training.
  • Better Pre-training Objectives: Designing objectives that encourage more robust representations and less anisotropic embeddings.
  • Better Fine-tuning Approaches: Developing methods that incorporate human-like common sense and address unknown biases.
  • Curating Challenging Evaluation Datasets: Creating more diverse and difficult benchmarks for evaluating robustness across various NLU tasks and biases.
  • In-depth Theoretical Understanding: Developing theoretical frameworks to explain shortcut learning in LLMs.
  • Inspiration from Other Fields: Leveraging insights from domain adaptation, domain generalization, and long-tailed classification.
  • Addressing Algorithmic Discrimination: Recognizing that shortcut learning can exacerbate societal biases.
  • Exploring Prompt-Based Paradigms: Further investigating the robustness of prompt-based methods, especially for massive LLMs, and developing mitigation frameworks for them.
  • Watermarking and Backdoor Attacks: Understanding how shortcut learning can be used for both benign (IP protection) and malicious (security threats) purposes.

Summary updated

BibTeX
@article{du2024shortcut,
  author = {Mengnan Du and Fengxiang He and Na Zou and Dacheng Tao and Xia Hu},
  title = {{Shortcut Learning of Large Language Models in Natural Language Understanding}},
  journal = {Communications of the ACM},
  year = {2024},
  url = {https://openreview.net/forum?id=fgvBZzFUIX},
}
Figure