Towards Fine-Grained Vision-Language Alignment for Few-Shot Anomaly Detection

Yuanting Fan, Jun Liu, Xiaochen Chen, Bin-Bin Gao, Jian Li +3 more
10/30/2025
cs.CV

No official code found. Best implementation: RetoFan233/FineGrainedAD (1 star, last commit 2026-02-02).

Abstract

Few-shot anomaly detection (FSAD) methods identify anomalous regions with few known normal samples. Most existing methods rely on the generalization ability of pre-trained vision-language models (VLMs) to recognize potentially anomalous regions through feature similarity between text descriptions and images. However, due to the lack of detailed textual descriptions, these methods can only pre-define image-level descriptions to match each visual patch token to identify potential anomalous regions, which leads to the semantic misalignment between image descriptions and patch-level visual anomalies, achieving sub-optimal localization performance. To address the above issues, we propose the Multi-Level Fine-Grained Semantic Caption (MFSC) to provide multi-level and fine-grained textual descriptions for existing anomaly detection datasets with automatic construction pipeline. Based on the MFSC, we propose a novel framework named FineGrainedAD to improve anomaly localization performance, which consists of two components: Multi-Level Learnable Prompt (MLLP) and Multi-Level Semantic Alignment (MLSA). MLLP introduces fine-grained semantics into multi-level learnable prompts through automatic replacement and concatenation mechanism, while MLSA designs region aggregation strategy and multi-level alignment training to facilitate learnable prompts better align with corresponding visual regions. Experiments demonstrate that the proposed FineGrainedAD achieves superior overall performance in few-shot settings on MVTec-AD and VisA datasets.

View on arXivView PDF

Code Implementations(1)

The official Pytorch implementation code of https://arxiv.org/abs/2510.26464

10Feb 2, 20268 months ago

Similar Papers

Cite this paper

@article{fan2025towards,
  title  = {Towards Fine-Grained Vision-Language Alignment for Few-Shot Anomaly Detection},
  author = {Yuanting Fan and Jun Liu and Xiaochen Chen and Bin-Bin Gao and Jian Li and Yong Liu and Jinlong Peng and Chengjie Wang},
  year   = {2025},
  eprint = {2510.26464},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.26464v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.26464.svg)](https://codeofpaper.com/paper/2510.26464)

Discussion