Abstract
Pre-trained language models (PLMs) often rely on spurious correlations between specific words and labels—known as shortcut learning—rather than deep semantic understanding. This paper introduces Less-Learn-Shortcut (LLS), a task-agnostic training strategy that identifies and down-weights biased examples during fine-tuning. Our analysis reveals that models prioritize learning these shortcuts early in training. Experimental results across multiple NLP tasks demonstrate that LLS significantly enhances model robustness on adversarial datasets while maintaining strong in-domain performance.
Introduction
While large pre-trained language models like BERT, RoBERTa, and ERNIE have set new benchmarks in NLP, their performance often degrades on adversarial or out-of-distribution data. This fragility is largely attributed to "shortcut learning," where models latch onto dataset biases—spurious correlations between simple features (e.g., specific words like "not") and target labels (e.g., "contradiction").
Existing mitigation strategies often rely on task-specific data augmentation or complex adversarial training. This research aims to provide a quantitative analysis of shortcut learning and proposes a universal, task-agnostic method to prevent models from over-relying on these misleading features.
Methodology: Less-Learn-Shortcut (LLS)
The authors propose LLS to penalize the model for relying on easy shortcuts during the fine-tuning process. The strategy involves three main steps:
- Quantify Bias: A "biased degree" is calculated for every word based on its frequency and co-occurrence rate with specific labels in the training set.
- Score Examples: Each training example is assigned a bias score based on the average biased degree of its constituent words. For sentence-pair tasks, this score is mathematically isolated from "word-overlap" shortcuts to avoid conflicting signals.
- Reweight Loss: During training, the loss weights of highly biased examples are scaled down using min-max normalization, while unbiased examples retain a standard weight of 1. This forces the model to look beyond obvious correlations and learn deeper representations.
Analysis of Shortcut Learning
Biased Examples as "Fast Food"
By manipulating the order of training data, the researchers observed that the training loss for biased examples drops much more sharply than for unbiased examples. Models tend to prioritize these easy correlations early in the training cycle, effectively treating them as "fast food" for optimization.
Dominance of Biased Words
Using the explainability tool LIME, the authors measured the contribution of biased words versus random words to the model's final prediction. They found that biased words consistently rank among the top four highest-contributing features up to 80% of the time, significantly outpacing random words across various datasets and architectures.
Key Results
The LLS strategy consistently improved performance on adversarial datasets while maintaining or slightly improving in-domain accuracy across BERT, ERNIE, and RoBERTa architectures:
- Question Matching: On the RoBERTa architecture, LLS improved accuracy on the adversarial DuQM dataset to 74.18% (from a 72.86% baseline) and boosted in-domain LCQMC accuracy to 88.46% (from 87.58%).
- Sentiment Analysis: LLS improved RoBERTa's accuracy on the adversarial SENTIrobust dataset to 66.46% (up from 65.32%).
- Comparison to Baselines: LLS generally outperformed other task-agnostic strategies like
Rew.biasandForg., proving to be a more stable and efficient approach for mitigating bias.
Conclusion and Future Work
LLS is a highly effective strategy for datasets with heavily biased distributions. However, its impact is less pronounced on relatively unbiased datasets (e.g., MNLI). Future research will focus on better mathematical formalization of various shortcut types to generalize these biases as a broader class of solvable problems in machine learning.
Summary updated