Papers
Topics
Authors
Recent
Search
2000 character limit reached

Layer-Resolved Optimal Transport for Hallucination Detection in NMT and Abstractive Summarization

Published 11 Jun 2026 in cs.CL and cs.LG | (2606.13216v1)

Abstract: Optimal transport (OT) has been shown to detect hallucinations in neural machine translation (NMT) by measuring the geometric distance between cross-attention distributions and a reference distribution, without any supervision. We extend this analysis to all six decoder layers of the Fairseq DE-EN model ($N=3{,}414$), showing that Wass-to-Unif and Wass-to-Data are complementary detectors specialised across hallucination types, that detection is concentrated in layers L1--L4 with L5 anti-predictive for subtler types, and that hallucinated translations lack the exploratory attention phase present in correct translations from the first decoding step. We further evaluate whether the geometric signal transfers to abstractive summarization faithfulness detection: our unsupervised OT detector on AggreFact ($N=1{,}116$) achieves $57.2\%$/$57.6\%$ balanced accuracy on CNN/XSum -- above chance but substantially below supervised MiniCheck-Flan-T5-L($69.9\%$/$74.3\%$). This gap is principled: unlike NMT hallucinations, unfaithful summaries can attend correctly to source tokens while misrepresenting their content, a failure mode invisible to concentration-based OT metrics by construction. Structural experiments on T5-base confirm consistent decoder organisation across depth, with Layer~3 showing peak concentration and Layer~12 being most critical for generation quality. Together, the results establish OT on cross-attention as a reliable detector when the failure mode is source disengagement, a principled interpretability tool regardless of task, and fundamentally limited when faithfulness failures occur downstream of attention.

Summary

  • The paper demonstrates that layer-resolved OT metrics can effectively detect hallucinations by analyzing attention concentration and routing consistency in NMT decoders.
  • The method employs complementary OT metrics—Wass-to-Unif, Wass-to-Data, and Routing Consistency—to distinguish failure modes, achieving AUROCs up to 0.957 in key layers.
  • The study extends the approach to abstractive summarization, revealing promising transferability with limitations for detecting content misrepresentation errors.

Layer-Resolved Optimal Transport for Hallucination Detection in NMT and Abstractive Summarization

Introduction

"Layer-Resolved Optimal Transport for Hallucination Detection in NMT and Abstractive Summarization" (2606.13216) extends prior work on unsupervised hallucination detection in neural machine translation (NMT) using optimal transport (OT) metrics derived from Transformer cross-attention distributions. The study provides a comprehensive, layer-wise analysis of OT attention-based scores in NMT (specifically Fairseq DE-EN) and investigates their transferability for faithfulness detection in abstractive summarization using AggreFact and T5-base architectures. The research offers theoretical and empirical characterization of attention concentration, step-wise attention dynamics, routing consistency, and their correspondence with hallucination failure modes.

OT-Based Metrics for Hallucination Detection

The paper leverages the Wasserstein-1 (W1W_1) distance as a metric between cross-attention distributions and reference distributions (uniform and confirmed-correct), enabling quantification of attention concentration and routing dynamics across decoder layers. The methodology includes several complementary metrics:

  • Wass-to-Unif (WTU): Measures how much attention deviates from uniformity at each layer and decoding step.
  • Wass-to-Data (WTD): Compares per-example distributions to exemplars of confirmed-correct translations, sensitive to global attention shape.
  • Routing Consistency (RC): Captures the entropy of maximal-attended positions across decoding, quantifying the diversity of source routing.

These metrics are computed exactly via cumulative distribution function formulas, sidestepping potential errors from regularized methods.

Layer-Resolved Attention Structure in NMT

The analysis of Fairseq DE-EN reveals distinct architectural regimes. Pairwise layerwise W1W_1 distances expose three core functional zones:

  • L0 (transitional),
  • L1–L4 (tight cluster, homogeneous attention routing),
  • L5 (isolated, highly concentrated and routing-divergent). Figure 1

    Figure 1: Mean pairwise W1W_1 distance matrix D\mathbf{D} for the Fairseq DE-EN decoder, delineating functional groupings and structural isolation.

Concentration profiles reflect a monotonic increase from L1 to L5, with the largest rise at L5 indicating its role in final output commitment. Figure 2

Figure 2: Mean W1W_1 concentration sWTUs_{\mathrm{WTU}} per decoder layer, highlighting peak selectivity at the final layer.

