← Latest papers
🤖 machine learning

When Confidence Lacks Concepts: Interpretable OOD Detection via Representation Perturbations

This paper proposes an interpretable Out-of-Distribution (OOD) detection framework for medical imaging that enhances safety by leveraging sparse autoencoders to extract class-specific concept vectors, using their perturbation-induced stability to distinguish in-distribution samples from OOD anomalies based on representational alignment.

Original authors: Anju Chhetri, Pratik Shrestha, Ramesh Rana, Prashnna Gyawali, Binod Bhattarai

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

Original authors: Anju Chhetri, Pratik Shrestha, Ramesh Rana, Prashnna Gyawali, Binod Bhattarai

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 Overconfident Robot Doctor

Imagine a highly trained robot doctor that is amazing at diagnosing diseases from medical images (like X-rays or endoscopy photos). It has studied thousands of pictures of healthy stomachs and specific types of cancer.

However, this robot has a dangerous flaw: it overgeneralizes. If you show it a picture of a completely different organ, or a weird artifact, or a disease it has never seen, it might still confidently say, "I know exactly what this is!" and give a diagnosis. In the real world, this is risky because the robot might be confidently wrong.

Current methods try to catch these mistakes by looking at the robot's "internal math" (like how sure it feels). But the problem is, these internal signals are like a black box. We know the robot is unsure, but we don't know why. It's like a car dashboard warning light that says "Engine Trouble" but gives no details. In healthcare, we need to know why the robot is unsure to trust it.

The Solution: The "Concept Perturbation" Test

The authors of this paper propose a new way to test the robot, which they call CAPS (Class-conditioned Activation Perturbations). Instead of just looking at the final answer, they poke the robot's brain to see how stable its thinking is.

Here is how it works, step-by-step:

1. Learning the "Vocabulary" of Disease (The SAE)

First, the researchers teach the robot a new way to think. They use a tool called a Sparse Autoencoder (SAE).

  • The Analogy: Imagine the robot usually thinks in a giant, messy soup of words. The SAE acts like a translator that breaks that soup down into distinct, single ingredients (concepts).
  • The Result: For a specific disease (e.g., "Pylorus"), the robot learns to identify specific "concept vectors." These are like mental blueprints for what a healthy Pylorus looks like (e.g., "round shape," "pink color," "specific opening").

2. The "What If?" Test (The Perturbation)

When the robot looks at a new patient image, it makes a guess. Let's say it guesses "Pylorus."

  • The Test: The researchers take the specific "Pylorus blueprint" (the concept vector) and gently nudge the robot's internal representation of the image in that direction. It's like asking the robot: "If I make this image look slightly more like a perfect Pylorus, does your confidence change?"

3. The Stability Check (ID vs. OOD)

This is where the magic happens. The researchers measure how much the robot's confidence changes after that nudge.

  • Scenario A: The Real Patient (In-Distribution)

    • The Situation: The image is actually a real Pylorus.
    • The Reaction: The robot's brain is already aligned with the "Pylorus blueprint." When you nudge it toward that blueprint, it barely flinches. Its confidence stays steady.
    • The Verdict: "This is a safe, known sample."
  • Scenario B: The Fake/Unknown Patient (Out-of-Distribution)

    • The Situation: The image is actually a weird artifact or a different organ, but the robot guessed "Pylorus" anyway.
    • The Reaction: The robot's brain is not actually aligned with the "Pylorus blueprint." When you nudge it toward that blueprint, the robot gets confused. Its confidence swings wildly because the image doesn't actually fit the concept.
    • The Verdict: "This is suspicious! The robot is guessing without a real basis. Flag this as Out-of-Distribution (OOD)."

Why This Matters: From Black Box to Glass Box

The paper claims this method is special because it is interpretable.

  • Old Way: "The robot is unsure." (We don't know why).
  • New Way: "The robot is unsure because the image lacks the specific visual features (concepts) that define a Pylorus, even though the robot guessed Pylorus."

The researchers tested this on three types of medical imaging:

  1. Endoscopy (looking inside the stomach/intestines).
  2. Histopathology (looking at tissue samples under a microscope).
  3. Ophthalmology (looking at retinal scans of the eye).

What the Experts Said

To prove their "concepts" were real and not just math gibberish, they showed the results to a human doctor (a gastroenterologist).

  • The Findings: The doctor confirmed that when the robot was "stable," the images showed clear, real medical landmarks (like the opening of the appendix or the Z-line in the esophagus).
  • The Failure: When the robot was "unstable" (the OOD samples), the doctor confirmed those images were missing those landmarks or showed things that didn't belong (like a polyp in the wrong place or a software overlay).

Summary

The paper introduces a method to catch AI mistakes by checking if the AI's confidence is "grounded" in real, understandable features.

  • If the AI is confident and the image matches the "concept" of that confidence, it's likely safe.
  • If the AI is confident but the image doesn't match the "concept" (causing a big reaction when tested), it's likely a mistake.

This makes AI safer for high-stakes fields like medicine, not just by catching errors, but by explaining why an error might be happening.

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 →