- 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 (W1​) 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 W1​ distances expose three core functional zones:
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: Mean W1​ concentration sWTU​ per decoder layer, highlighting peak selectivity at the final layer.
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.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: 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: 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: 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: Concentration trajectory by decoding step; hallucinations are compressed and lack the exploratory dip seen in correct outputs.
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: Cross-attention concentration c(â„“) by decoder layer in T5-base, establishing Layer 3 as a global peak.
Figure 9: Concentration by ROUGE-L quality group; no significant differences across layers, confirming OT-insensitivity to content misuse.
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 W1​ 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.