Hallucination Separation and Detection Performance

Statistical analysis demonstrates that hallucinated translations are robustly separated from correct outputs across all OT metrics (mean concentration, step-to-step OT, layer OT, routing consistency), with significance p<0.001p < 0.001. Hallucinations manifest as static, focused attention that locks onto a sparse set of source tokens from the initial decoding step, lacking the exploratory scanning seen in normal translation. Figure 3

Figure 3: OT metric distributions for hallucinated versus confirmed-correct translations, accentuating discriminative concentration and step-OT signals.

WTU achieves peak AUROC for full-unsupport hallucinations at L2–L4 (up to 0.946); performance degrades for strong-unsupport and repetition types, with the final layer becoming anti-predictive for subtler hallucinations. RC provides slightly superior results for full-unsupport cases (aggregate AUROC 0.957 at L2), capturing the extremal pattern of static routing to a single source position across all steps. Figure 4

Figure 4: AUROC of WTU per decoder layer and hallucination type; anti-predictive behavior at L5 for weaker hallucinations is clearly observable.

WTU and WTD serve as complementary detectors: WTU excels for full disengagement scenarios, while WTD is more robust for cases where attention shape similarity (not absolute concentration) is indicative of hallucination. Figure 5

Figure 5: Comparative AUROC tracing for WTD and WTU across layers and hallucination categories; WTD sustains effectiveness even where WTU collapses.

Generation Dynamics: Exploratory and Commitment Phases

Normal sequence generation adopts an identifiable two-phase trajectory: early exploration (low concentration, high step-to-step OT) followed by commitment (rising concentration, reduced dynamic shifts). Hallucinations omit this dynamic, initializing in a focused, static state without exploratory attention, implicating the attention pathology as an early, persistent phenomenon. Figure 6

Figure 6

Figure 6: Concentration trajectory by decoding step; hallucinations are compressed and lack the exploratory dip seen in correct outputs.

Figure 7

Figure 7

Figure 7: Trajectory split between confirmed-correct and hallucinated translations, reinforcing the absence of the exploration phase in pathological outputs.

Transfer to Abstractive Summarization

OT concentration-based detectors are applied to AggreFact, yielding balanced accuracy (BAcc) of 57.2–57.6% on CNN/XSum—above random baseline but substantially below supervised MiniCheck-Flan-T5-L (69.9%/74.3%). The performance gap aligns with task-specific failure modes: summarization errors frequently result from content misrepresentation downstream of attention alignment, rather than source disengagement.

Structural Analysis of T5-Base Decoder

T5-base attention concentration exhibits an architectural peak at Layer 3, with Layer 12 recognized as most critical to generation quality (ablation-induced ROUGE-L drop of 0.96). Layers 9–11 are functionally redundant, evidenced by ablation-improved scores. This structure is confirmed across OT metrics and ablation studies, pointing to unified early context-encoding blocks and decisive output layers in both Fairseq and T5 architectures. Figure 8

Figure 8: Cross-attention concentration c(â„“)c(\ell) by decoder layer in T5-base, establishing Layer 3 as a global peak.

Figure 9

Figure 9: Concentration by ROUGE-L quality group; no significant differences across layers, confirming OT-insensitivity to content misuse.

Figure 10

Figure 10: ROUGE-L distribution in T5-base summarization, with HIGH/LOW bins highlighting indistinguishability via concentration metrics.

Practical and Theoretical Implications

The results underscore that OT-based detectors are principled and reliable when hallucination arises from source disengagement. The framework offers a domain-agnostic interpretability tool that structurally reveals attention mechanics without supervision. However, its utility is fundamentally capped where failure modes stem from content misuse, emphasizing theoretical limitations in broader faithfulness detection. Future research directions include token-level (head-specific) OT analysis, application to larger and more instruction-tuned models, and fusion with NLI-based detectors for comprehensive content verification.

Conclusion

Layer-wise OT analysis robustly discriminates disengagement-based hallucinations in NMT and elucidates architectural organization in Transformer decoders. The OT signal partially transfers to summarization, constrained by task-dependent error types. The combination of exact W1W_1 metrics, routing consistency, and structural ablation forms a powerful diagnostic toolkit for model interpretability, offering detailed insight into causal mechanisms of attention allocation and decoding dynamics. For tasks with faithfulness failures downstream of attention, alternative or hybrid approaches will be required to bridge the detection gap.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 5 likes about this paper.