← Latest papers
💬 NLP

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

This paper extends layer-resolved optimal transport analysis of cross-attention distributions to detect hallucinations in neural machine translation and abstractive summarization, demonstrating its effectiveness in identifying source disengagement while highlighting its inherent limitations in detecting faithfulness failures where attention remains correct but content is misrepresented.

Original authors: Mariia Onyshchuk, Maksym-Vasyl Tarnavskyi, Marta Sumyk

Published 2026-06-12
📖 5 min read🧠 Deep dive

Original authors: Mariia Onyshchuk, Maksym-Vasyl Tarnavskyi, Marta Sumyk

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart robot translator (or a summarizer) that reads a story and then writes its own version of it. Sometimes, this robot gets it right. Other times, it "hallucinates"—it makes up facts, repeats itself, or ignores the original story entirely, even though the new text sounds fluent and confident.

This paper is like a detective trying to figure out how to catch the robot lying just by watching how its eyes move while it reads.

Here is the breakdown of their investigation using simple analogies:

1. The Detective's Tool: "Optimal Transport"

The researchers use a mathematical tool called Optimal Transport (OT).

  • The Analogy: Imagine the robot's attention is like a spotlight shining on the original text.
    • Good behavior: The spotlight moves around, scanning different parts of the text as the robot writes, checking facts and context.
    • Bad behavior (Hallucination): The spotlight gets stuck on one spot (or a few random spots) and refuses to move, even though the robot is writing about something completely different.
  • The Measurement: The researchers measure the "distance" between where the spotlight should be (spread out and moving) and where it actually is. If the distance is weird, they know the robot is likely hallucinating.

2. The First Case Study: Machine Translation (DE-EN)

They first tested this on a model translating German to English. They looked at the robot's "brain" layer by layer (like looking at different floors of a skyscraper).

  • The Layers: They found that the robot's brain isn't uniform.
    • Floors 1–4: These are the "detective floors." This is where the robot checks if it's paying attention to the right words. If the robot is lying, these floors show a very clear pattern of the spotlight getting stuck.
    • Floor 5: This is the "final boss" floor. Interestingly, for some types of lies, this floor actually gets worse at detecting them. It's like the final floor is so focused on finishing the sentence that it stops caring about whether the facts are right.
    • The "Exploration" Phase: When a robot translates correctly, it starts by "scanning" the text (moving the spotlight around) before locking onto specific words. When it hallucinates, it skips the scanning phase entirely. It locks onto a wrong word immediately from the very first step.

The Verdict on Translation: This method is a superhero at catching "full lies" (where the robot ignores the source text completely). It catches these with high accuracy. However, it struggles with "partial lies" (where the robot remembers some words but gets the meaning wrong).

3. The Second Case Study: Summarization (CNN/XSum)

Next, they tried to use the same "spotlight detector" on a different job: summarizing news articles.

  • The Problem: In translation, a lie usually means the robot ignores the source text. But in summarization, a lie can happen even if the robot is looking at the right words.
    • The Analogy: Imagine a student reading a history book.
      • Translation Lie: The student closes the book and writes a story about dragons. (The spotlight is off the book).
      • Summarization Lie: The student reads the book perfectly but then writes, "The book says the war ended in 1990," when it actually ended in 1980. The student was looking at the right page, but misinterpreted the content.
  • The Result: The "spotlight detector" could still spot some lies (it was better than random guessing), but it wasn't nearly as good as a teacher who actually knows the facts (a supervised AI).
  • Why? Because the detector only checks if the robot is looking at the text. It cannot check if the robot is understanding the text correctly. If the robot looks at the right words but twists the meaning, the detector stays silent.

4. Mapping the Robot's Brain (T5 Model)

They also did a structural analysis of the summarization model (T5) to see how its brain is organized, even without looking for lies.

  • Layer 3: This is the "peak" layer. It's the most selective and unique part of the brain.
  • Layer 12: This is the "critical" layer. If you remove it, the robot's writing quality crashes.
  • Layers 9–11: These are like "backup copies." If you remove them, the robot doesn't really care; it still works fine.

The Big Takeaway

The paper concludes that this "spotlight" method is a powerful tool, but with a specific job description:

  1. It is excellent at catching robots that stop paying attention to the source text entirely (source disengagement).
  2. It is useful for understanding how a robot's brain is organized (which layers do what).
  3. It is limited when the robot pays attention but gets the facts wrong (content misuse).

In short: You can tell if the robot is ignoring the book, but you can't always tell if the robot is misreading the book just by watching its eyes.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →