Skip to main content
QUICK REVIEW

[Paper Review] Wat zei je? Detecting Out-of-Distribution Translations with Variational Transformers

Tim Z. Xiao, Aidan N. Gomez|arXiv (Cornell University)|Jun 8, 2020
Natural Language Processing TechniquesComputer Science35 references19 citations
TL;DR

This paper proposes BLEUVar, a novel uncertainty measure for Neural Machine Translation (NMT) that detects out-of-distribution (OOD) inputs using variational inference with dropout in Transformer models. By estimating epistemic uncertainty through predictive variance over sampled translations, BLEUVar effectively identifies Dutch sentences (with German-like vocabulary) as OOD inputs, achieving high detection performance on WMT13 and Europarl datasets.

ABSTRACT

We detect out-of-training-distribution sentences in Neural Machine Translation using the Bayesian Deep Learning equivalent of Transformer models. For this we develop a new measure of uncertainty designed specifically for long sequences of discrete random variables -- i.e. words in the output sentence. Our new measure of uncertainty solves a major intractability in the naive application of existing approaches on long sentences. We use our new measure on a Transformer model trained with dropout approximate inference. On the task of German-English translation using WMT13 and Europarl, we show that with dropout uncertainty our measure is able to identify when Dutch source sentences, sentences which use the same word types as German, are given to the model instead of German.

Motivation & Objective

  • To address the lack of uncertainty estimation in state-of-the-art NMT models, particularly for detecting out-of-distribution (OOD) inputs.
  • To develop a scalable uncertainty measure tailored for long sequences of discrete outputs, such as translated sentences.
  • To enable selective classification in NMT by identifying low-confidence, potentially erroneous translations for human review.
  • To evaluate whether model uncertainty correlates with translation quality and OOD detection performance.
  • To extend Bayesian deep learning tools from computer vision to natural language processing, specifically sequence modeling in translation.

Proposed method

  • Proposes BLEUVar, a new uncertainty measure based on the variance of BLEU scores computed over multiple stochastic forward passes during decoding.
  • Applies dropout approximate inference in a Transformer model to generate diverse, uncertain predictions for the same input.
  • Uses Monte Carlo sampling of model weights during inference to estimate predictive uncertainty over output sequences.
  • Employs variational inference to approximate the true posterior over model weights, enabling uncertainty quantification without full Bayesian training.
  • Combines predictive sampling with BLEU score aggregation to create a differentiable, sequence-level uncertainty proxy.
  • Trains a standard Transformer with dropout and uses the resulting predictive variance as a proxy for epistemic uncertainty.

Experimental results

Research questions

  • RQ1Can a Bayesian deep learning approach effectively estimate epistemic uncertainty in sequence-to-sequence NMT models?
  • RQ2Does the proposed uncertainty measure BLEUVar correlate with mistranslations and OOD inputs in real-world translation scenarios?
  • RQ3How does the uncertainty estimate perform in detecting Dutch sentences (with German-like lexicon) when given as input to a German-English NMT model?
  • RQ4Can uncertainty estimation improve model reliability by enabling selective classification or human-in-the-loop translation?
  • RQ5How does the uncertainty measure behave across varying sentence lengths and linguistic structures?

Key findings

  • BLEUVar successfully detects out-of-distribution Dutch sentences that use German-like vocabulary when fed into a German-English NMT model.
  • The model's uncertainty, as measured by BLEUVar, correlates strongly with translation quality, with high uncertainty indicating likely mistranslations.
  • On the WMT13 and Europarl datasets, BLEUVar identifies OOD inputs with high reliability, even when the input sentences are linguistically plausible but distributionally out of domain.
  • The method outperforms deterministic Transformers in identifying uncertain or incorrect translations, particularly for OOD inputs.
  • The uncertainty estimate remains robust across varying sentence lengths, though longer sequences show slightly increased variance in uncertainty scores.
  • BLEUVar demonstrates potential for bias detection, as biased training data may lead to OOD inputs that are flagged by the uncertainty measure.

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.