← Latest papers
💬 NLP

LogitTrace: Detecting Benchmark Contamination via Layerwise Logit Trajectories

This paper introduces LogitTrace, a framework that detects benchmark contamination in large language models by analyzing layerwise logit trajectories to distinguish between the early commitment patterns of memorized examples and the gradual evidence accumulation of genuinely reasoned responses.

Original authors: Zirui He, Haiyan Zhao, Yingcong Li, Ali Payani, Mengnan du

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

Original authors: Zirui He, Haiyan Zhao, Yingcong Li, Ali Payani, Mengnan du

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

The Big Problem: The "Cheat Sheet" in the Classroom

Imagine a student taking a very difficult math test. They get a perfect score. You might think, "Wow, they are a genius!" But what if they actually memorized the answers to those specific questions during their study time? They aren't reasoning through the math; they are just recalling the answers from memory.

In the world of Artificial Intelligence (AI), this is called benchmark contamination. It happens when the test questions an AI is evaluated on accidentally end up in the AI's training data (the "textbook" it studied). The AI looks like it's smart, but it's actually just cheating by remembering the answers.

The Old Way of Catching Cheaters

Previously, researchers tried to catch this cheating by looking at the surface:

  • The "Copy-Paste" Check: Did the AI write the answer word-for-word exactly like the training data? (If the teacher rewrites the question, the AI might fail this check).
  • The "Confidence" Check: Does the AI seem unusually sure of itself?
  • The "Speed" Check: Does it finish too fast?

The Flaw: These methods are fragile. If someone rephrases the question (e.g., changing "What is 2+2?" to "Calculate the sum of two and two"), the AI might still know the answer because it memorized the concept, but the old detectors can't see it anymore. It's like a student who memorized the answer key but fails if the teacher changes the font.

The New Solution: LogitTrace (The "Thought Process" Camera)

The authors propose a new tool called LogitTrace. Instead of just looking at the final answer the AI writes, LogitTrace looks at how the AI thinks while it's solving the problem.

The Analogy: The Factory Assembly Line

Imagine the AI is a factory with 30 different assembly stations (layers) working in a row.

  1. Clean Thinking (Real Reasoning): As the product (the answer) moves down the line, the workers at each station slowly gather evidence. They discuss, weigh options, and gradually agree on the final product. The decision builds up slowly and steadily.
  2. Memorized Thinking (Cheating): If the AI has seen this problem before, it's like a worker who already knows the final product. They don't need to gather evidence. They commit to the answer immediately at the very first station. The rest of the factory just copies that early decision.

LogitTrace is like a high-speed camera that records the "confidence levels" of the AI at every single station (layer) as it processes the question. It doesn't care about the final answer; it cares about the trajectory (the path) the AI took to get there.

How It Works (Step-by-Step)

  1. Peek Inside: The researchers use a technique called a "Logit Lens" to peek at the AI's internal "thoughts" (probabilities) at every layer of the network, not just the end.
  2. Track the Path: They map out how the AI's preference for a specific number changes from the first layer to the last.
    • Clean Example: The path is a gentle slope. The AI slowly narrows down its choices.
    • Contaminated Example: The path is a steep cliff. The AI locks onto the answer very early and stays there.
  3. The Detective: They feed these "thought paths" into a small, simple AI detector (a 1D-CNN). This detector learns to spot the difference between a "slow build-up" (clean) and an "early lock-in" (memorized).

What They Found

The paper tested this on several AI models using math problems. Here are the key findings:

  • It Works Even When Questions Change: When the researchers rephrased, translated, or slightly messed up the math problems, the old detectors failed (they couldn't tell the AI was cheating). LogitTrace still worked. It could still see that the AI was "locking in" to the answer too early, proving it was recalling rather than reasoning.
  • The "LoRA" Experiment (The Smoking Gun): To prove this wasn't just a coincidence, they took a clean AI and forced it to memorize specific math problems using a technique called LoRA (a type of fine-tuning).
    • Before they forced the memorization, the AI showed "clean" thought paths.
    • After they forced the memorization, the AI's thought paths changed to look exactly like the "cheating" pattern (early commitment).
    • Why this matters: This proves that LogitTrace is actually detecting the act of memorization, not just random noise.

The Bottom Line

LogitTrace is a new way to tell if an AI is truly smart or just a parrot. By watching the "internal journey" of how an AI forms an answer, rather than just the final result, it can spot cheating even when the test questions are rewritten or disguised. It offers a more honest look at whether AI models are actually learning to reason or just memorizing their textbooks.

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 →