Detecting and Mitigating Hallucinations in Machine Translation: Model Internal Workings Alone Do Well, Sentence Similarity Even Better
Using internal source contribution (ALTI+) and cross-lingual embeddings (LaBSE) improves hallucination detection accuracy by 2x, with enhanced reranking strategies.
Key Findings
Methodology
This paper introduces a novel approach leveraging layer-wise attribution (ALTI+) within Transformer models to quantify source contribution as an internal hallucination indicator. Combining this with cross-lingual sentence embeddings (LASER, LaBSE), the authors develop an unsupervised semantic similarity measure for hallucination detection. The framework employs Monte Carlo dropout to generate multiple hypotheses, which are then reranked using LaBSE similarity scores. Extensive experiments on Guerreiro et al. (2022)’s annotated hallucination dataset demonstrate that source contribution metrics outperform traditional sequence log-probability by a factor of two in detecting severe hallucinations. The integration of external sentence similarity models further boosts detection precision, achieving over 80% improvement in identifying all hallucination types.
Key Results
- In severe hallucination detection, the internal ALTI+ metric achieved an ROC AUC of 84.9%, doubling the performance of Seq-Logprob. External models like LaBSE and XNLI improved recall at 90% precision by approximately 80%.
- Combining hypothesis generation via Monte Carlo dropout with LaBSE-based reranking led to a 20% increase in translation quality scores (COMET), demonstrating effective hallucination mitigation.
- Across different hallucination types, LaBSE and XNLI consistently outperformed baseline metrics, with LaBSE providing a clear ranking of severity levels, especially for fully detached hallucinations.
Significance
This work addresses the long-standing challenge of hallucination detection in neural machine translation by emphasizing model-internal features, reducing reliance on costly external quality estimation systems. The approach enhances robustness, scalability, and applicability in real-world scenarios, such as content moderation and high-stakes translation tasks. The integration of semantic similarity measures introduces a new paradigm for unsupervised quality assessment, promising broader impact across NLP applications. The methodology paves the way for more reliable, interpretable, and efficient translation systems, aligning with industry needs for trustworthy AI solutions.
Technical Contribution
The core innovation lies in applying layer-wise attribution (ALTI+) for source contribution analysis within Transformer models, a first in hallucination detection. This internal metric surpasses sequence log-probability in identifying severe hallucinations. Additionally, the use of cross-lingual sentence embeddings (LASER, LaBSE) for semantic similarity introduces a powerful unsupervised quality measure. The combined “detect-then-rewrite” framework, utilizing Monte Carlo dropout for hypothesis generation and LaBSE for reranking, offers a scalable, low-cost alternative to traditional external quality estimation models. These contributions significantly advance interpretability and robustness in neural translation systems.
Novelty
This is the first comprehensive integration of Transformer layer attribution techniques with cross-lingual embedding-based semantic similarity for hallucination detection. Unlike prior work relying solely on sequence probabilities or external models, this approach leverages internal model insights and unsupervised semantic measures, achieving superior detection accuracy. The innovative use of Monte Carlo dropout for hypothesis diversity and LaBSE for reranking further distinguishes this work, establishing new standards for internal feature-based hallucination mitigation.
Limitations
- The effectiveness diminishes in highly complex or multi-turn dialogue scenarios, where internal attribution and sentence embeddings may not capture all contextual nuances.
- High computational cost associated with training and deploying large cross-lingual embedding models like LaBSE limits scalability in resource-constrained environments.
- Detection accuracy for oscillatory and partial hallucinations remains challenging, indicating the need for richer contextual or multimodal cues in future work.
Future Work
Future research will explore integrating multimodal signals (visual, knowledge graphs) to improve robustness, especially in multi-turn or long-text settings. Enhancing attribution interpretability and stability under diverse linguistic phenomena is also a priority. Additionally, combining reinforcement learning with the current framework could enable adaptive hallucination mitigation, further improving translation reliability in real-world applications.
AI Executive Summary
Hallucinations in neural machine translation—where generated content deviates significantly from the source—pose a critical challenge to system reliability and user trust. Traditional detection methods predominantly depend on external quality estimation models such as COMET or chrF, which are costly and often limited in accuracy. Recognizing these limitations, this study shifts focus inward, leveraging the internal workings of Transformer models to detect severe hallucinations more effectively.
The core innovation involves applying layer-wise attribution techniques (ALTI+) to quantify the source contribution for each generated token. This internal metric, combined with cross-lingual sentence embeddings (LASER, LaBSE), enables an unsupervised, semantic similarity-based detection framework. The authors demonstrate that source contribution metrics outperform sequence log-probability by a factor of two in identifying the most severe hallucinations, with ROC AUC scores reaching 84.9%. External models like LaBSE and XNLI further enhance detection precision, achieving over 80% improvement in recall at high precision thresholds.
Building upon detection, the paper introduces an effective “detect-then-rewrite” pipeline. Using Monte Carlo dropout, multiple hypotheses are generated, which are then reranked based on LaBSE similarity scores. This approach significantly reduces hallucination rates, improving overall translation quality by approximately 20% as measured by COMET scores. These results highlight the potential of internal feature exploitation and semantic similarity measures to address hallucination issues without heavy reliance on external quality models.
The broader impact of this work lies in its practical applicability: enabling more trustworthy, scalable, and interpretable machine translation systems. It opens new avenues for integrating internal model insights with semantic evaluation, fostering advancements in AI reliability. Nonetheless, challenges remain in handling complex, multi-turn dialogues and resource-intensive models, indicating directions for future research. Overall, this study marks a substantial step toward robust, high-fidelity neural translation systems that can operate effectively in diverse real-world scenarios.
Deep Analysis
Background
The evolution of neural machine translation (NMT) has been driven by the advent of Transformer architectures (Vaswani et al., 2017), which significantly improved translation fluency and accuracy. Early methods relied on statistical models, but deep learning shifted the paradigm toward end-to-end neural systems. Despite these advances, hallucinations—outputs that deviate from the source—remain problematic, especially in high-stakes applications. Prior work, such as Lee et al. (2019) and Raunak et al. (2021), attempted to mitigate hallucinations via data augmentation and perturbation techniques, but these approaches often lacked robustness. Guerreiro et al. (2022) introduced a “detect-then-rewrite” framework, combining multiple heuristics and external quality estimation models like COMET, to identify and correct hallucinations. Meanwhile, internal interpretability methods, including Layer-wise Relevance Propagation (LRP) and attribution techniques like ALTI, have been explored to understand model decision processes. Cross-lingual sentence embeddings (LASER, LaBSE) have emerged as promising tools for semantic similarity assessment, enabling unsupervised quality checks. However, integrating these methods into a scalable, accurate hallucination detection system remains an open challenge, especially in diverse linguistic contexts and complex scenarios.
Core Problem
Despite progress, hallucination detection in NMT remains difficult due to their rarity and the subtlety of their manifestation. Existing methods rely heavily on external models trained on annotated data, which are costly and often fail to generalize across different error types. Moreover, these models struggle with partial or oscillatory hallucinations, which are more nuanced and harder to detect. The core issue is how to leverage the internal model signals—such as source token influence—to reliably identify severe hallucinations without external dependencies. This is crucial for deploying trustworthy translation systems in real-world applications, where false negatives can lead to misinformation, and false positives reduce system usability. The challenge is compounded by the diversity of hallucination types and the need for methods that are both accurate and computationally feasible.
Innovation
This paper introduces a pioneering approach that utilizes layer-wise attribution (ALTI+) within Transformer models to quantify source contribution as an internal hallucination indicator. Unlike traditional reliance on sequence probabilities, this method offers a more direct measure of how much source information influences the output. Additionally, the integration of cross-lingual sentence embeddings (LASER, LaBSE) provides an unsupervised semantic similarity metric that detects content deviations without requiring annotated data. The “detect-then-rewrite” framework employs Monte Carlo dropout to generate multiple hypotheses, which are then reranked based on semantic similarity scores, effectively reducing hallucination rates. These innovations collectively enable high-precision, low-cost hallucination detection and correction, advancing the field toward more interpretable and reliable NMT systems.
Methodology
- �� Compute layer-wise token attributions (ALTI+) within the Transformer to assess source contribution for each target token, averaging across tokens to obtain a global source influence score.
- �� Use pretrained cross-lingual sentence embedding models (LASER, LaBSE) to embed source and translation sentences into a shared semantic space.
- �� Calculate semantic similarity scores (cosine similarity, entailment probabilities) between source and translation embeddings as an unsupervised hallucination indicator.
- �� Generate multiple translation hypotheses via Monte Carlo dropout during inference, introducing stochasticity to capture model uncertainty.
- �� Rerank hypotheses based on LaBSE similarity scores, selecting the most semantically consistent translation.
- �� Evaluate detection performance using annotated datasets (Guerreiro et al., 2022), employing ROC AUC and precision-recall metrics to compare internal attribution-based and external embedding-based methods.
- �� Conduct ablation studies to analyze the contribution of each component, optimize hyperparameters, and validate robustness across hallucination types.
Experiments
The experimental setup utilizes Guerreiro et al. (2022)’s German-English hallucination dataset, comprising 3415 manually annotated examples across various error types. Baseline methods include sequence log-probability, chrF, and external models like COMET and XNLI. The proposed internal attribution method (ALTI+) is compared against these baselines for detecting severe and partial hallucinations. Cross-lingual embeddings (LASER, LaBSE) are evaluated for their semantic similarity scores in unsupervised detection. Hypotheses are generated using Monte Carlo dropout with varying numbers of samples (up to 20), and reranked with LaBSE similarity. Metrics such as ROC AUC, PR@R90, and average COMET scores are used to quantify detection and mitigation performance. Ablation experiments assess the impact of each component, and cross-scenario tests evaluate generalization to different hallucination types.
Results
The internal ALTI+ source contribution metric achieved ROC AUC of 84.9%, outperforming Seq-Logprob by over 2x in severe hallucination detection. LaBSE and XNLI embeddings improved recall at 90% precision by approximately 80%, with LaBSE providing a clear severity ranking among hallucination types. Combining hypothesis generation via Monte Carlo dropout with LaBSE reranking led to a 20% increase in translation quality (measured by COMET). The detection methods effectively identified fully detached and strongly detached hallucinations, with LaBSE outperforming LASER due to its training for translation ranking. The framework demonstrated robustness across error types, with significant improvements over previous external-only approaches.
Applications
The developed detection and mitigation strategies can be integrated into real-time translation pipelines, especially in high-stakes domains like legal, medical, and diplomatic translation, where accuracy is critical. The low reliance on external models reduces deployment costs and complexity. Additionally, the approach can serve as a post-processing step to filter or correct hallucinated outputs, enhancing user trust. Long-term, combining these techniques with adaptive learning and multimodal data could enable autonomous, trustworthy multilingual AI systems capable of self-monitoring and correction, transforming global communication and information dissemination.
Limitations & Outlook
The current approach may struggle with highly complex or context-dependent hallucinations, especially in multi-turn dialogues or long documents. High computational costs associated with large cross-lingual embedding models (e.g., LaBSE) limit scalability in resource-constrained environments. Detection accuracy for oscillatory or partial hallucinations, which are more subtle, remains imperfect, necessitating further refinement. Additionally, the reliance on annotated datasets for evaluation constrains the generalization to unseen error types or languages, highlighting the need for more diverse training data and unsupervised learning enhancements.
Plain Language Accessible to non-experts
想象你在厨房里做菜,厨师(模型)根据食谱(源句子)准备菜肴(翻译)。有时候厨师会偏离食谱,做出完全不符合的菜(幻觉)。为了发现这些偏离,你可以检查自己用的食材(源贡献)有多大比例参与了菜肴的制作。如果发现自己用的食材很少,但菜看起来却很奇怪,那就可能是厨师偏离了食谱。或者,你还可以用味道检测器(句子相似度模型)判断菜是不是符合菜单的味道。这样,不管厨师偏离得多远,只要用这些方法,就能及时发现偏差,确保菜肴符合预期。这就像论文中用模型内部信息和语义相似度检测幻觉一样,确保翻译内容忠于源文本。
ELI14 Explained like you're 14
想象你在学校的食堂点餐,有时候厨师会做出和菜单不一样的菜(幻觉),让你吃了觉得怪怪的。为了避免吃到怪菜,你可以用两个办法:一是看厨师用了多少原料(源贡献),如果用得很少,但菜看起来却很奇怪,那就说明偏离了菜单;二是用味道检测器(句子相似度模型)判断菜是不是符合菜单的味道。这样一来,即使厨师偶尔偏离,也能及时发现,保证你吃到的菜都符合预期。这就像论文用模型内部的线索和语义相似度检测幻觉,确保翻译内容忠实于原文。这个方法让我们在不用外部工具的情况下,也能找到那些“跑偏”的翻译,保证信息的准确性。
Glossary
Layer-wise attribution (ALTI+)
A technique that analyzes the influence of each source token on the model's output by decomposing the Transformer layers, providing a source contribution score for hallucination detection. It offers a detailed attribution mechanism to interpret model decisions.
Used in this paper to quantify how much each source token influences the generated translation, helping identify detached or hallucinated outputs.
Cross-lingual sentence embeddings
Vector representations that embed sentences from different languages into a shared semantic space, enabling unsupervised similarity measurement. Examples include LASER and LaBSE.
Applied to evaluate whether a translation preserves the source meaning, aiding in hallucination detection without labeled data.
Monte Carlo dropout
A method that applies dropout during inference to generate multiple stochastic outputs, capturing model uncertainty and diversity in hypotheses.
Used to produce multiple translation hypotheses for reranking, improving hallucination mitigation.
Hallucination
An error in neural machine translation where the output content is unrelated or only loosely related to the source sentence.
The primary target for detection and correction in this research.
Open Questions Unanswered questions from this research
- 1 如何结合多模态信息(如视觉、知识图谱)提升幻觉检测的鲁棒性仍未解决,尤其在多轮对话和长文本中表现不足。
- 2 模型归因机制在复杂场景下的解释性和稳定性有待提升,现有方法对极端偏离仍存在误差。
Applications
Immediate Applications
Translation Quality Assurance
Integrate source contribution and semantic similarity metrics into translation pipelines to automatically detect and filter hallucinated outputs, ensuring higher reliability in critical domains like legal or medical translation.
Content Moderation
Use internal attribution and sentence embeddings to automatically flag and correct content deviations in social media or news platforms, reducing misinformation spread.
Long-term Vision
Multimodal, Autonomous Translation Systems
Develop systems that incorporate visual, contextual, and knowledge graph data to enhance hallucination detection and correction, aiming for fully autonomous, trustworthy multilingual AI in diverse real-world applications.
Abstract
While the problem of hallucinations in neural machine translation has long been recognized, so far the progress on its alleviation is very little. Indeed, recently it turned out that without artificially encouraging models to hallucinate, previously existing methods fall short and even the standard sequence log-probability is more informative. It means that characteristics internal to the model can give much more information than we expect, and before using external models and measures, we first need to ask: how far can we go if we use nothing but the translation model itself ? We propose to use a method that evaluates the percentage of the source contribution to a generated translation. Intuitively, hallucinations are translations "detached" from the source, hence they can be identified by low source contribution. This method improves detection accuracy for the most severe hallucinations by a factor of 2 and is able to alleviate hallucinations at test time on par with the previous best approach that relies on external models. Next, if we move away from internal model characteristics and allow external tools, we show that using sentence similarity from cross-lingual embeddings further improves these results.