Skip to main content
QUICK REVIEW

[Paper Review] PromptMAD: Cross-Modal Prompting for Multi-Class Visual Anomaly Localization

Duncan McCain, Hossein Kashiani|arXiv (Cornell University)|Jan 30, 2026
Anomaly Detection Techniques and ApplicationsComputer Science0 citations
TL;DR

PromptMAD introduces a text-guided diffusion framework with CLIP-based cross-modal prompts and a diffusion-refined segmentor to achieve state-of-the-art pixel-level anomaly localization across multiple classes on MVTec-AD.

ABSTRACT

Visual anomaly detection in multi-class settings poses significant challenges due to the diversity of object categories, the scarcity of anomalous examples, and the presence of camouflaged defects. In this paper, we propose PromptMAD, a cross-modal prompting framework for unsupervised visual anomaly detection and localization that integrates semantic guidance through vision-language alignment. By leveraging CLIP-encoded text prompts describing both normal and anomalous class-specific characteristics, our method enriches visual reconstruction with semantic context, improving the detection of subtle and textural anomalies. To further address the challenge of class imbalance at the pixel level, we incorporate Focal loss function, which emphasizes hard-to-detect anomalous regions during training. Our architecture also includes a supervised segmentor that fuses multi-scale convolutional features with Transformer-based spatial attention and diffusion iterative refinement, yielding precise and high-resolution anomaly maps. Extensive experiments on the MVTec-AD dataset demonstrate that our method achieves state-of-the-art pixel-level performance, improving mean AUC to 98.35% and AP to 66.54%, while maintaining efficiency across diverse categories.

Motivation & Objective

  • Address multi-class visual anomaly detection and localization with camouflaged and textured defects in industrial settings.
  • Leverage semantic guidance through vision-language alignment to enrich reconstruction quality.
  • Mitigate pixel-level class imbalance with Focal loss and refine anomaly maps via diffusion and multi-scale attention.
  • Deliver a unified model that performs well across diverse object/textures without heavy computation.

Proposed method

  • Use a baseline OneNIP-inspired prompt-based reconstruction framework.
  • Incorporate CLIP-based cross-modal prompts describing normal and anomalous traits to guide reconstruction.
  • Introduce a text-guided segmentor with multi-scale CNN features, Transformer spatial attention, and diffusion-based refinement.
  • Apply Focal loss to emphasize hard-to-detect anomalous pixels during training.
  • Fuse CLIPText embeddings with visual prompts in the bidirectional decoder for semantic guidance.
  • Utilize a diffusion refinement process (10 steps, linear beta schedule) conditioned on text prompts to sharpen anomaly boundaries.

Experimental results

Research questions

  • RQ1Can cross-modal (text+image) prompts improve pixel-level localization across multiple object/texture categories in unsupervised anomaly detection?
  • RQ2Does integrating a text-guided diffusion-refinement segmentor yield sharper, higher-precision anomaly maps compared to a visual-prompt baseline?
  • RQ3What is the impact of Focal loss on detecting sparse, camouflaged anomalies in a multi-class setting?
  • RQ4How does PromptMAD perform in terms of inference efficiency relative to strong baselines on MVTec-AD?

Key findings

  • Pixel-level mean AUC improves from 97.81% (OneNIP baseline) to 98.35% with PromptMAD.
  • Pixel-level mean AP improves from 63.52% (OneNIP baseline) to 66.54% with PromptMAD.
  • Image-level Max AUC increases to 97.62% and Max AP to 99.23% with PromptMAD.
  • PromptMAD delivers notable gains in textured classes (e.g., hazelnut, tile, metal_nut, pill) due to semantic cross-modal guidance.
  • Inference speed remains real-time: 193 FPS on 4 A100 GPUs, vs 219 FPS for OneNIP baseline.
  • Ablation shows the full integration of segmentor, cross-modal prompts, and Focal loss yields best pixel AP and AUC across most classes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.