重配置预训练注意力,提升工业缺陷检测的定位精度。
PL-SCEA: Reconfiguring Pretrained Attention for Few-Shot Industrial Anomaly Detection

- 用幂律自相关增强注意力,动态调整特征间关系权重。
- 在少样本设置下,像素级定位准确率显著优于基线方法。
- 无需新增参数,适配冻结模型,适合工业缺陷检测场景。
视觉基础模型(VFMs)为少样本工业异常检测提供了可迁移的局部特征表示,但其注意力计算通常继承自以语义聚合为中心的预训练目标,可能造成偏差:支持语义识别的标记关系未必能有效揭示局部纹理与结构异常。本文提出将冻结的VFM注意力重新配置为异常检测的任务相关组件。设计了幂律自相关增强注意力(PL-SCEA),在保留预训练查询-键注意力语义上下文的同时,对上下文化值特征构建自适应的标记关联。通过正相关过滤与幂律重加权,突出相对于每个标记关系背景的显著关联,且不引入额外可训练的注意力投影。生成的特征由轻量级变分自编码器建模,提供类别特定正常性的固定尺寸重构表示。两个阶段互补:注意力重配置决定局部关系偏差的表征方式,而基于重构的建模将学习到的正常性偏差转化为异常分数。在MVTec AD和VisA数据集上,该框架在图像级检测上表现竞争,在各类少样本设置中均实现稳定的像素级定位。消融实验进一步表明,无论使用VAE还是记忆库,PL-SCEA均能提升定位性能。结果支持任务对齐的注意力重配置可增强冻结预训练表示的异常定位能力。
原文摘要 · Abstract (English)
Vision Foundation Models (VFMs) provide transferable patch representations for few-shot industrial anomaly detection, but their attention computation is typically inherited from pretraining objectives centered on semantic aggregation. This creates a potential mismatch: token relations that support semantic recognition may not adequately expose the localized texture and structural deviations required for anomaly localization. We therefore investigate the hypothesis that the attention computation of a frozen VFM can be reconfigured as a task-relevant component of anomaly detection. We instantiate this idea with Power-Law Self-Correlation Enhanced Attention (PL-SCEA), which retains the semantic context of pretrained query-key attention while constructing token-adaptive self-correlations over contextualized value features. Positive-correlation filtering and power-law reweighting then emphasize relations that are salient relative to each token's relational background, without introducing additional trainable attention projections. The resulting features are modeled by a lightweight variational autoencoder that provides a fixed-size reconstruction-based representation of category-specific normality. The two stages serve complementary roles: attention reconfiguration shapes how local relational deviations are represented, while reconstruction-based modeling converts deviations from learned normality into anomaly scores. Across MVTec AD and VisA, the complete framework achieves competitive image-level detection and consistently strong pixel-level localization across the evaluated few-shot settings. Ablations further show that PL-SCEA improves localization with either the VAE or a memory bank under the tested setting. These results support the view that task-aligned attention reconfiguration can improve the anomaly-localization capability of frozen pretrained representations.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。