ReFP-AD: Rectified Flow Preconditioning for Energy-Based Anomaly Detection
On the map: Diffusion models → Flow matching, time series and science
Abstract (arXiv)
Unified anomaly detection requires modeling highly heterogeneous normal data without access to anomalous samples. While foundation models like DINOv2 provide rich token representations, leveraging these spaces for explicit density estimation remains challenging. Energy-Based Models (EBMs) offer a principled formulation, but their training in high-dimensional token spaces is unstable due to anisotropy and strong cross-dimensional correlations, which degrades finite-step Markov Chain Monte Carlo (MCMC) sampling. We identify this instability as fundamentally geometric and introduce ReFP-AD (Rectified Flow Preconditioning for Anomaly Detection), which learns a geometric reparameterization that maps high-dimensional embeddings into a well-conditioned latent space via an optimal transport (OT)-coupled rectified flow. This preconditioning enables stable persistent contrastive divergence with preconditioned Stochastic Gradient Langevin Dynamics (SGLD) in full-dimensional token spaces. Anomaly scores are then derived from the learned energy landscape using gradient norms. Under a strict unified protocol on the MVTec-AD and VisA datasets, ReFP-AD achieves 98.6%/97.9% Image/Pixel AUROC on MVTec-AD and 97.3%/99.0% on VisA, outperforming prior unified EBM baselines by up to +10.8% in Image AUROC. Ablation experiments demonstrate that geometric reparameterization is critical for finite-step MCMC and accurate anomaly localization in high-dimensional token spaces. Code is available at https://github.com/CLendering/ReFP-AD
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Flow matching, time series and science, one of 14 directions in Diffusion models. Builds on 51 of its 61 references that are in the map. First posted on arXiv 3 Aug 2026.
Builds on
51 of 61 references.
Closest ancestors · 5
Same direction, newest first
- 2025Scalable, Explainable and Provably Robust Anomaly Detection with One-Step Flow Matching21 Oct
- 2023Anomaly Detection with Conditioned Denoising Diffusion Models25 May
- 2023DiffusionAD: Norm-guided One-step Denoising Diffusion for Anomaly Detection15 Mar
- 2022Flow Matching for Generative Modeling6 Oct
- 2022Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow7 Sep
Other references · 46
- 2023DINOv2: Learning Robust Visual Features without Supervisioncited by 7,974
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,968
- 2013Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distancescited by 2,316
- 2020Energy-based Out-of-distribution Detectioncited by 1,299
- 2021Towards Total Recall in Industrial Anomaly Detectioncited by 776
- 2020PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localizationcited by 594
- 2021DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detectioncited by 514
- 2018Do Deep Generative Models Know What They Don't Know?cited by 443
- 2022Anomaly Detection via Reverse Distillation from One-Class Embeddingcited by 421
- 2019Your Classifier is Secretly an Energy Based Model and You Should Treat it Like Onecited by 405
- 2022SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentationcited by 400
- 2021CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flowscited by 321
34 more
- 2023WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentationcited by 315
- 2022How Do Vision Transformers Work?cited by 307
- 2020Multiresolution Knowledge Distillation for Anomaly Detectioncited by 285
- 2023AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detectioncited by 271
- 2022A Unified Model for Multi-class Anomaly Detectioncited by 268
- 2023SimpleNet: A Simple Network for Image Anomaly Detection and Localizationcited by 256
- 2021FastFlow: Unsupervised Anomaly Detection and Localization via 2D Normalizing Flowscited by 227
- 2020Why Normalizing Flows Fail to Detect Out-of-Distribution Datacited by 221
- 2020Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flowscited by 212
- 2023EfficientAD: Accurate Visual Anomaly Detection at Millisecond-Level Latenciescited by 160
- 2019Learning Non-Convergent Non-Persistent Short-Run MCMC Toward Energy-Based Modelcited by 148
- 2015A Complete Recipe for Stochastic Gradient MCMCcited by 146
- 2024Real-IAD: A Real-World Multi-View Dataset for Benchmarking Versatile Industrial Anomaly Detectioncited by 139
- 2020Improved Contrastive Divergence Training of Energy Based Modelscited by 130
- 2015Preconditioned Stochastic Gradient Langevin Dynamics for Deep Neural Networkscited by 121
- 2024MambaAD: Exploring State Space Models for Multi-class Unsupervised Anomaly Detectioncited by 113
- 2019On the Anatomy of MCMC-Based Maximum Likelihood Learning of Energy-Based Modelscited by 105
- 2024PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detectioncited by 98
- 2024Dinomaly: The Less Is More Philosophy in Multi-Class Unsupervised Anomaly Detectioncited by 93
- 2019Flow Contrastive Estimation of Energy-Based Modelscited by 75
- 2022Anomalib: A Deep Learning Library for Anomaly Detectioncited by 75
- 2019NeuTra-lizing Bad Geometry in Hamiltonian Monte Carlo Using Neural Transportcited by 74
- 2023ReContrast: Domain-Specific Anomaly Detection via Contrastive Reconstructioncited by 63
- 2024SoftPatch: Unsupervised Anomaly Detection with Noisy Datacited by 55
- 2024AnomalyDINO: Boosting Patch-based Few-shot Anomaly Detection with DINOv2cited by 53
- 2023Exploring Plain ViT Reconstruction for Multi-class Unsupervised Anomaly Detectioncited by 47
- 2025The MVTec AD 2 Dataset: Advanced Scenarios for Unsupervised Anomaly Detectioncited by 30
- 2024GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Featurescited by 29
- 2024Hierarchical Gaussian Mixture Normalizing Flow Modeling for Unified Anomaly Detectioncited by 28
- 2020MCMC Should Mix: Learning Energy-Based Model with Neural Transport Latent Space MCMCcited by 26
- 2023Energy-Based Models for Anomaly Detection: A Manifold Diffusion Recovery Approachcited by 18
- 2025INP-Former++: Advancing Universal Anomaly Detection via Intrinsic Normal Prototypes and Residual Learningcited by 7
- 2026SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modelingcited by 7
- 2021Energy-Based Anomaly Detection and Localizationcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Flow Sampling: Learning to Sample from Unnormalized Densities via Denoising Conditional Processes
- 2026Flow Mismatching: Unsupervised Anomaly Detection via Velocity Discrepancies in Flow Matching Models
- 2026Composing Flow-Matching Energies with Known Physics: Generation, OOD Detection, and Inversion on PDE Fields
- 2025Time-reversed Flow Matching with Worst Transport in High-dimensional Latent Space for Image Anomaly Detection
- 2026Preconditioned Flow Matching
- 2024Dynamic Addition of Noise in a Diffusion Model for Anomaly Detection
- 2025One-for-More: Continual Diffusion Model for Anomaly Detection
- 2025InvAD: Inversion-based Reconstruction-Free Anomaly Detection with Diffusion Models