End-to-End Self-Debiasing Framework for Robust NLU Training

Abbas Ghaddar, Philippe Langlais, Mehdi Rezagholizadeh, Ahmad Rashid

TL;DR

This paper introduces an "End-to-End Self-Debiasing Framework" that trains a main NLU model and a "bias model" simultaneously. This approach effectively mitigates dataset biases, leading to improved performance on out-of-distribution (OOD) datasets while maintaining strong in-distribution (ID) performance, outperforming existing debiasing methods on several NLU tasks.

What Problem Does This Paper Address?

Modern Natural Language Understanding (NLU) models, particularly those based on Transformers like BERT, have a tendency to latch onto superficial, spurious correlations within training data. These "dataset biases" allow models to perform exceptionally well on in-distribution (ID) test sets that mirror the training data's biases. However, this reliance on shallow features leads to a significant performance drop when these models encounter out-of-distribution (OOD) test sets that contain counterexamples to these biases. This fragility limits the real-world applicability of these powerful NLU models.

Previous attempts to address this issue often involved training a separate "bias model" with hand-crafted features or using a pre-trained model as a bias detector. These methods typically required additional training stages or manual feature engineering. This paper aims to provide a simpler, more integrated solution.

Methods

The core of the proposed framework is the simultaneous, end-to-end training of two models: the main NLU model and a lightweight "bias model."

  • Main Model: This is a standard Transformer-based encoder (e.g., BERT) with a classification layer on top. It takes input sequences and outputs a probability distribution over classes.
  • Bias Model: This model is designed to identify and exploit dataset biases. It's built using the intermediate representations from a specific layer ($k$) of the main model. It consists of an additive attention mechanism followed by a softmax layer. The attention weights ($a_i$) highlight which token representations are most informative for the bias model's classification.
  • Biased Features Regularization: To prevent the main model from relying on these identified bias features, a noise vector is added to the main model's intermediate representations at layer $k$. The amplitude of this noise for each token is controlled by the attention weights from the bias model, effectively down-weighting representations that the bias model finds informative.
  • Example Reweighting: Both the main and bias models' training samples are re-weighted. The weight for a main model sample ($w_m$) is decreased if the bias model predicts the ground-truth class with high confidence. Conversely, the weight for a bias model sample ($w_b$) is decreased if the main model predicts the ground-truth class with low confidence. This mechanism encourages the bias model to focus on challenging examples and the main model to learn from them.

Crucially, this framework integrates these components into a single training stage, avoiding separate debiasing steps or manual feature engineering.

Datasets

The paper evaluates its method on three sentence-pair classification tasks, each with standard in-distribution (ID) training/validation sets and specific out-of-distribution (OOD) test sets designed to measure robustness to dataset bias:

  • Natural Language Inference (NLI):
    • ID: MNLI (Multi-Genre Natural Language Inference)
    • OOD: HANS (Heuristic Analysis for NLI Systems)
  • Fact Verification:
    • ID: FEVER (Fact Extraction and VERification)
    • OOD: FEVER Symmetric
  • Paraphrase Identification:
    • ID: QQP (Quora Question Pairs)
    • OOD: PAWS (Paraphrase Adversaries from Word Scrambling)

Key Insights and Ideas

  • Simplicity and Integration: The framework's elegance lies in its end-to-end nature. By jointly training the main and bias models, it avoids the complexity of multi-stage training or manual feature engineering, making it more practical.
  • Bias Model as a Feature Detector: The bias model, by learning attention weights over intermediate representations, implicitly identifies which linguistic cues (lexical, syntactic) are being exploited by the main model. This is a powerful insight into why models fail on OOD data.
  • Noise as a Regularizer: Adding noise to the main model's representations, guided by the bias model's attention, is an effective way to "unlearn" reliance on biased features.
  • Mutual Reweighting: The interplay of reweighting samples for both models creates a dynamic training process where each model helps the other improve robustness.
  • Generalizability: The fact that a single configuration of the framework works well across three diverse NLU tasks suggests its potential for generalizing to entirely unseen OOD scenarios.

Key Results

  • Improved OOD Performance: The proposed method consistently improves performance on OOD test sets across all three tasks, often significantly outperforming the baseline BERT model.
  • Balanced Performance: The framework achieves this OOD improvement while maintaining competitive or only slightly degraded performance on the ID development sets.
  • Outperforms Prior Work: On FEVER and HANS, the method achieves the best reported results among the compared debiasing approaches.
  • Ablation Studies:
    • Removing the noise regularization ("w/o noise") leads to a modest OOD gain but a slight ID drop.
  • Disabling main model reweighting ("w/o main reweighting") results in near-baseline performance, highlighting the importance of this mechanism.
  • Disabling bias model reweighting ("w/o bias reweighting") leads to the worst performance, indicating that properly training the bias model itself is crucial.
  • Example: On the FEVER task, the method achieved 85.7% accuracy on the OOD test set compared to the baseline's 62.4%.

Limitations and Future Work

  • Hyperparameter Tuning: While the framework is end-to-end, it still requires tuning hyperparameters like the layer $k$ for the bias model, and the thresholds $\gamma$ and $\beta$ for reweighting. The authors note that these parameters are tuned on OOD sets, which is not ideal but a common practice.
  • Hyperparameter Free Future: The authors suggest making the method hyper-parameter free as a future direction.
  • Proxy OOD Data: Exploring methods to obtain proxy OOD data for hyper-parameter selection is also mentioned.
  • Broader Task Applicability: Future work could involve testing the approach on other NLU tasks, such as Question Answering.
  • Bias Identification: The authors suggest further exploring methods to obtain proxy OOD data for hyper-parameter selection and making the method hyper-parameter free.

Summary updated

BibTeX
@inproceedings{ghaddar2021end,
  author = {Abbas Ghaddar and Philippe Langlais and Mehdi Rezagholizadeh and Ahmad Rashid},
  title = {{End-to-End Self-Debiasing Framework for Robust NLU Training}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  url = {https://openreview.net/forum?id=iMIC-7tfUgB},
}
Figure