用几何重参数化让能量模型在高维特征空间更稳定,提升异常检测精度。
ReFP-AD: Rectified Flow Preconditioning for Energy-Based Anomaly Detection

- 通过最优传输的修正流,将高维特征映射到条件良好的潜在空间。
- 在MVTec-AD和VisA上图像级与像素级AUROC均超97%,最高提升10.8%。
- 适合需要高精度异常定位的工业质检场景,尤其依赖无异常训练数据。
统一异常检测需建模高度异质的正常数据,且无法获取异常样本。尽管DINOv2等基础模型提供丰富令牌表示,但将其用于显式密度估计仍具挑战。能量模型(EBM)虽具理论优势,但在高维令牌空间中因各向异性与强跨维度相关性导致训练不稳定,影响有限步马尔可夫链蒙特卡洛(MCMC)采样效果。我们发现该不稳定性本质源于几何结构,提出ReFP-AD(修正流预处理用于异常检测),通过耦合最优传输的修正流学习几何重参数化,将高维嵌入映射至条件良好的潜在空间。此预处理使全维令牌空间中可稳定进行持续对比散度与预处理随机梯度朗之万动力学(SGLD)采样。异常分数基于学习到的能量景观中的梯度范数计算。在严格统一协议下,于MVTec-AD和VisA数据集上,图像/像素级AUROC分别达到98.6%/97.9%与97.3%/99.0%,优于先前统一型EBM基线最高达+10.8%图像级AUROC。消融实验表明,几何重参数化对有限步MCMC及高维空间中准确异常定位至关重要。代码已开源:https://github.com/CLendering/ReFP-AD。
原文摘要 · Abstract (English)
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
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。