[Paper Review] Supervising Model Attention with Human Explanations for Robust Natural Language Inference
This paper proposes a method to improve natural language inference (NLI) model robustness by supervising attention mechanisms using human-generated explanations from the e-SNLI dataset. By encouraging models to focus more on words highlighted in explanations—particularly content words like nouns and verbs—it achieves state-of-the-art performance on SNLI and improved generalization to out-of-distribution datasets, while also making attention more interpretable and less biased toward stop-words and punctuation.
Natural Language Inference (NLI) models are known to learn from biases and artefacts within their training data, impacting how well they generalise to other unseen datasets. Existing de-biasing approaches focus on preventing the models from learning these biases, which can result in restrictive models and lower performance. We instead investigate teaching the model how a human would approach the NLI task, in order to learn features that will generalise better to previously unseen examples. Using natural language explanations, we supervise the model's attention weights to encourage more attention to be paid to the words present in the explanations, significantly improving model performance. Our experiments show that the in-distribution improvements of this method are also accompanied by out-of-distribution improvements, with the supervised models learning from features that generalise better to other NLI datasets. Analysis of the model indicates that human explanations encourage increased attention on the important words, with more attention paid to words in the premise and less attention paid to punctuation and stop-words.
Motivation & Objective
- To address the poor generalization of NLI models to out-of-distribution data by teaching them to emulate human reasoning rather than relying on dataset biases.
- To improve both in-distribution and out-of-distribution performance by incorporating human explanations as supervision for attention mechanisms.
- To reduce hypothesis-only bias by encouraging models to attend more to premise words and less to stop-words and punctuation.
- To create more interpretable attention patterns that align with human-identified important words in premise-hypothesis pairs.
Proposed method
- Introduce a contrastive loss term to supervise the attention weights of the [CLS] token in DeBERTa’s self-attention layers, encouraging higher attention on words present in human explanations.
- Apply supervision to the topmost self-attention layer, with a separate attention mechanism trained to align with explanation-relevant words.
- Adapt a method from Pruthi et al. (2020) that uses attention-based fusion of explanations, testing its efficacy in the NLI setting.
- Use the e-SNLI dataset’s free-text explanations to identify important words in each premise-hypothesis pair, forming a supervision signal for attention.
- Train models with a combination of NLI classification loss and explanation-based attention regularization, using multiple attention heads for ablation.
- Evaluate attention patterns via PoS tagging and word frequency analysis to assess shifts in attention toward content words and away from function words.
Experimental results
Research questions
- RQ1Can supervising model attention with human explanations improve both in-distribution and out-of-distribution performance in NLI?
- RQ2Does attention supervision based on human explanations lead to more interpretable and human-aligned attention patterns?
- RQ3How does attention distribution shift when models are trained to attend to explanation-relevant words, particularly in terms of part-of-speech tags?
- RQ4Can attention supervision reduce the hypothesis-only bias observed in standard NLI models?
- RQ5Does using fewer supervised attention heads still yield significant improvements, and what does this imply about attention transfer across layers?
Key findings
- Supervising 12 attention heads in the top layer increased the [CLS] token’s attention on the premise from 22.86% to 50.89%, significantly improving generalization.
- Even with only 3 heads supervised, the previous layer’s attention on the premise rose to 54.8%, indicating that supervision propagates to lower layers.
- The supervised model attended more to nouns (46% of highlighted words), verbs, and adjectives, while reducing attention on punctuation, determiners, and stop-words.
- The model achieved a new state-of-the-art result on the SNLI benchmark when combined with DeBERTa, outperforming prior methods.
- Attention weights in the supervised model effectively predicted which words would appear in human explanations, matching performance of specialized explanation-prediction models.
- The method improved performance on SNLI-hard, a challenging out-of-distribution set, confirming better robustness to distribution shift.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.