← Latest papers
🤖 machine learning

LaRA: Layer-wise Representation Analysis for Detecting Data Contamination in RL Post-Training

This paper introduces LaRA, a layer-wise representation analysis framework that detects data contamination in RL post-trained large language models by identifying geometric deviations such as amplified perturbation sensitivity, directional collapse, and local rigidity, thereby outperforming existing output-level detection methods.

Original authors: Minju Gwak, Minseo Kwak, Dongseok Lee, Guijin Son, Alan Ritter, Jaehyung Kim

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

Original authors: Minju Gwak, Minseo Kwak, Dongseok Lee, Guijin Son, Alan Ritter, Jaehyung Kim

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 Exam

Imagine you are training a brilliant student (a Large Language Model) to solve difficult math problems. You give them a massive library of practice books to study. However, some of the "practice" questions in those books are actually the exact same questions that will appear on their final exam.

This is called data contamination. If the student memorizes the answers to the exam questions while studying, they will ace the test, but they haven't actually learned how to think or reason. They just memorized the cheat sheet.

For a long time, scientists tried to catch this cheating by looking at the student's final answers. They asked: "Does the student sound too confident? Do they answer too quickly?" (These are called output-level signals).

The Problem: In the new era of "Reinforcement Learning" (RL), the student learns by trying many different paths to a solution, not just by memorizing words. Because of this, looking at the final answer is like trying to catch a cheater by only looking at their final grade—it's often too late, and the cheater can fake a good grade easily.

The Solution: LaRA (The "X-Ray" Vision)

The authors propose a new method called LaRA. Instead of looking at the final answer, LaRA looks inside the student's brain while they are thinking.

Think of the student's brain as a multi-story building with many floors (layers). As a question goes up the building, the student's understanding changes on each floor.

  • Normal Learning: When a student encounters a new question, their brain is flexible. If you slightly change the wording of the question (a "perturbation"), their internal thoughts shift and adapt naturally.
  • Memorization (Contamination): When a student has memorized an answer, their brain becomes rigid. It's like a robot that has a pre-recorded script. If you change the question slightly, the robot's internal script doesn't know how to adjust, or it panics and shifts in a weird, unnatural way.

How LaRA Works: The Three "Tests"

LaRA acts like a detective who asks the student the same question in three slightly different ways and watches how their internal brain waves (representations) react. They measure three specific things:

  1. The "Shock Test" (Representation Shift Magnitude):

    • The Analogy: Imagine you take a key piece of information out of a math problem (like removing the number "5" and replacing it with a blank).
    • The Normal Student: Their brain re-calculates the whole problem. Their internal "thought pattern" shifts significantly because the math has changed.
    • The Cheater: Because they memorized the answer, removing a number confuses them or causes their brain to shift in a huge, unnatural spike. They are too sensitive to the missing piece because they relied on it being there.
  2. The "Crowd Test" (Directional Collapse):

    • The Analogy: Imagine asking 10 different people to solve a problem. Their brains usually move in slightly different directions because everyone thinks a little differently.
    • The Normal Student: Their brain moves in a unique, diverse direction.
    • The Cheater: Their brain collapses into a single, rigid direction. It's like a crowd of people suddenly all marching in lockstep. This "collapse" happens because they are just replaying a memorized path rather than exploring new ideas.
  3. The "Paraphrase Test" (Representation Stability):

    • The Analogy: Ask the student the same question but reword it completely (e.g., "How many apples?" vs. "What is the count of fruit?").
    • The Normal Student: Their brain stays stable and consistent. They know it's the same problem.
    • The Cheater: Their brain becomes rigid and unchanging. They are so locked into the specific memorized wording that even a slight rewording makes their internal state feel "stiff" and unnatural compared to how they handle normal questions.

The Results: Catching the Cheaters

The researchers tested this on several AI models trained with Reinforcement Learning.

  • Old Methods: The old "output-level" detectors (checking confidence or probability) were often fooled. They couldn't tell the difference between a smart student and a memorizing cheater.
  • LaRA: By looking at the "X-ray" of the brain's internal geometry, LaRA successfully spotted the memorized questions. It found that contaminated samples (the cheaters) had distinct "scars" in their brain waves: they were too sensitive to missing info, too rigid in their direction, and too stiff when reworded.

Why This Matters

This paper claims that to truly know if an AI is "learning" or just "memorizing" during its advanced training, we cannot just listen to what it says. We must look at how it thinks. LaRA provides a way to audit the AI's internal brain structure to ensure it is actually reasoning and not just reciting a cheat sheet.

In short: LaRA is a new tool that catches AI models cheating on their exams by watching how their brains react when you poke, prod, and rephrase the questions, rather than just grading their final answers.

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 →