NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Flow Mismatching: Unsupervised Anomaly Detection via Velocity Discrepancies in Flow Matching Models

Shengzhe Chen, Mehrdad Moradi, Kamran Paynabar, Hao Yan

NeurIPS page · Open on the map

Category: Time Series, PDEs & Probabilistic ML › Flow Matching with Optimal Transport · Type: new method · Keywords: unsupervised anomaly detection, flow matching, velocity discrepancy, image inspection, MVTec-AD, VisA

Areas: Generative Models (Diffusion & Flows) › Flow Matching and Diffusion › Improved Flow Matching; Computer Vision & 3D › Medical Visual Computing › Diffusion and Flow Models

Summary

Flow Mismatching is an unsupervised anomaly detection method that exploits velocity discrepancies in flow matching models to generate pixel-wise heatmaps without reconstruction.

Explained to a 5-year-old

We teach a computer only what normal pictures look like. When a new picture appears, we compare how the computer thinks things should move with how they actually move. If they don't match, the computer says that part might be weird. This helps find hidden problems without needing examples of problems. It works like noticing a toy car goes where it shouldn't when you didn't ask it to.

Explained to a 5-year-old, longer

We show a computer many pictures that are normal and nothing else. When a new picture comes, the computer follows a path from random noise to that picture. Along this path, we look at two kinds of movement: how the computer expects things to move based on what it learned, and how the picture itself actually moves. If these two movements differ, the computer marks that spot as possibly strange. By checking many paths and many steps, we get a map that highlights odd areas. This way we can spot problems without having any examples of problems beforehand. The method works like a detective that notices when a puzzle piece doesn't fit the picture. It helps keep factories running smoothly by catching defects early. The approach does not need extra training or complex memory, making it simple to use. It can be applied to many kinds of images, like checking products on an assembly line or spotting cracks in photos. The idea is inspired by how flows move in nature, using a mathematical model to compare expected and actual motion. This gives a clear picture of where something is out of place.

For a technical reader

The paper presents an unsupervised anomaly detection technique that uses a flow matching model trained on normal data. For a test image, it follows a path from noise to the image and compares the model’s predicted velocity with the geometric velocity along that path. Discrepancies between these velocities highlight anomalous regions, producing pixel-wise heatmaps without extra optimization. The method aggregates mismatches across multiple paths and time steps, yielding both per-pixel and image-level scores. Theoretical analysis shows the mismatch decomposes into a denoising term and a Fisher-divergence term, explaining why the approach works.

Problem

Unsupervised anomaly detection aims to locate and score anomalous pixels in an image using only normal training data, which is challenging because existing methods often rely on reconstruction errors that can be ambiguous.

Method

The approach trains a flow matching model solely on normal images, then probes its learned velocity field along affine paths from Gaussian noise to a test image. It compares the model-predicted velocity (normal generative dynamics) with the geometric velocity toward the target, aggregating the mismatch over multiple paths and time steps to produce pixel-wise heatmaps and image-level scores.

Results

The approach achieves state-of-the-art performance on MVTec-AD and VisA, outperforming reconstruction-based and recent flow matching-based methods.

Contributions

It introduces a novel unsupervised anomaly detection paradigm that leverages velocity mismatches in flow matching models, provides a theoretical decomposition of the mismatch into denoising and Fisher-divergence components, and yields pixel-wise heatmaps without test-time optimization.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction