Skip to main content
QUICK REVIEW

[Paper Review] Uncertainty-Aware Natural Language Inference with Stochastic Weight Averaging

Aarne Talman, Hande Çelikkanat|arXiv (Cornell University)|Apr 10, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes uncertainty-aware natural language inference using Stochastic Weight Averaging-Gaussian (SWAG), a Bayesian deep learning method that improves model calibration and generalization. By modeling epistemic uncertainty through Gaussian posterior approximations over model weights, SWAG achieves higher accuracy and significantly better alignment with human annotation disagreements than standard models or SWA alone.

ABSTRACT

This paper introduces Bayesian uncertainty modeling using Stochastic Weight Averaging-Gaussian (SWAG) in Natural Language Understanding (NLU) tasks. We apply the approach to standard tasks in natural language inference (NLI) and demonstrate the effectiveness of the method in terms of prediction accuracy and correlation with human annotation disagreements. We argue that the uncertainty representations in SWAG better reflect subjective interpretation and the natural variation that is also present in human language understanding. The results reveal the importance of uncertainty modeling, an often neglected aspect of neural language modeling, in NLU tasks.

Motivation & Objective

  • Address the lack of uncertainty modeling in NLU tasks, where models typically ignore inherent ambiguity in human language.
  • Investigate whether uncertainty-aware models better reflect human annotation disagreements, which are common in datasets like SNLI and MNLI.
  • Improve model generalization and robustness by leveraging weight averaging and uncertainty calibration in neural network training.
  • Evaluate whether SWAG’s uncertainty estimates correlate more closely with human disagreement than standard models or SWA.
  • Explore the potential of SWAG for identifying noisy annotations in active learning scenarios.

Proposed method

  • Apply Stochastic Weight Averaging (SWA) to average model weights along the optimization trajectory, improving generalization.
  • Extend SWA with SWAG to approximate a Gaussian posterior over model parameters using low-rank plus diagonal covariance matrices.
  • Use Monte Carlo sampling (N=20) from the SWAG posterior during inference to estimate predictive uncertainty via ensemble averaging.
  • Calibrate model predictions using the average of sampled models’ output distributions, improving uncertainty estimation.
  • Train standard transformer-based NLI models (e.g., BERT) with SWA and SWAG, using standard cross-entropy loss.
  • Compare SWAG against baseline models and SWA using accuracy, cross-entropy with annotation distributions, and cross-dataset generalization.

Experimental results

Research questions

  • RQ1How does uncertainty modeling using SWAG affect prediction accuracy and generalization in NLI tasks?
  • RQ2To what extent does the uncertainty estimated by SWAG correlate with human annotation disagreements in SNLI and MNLI?
  • RQ3Does SWAG improve cross-dataset generalization compared to standard models and SWA?
  • RQ4Can SWAG’s uncertainty estimates help identify noisy or inconsistent human annotations?
  • RQ5How do SWAG’s uncertainty representations compare to those of non-Bayesian models in reflecting natural language ambiguity?

Key findings

  • SWAG significantly improves prediction accuracy on SNLI and MNLI, with mean accuracy gains of 1.5–2.5 percentage points over the baseline.
  • In cross-dataset evaluation, SWAG outperforms both baseline and SWA models, showing improved generalization, especially in zero-shot settings.
  • SWAG reduces cross-entropy between predicted and annotation distributions by 0.14–0.33 points compared to the baseline, indicating better calibration to human disagreement.
  • SWAG’s uncertainty estimates show strong alignment with human annotation confusion, as confirmed by qualitative analysis of individual examples.
  • SWAG outperforms SWA in modeling annotation variance, particularly in high-disagreement cases, suggesting better epistemic uncertainty estimation.
  • The results indicate that SWAG can identify instances with high annotation noise, supporting its use in active learning for data filtering.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.