Divergence-Aware Flow Likelihoods for Industrial Anomaly Localization
Abstract
Recent work on flow matching for visual anomaly detection has adopted Gaussian endpoint scores and density proxies that avoid evaluating the full flow likelihood. These choices bypass the costly divergence integral, raising the question of when this term can be omitted and what information it contributes to detection and localization. We introduce FlowAD, which learns a flow-matching density over frozen foundation-model patch features. Its likelihood score separates into Gaussian endpoint energy and integrated divergence, the volume-change correction. We estimate divergence at inference using forward-only finite-difference Hutchinson probes. Controlled comparisons of endpoint-only, correction-only and full scores show that the correction improves localization even when image-level detection declines: on VisA, adding it to single-layer C-RADIO endpoint scores raises P-AUPRO by 4.92 percentage points while image AUROC falls by 0.66 points. Localization gains also appear on MVTec AD and with a second backbone, but the correction's additional benefit depends on how layers are combined. In a separate fixed-model-bank control on VisA, multi-layer fusion reduces its mean P-AUPRO gain from 4.86 to 1.15 percentage points and introduces category-level losses. We further prove that, for Gaussian data with positive-definite covariance and an independent standard Gaussian base under linear interpolation, the population-optimal flow-matching field is affine and its divergence is input-independent, so endpoint scoring preserves the full likelihood ranking. These findings establish a sufficient condition for omitting divergence integration and show that the correction's empirical value depends on the task and layer configuration.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.