Investigating the Effect of Natural Language Explanations on Out-of-Distribution Generalization in Few-shot NLI

Yangqiaoyu Zhou, Chenhao TanarXiv 2021

Introduction

Natural Language Inference (NLI) models have achieved remarkable performance on standard benchmarks. However, their robustness is often superficial; they frequently rely on "spurious patterns"—statistical shortcuts in training data—rather than genuine logical reasoning. This fragility becomes evident when models are tested on out-of-distribution (OOD) datasets like HANS (Heuristic Analysis for NLI Systems), where performance often collapses to near-random levels.

This study investigates whether providing natural language explanations (NLEs) can serve as a "bridge" to improve OOD generalization in few-shot settings. The hypothesis is that learning to explain reasoning might help models internalize the underlying logic of OOD data more effectively than labels alone.

Methodology: The EXPLAINTHENPREDICT Framework

The researchers utilize an EXPLAINTHENPREDICT pipeline consisting of two distinct stages:

  1. Explanation Generation: An encoder-decoder model (BERT-based) generates a natural language explanation given a premise and hypothesis.
  2. Classification: A BERT-based classifier receives the original input concatenated with the generated explanation to predict the final label (Entailment or Non-entailment).

The experiments were conducted in a few-shot learning environment, varying the number of samples per template ($k \in \{1, 2, 4, 8, 16\}$). Robustness was evaluated by categorizing test sets based on whether the vocabulary (IND/OOD vocab) and logical structure (IND/OOD template) were seen during training.

Datasets and the E-HANS Contribution

The study leverages several key datasets:

  • HANS: A diagnostic dataset designed to expose heuristic-based failures in NLI models.
  • E-SNLI: An extension of SNLI featuring human-annotated explanations.
  • E-HANS: A primary contribution of this work. The authors augmented HANS by manually constructing high-quality, templated natural language explanations for all 30 HANS subcases.

The BLEU Paradox

A central finding of the research is the "BLEU Paradox." As shown in Figure 1, the generation models achieved high BLEU scores, particularly on in-distribution templates and vocabularies, with scores often exceeding 90.

BLEU scores for generated explanations across different training sizes, templates, and vocabularies.

Despite these high scores, the explanations failed to improve predictive performance. In nearly every scenario, a "Label-Only" baseline outperformed the explanation-augmented model. This suggests that high surface-level similarity to ground-truth text (as measured by BLEU) does not necessarily correlate with the logical utility of the explanation for a downstream classifier.

Analysis of Failure Modes

The failure of NLEs to aid generalization can be attributed to several factors:

Hallucination

Models frequently "hallucinated" entities—such as professions or locations—that were absent from the input. For instance, a model might replace "analysts" with "artisans" in its explanation. Without E-SNLI pre-training, hallucination rates in OOD vocabulary cases reached a staggering 99%. While pre-training mitigated this, the core issue of noise introduction remained.

Logical Recall

Models struggled to capture the specific logic required for "non-entailment" in HANS, which often relies on expressing ambiguity (e.g., "we do not know if X happened"). The failure to generate these critical uncertainty phrases led to a breakdown in the reasoning chain.

Information Gap

Interestingly, when the classifier was provided with human-written (ground truth) explanations at test time, performance improved significantly. This indicates that the necessary information for correct labeling exists within the explanations; however, the generation models are currently unable to capture and transmit this information reliably.

Conclusion and Future Directions

The results are sobering: current few-shot NLE generation hinders rather than helps OOD generalization in NLI. The "BLEU Paradox" highlights the need for evaluation metrics that prioritize logical consistency and faithfulness over n-gram overlap.

Future research should focus on developing evaluation methods that measure how well an explanation supports the predicted label and exploring joint training of generators and classifiers to ensure explanations are task-relevant.

Summary updated

BibTeX
@misc{zhou2021investigating,
  author = {Yangqiaoyu Zhou and Chenhao Tan},
  title = {{Investigating the Effect of Natural Language Explanations on Out-of-Distribution Generalization in Few-shot NLI}},
  year = {2021},
  eprint = {2110.06223},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.06223},
}
Figure