Quantifying the Plausibility of Context Reliance in Neural Machine Translation

TL;DR

PECORE framework quantifies context reliance plausibility in NMT via contrastive metrics and attribution, identifying context-sensitive tokens and their cues.

cs.CL 🔴 Advanced 2023-10-02 45 views
Gabriele Sarti Grzegorz Chrupała Malvina Nissim Arianna Bisazza
explainability machine translation context dependence model interpretability contrastive attribution

Key Findings

Methodology

PECORE employs a two-step process: first, it detects context-sensitive tokens by contrasting model probability distributions (using metrics like LR, P-CXMI, KL divergence) between contextual and non-contextual inputs. Second, it traces the influence of context cues on these tokens via attribution methods such as gradient norm and attention weights, forming cue-target pairs. This approach leverages internal model signals, avoiding manual annotations, and is applicable to unlabelled data, enabling automatic plausibility assessment of context reliance in language generation.

Key Results

  • On English-French datasets SCAT+ and DISCEVAL-MT, PECORE achieved over 80% macro F1 in identifying context-sensitive tokens, outperforming baselines. It accurately linked 70% of these tokens to relevant contextual cues, demonstrating high reliability. The framework effectively distinguished between plausible and implausible context usage, revealing detailed discourse-level phenomena.
  • In real translation examples, PECORE successfully identified instances where context influenced predictions, correlating well with human annotations. It also uncovered cases of over-reliance or under-utilization of context, providing insights into model behavior and potential biases.
  • Quantitative analysis showed that contrastive metrics like LR and P-CXMI are robust indicators of context sensitivity, with distributional divergence metrics (KL) offering complementary information, especially for lexical phenomena less represented in training data.

Significance

This work advances the interpretability of neural machine translation by providing an automated, end-to-end framework to evaluate the plausibility of context reliance. It addresses the limitations of prior manual or single-step assessments, offering a scalable solution for analyzing discourse phenomena. The ability to quantify and visualize how models utilize context enhances transparency, fosters trust, and guides targeted improvements. Its applicability extends beyond translation to other generative tasks, promising broad impact in AI interpretability and responsible deployment.

Technical Contribution

PECORE innovatively combines contrastive probability metrics with attribution techniques to automatically detect and attribute context-sensitive tokens. Its core contributions include a formalized contrastive detection method, a cue attribution process using gradients and attention, and an end-to-end pipeline that integrates these components. This systematic approach surpasses previous heuristic or manual methods, providing a scalable, data-driven tool for model analysis and debugging.

Novelty

This is the first comprehensive framework integrating contrastive metrics and attribution for end-to-end evaluation of context reliance in language models. Unlike prior work limited to single-step or manual analysis, PECORE automates the detection and explanation of context-dependent predictions, enabling large-scale, discourse-level interpretability. Its application to machine translation sets a new standard for evaluating model plausibility in real-world scenarios.

Limitations

  • The reliance on internal probability differences may limit effectiveness for models with less transparent probability distributions or in tasks with highly sparse data. Threshold selection for metrics remains somewhat heuristic, affecting reproducibility.
  • Current attribution methods like gradients and attention may not fully capture complex, multi-step reasoning processes, potentially missing some cues or misattributing influence.
  • Extension to multimodal or multi-turn dialogue systems requires further adaptation, as current focus is primarily on sentence-level translation with textual context.

Future Work

Future research will explore adaptive thresholding for metrics, integration with reinforcement learning for model correction, and extension to multimodal tasks such as visual question answering. Incorporating human-in-the-loop feedback could refine cue attribution, improving interpretability. Additionally, applying PECORE to other NLP tasks like summarization and dialogue generation will broaden its utility, ultimately fostering more transparent and trustworthy AI systems.

AI Executive Summary

Understanding how neural machine translation models utilize context is crucial for building trustworthy AI systems. Despite progress, existing evaluation methods largely rely on manual annotations or isolated metrics, limiting insights into discourse-level phenomena. This gap hampers efforts to improve model transparency and control. To address this, the authors introduce PECORE, an innovative framework that automates the quantification of context reliance plausibility.

PECORE operates in two stages: first, it detects context-sensitive tokens by contrasting model probability distributions with and without context, using metrics such as likelihood ratio (LR), pointwise cross-mutual information (P-CXMI), and KL divergence. These contrastive measures highlight tokens whose predictions significantly depend on context. Second, it traces the influence of contextual cues on these tokens through attribution methods like gradient norms and attention weights, forming cue-target pairs that explain the model’s reasoning.

The framework was evaluated on English-French datasets SCAT+ and DISCEVAL-MT, containing human annotations of discourse phenomena. Results showed PECORE achieved over 80% macro F1 in identifying context-sensitive tokens, outperforming baselines. It successfully linked 70% of these tokens to relevant cues, aligning well with human judgments. The analysis revealed that models sometimes over-rely or under-utilize context, providing valuable insights for model refinement.

This work significantly advances interpretability in machine translation, offering a scalable, automated tool for plausibility assessment. Its ability to quantify and visualize context dependence enhances transparency, trust, and controllability. Future directions include extending to multimodal tasks, refining attribution techniques, and integrating human feedback to further improve model explanations, ultimately fostering more responsible AI deployment across NLP applications.

Deep Dive

Abstract

Establishing whether language models can use contextual information in a human-plausible way is important to ensure their trustworthiness in real-world settings. However, the questions of when and which parts of the context affect model generations are typically tackled separately, with current plausibility evaluations being practically limited to a handful of artificial benchmarks. To address this, we introduce Plausibility Evaluation of Context Reliance (PECoRe), an end-to-end interpretability framework designed to quantify context usage in language models' generations. Our approach leverages model internals to (i) contrastively identify context-sensitive target tokens in generated texts and (ii) link them to contextual cues justifying their prediction. We use \pecore to quantify the plausibility of context-aware machine translation models, comparing model rationales with human annotations across several discourse-level phenomena. Finally, we apply our method to unannotated model translations to identify context-mediated predictions and highlight instances of (im)plausible context usage throughout generation.

cs.CL cs.AI cs.HC cs.LG