"<!DOCTYPE html>\n<html lang=\"zh\" data-theme=\"light\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>fulltext.txt — Vercel Design System</title>\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css\">\n<style>\n\n:root {\n  /* Vercel Palette */\n  --geist-foreground: #171717;\n  --geist-background: #ffffff;\n  --geist-secondary: #4d4d4d;\n  --geist-tertiary: #666666;\n  --geist-quaternary: #808080;\n  --geist-border: #ebebeb;\n  --geist-surface-tint: #fafafa;\n  \n  /* Workflow Accents */\n  --develop-blue: #0a72ef;\n  --preview-pink: #de1d8d;\n  --ship-red: #ff5b4f;\n  \n  /* Interactive & Status */\n  --link-blue: #0072f5;\n  --ds-focus-color: hsla(212, 100%, 48%, 1);\n  --badge-blue-bg: #ebf5ff;\n  --badge-blue-text: #0068d6;\n  \n  /* Shadow-as-Border Philosophy */\n  --shadow-border: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(0, 0, 0, 0.16) 0px 0px 0px 1px;\n  --shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(0, 0, 0, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.06) 0px 4px 6px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-full: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, rgba(0, 0, 0, 0.04) 0px 8px 8px -8px, #fafafa 0px 0px 0px 1px;\n  --shadow-ring: rgb(235, 235, 235) 0px 0px 0px 1px;\n  \n  /* Radius Scale */\n  --radius-xs: 2px;\n  --radius-sm: 4px;\n  --radius-md: 6px;\n  --radius-lg: 8px;\n  --radius-xl: 12px;\n  --radius-pill: 9999px;\n}\n\n[data-theme=\"dark\"] {\n  --geist-foreground: #ededed;\n  --geist-background: #000000;\n  --geist-secondary: #a1a1a1;\n  --geist-tertiary: #888888;\n  --geist-quaternary: #666666;\n  --geist-border: #222222;\n  --geist-surface-tint: #0a0a0a;\n  \n  --shadow-border: rgba(255, 255, 255, 0.14) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(255, 255, 255, 0.28) 0px 0px 0px 1px;\n  --shadow-card: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.4) 0px 2px 4px, #111111 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 6px 12px, #111111 0px 0px 0px 1px;\n  --shadow-card-full: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 8px 16px -4px, #111111 0px 0px 0px 1px;\n  --shadow-ring: rgb(40, 40, 40) 0px 0px 0px 1px;\n  \n  --badge-blue-bg: rgba(10, 114, 239, 0.15);\n  --badge-blue-text: #70b5ff;\n}\n\n* { box-sizing: border-box; }\nhtml { scroll-behavior: smooth; }\nbody {\n  margin: 0;\n  font-family: \"Geist\", Arial, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n  background-color: var(--geist-background);\n  color: var(--geist-foreground);\n  font-feature-settings: \"liga\" 1;\n  -webkit-font-smoothing: antialiased;\n  min-height: 100vh;\n}\n\na {\n  color: inherit;\n  text-decoration: none;\n  transition: color 0.15s ease;\n}\n\n/* 导航栏 (Vercel Clean Sticky Nav) */\n.vercel-nav {\n  position: sticky;\n  top: 0;\n  background-color: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  z-index: 100;\n  padding: 0 24px;\n  height: 64px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n.nav-brand {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n.vercel-triangle {\n  width: 22px;\n  height: 19px;\n  fill: var(--geist-foreground);\n}\n.nav-title {\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: -0.32px;\n  color: var(--geist-foreground);\n}\n.nav-badge-pill {\n  font-family: \"Geist Mono\", ui-monospace, monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  background: var(--badge-blue-bg);\n  color: var(--badge-blue-text);\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n}\n\n.nav-links {\n  display: flex;\n  align-items: center;\n  gap: 24px;\n}\n.nav-link {\n  font-size: 14px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.nav-link:hover, .nav-link.active {\n  color: var(--geist-foreground);\n}\n.nav-link.active {\n  font-weight: 600;\n}\n\n.nav-actions {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n/* 按钮规范 */\n.btn-primary-dark {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: opacity 0.15s;\n}\n.btn-primary-dark:hover {\n  opacity: 0.9;\n}\n.btn-secondary-white {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: background 0.15s, box-shadow 0.15s;\n}\n.btn-secondary-white:hover {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border-hover);\n}\n.theme-toggle-btn {\n  background: transparent;\n  border: none;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  width: 36px;\n  height: 36px;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--geist-foreground);\n}\n\n/* 核心容器 */\n.vercel-container {\n  max-width: 1200px;\n  margin: 0 auto;\n  padding: 56px 24px 100px;\n}\n\n/* Hero Section (Gallery Emptiness + Negative Letter-spacing) */\n.vercel-hero {\n  text-align: center;\n  max-width: 860px;\n  margin: 0 auto 56px;\n}\n.hero-stage-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 4px 14px;\n  border-radius: var(--radius-pill);\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  margin-bottom: 24px;\n}\n.stage-dot {\n  width: 7px;\n  height: 7px;\n  border-radius: 50%;\n}\n.vercel-hero h1 {\n  font-size: 48px;\n  font-weight: 600;\n  line-height: 1.05;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 16px;\n}\n.vercel-hero p {\n  font-size: 20px;\n  font-weight: 400;\n  line-height: 1.80;\n  color: var(--geist-secondary);\n  margin: 0 auto 28px;\n}\n\n/* Workflow Pipeline (Develop -> Preview -> Ship) */\n.workflow-pipeline {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 768px) {\n  .workflow-pipeline { grid-template-columns: 1fr; }\n}\n.workflow-step {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px 22px;\n  transition: box-shadow 0.2s;\n}\n.workflow-step:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n.step-mono-label {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  margin-bottom: 8px;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n.step-title {\n  font-size: 20px;\n  font-weight: 600;\n  letter-spacing: -0.96px;\n  color: var(--geist-foreground);\n  margin-bottom: 6px;\n}\n.step-desc {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n\n/* Metric Cards (Section 4 Spec) */\n.metric-grid {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 900px) {\n  .metric-grid { grid-template-columns: repeat(2, 1fr); }\n}\n.metric-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n}\n.metric-number {\n  font-size: 40px;\n  font-weight: 600;\n  line-height: 1.0;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin-bottom: 8px;\n  font-feature-settings: \"tnum\" 1;\n}\n.metric-label {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.4;\n}\n\n/* VAD 专栏 Banner (Ship Red & Vercel Clean) */\n.vad-showcase {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-xl);\n  padding: 32px;\n  margin-bottom: 48px;\n  position: relative;\n}\n.vad-header-row {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 12px;\n  margin-bottom: 12px;\n}\n.vad-header-row h2 {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  color: var(--geist-foreground);\n  margin: 0;\n}\n.vad-pillars-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n  gap: 14px;\n  margin-top: 24px;\n}\n.vad-pillar-item {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 14px 16px;\n}\n.vad-pillar-title {\n  font-size: 14px;\n  font-weight: 600;\n  color: var(--ship-red);\n  margin-bottom: 4px;\n}\n.vad-pillar-text {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n.vad-filter-bar {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  margin: 24px 0 16px;\n  padding: 12px 16px;\n  background: var(--geist-surface-tint);\n  border-radius: var(--radius-md);\n  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);\n}\n.vad-filter-btn {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  font-weight: 500;\n  padding: 6px 14px;\n  border-radius: 9999px;\n  border: none;\n  background: transparent;\n  color: var(--geist-secondary);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.vad-filter-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0,0,0,0.05);\n}\n.vad-filter-btn.active {\n  background: #171717;\n  color: #ffffff;\n}\n.vad-search-input {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  padding: 7px 12px;\n  border-radius: 6px;\n  border: 1px solid var(--geist-border);\n  background: #ffffff;\n  color: var(--geist-foreground);\n  width: 280px;\n  outline: none;\n  transition: border-color 0.15s, box-shadow 0.15s;\n}\n.vad-search-input:focus {\n  border-color: #0a72ef;\n  box-shadow: 0 0 0 2px rgba(10, 114, 239, 0.2);\n}\n\n/* 控制栏：搜索、视图、筛选 */\n.control-bar {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  margin-bottom: 24px;\n  flex-wrap: wrap;\n}\n.search-input-wrap {\n  position: relative;\n  flex: 1;\n  max-width: 480px;\n}\n.search-input {\n  width: 100%;\n  height: 40px;\n  padding: 0 38px 0 14px;\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  color: var(--geist-foreground);\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  outline: none;\n  transition: box-shadow 0.15s;\n}\n.search-input:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n.search-kbd {\n  position: absolute;\n  right: 12px;\n  top: 50%;\n  transform: translateY(-50%);\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  color: var(--geist-quaternary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n\n.view-switcher {\n  display: flex;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  background: var(--geist-background);\n  padding: 2px;\n}\n.view-btn {\n  background: transparent;\n  border: none;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-tertiary);\n  padding: 6px 12px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n  transition: color 0.15s, background 0.15s;\n}\n.view-btn.active {\n  background: var(--geist-surface-tint);\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 筛选芯片行 (Filter Pill Strip) */\n.filter-group-strip {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  margin-bottom: 28px;\n  padding: 16px 20px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-lg);\n}\n.filter-row {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  flex-wrap: wrap;\n}\n.filter-label-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  min-width: 68px;\n}\n.pill-badge {\n  background: var(--geist-background);\n  color: var(--geist-secondary);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 3px 12px;\n  border-radius: var(--radius-pill);\n  font-size: 12px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 0.15s;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n}\n.pill-badge:hover {\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border-hover);\n}\n.pill-badge.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  font-weight: 600;\n  box-shadow: none;\n}\n.pill-badge.active-blue {\n  background: var(--develop-blue);\n  color: #ffffff;\n  box-shadow: none;\n}\n.pill-badge.active-red {\n  background: var(--ship-red);\n  color: #ffffff;\n  box-shadow: none;\n}\n\n/* Bento Grid Cards (Section 4 & 6 Spec) */\n.card-grid-bento {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n  gap: 16px;\n}\n.vercel-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  transition: box-shadow 0.2s, transform 0.2s;\n  text-decoration: none;\n  color: inherit;\n  overflow: hidden;\n  min-width: 0;\n  word-break: break-word;\n}\n.vercel-card:hover {\n  box-shadow: var(--shadow-card-hover);\n  transform: translateY(-2px);\n}\n.card-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 12px;\n  gap: 8px;\n}\n.card-tag-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  letter-spacing: 0.5px;\n}\n.status-pill-badge {\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 500;\n  flex-shrink: 0;\n}\n.pub-accepted { background: #ebfdf2; color: #027a48; }\n.pub-workshop { background: #eff8ff; color: #175cd3; }\n.pub-submitted { background: #fff8e6; color: #b54708; }\n.pub-preprint { background: #f2f4f7; color: #475467; }\n.pub-other { background: #f9f5ff; color: #6941c6; }\n\n[data-theme=\"dark\"] .pub-accepted { background: rgba(2, 122, 72, 0.2); color: #32d583; }\n[data-theme=\"dark\"] .pub-workshop { background: rgba(23, 92, 211, 0.2); color: #84caff; }\n[data-theme=\"dark\"] .pub-submitted { background: rgba(181, 71, 8, 0.2); color: #fec84b; }\n[data-theme=\"dark\"] .pub-preprint { background: rgba(71, 84, 103, 0.2); color: #98a2b3; }\n[data-theme=\"dark\"] .pub-other { background: rgba(105, 65, 198, 0.2); color: #d6bbfb; }\n\n/* 必读标杆徽章 (Vercel Amber Accent) */\n.milestone-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  padding: 2px 7px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 600;\n  white-space: nowrap;\n  flex-shrink: 0;\n  transition: all 0.15s ease;\n}\n.milestone-badge.ms-idea, .milestone-badge:not([class*=\"ms-\"]) {\n  color: #b54708;\n  background: #fff8e6;\n  border: 1px solid rgba(247, 144, 9, 0.35);\n  box-shadow: 0 1px 2px rgba(181, 71, 8, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-idea, [data-theme=\"dark\"] .milestone-badge:not([class*=\"ms-\"]) {\n  color: #fec84b;\n  background: rgba(181, 71, 8, 0.22);\n  border-color: rgba(254, 200, 75, 0.35);\n}\n.milestone-badge.ms-writing {\n  color: #6941c6;\n  background: #f9f5ff;\n  border: 1px solid rgba(105, 65, 198, 0.3);\n  box-shadow: 0 1px 2px rgba(105, 65, 198, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-writing {\n  color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.22);\n  border-color: rgba(214, 187, 251, 0.35);\n}\n.milestone-badge.ms-value {\n  color: #027a48;\n  background: #ebfdf2;\n  border: 1px solid rgba(2, 122, 72, 0.3);\n  box-shadow: 0 1px 2px rgba(2, 122, 72, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-value {\n  color: #32d583;\n  background: rgba(2, 122, 72, 0.22);\n  border-color: rgba(50, 213, 131, 0.35);\n}\n\n/* 论文正文图表与插图卡片样式 (Geist Design) */\n.paper-figure, .article-body figure {\n  margin: 32px auto;\n  text-align: center;\n  max-width: 100%;\n}\n.paper-figure img, .article-body img {\n  max-width: 96%;\n  height: auto;\n  border-radius: var(--radius-md);\n  border: 1px solid var(--geist-border);\n  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);\n  background: #ffffff;\n  transition: transform 0.2s ease, box-shadow 0.2s ease;\n  display: block;\n  margin: 0 auto;\n}\n.paper-figure img:hover, .article-body img:hover {\n  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);\n}\n.paper-figure figcaption, .article-body figcaption {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  margin-top: 10px;\n  line-height: 1.6;\n  font-style: italic;\n  max-width: 850px;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n/* VAD 视图切换器 View Switcher */\n.vad-view-switcher {\n  display: inline-flex;\n  padding: 3px;\n  background: var(--geist-secondary-bg);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  margin-bottom: 20px;\n  gap: 2px;\n}\n.view-switch-btn {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 6px 14px;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  border-radius: 6px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.view-switch-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0, 0, 0, 0.04);\n}\n[data-theme=\"dark\"] .view-switch-btn:hover {\n  background: rgba(255, 255, 255, 0.06);\n}\n.view-switch-btn.active {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  font-weight: 600;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* 关系图谱 Graph View Styles */\n.graph-container {\n  position: relative;\n  width: 100%;\n  height: 720px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: var(--radius-lg);\n  overflow: hidden;\n  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);\n  margin-bottom: 40px;\n}\n.graph-toolbar {\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  right: 14px;\n  z-index: 10;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  padding: 8px 14px;\n  border-radius: 8px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  flex-wrap: wrap;\n  gap: 8px;\n}\n.graph-tool-title {\n  font-size: 13px;\n  font-weight: 700;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--geist-foreground);\n}\n.graph-filter-group {\n  display: flex;\n  gap: 6px;\n  align-items: center;\n  flex-wrap: wrap;\n}\n.graph-chip {\n  font-size: 11px;\n  padding: 3px 8px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.graph-chip:hover { background: var(--geist-secondary-bg); }\n.graph-chip.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-color: var(--geist-foreground);\n}\n.graph-search-input {\n  padding: 3px 8px;\n  font-size: 11px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  outline: none;\n  width: 150px;\n}\n#vad-graph-svg {\n  width: 100%;\n  height: 100%;\n  cursor: grab;\n}\n#vad-graph-svg:active { cursor: grabbing; }\n.graph-legend {\n  position: absolute;\n  bottom: 14px;\n  left: 14px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  padding: 10px 14px;\n  font-size: 11px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  z-index: 10;\n  line-height: 1.6;\n  pointer-events: none;\n}\n.graph-legend-row { display: flex; align-items: center; gap: 8px; }\n.graph-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }\n.graph-info-drawer {\n  position: absolute;\n  top: 66px;\n  right: 14px;\n  width: 310px;\n  max-height: 620px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  box-shadow: 0 8px 30px rgba(0,0,0,0.12);\n  z-index: 10;\n  padding: 16px;\n  overflow-y: auto;\n  display: none;\n  backdrop-filter: blur(10px);\n  transition: transform 0.2s ease, opacity 0.2s ease;\n}\n.graph-drawer-close {\n  position: absolute;\n  top: 10px;\n  right: 12px;\n  cursor: pointer;\n  font-size: 16px;\n  color: var(--geist-tertiary);\n}\n.graph-drawer-badge {\n  display: inline-block;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 10px;\n  font-weight: 600;\n  margin-bottom: 6px;\n}\n.graph-drawer-title {\n  font-size: 13px;\n  font-weight: 700;\n  line-height: 1.4;\n  margin-bottom: 8px;\n  color: var(--geist-foreground);\n}\n.graph-drawer-meta {\n  font-size: 11px;\n  color: var(--geist-secondary);\n  margin-bottom: 12px;\n}\n.graph-drawer-core {\n  font-size: 12px;\n  line-height: 1.6;\n  color: var(--geist-foreground);\n  background: var(--geist-secondary-bg);\n  padding: 8px 10px;\n  border-radius: 6px;\n  margin-bottom: 12px;\n  border: 1px solid var(--geist-border);\n}\n.graph-drawer-link {\n  display: block;\n  text-align: center;\n  padding: 7px 12px;\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-radius: 6px;\n  font-size: 12px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: opacity 0.15s ease;\n  margin-bottom: 6px;\n}\n.graph-drawer-link:hover { opacity: 0.85; }\n.graph-drawer-pdf-link {\n  display: block;\n  text-align: center;\n  padding: 6px 12px;\n  background: var(--geist-secondary-bg);\n  color: var(--geist-foreground);\n  border: 1px solid var(--geist-border);\n  border-radius: 6px;\n  font-size: 11px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.graph-drawer-pdf-link:hover { background: var(--geist-border); }\n.node-circle {\n  cursor: pointer;\n  transition: r 0.2s, stroke-width 0.2s;\n}\n.node-label {\n  font-size: 10px;\n  font-weight: 600;\n  fill: var(--geist-foreground);\n  pointer-events: none;\n  text-shadow: 0 1px 2px var(--geist-background);\n}\n.link-line {\n  stroke: var(--geist-border);\n  stroke-opacity: 0.6;\n  stroke-width: 1.2;\n  transition: stroke 0.2s, stroke-width 0.2s, stroke-opacity 0.2s;\n}\n.link-label {\n  font-size: 9px;\n  fill: var(--geist-tertiary);\n  pointer-events: none;\n  text-anchor: middle;\n}\n\n/* 引用框与警示框 Alerts */\n.callout-alert {\n  margin: 20px 0;\n  padding: 14px 18px;\n  border-radius: var(--radius-md);\n  transition: all 0.15s ease;\n}\n.callout-important, .callout-idea {\n  border-left: 4px solid #b54708;\n  background: rgba(181, 71, 8, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(247, 144, 9, 0.3);\n}\n[data-theme=\"dark\"] .callout-important, [data-theme=\"dark\"] .callout-idea {\n  border-left-color: #fec84b;\n  background: rgba(181, 71, 8, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(254, 200, 75, 0.25);\n}\n.callout-writing {\n  border-left: 4px solid #6941c6;\n  background: rgba(105, 65, 198, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(105, 65, 198, 0.3);\n}\n[data-theme=\"dark\"] .callout-writing {\n  border-left-color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(214, 187, 251, 0.25);\n}\n.callout-value {\n  border-left: 4px solid #027a48;\n  background: rgba(2, 122, 72, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(2, 122, 72, 0.3);\n}\n[data-theme=\"dark\"] .callout-value {\n  border-left-color: #32d583;\n  background: rgba(2, 122, 72, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(50, 213, 131, 0.25);\n}\n\n.card-title {\n  font-size: 16.5px;\n  font-weight: 600;\n  line-height: 1.42;\n  letter-spacing: -0.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 10px;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n  hyphens: auto;\n}\n.card-title a {\n  color: var(--geist-foreground);\n  text-decoration: none;\n  display: inline;\n  transition: color 0.15s ease;\n}\n.card-title a:hover {\n  color: var(--develop-blue);\n  text-decoration: none;\n}\n.card-id-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-quaternary);\n  margin-right: 5px;\n}\n.card-meta-row {\n  display: flex;\n  gap: 6px;\n  flex-wrap: wrap;\n  margin-bottom: 12px;\n}\n.meta-token {\n  font-size: 12px;\n  color: var(--geist-tertiary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-ring);\n  padding: 2px 7px;\n  border-radius: var(--radius-sm);\n  white-space: nowrap;\n}\n.card-body-text {\n  font-size: 13.5px;\n  color: var(--geist-secondary);\n  line-height: 1.6;\n  margin-bottom: 16px;\n  flex-grow: 1;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n}\n.card-body-text strong {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n.card-footer {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 14px;\n}\n.card-link-action {\n  font-size: 13.5px;\n  font-weight: 500;\n  color: var(--link-blue);\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.card-link-action:hover {\n  opacity: 0.85;\n  transform: translateX(2px);\n}\na.meta-token {\n  transition: all 0.15s ease;\n  cursor: pointer;\n  text-decoration: none;\n}\na.meta-token:hover {\n  background: var(--geist-selection);\n  color: var(--geist-foreground);\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);\n}\n\n/* 紧凑列表视图 (List View) */\n.card-list-view {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n.list-row-item {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-md);\n  padding: 12px 18px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  transition: box-shadow 0.15s;\n}\n.list-row-item:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n\n/* 阅读详情页 (Report Detail) */\n.reading-container {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) 260px;\n  gap: 40px;\n  align-items: start;\n}\n@media (max-width: 960px) {\n  .reading-container { grid-template-columns: 1fr; }\n  .reading-sidebar { display: none; }\n}\n\n.report-header-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 28px 32px;\n  margin-bottom: 28px;\n}\n.crumb-bar {\n  font-size: 13px;\n  color: var(--geist-tertiary);\n  margin-bottom: 10px;\n}\n.report-title {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  margin: 0 0 16px;\n  color: var(--geist-foreground);\n}\n.report-action-buttons {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  flex-wrap: wrap;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 16px;\n  margin-top: 16px;\n}\n\n.article-body {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 36px 42px 80px;\n  font-size: 16px;\n  line-height: 1.75;\n  color: var(--geist-foreground);\n}\n.article-body h1, .article-body h2, .article-body h3 {\n  color: var(--geist-foreground);\n  scroll-margin-top: 80px;\n}\n.article-body h1 { font-size: 28px; font-weight: 600; letter-spacing: -1.28px; border-bottom: 1px solid var(--geist-border); padding-bottom: 8px; margin-top: 32px; }\n.article-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.96px; border-bottom: 1px solid var(--geist-border); padding-bottom: 6px; margin-top: 36px; }\n.article-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.32px; margin-top: 26px; }\n.article-body table {\n  width: 100%;\n  border-collapse: collapse;\n  margin: 24px 0;\n  font-size: 14px;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  overflow: hidden;\n}\n.article-body th, .article-body td {\n  padding: 10px 14px;\n  text-align: left;\n  border-bottom: 1px solid var(--geist-border);\n}\n.article-body th {\n  background: var(--geist-surface-tint);\n  font-weight: 600;\n  color: var(--geist-foreground);\n}\n.article-body blockquote {\n  border-left: 2px solid var(--geist-foreground);\n  margin: 20px 0;\n  padding: 8px 18px;\n  color: var(--geist-secondary);\n  font-style: normal;\n}\n.article-body code {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13.5px;\n  box-shadow: var(--shadow-ring);\n  background: var(--geist-surface-tint);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n.article-body pre {\n  position: relative;\n  background: #000000;\n  color: #ededed;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 18px;\n  margin: 24px 0;\n  overflow-x: auto;\n}\n.article-body pre code {\n  background: transparent;\n  box-shadow: none;\n  padding: 0;\n  color: inherit;\n  font-size: 13px;\n}\n.copy-code-btn {\n  position: absolute;\n  top: 8px;\n  right: 10px;\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  background: #171717;\n  color: #ffffff;\n  border: 1px solid #333333;\n  padding: 3px 8px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n}\n\n/* 侧边大纲 (TOC) */\n.reading-sidebar {\n  position: sticky;\n  top: 80px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  max-height: calc(100vh - 100px);\n  overflow-y: auto;\n}\n.sidebar-toc-title {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: var(--geist-quaternary);\n  margin-bottom: 12px;\n}\n.reading-sidebar ul {\n  list-style: none;\n  padding-left: 0;\n  margin: 0;\n  font-size: 13px;\n}\n.reading-sidebar li {\n  margin: 6px 0;\n}\n.reading-sidebar ul ul {\n  padding-left: 14px;\n}\n.reading-sidebar a {\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.reading-sidebar a:hover, .reading-sidebar a.active {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 后台管理 (/admin) */\n.admin-card-container {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 32px;\n  margin-bottom: 32px;\n}\n.form-row-2 {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 16px;\n  margin-bottom: 16px;\n}\n@media (max-width: 600px) {\n  .form-row-2 { grid-template-columns: 1fr; }\n}\n.form-field {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  margin-bottom: 16px;\n}\n.form-field label {\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-foreground);\n}\n.form-field input, .form-field select, .form-field textarea {\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  padding: 9px 12px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  color: var(--geist-foreground);\n  outline: none;\n}\n.form-field input:focus, .form-field select:focus, .form-field textarea:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n\n/* 语法高亮 (Console Blue / Purple / Pink) */\n.codehilite .k, .codehilite .kd, .codehilite .kn { color: #eb367f; font-weight: 500; }\n.codehilite .s, .codehilite .s1, .codehilite .s2 { color: #0070f3; }\n.codehilite .nf, .codehilite .na { color: #7928ca; font-weight: 500; }\n.codehilite .c, .codehilite .c1 { color: #666666; font-style: italic; }\n.codehilite .mi, .codehilite .mf { color: #ff5b4f; }\n\n</style>\n\n</head>\n<body>\n\n    <nav class=\"vercel-nav\">\n      <div class=\"nav-brand\">\n        <a href=\"/\" style=\"display:flex;align-items:center;gap:10px;text-decoration:none\">\n          <svg class=\"vercel-triangle\" viewBox=\"0 0 76 65\" fill=\"none\">\n            <path d=\"M37.5274 0L75.0548 65H0L37.5274 0Z\" fill=\"currentColor\"/>\n          </svg>\n          <span class=\"nav-title\">Agent Harness KB</span>\n        </a>\n        <span class=\"nav-badge-pill\">Geist 2.0</span>\n      </div>\n\n      <div class=\"nav-links\">\n        <a class=\"nav-link \" href=\"/\">全景总览</a>\n        <a class=\"nav-link \" href=\"/vad\" style=\"color:var(--ship-red)\">🎯 VAD 专栏 (144)</a>\n        <a class=\"nav-link\" href=\"https://m0rtzz.github.io/paper-notes/\" target=\"_blank\" rel=\"noopener\">顶会 669 篇 ↗</a>\n        <a class=\"nav-link\" href=\"/download/all\">整库打包</a>\n        \n      </div>\n\n      <div class=\"nav-actions\">\n        \n        <button class=\"theme-toggle-btn\" id=\"theme-toggle-btn\" onclick=\"toggleTheme()\" title=\"切换亮暗主题\">🌙</button>\n      </div>\n    </nav>\n    \n<main class=\"vercel-container\">\n\n        <div class=\"report-header-card\">\n          <div class=\"crumb-bar\"><a href=\"/\">Home</a> / <b>fulltext.txt</b></div>\n          <h1 class=\"report-title\">fulltext.txt</h1>\n          <div class=\"report-action-buttons\">\n            <a class=\"btn-primary-dark\" href=\"?dl=1\">Download Text</a>\n          </div>\n        </div>\n        <article class=\"article-body\"><pre><code>Robust Zero-shot Anomaly Detection under\nLimited Auxiliary Anomaly Priors\nGuanyu Lu, Fang Zhou(B) , and Cheqing Jin\n\narXiv:2606.29428v1 [cs.CV] 28 Jun 2026\n\nEast China Normal University, Shanghai, China\ngylu@stu.ecnu.edu.cn, {fzhou, cqjin}@dase.ecnu.edu.cn\n\n1\n\nAbstract. Zero-shot anomaly detection aims to identify defects in arbitrary novel domains; however, existing models assume that the auxiliary data contains a rich diversity of anomalies, neglecting the far more\ncomplex and unpredictable variations in real-world target domains. This\nstudy introduces DIVE, the first approach to investigate the scenario of\nlimited auxiliary anomaly priors and resolve the resulting substantial performance degradation. Through a shallow-and-deep text embedding injection strategy during visual encoding, DIVE learns to abstract generic\nanomaly concepts shared across the auxiliary training domain and diverse target domains. Moreover, we propose a disentanglement mechanism to tackle the suboptimal alignment between visual embeddings\nentangled with object semantics and object-agnostic textual prompts.\nExperiments demonstrate that, under the setting of limited anomaly\npatterns in auxiliary data, DIVE outperforms SOTA baselines by up to\n16.2% and 28.5% on two classification metrics, and 23.4%, 24.1%, and\n47.0% on three segmentation metrics, in terms of average performance\nacross twelve datasets. Furthermore, it maintains highly competitive performance when auxiliary data exhibits sufficient anomaly diversity.\nKeywords: Anomaly Detection · Zero-shot Learning · Prompt Engineering\n\nIntroduction\n\nAnomaly detection (AD) [5, 25] plays a crucial role in identifying instances that\ndeviate from normal patterns, forming the foundation of a wide range of applications, such as industrial defect detection [18,49], medical diagnosis [4,43], and\nfinancial fraud identification [27]. Traditional AD approaches predominantly rely\non the assumption that an adequate amount of training data can be acquired\nbeforehand. However, compiling extensive datasets for every newly encountered\nscenario is often infeasible. This limitation is prominent in two scenarios: 1) accessing or centralizing training data may violate strict privacy policies, such as\nhandling sensitive patient scans in collaborative diagnostics; 2) the target domain may intrinsically lack historical data, as seen in customized manufacturing\nwhere novel products demand immediate inspection.\n\n\f2\n\nG. Lu et al.\nGround truth\n\nAnomaly map\n\npixel-AUROC: 99.0%\npixel-AUPRO: 96.5%\npixel-RCPRO: 28.7%\n\nFig. 1: Left: AP results of five SOTA baseline models and DIVE (our model), evaluated\non six target datasets under different auxiliary pre-training settings. The green and\nred regions denote models pre-trained on MVTec and DTD, respectively. Right: The\nvisualization result of AnomalyCLIP on a single test image from the ColonDB dataset,\nwith performance measured by AUROC, AUPRO, and RCPRO (our proposed metric).\n\nTo overcome the aforementioned limitations, Zero-shot Anomaly Detection\n(ZSAD) has been proposed to identify anomalies in entirely unseen target domains without any prior domain-specific data collection. Existing ZSAD methods\npredominantly rely on large Vision-Language Models (VLMs), such as CLIP [33],\nwhich are pre-trained on massive image-text pairs and provide rich open-world\nvisual priors together with strong cross-modal alignment capabilities. Early studies primarily adopt hand-crafted prompt engineering [8,9,19], aligning visual features with manually designed text prompts. This paradigm heavily depends on\nhuman expertise and task-specific prompt design, which restricts model scalability and adaptability to diverse anomaly patterns. To alleviate this issue, recent\nworks have shifted towards learnable prompt tuning [10, 30, 46, 48], enabling\nthe model to automatically optimize text embeddings for anomaly detection.\nDespite the enhanced flexibility brought by learnable prompt tuning, existing\nZSAD paradigms still encounter two challenges:\nChallenge 1. Degraded generalization under limited auxiliary anomaly priors.\nExisting ZSAD methods primarily leverage learnable prompts or adapter networks to fine-tune VLMs, operating under the optimistic assumption that they\ncan fully exploit rich anomaly information in the auxiliary data. When such auxiliary anomaly priors are scarce, these methods are highly susceptible to overfitting on specific anomaly distributions. This inevitably leads to a failure when\ndealing with target domains that harbor more complex defects alongside a potentially continuous influx of novel object categories. For instance, as illustrated\nin Fig. 1 (left), when the auxiliary data is switched from MVTec (comprising\ndiverse industrial defects such as holes, stains, and cracks) to DTD (containing\n\n\fDIVE\n\n3\n\nonly texture anomalies), the average AP performance of these methods across\ntarget datasets drops by 9.9% to 23.3%.\nChallenge 2. Suboptimal alignment due to visual embeddings entangled with object\nsemantics. The feature space of pre-trained vision encoders is dominated by\nobject semantics. When the visual embeddings are aligned with text prompts\ndesigned exclusively for anomaly evaluation, the dominant object semantics act\nas disruptive noise. Consequently, the model’s inability to disentangle subtle\ndefect variations from salient object identities critically hinders the learning of\nanomaly-discriminative representations.\nTo this end, we propose a novel model called DIVE1 (Disentangled and textInjected Visual Embeddings) for ZSAD. To overcome the generalization bottleneck caused by insufficient abnormality coverage (Challenge 1), DIVE introduces\na shallow-and-deep text embedding injection strategy. At the shallow level, the\ncross-modal projection of learnable semantic text prompts into visual prompts\nenables synergistic optimization for effective generalization across unseen object semantics. Subsequently, by selectively fusing each patch token extracted\nat deep layers with the text embeddings of LLM-generated descriptions about\nnormality and abnormality through a cross-attention formulation, the model is\nempowered to abstract generic anomaly concepts from specific auxiliary visual\npatterns. For instance, a texture anomaly might share similarities in shape and\ncontour with an industrial fabric stain or a medical tumor shadow; thus, its corresponding patch can match with enriched text prompts like \"a photo of an\nobject with a stain\" or \"a photo of an object with a shadow\". As verified in Fig. 1 (left), benefiting from this strategy, DIVE restricts the average\nperformance penalty to a mere 5.3%, effectively reducing the degradation magnitude by approximately 46.5% to 77.3% compared to the drastic drop observed\nin baselines under the DTD-pretrained setting. Furthermore, to eliminate the\ninterference of object semantics on AD tasks (Challenge 2), a disentanglement\nmechanism is applied to decouple the global visual embeddings into independent\nanomaly-state and object-semantic subspaces, where each is optimized for crossmodal alignment under the guidance of its respective text prompt learner. By\nimposing orthogonal constraints, the state branch focuses exclusively on visual\ncues essential for anomaly identification.\nThis paper additionally introduce a segmentation evaluation metric to resolve\nthe flaws of the standard AUPRO metric [2,3] widely adopted in prior works [10,\n12, 17, 30, 46, 48], which ignores false positives in normal regions and over segmentation of anomaly regions. As depicted in Fig. 1 (right), while AnomalyCLIP\nhighlights three primary anomalous regions on a given test instance, two are\nstark false positives (including the region with the highest anomaly score). Since\nthe AUPRO metric solely focuses on the coverage of ground-truth anomalous\nregions, it yields a misleadingly inflated score of 96.5%. By integrating a regionwise prediction quality penalty, the proposed metric RCPRO circumvents this\nissue, restricting the score of the aforementioned test case to a realistic 28.7%.\nIn summary, this paper makes the following key contributions:\n1\n\nCode is available at https://github.com/ZhouF-ECNU/DIVE.\n\n\f4\n\nG. Lu et al.\n\n– To the best of our knowledge, this work pioneers the study of ZSAD under the setting of limited auxiliary anomaly priors and analyzes the severe\ngeneralization bottlenecks induced by this constraint. This realistic scenario\nreflects the unpredictable variations and the continual emergence of novel\nanomaly patterns in real-world target domains.\n– We propose DIVE, a tailored model for this challenging scenario, with two\ncore components for visual embedding learning: text embedding injection to\nenable generalization to unseen object categories and abstraction of generic\nanomaly concepts, and a disentanglement mechanism to alleviate semantic\ninterference in global embeddings.\n– We formulate RCPRO, a novel metric that rectifies AUPRO’s leniency towards false positives in normal regions and over-segmentation of anomalous\nregions. Experiments on twelve datasets verify the superiority and robustness\nof DIVE under both limited and sufficient anomaly diversity settings.\n\n2\n\nRelated Work\n\n2.1\n\nAnomaly Detection\n\nConventional AD are typically built on the assumption of i.i.d. training and\ntesting data, meaning they are sampled from the same domain. Based on the\navailability of labeled anomalies, these methods can be categorized into unsupervised [14,39,40,47] and semi-supervised [21,28,35,38] settings. Such a closed-set\nparadigm leads to limited generalization across diverse domains, necessitating\ncostly retraining when deployed in new scenarios.\nTo achieve broader applicability, Zero-shot Anomaly Detection has emerged\nas a promising direction. Generally, current ZSAD methods can be categorized\ninto two paradigms based on their utilization of Large Language Models (LLMs):\n(i) prompting-based detection [13, 42], which directly queries LLMs to generate\ndescriptive responses indicating anomalies, yet suffers from the imprecise articulation of fine-grained anomaly patterns; (ii) contrasting-based detection [23, 49]\noffers a more effective alternative by leveraging pre-trained VLMs (e.g., CLIP) to\ncompute similarity between image features and textual prompt embeddings for\nanomaly identification. As the pioneering work applying CLIP to ZSAD, WinCLIP [19] aligns window-level visual features with hand-crafted text prompts,\nwhose manual construction restricts adaptability and generalization, a limitation\nalso shared by VAND [8] and AnoVL [9]. To solve this issue, AnomalyCLIP [46]\nintroduces an object-agnostic prompt design, where specific portions of the text\nprompts are substituted with learnable tokens for dynamic optimization. Furthermore, some recent works like TPS [30] and FAPrompt [48] focus on designing\nfine-grained text prompts to capture nuanced abnormal patterns and enhance\nlocal grounding. While these approaches have somewhat contributed to improvements in ZSAD, their generalization heavily relies on the assumption of sufficient\nanomaly diversity in the auxiliary data, causing severe performance degradation\nwhen target domains exhibit significant shifts.\n\n\fDIVE\n\n2.2\n\n5\n\nPrompt Engineering\n\nVision-Language Models have exhibited impressive zero-shot capabilities, which\nare largely contingent upon effective prompt engineering. Early attempts relied on manually designed static text templates [33], which are not only laborintensive but also highly sensitive to specific wording choices. To overcome the\nlimitations of manual design, CoOp [45] pioneered the use of continuous learnable vectors in the text encoder. Subsequent research further advanced textual\nprompt tuning by learning prompt distributions (ProDA [29]), incorporating\nknowledge guidance (KgCoOp [41]), or leveraging optimal transport (PLOT [7]).\nIn response to the limited generalization of static learned prompts to unseen\nclasses, CoCoOp [44] introduced instance-conditional dynamic prompting, where\nlearnable tokens are conditioned on individual image features. Recognizing that\nsingle-modality adaptation is suboptimal for complex cross-modal alignment,\nMaPLe [22] explores multi-modal prompt learning, jointly optimizing learnable\nprompts in both vision and language branches. In this paper, we construct visual embeddings through text-injected synergistic learning and disentanglement,\nmaking CLIP more suitable for downstream AD tasks and enabling it to abstract\nanomaly concepts that are common across diverse domains.\n\n3\n\nProblem Formulation\n\nConsider an auxiliary training dataset Dtrain = {(xi , yi , Gi )}li=1 comprising\nl samples from a source domain, where xi ∈ RH×W ×3 is the input image,\nyi ∈ {0, 1} denotes the image-level label (with 0 representing normal and 1 representing anomalous), and Gi ∈ {0, 1}H×W represents the ground-truth pixel-level\nanomaly mask. The objective of Zero-Shot AD is to learn a generalized model\nk\non Dtrain capable of handling multiple test datasets {Dtest\n}K\nk=1 derived from K\ndistinct unseen target domains that are disjoint from the source domain. During\ninference, for any query image x ∈ Dtest , the model is expected to simultaneously\npredict a scalar anomaly score s ∈ [0, 1] indicating the probability of the image\nbeing anomalous, and a pixel-wise anomaly map M ∈ [0, 1]H×W that localizes\nthe anomalous regions. For both the image-level score s and the pixel values in\nM, a higher value indicates a higher degree of abnormality.\n\n4\n\nMethodology\n\nThe overall workflow of DIVE is illustrated in Fig. 2. Following the CLIP-based\nAD paradigm [6, 30, 31, 46, 48], DIVE aligns global and local visual embeddings\nwith designated “normal” and “abnormal” text prompts. Notably, a text embedding injection strategy (Vision-Language (V-L) coupling function F and crossattention networks CA in Fig. 2) is applied to enhance the model’s generalization\nto unseen object categories and complex anomaly patterns. Furthermore, to prevent visual embeddings from entangling with object semantics, we introduce a\ndisentanglement mechanism (branch networks Gstate and Gsemantic in Fig. 2) to\ncapture global visual information related to anomaly identification.\n\n\fG. Lu et al.\n\n[C1]...[Cm] {class}\n\n...\n...\n\n...\n...\n\n...\n\nLayer Q\n\n...\n...\n\n...\n\n...\n\nLayer Q-1\n\n...\n\nLayer Q’\n\n...\n\n...\n\nLayer P\n\nNormal/Anomalous state\n\n...\n\nLayer 1\n\n[U1]...[Um] object\n[V1]...[Vm] damaged object\n\nWord embed\n\n6\n\nImage-level\nlabel (0/1)\nCross-entropy\nloss\nSemantic\nalignment loss\n\nClass semantic\nText prompt\nText encoder\n\nGround truth\n\nRegularization loss\n\nInput images\nQuestion template\n\nViT block Q\n\nViT block Q-1\n\n...\n\nDisentangled\nloss\n\nVision encoder\n\na photo of an object\nwith a scratch\n\na photo of an object\nwith a clean surface\n\nDice loss\n\nSimilarity map\n\n...\nText\nEncoder\n\nYou are a cross-domain expert in\nanomaly detection (e.g., industrial\nmanufacturing, medical imaging).\nList at least ...\nOutput format: ...\n\n...\n\nViT block Q’\n\n...\n\nP\nblockN’\nViTblock\nViT\n\nViT block 1\n\nPatch embed\n\nFocal loss\n\nGlobal visual feature\n\nVisual prompt\n\n...\nLocal visual feature\nState visual embedding\nSemantic visual embedding\n\nAggregation patch feature\nState textual embedding\nSemantic textual embedding\n\nFig. 2: The workflow of DIVE.\n\n4.1\n\nIndependent Parallel Text Prompting\n\nIn traditional VLMs, text prompt templates typically entangle anomaly descriptions with specific object identities (e.g., \"a photo of a damaged {class}\")\n[19]. To decouple these semantics, AnomalyCLIP [46] discards the token {class}\nfrom the prompts. Alternatively, it introduces a set of learnable context vectors\nto construct two object-agnostic text prompt templates:\n  t_n = [U_1][U_2]\\ldots [U_m][object], \\quad t_a = [V_1][V_2]\\ldots [V_m][damaged][object]. \nHowever, directly aligning visual embeddings extracted by a pre-trained vision\nencoder with object-agnostic text prompts is suboptimal, as it forces semanticdominated visual embeddings into a textual space exclusively designed for anomaly\ndetection. To address this issue, we further design an independent semanticaware prompt learner on the text side. Operating in parallel with the aforementioned state-aware prompt learner, this module is specifically dedicated to capturing the semantic category information of target objects. This parallel design\nprovides textual anchors for the subsequent precise disentanglement of staterelated visual embeddings and semantic-related visual embeddings at the visual\nend. Specifically, for an auxiliary training data comprising R distinct object categories, we formulate the semantic-aware text prompt template using a separate\nset of learnable context vectors as follows:\n  t_c = [C_1][C_2]\\ldots [C_m][\\text {class}_r], \\quad r \\in \\{1, 2, \\ldots , R\\}, \nwhere [classr ] represents the word token for the r-th specific object class.\nTo encourage the textual context prompts in two prompt learner to better\ngeneralize to both anomaly detection and object recognition tasks, a new set of\nlearnable tokens is introduced into each transformer block Tj of the text encoder\n\n\fDIVE\n\n7\n\nup to depth P :\n(1)\nwhere N , A, and S denote the fixed input tokens; U i |h1 , V i |h1 , and C i |h1 represent\nthe newly introduced learnable tokens with a sequence length of h; and [·, ·, ·]\ndenotes the concatenation operation. Beyond the P th Transformer layer, each\nsubsequent layer takes the prompts from its preceding layer as input:\n(2)\nm\nm\n, Am\nUltimately, by feeding the final tokens NQ\nQ , and CQ into the text projection head, the two parallel prompt learners generate the state textual embeddings\nzn , za and the semantic textual embedding zc , respectively.\n\n4.2\n\nTextual Embedding Injection\n\nLacking prior knowledge regarding unseen categories and normal/abnormal patterns in the target domain, the pre-trained visual encoder suffers from restricted\ngeneralization capabilities in novel scenarios, which incurs a substantial performance degradation. Inspired by the multi-modal prompting mechanism of\nMaPLe [22], learnable text prompting are introduced to guide visual feature extraction, which preserves the cross-modal alignment capability for novel object\ncategories. Given that the shallow layers of Vision Transformer (ViT) are primarily responsible for capturing coarse-grained local structures such as edges\nand textures, we map the first h learnable tokens of the semantic text prompt\ninto visual prompts via a V-L coupling function F before the first layer, injecting them into the visual feature extraction process, i.e., [c1 , E1 , C̃1i |h1 ] =\nViT1 ([c0 , E0 , F(C0i |h1 )]), where c denotes the global visual feature, and E represents the local visual feature comprising H × W patch tokens.\nWhile the shallow injection of semantic text prompts improves generalization\nto unseen object categories, the model remains highly susceptible to overfitting\nthe known anomaly patterns in the auxiliary dataset. When encountering novel\nvariants, this overfitting directly leads to the misclassification of unseen anomalies and false alarms on normal samples. Given that the deep layers of ViT\npossess strong conceptual abstraction capabilities to represent object-agnostic\nstate features, we directly fuse the rich LLM-generated typological descriptions\nof normality and abnormality with the patch tokens via cross-attention in these\ndeep layers. This process compels the model to abstract the concrete visual patterns from the auxiliary training data and map them onto more generalizable,\nuniversal anomaly concepts. Formally, executing\nthis cross-modal fusion after\n  \\scalebox {0.77}{$ [c_{d}, E_d, \\tilde {C}_d] = \\texttt {ViT}_d([c_{d-1}, E_{d-1}, \\tilde {C}_{d-1}]), \\quad d=2, 3, \\dots , Q', $} \nthe Q′th ViT block:\n(3)\n\n\f8\n\nG. Lu et al.\n\n(4)\nwhere Zg denotes the text embeddings obtained by feeding diverse LLM-generated\ndescriptions of normality and abnormality (the question template are detailed\n⊤\nin Appendix A.1) into a pre-trained CLIP text encoder, and Wproj\nis a learnable linear projection matrix that maps these textual embeddings into the visual\nfeature space;\nCA(·, ·, ·) denotes the cross-attention operation, utilizing the vi  \\scalebox {0.98}{$ z_{st} = z_x + \\Delta z_{st} = z_x + \\mathcal {G}_{state}(z_x), \\quad z_{se} = z_x + \\Delta z_{se} = z_x + \\mathcal {G}_{semantic}(z_x). $} \nsual patch tokens as the query, and the projected text features as the key and\nvalue. Notably, these cross-modal state textual priors are injected via a residual\nconnection, where γ is a hyperparameter designed to balance the original visual\nfeatures and the injected textual information.\nTo extract the final visual embeddings, the global visual feature zx and local\n(i,j)\npatch features ze (i ∈ [1, H], j ∈ [1, W ]) are derived by processing the output\ntokens cQ and EQ via the image projection head.\n4.3\n\nVisual Embedding Disentanglement\n\nThe global visual feature zx extracted by the vision encoder is a highly entangled embedding, inherently coupling the object identity semantics with the\nanomaly state information. Directly aligning this entangled embedding with text\nprompts would inevitably blur the boundary between normal and anomalous instances across different categories. Therefore, we design two parallel learnable\nMulti-Layer Perceptron (MLP) networks, denoted as Gstate (·) and Gsemantic (·),\nto explicitly disentangle zx into two independent subspaces. This process yields\nthe state visual embedding zst and the semantic visual embedding zse , i.e.,\n(5)\nHere, instead of learning an absolute transformation, we formulate the disentanglement through a residual learning paradigm, where ∆zst and ∆zse represent\nthe learned residual offsets for the state and semantic subspaces, respectively.\nThis not only mitigates the risk of catastrophic forgetting of pre-trained visual\nconcepts but also stabilizes the optimization process.\n4.4\n\nTraining and Inference\n\nDuring the training phase, the backbone parameters of the pre-trained vision\nand text encoders are strictly frozen to retain their open-world generalization\ncapabilities. Only the state-aware and semantic-aware prompt learners, the V-L\ncoupling function F , the introduced cross-attention layers, and the visual MLP\nprojection heads (Gstate and Gsemantic ) are trainable.\nFor the anomaly classification task, we compute the cosine similarity between the state visual embedding zst and the normal/abnormal state textual\nembeddings {zn , za }. The state prediction probability pst is formulated as: pst =\n\n\fDIVE\n\n9\n\n\u0001\n⊤\n⊤\nsoftmax [zst\nzn , zst\nza ]/τ , where τ is a temperature hyperparameter. The stateaware alignment is optimized using the cross-entropy loss: Lstate = CE(pst , yi ).\nSimilarly, to ensure that the semantic branch accurately captures the object\nidentity, we align the semantic visual embedding zse with the semantic textual embeddings {zcr }R\nr=1 via a contrastive learning objective. Specifically, zse is\npulled closer to the textual embedding of its corresponding ground-truth category ycls , while being pushed apart from those of other mismatched categories:\n⊤ ycls\nexp(zse\nzc\n/τ )\n, where zcycls represents the positive textual emLsem = − log PR exp(z\n⊤ r\nse zc /τ )\nr=1\nbedding anchor associated with the actual class of the input image.\nTo enforce the disentanglement between the object semantics and anomaly\nstates, we apply an orthogonal constraint on the learned residual offsets. The\ndisentanglement loss is calculated using the squared cosine similarity between\n\u0010\n\u00112\n∆z ⊤ ∆z\nthe two offset vectors: Ldis = ∥∆zst ∥st ∥∆zsese ∥\n.\n2\n\n2\n\nFor the pixel-level segmentation task, we compute the similarity map S by\n(i,j)\nand the\ncalculating the similarity scores between the local patch features ze\nstate textual embeddings {zn , za }. Focal loss [26] and Dice loss [24] are jointly\napplied to optimize the anomaly segmentation map against the ground-truth\nmask G: Lseg = Focal(U p(S), G) + Dice(U p(Sa ), G) + Dice(U p(Sn ), I − G),\nwhere Sn and Sa denote the normal and abnormal probability channels of S,\nrespectively, and I is the full-one matrix. The operator U p(·) represents the upsampling operation used to restore the feature resolution to the original image\nsize. Furthermore, to prevent the visual prompt tokens from overpowering the\noriginal visual features and causing instability, we impose a regularization con1\nstraint Lreg = |C̃|\n||C̃||22 on the generated visual prompts C̃, where |C̃| denotes\nthe total number of elements in the prompt tensor.\nThe overall objective function is optimized as follows: L = Lstate + λLsem +\nλ′ Ldis + Lseg + λ′′ Lreg , where λ, λ′ and λ′′ are trade-off weighting coefficients.\nIn the detection phase, inference is performed using the frozen model weights\noptimized on the auxiliary dataset. Given a query test image x, we first calculate\nits image-level anomaly score s ∈ [0, 1]. We directly apply the abnormal channel\nof the state prediction probability as the anomaly score, which tends toward 1\nwhen the abnormal state textual embedding za is highly aligned with the state\nvisual embedding zst :\n\n  s = \\frac {\\exp (z_{st}^\\top z_a / \\tau )}{\\exp (z_{st}^\\top z_n / \\tau ) + \\exp (z_{st}^\\top z_a / \\tau )}. \n\n(6)\n\n(i,j)\n\nFor pixel-wise predictions, the final-layer patch features ze\nare used to compute a similarity map. Its abnormal channel Sa is then upsampled and spatially\nsmoothed to generate the final anomaly map: M = Gσ (U p(Sa )), where Gσ represents a Gaussian filter with a standard deviation σ designed to smooth the\nfinal segmentation boundaries and eliminate noise.\n\n\f10\n\nG. Lu et al.\n\n5\n\nExperiments\n\n5.1\n\nExperimental Setup\n\nDatasets and Baselines. To comprehensively evaluate the proposed DIVE,\nwe selected twelve publicly available datasets, spanning both industrial defect\ndetection (MVTec [2], DTD [1], Visa [50], MPDD [20], SDD [36], and BTAD [32])\nand clinical medical imaging (HeadCT [34], Br35H [16], BrainMRI [34], ISIC [15],\nColonDB [37], and TN3K [11]). The proposed DIVE is compared against several state-of-the-art baselines representing the latest advancements in ZSAD:\nAnomalyCLIP [46], AdaCLIP [6], AF-CLIP [10], AA-CLIP [31], and TPS [30].\nRecognizing that anomalous events are scarce in real-world applications, these\ndatasets were resampled to simulate an imbalanced setting, where anomalies\naccount for only a minor proportion of the entire distribution. The exceptions\nare ISIC, ColonDB, and TN3K. Given that they are exclusively utilized for segmentation evaluation and contain no normal instances, we follow their original\ntesting setups. Further statistical details for the datasets, along with descriptions\nof the baseline models, are provided in Appendix A.2.\nEvaluation Metrics. Following standard evaluation procedures in ZSAD, we\nassess performance at both the image and pixel levels. For image-level anomaly\nclassification, the Area Under the Receiver Operating Characteristic curve (AUROC) and Average Precision (AP) are reported. For pixel-level anomaly segmentation, AUROC along with the Area Under the Per-Region Overlap (AUPRO) [2,\n3] is used to evaluate localization accuracy.\nWe introduce a new segmentation metric, Region-Calibrated PRO (RCPRO),\ndesigned to overcome key limitations of the AUPRO metric (as analyzed in Section 1). First, a series of binary anomaly maps is generated by varying the\nthreshold from the minimum to the maximum anomaly score. For each threshold, two core curve coordinates are then computed: the X-axis represents the\nstandard PRO score, and the Y-axis represents the Region-Calibrated score,\nwhich quantifies the average prediction quality across all predicted anomalous\nregions. Specifically, if the maximum overlap between a predicted region and\nany ground-truth anomaly falls below a tolerance threshold (set to 0.05 of the\nmatched ground-truth area in our setting), the predicted region receives a score\nof zero, thereby penalizing false positives in normal regions. On the other hand,\nif a correctly located prediction expands excessively beyond the ground-truth\nboundary, its score decays inversely proportional to the excess area ratio to penalize over-segmentation. Ultimately, the RCPRO value is defined as the area\nunder the curve formed by these coordinates. Detailed formulas are provided in\nAppendix A.3.\nImplementation Details. The pre-trained CLIP model (ViT-L/14@336px)\nwas adopted as our backbone, with all input images uniformly resized to a resolution of 518 × 518. The learnable parameters detailed in Section 4.4 were\n\n\fDIVE\n\n11\n\nTable 1: Performance comparison of DIVE with baseline models utilizing DTD as\nauxiliary data for pre-training, evaluated across two tasks: image-level classification\n(AUROC, AP) and pixel-level segmentation (AUROC, AUPRO, RCPRO). The best\nresults are highlighted in bold and the second-best results are underlined.\nAnomalyCLIP\nAdaCLIP\nAF-CLIP\nAA-CLIP\nTPS\nDataset\nDIVE\n(ICLR’ 2024)\n(ECCV’ 2024)\n(MM’ 2025)\n(CVPR’ 2025)\n(AAAI’ 2025)\nHeadCT\n(95.1, 68.6)\n(84.1, 47.7)\n(70.9, 21.6)\n(75.4, 28.1)\n(97.9, 84.8)\n(99.1, 92.1)\nBr35H\n(91.6, 55.8)\n(92.2, 49.7)\n(59.6, 18.4)\n(80.5, 44.2)\n(94.8, 70.8)\n(97.3, 78.9)\nBrainMRI\n(89.9, 61.6)\n(92.8, 64.6)\n(81.8, 52.5)\n(83.1, 51.1)\n(93.6, 74.7)\n(96.4, 81.2)\nMVTec\n(81.7, 55.1)\n(84.8, 63.9)\n(88.2, 70.0)\n(78.4, 56.1)\n(85.5, 69.5)\n(89.3, 73.9)\nClassification\nVisa\n(66.8, 34.5)\n(71.2, 41.1)\n(76.3, 46.8)\n(60.8, 27.5)\n(75.0, 45.0)\n(77.8, 50.0)\n(image-level)\nMPDD\n(58.0, 21.9)\n(63.0, 21.2)\n(68.2, 21.2)\n(43.5, 15.3)\n(65.6, 25.0)\n(71.8, 30.1)\nSDD\n(79.1, 51.2)\n(72.0, 40.2)\n(75.2, 41.0)\n(72.1, 31.0)\n(78.8, 56.3)\n(81.7, 66.6)\nBTAD\n(72.0, 64.7)\n(80.4, 68.1)\n(86.2, 79.3)\n(74.8, 73.0)\n(61.6, 57.6)\n(85.2, 81.3)\nAverage\n(79.3, 51.7)\n(80.1, 49.6)\n(75.8, 43.9)\n(71.1, 40.8)\n(81.6, 60.5)\n(87.3, 69.3)\nISIC\n(70.7, 45.5, 41.2) (83.5, 15.5, 66.5) (74.1, 64.0, 64.1) (80.2, 71.8, 89.3) (70.2, 45.2, 61.8) (86.4, 76.5, 74.2)\nColonDB (62.9, 26.2, 15.5) (76.3, 17.3, 30.1) (72.7, 58.8, 44.4) (78.7, 63.2, 59.6) (57.8, 18.6, 26.2) (81.8, 68.2, 56.2)\nTN3K (69.6, 21.5, 21.1) (72.6, 8.1, 54.0) (65.6, 44.9, 36.4) (79.0, 52.7, 68.6) (64.9, 26.2, 43.8) (81.3, 55.8, 56.8)\nMVTec (80.9, 48.2, 23.1) (89.4, 37.8, 24.3) (90.0, 80.2, 36.4) (89.6, 76.9, 21.9) (66.0, 20.2, 0.3) (90.5, 80.9, 37.0)\nSegmentation\nVisa\n(82.1, 45.2, 3.6) (90.6, 48.9, 14.1) (91.2, 73.9, 10.9) (90.0, 71.6, 8.7) (68.8, 21.2, 0.2) (92.0, 80.2, 23.2)\n(pixel-level)\nMPDD (75.0, 22.0, 0.4) (91.7, 57.5, 15.7) (91.9, 80.9, 9.0) (91.8, 78.2, 5.2) (81.9, 42.4, 0.9) (93.7, 81.7, 24.3)\nSDD\n(78.5, 38.3, 20.4) (84.5, 0.8, 4.2) (86.2, 53.8, 8.3) (86.3, 55.3, 8.9) (49.2, 9.5, 0.3) (86.9, 65.0, 24.4)\nBTAD (63.3, 13.1, 5.4) (84.4, 7.2, 15.9) (87.0, 67.6, 25.4) (79.9, 49.7, 11.9) (52.3, 13.4, 4.3) (85.7, 60.6, 27.2)\nAverage (72.9, 32.5, 16.3) (84.1, 24.1, 28.1) (82.3, 65.5, 29.4) (84.4, 64.9, 34.3) (63.9, 24.6, 17.2) (87.3, 71.1, 40.4)\nTask\n\nupdated using the Adam optimizer. Training was conducted with a batch size\nof 8, applying a learning rate of 1 × 10−3 to the prompt learners and coupling\nfunction F , and 5 × 10−5 to the cross-attention network CA. Within the text encoder, the learnable prompt length was set to m = 12 and the prompting depth\nto P = 9. The length of the text prompts used for projection was configured to\nh = 4. For the vision encoder, cross-attention modules were introduced into the\nfinal four ViT blocks (i.e., from Q′ = 21 to Q = 24) to enable the injection of the\nLLM-generated text embeddings. For all baseline models, we used their official\nimplementations released by the authors. All experiments were implemented in\nPyTorch 2.0.0 and conducted on a server equipped with a single NVIDIA L40S\nGPU, an Intel(R) Xeon(R) Silver 4110 CPU, and 160 GB of RAM.\n5.2\n\nExperimental Results and Analysis\n\nOverall Performance. Comparing Table 1 and Table 2 reveals a significant\nperformance degradation when utilizing DTD as auxiliary data instead of MVTec.\nIn the image-level classification task, baseline models suffer an average drop of\n7.1%-11.6% in AUROC and 9.9%-23.3% in AP, with a similar downward trend\nconsistently observed in the segmentation task. This discrepancy arises because\nMVTec provides diverse anomaly classes that naturally share closer patterns\nwith the target domains. Since real-world applications frequently encounter unpredictable domain shifts, the DTD pre-training setting presents a more realistic\nand challenging scenario. In contrast, DIVE successfully mitigates this degradation under this challenging setting, restricting the performance drop in the\nclassification task to a mere 2.8% for AUROC and 5.3% for AP. DIVE yields\nthe best results on nearly all testing datasets and ranks second-best on the\nrare exceptions. For image-level classification, DIVE achieves average improvements of 5.7%-16.2% in AUROC and 8.8%-28.5% in AP. Similarly, for pixel-level\n\n\f12\n\nG. Lu et al.\n\nTable 2: Performance comparison of DIVE with baseline models utilizing MVTec as\nauxiliary data for pre-training.\nAnomalyCLIP\nAdaCLIP\nAF-CLIP\nAA-CLIP\nTPS\nDIVE\n(ICLR’ 2024)\n(ECCV’ 2024)\n(MM’ 2025)\n(CVPR’ 2025)\n(AAAI’ 2025)\nHeadCT\n(98.3, 77.9)\n(97.4, 78.0)\n(92.9, 69.9)\n(87.5, 39.2)\n(98.1, 82.4)\n(99.1, 91.2)\nBr35H\n(95.1, 71.8)\n(95.4, 72.6)\n(96.0, 75.4)\n(82.5, 55.4)\n(95.2, 73.4)\n(96.1, 76.9)\nBrainMRI\n(95.5, 77.2)\n(91.2, 71.3)\n(96.5, 79.0)\n(84.9, 52.7)\n(94.1, 77.4)\n(97.3, 84.0)\nDTD\n(91.5, 78.3)\n(97.6, 92.1)\n(89.6, 75.4)\n(86.6, 77.2)\n(91.3, 81.4)\n(92.8, 84.0)\nClassification\nVisa\n(81.7, 53.7)\n(83.4, 57.4)\n(85.0, 61.8)\n(73.9, 43.5)\n(83.3, 56.4)\n(84.0, 57.7)\n(image-level)\nMPDD\n(72.2, 31.4)\n(75.1, 38.8)\n(74.0, 40.8)\n(59.7, 23.3)\n(73.1, 31.9)\n(75.6, 41.1)\nSDD\n(83.0, 70.1)\n(81.6, 59.5)\n(73.7, 45.9)\n(71.6, 40.7)\n(83.8, 73.6)\n(83.9, 71.1)\nBTAD\n(91.5, 87.1)\n(90.9, 90.2)\n(91.8, 89.1)\n(82.2, 85.4)\n(90.7, 86.1)\n(92.0, 90.4)\nAverage\n(88.6, 68.4)\n(89.1, 70.0)\n(87.4, 67.2)\n(78.6, 52.2)\n(88.7, 70.3)\n(90.1, 74.6)\nISIC\n(84.9, 69.4, 69.6) (81.4, 13.9, 69.4) (90.1, 78.1, 85.7) (77.6, 68.4, 85.4) (66.4, 40.0, 59.4) (88.5, 76.4, 73.9)\nColonDB (82.1, 69.7, 53.4) (80.8, 21.2, 36.7) (80.7, 66.6, 51.2) (73.4, 63.0, 54.3) (60.1, 25.5, 28.1) (83.2, 71.4, 54.9)\nTN3K (82.0, 49.3, 51.2) (78.4, 5.8, 52.8) (81.4, 62.2, 62.7) (67.1, 35.5, 52.4) (65.5, 28.9, 45.1) (84.1, 54.5, 55.7)\nDTD (98.6, 92.8, 48.1) (99.0, 65.9, 27.9) (99.5, 92.0, 37.0) (92.9, 81.5, 33.3) (86.9, 65.5, 11.1) (99.7, 94.7, 49.9)\nSegmentation\nVisa\n(94.9, 81.8, 24.5) (92.6, 33.9, 16.2) (96.2, 81.1, 23.9) (92.7, 76.8, 10.9) (79.4, 44.7, 0.6) (95.0, 85.1, 25.4)\n(pixel-level)\nMPDD (92.3, 77.8, 17.8) (94.5, 24.3, 17.7) (95.3, 82.4, 20.4) (94.5, 82.5, 7.6) (87.5, 58.6, 0.2) (95.5, 84.4, 18.5)\nSDD\n(91.3, 59.9, 32.6) (86.0, 35.2, 26.8) (90.5, 55.5, 26.0) (77.0, 44.5, 9.9) (72.6, 33.8, 6.2) (88.2, 60.0, 33.5)\nBTAD (93.8, 72.9, 34.0) (93.6, 47.9, 29.4) (95.0, 53.8, 34.6) (91.3, 71.7, 20.3) (66.4, 29.9, 6.1) (94.3, 73.6, 37.6)\nAverage (90.0, 71.7, 41.4) (88.3, 31.0, 34.6) (91.1, 71.5, 42.7) (83.3, 65.5, 34.3) (73.1, 40.9, 19.6) (91.1, 75.0, 43.7)\nTask\n\nDataset\n\nsegmentation, it delivers substantial average gains of 2.9%-23.4% in AUROC,\n5.6%-47.0% in AUPRO, and 6.1%-24.1% in our proposed RCPRO metric. Furthermore, Table 2 also demonstrates that given sufficient anomaly diversity in\nthe auxiliary data, DIVE maintains highly competitive performance, yielding\nthe best average results across all evaluated datasets.\nTo delve into several intriguing phenomena observed in Table 1, Fig. 3 visualizes the anomaly maps generated by DIVE and three relevant baselines for\nfurther analysis. Observation 1. Although TPS ranks second or third in imagelevel classification across most datasets, it underperforms in segmentation. As\nillustrated by its anomaly maps, although TPS possesses the capacity to recognize anomalous images globally, it generates numerous small-scale false positives\nscattered across normal regions. Observation 2. AdaCLIP outperforms AA-CLIP\nin our proposed RCPRO metric on several industrial datasets (e.g., MVTec,\nVisa, and MPDD), despite falling significantly behind in AUPRO. The visualization results show that AA-CLIP tends to predict excessively large connected\ncomponents, leading to severe over-segmentation and prominent false positives\nin normal regions. In contrast, AdaCLIP can localize the core anomalies, albeit with potentially incomplete boundaries. As the AUPRO metric primarily\nemphasizes the recall of ground-truth regions without imposing penalties for\nextraneous predictions, AA-CLIP receives an inflated AUPRO score. This phenomenon compellingly demonstrates the necessity and rationality of our RCPRO\nmetric. Observation 3. AA-CLIP yields higher RCPRO scores than DIVE on several medical imaging datasets, most notably ISIC. This exception stems from the\nspecific characteristics of the ISIC dataset, where anomalous regions occupy a\ndominant portion of the entire image. Consequently, AA-CLIP’s tendency to\npredict excessively expansive connected regions, which causes over-segmentation\nelsewhere, inadvertently becomes a advantage here. Nevertheless, DIVE still precisely segments the core pathological areas of these anomalies.\n\n\fDIVE\nMVTec\n\nMVTec\n\nVisa\n\nVisa\n\nMPDD\n\nBTAD\n\nColonDB\n\nISIC\n\ncable\n\nbottle\n\nchewinggum\n\ncandle\n\nmetal plate\n\ntexture\n\ncolon\n\nskin\n\n13\n\nOriginal\nimage\n\nGround\ntruth\n\nAdaCLIP\n\nAA-CLIP\n\nTPS\n\nDIVE\n\nFig. 3: Visualization of anomaly maps generated by DIVE and baseline models across\ndiverse datasets, under the setting where DTD is utilized as auxiliary pre-training data.\nTable 3: Performance of DIVE and its ablated variants on the MVTec and Visa\ndatasets. The evaluation metrics for the classification task are (AUROC, AP), and for\nthe segmentation task are (AUROC, AUPRO, RCPRO).\nMVTec\nVisa\nClassification\nSegmentation\nClassification\nSegmentation\nDIVE-dis (88.7↓0.6 , 72.1↓1.8 ) (89.9↓0.6 , 80.5↓0.4 , 36.8↓0.2 ) (76.2↓1.6 , 48.4↓1.6 ) (91.8↓0.2 , 79.5↓0.7 , 22.9↓0.3 )\nDIVE-text(s) (88.8↓0.5 , 73.2↓0.7 ) (90.2↓0.3 , 80.5↓0.4 , 36.2↓0.8 ) (76.9↓0.9 , 49.1↓0.9 ) (91.6↓0.4 , 79.4↓0.8 , 23.1↓0.1 )\nDIVE-text(d) (87.3↓2.0 , 70.8↓3.1 ) (89.7↓0.8 , 77.3↓3.6 , 35.6↓1.4 ) (75.3↓2.5 , 46.0↓4.0 ) (91.1↓0.9 , 77.9↓2.3 , 21.6↓1.6 )\nDIVE-text (86.9↓2.4 , 69.5↓4.4 ) (88.3↓2.2 , 76.6↓4.3 , 35.5↓1.5 ) (74.4↓3.4 , 43.9↓6.1 ) (90.4↓1.6 , 74.4↓5.8 , 20.5↓2.7 )\nDIVE\n(89.3, 73.9)\n(90.5, 80.9, 37.0)\n(77.8, 50.0)\n(92.0, 80.2, 23.2)\nModels\n\nAblation Study. To evaluate the contribution of each proposed component,\nwe perform ablation studies using several DIVE variants: 1) DIVE-dis ablates\nthe disentanglement mechanism; 2) DIVE-text entirely discards the text embedding injection. DIVE-text(s) and DIVE-text(d) are further introduced to ablate\nthe shallow-level and deep-level injections, respectively. Table 3 presents the results of the aforementioned ablated models under the setting of using DTD as\nauxiliary data. Comparing DIVE-dis with the full DIVE model reveals that the\nperformance degradation predominantly occurs in the two classification metrics.\nThis is attributed to the fact that the disentanglement operates on the global\nvisual embeddings, which are aligned with state textual embeddings to derive\nthe image-level anomaly scores. Furthermore, we observe that the performance\ndegradation of DIVE-text is more pronounced than that of DIVE-dis . In scenarios\nwhere the auxiliary data lacks sufficient anomaly diversity, the text embedding\n\n\f14\nOriginal image\n\nG. Lu et al.\nGround truth\n\nAttention map\n\nOriginal image\n\nGround truth\n\nAttention map\n\nOriginal image\n\nGround truth\n\nhazelnut\nOriginal image\n\nGround truth\n\nblotchy\n\nAttention map\n\nOriginal image\n\nGround truth\n\nAttention map\n\nOriginal image\n\nGround truth\n\ntile\n\nwood\n\nmatted\n\nAttention map\n\nAttention map\n\nfibrous\n\nFig. 4: Visualization of attention maps between image patches of representative categories from the auxiliary data (first row: MVTec, second row: DTD) and the embeddings of LLM-generated descriptions. The attention score for each patch is calculated\nby summing the normalized similarity probabilities of all anomaly descriptions.\n\ninjection strategy is critical to capture generic anomaly concepts, thereby safeguarding the model against a decline in generalization.\nA further analysis of the DIVE-text variants shows that DIVE-text(d) exhibits\na more pronounced performance degradation than DIVE-text(s) , underscoring\nthe importance of incorporating LLM-generated descriptions of normality and\nabnormality into the deep-level patch tokens. Within the DIVE framework, the\ncross-attention networks are tasked with integrating these text embeddings, and\nthe resulting patch-wise attention maps are visualized in Fig. 4. It can be observed that the cross-attention module in DIVE excels at focusing on anomalous\nregions, though it also exhibits a slight tendency to attend to object boundaries. For instance, regarding the hazelnut category in Fig. 4, high attention\nscores are assigned not only to the damaged area but also to the contour of the\nhazelnut against the background. Consequently, as shown in Fig. 3, DIVE may\noccasionally introduce minor false positive predictions along object edges (e.g.,\nthe anomaly maps for the cable in MVTec and the colon in ColonDB).\n\nHyperparameter Sensitivity. In this section, we conduct a sensitivity analysis of DIVE on the MVTec and Visa datasets concerning three hyperparameters:\nthe prompting depth P , the learnable prompt length m, and the length of the\ntext prompts used for projection h. First, to evaluate the model’s sensitivity to\nP , we keep the other two parameters fixed and vary the value of P within the set\n{3, 6, 9, 12}. As illustrated in Fig. 5, DIVE is relatively sensitive to the parameter\nP . With the increase of P , the model’s performance exhibits an initial upward\ntrend followed by a subsequent decline. This phenomenon can be attributed to\nthe fact that deeper prompt layers facilitate a more refined construction of the\ntextual embedding space regarding anomalous states and object semantics; however, when the prompting layers become excessively deep, it may degrade the\noriginal representation capacity of the pre-trained VLMs.\nNext, we evaluate the sensitivity of DIVE to the hyperparameters m and\nh, with their variation ranges set to {6, 8, 10, 12} and {2, 4, 6, 8}, respectively.\n\n\fDIVE\n\n15\n\nFig. 5: AUROC ((left Y-axis) and AP (right Y-axis) results under varying values of\nthe hyperparameters P , m, and h.\n\nThe hyperparameter m denotes the length of the learnable context initialized at\nthe first layer of the text encoder. As observed in Fig. 5, DIVE demonstrates\nrelatively low sensitivity to m. This can be interpreted as indicating that a small\nnumber of learnable context tokens is already sufficient to adequately capture\nthe essential information required to distinguish between normal and anomalous states. Regarding the hyperparameter h, we select a relatively small value\n(e.g., 4). This choice is motivated by the observation that the DIVE’s performance tends to plateau beyond this value. Furthermore, maintaining a smaller\nvalue prevents the visual encoding process from incurring excessive overhead or\nintroducing redundant noise.\n\n6\n\nConclusion\n\nIn this paper, we investigate a more realistic and challenging scenario for ZSAD\ncharacterized by limited auxiliary anomaly priors. To address this, we propose\nDIVE, a novel model that integrates and fine-tunes learnable networks and\nprompts to construct robust visual embeddings. By leveraging text embedding\ninjection and a disentanglement mechanism, DIVE is enable to capture anomaly\npatterns shared between the auxiliary training domain and unknown target domains. Extensive experiments demonstrate that DIVE exhibiting superior generalization on testing data that heavily deviates from the auxiliary training distribution. Future work will focus on mitigating the small false-positive noise\npatches introduced by DIVE along object boundaries, to further enhance its\nfine-grained anomaly localization capability.\n\nReferences\n1. Aota, T., Tong, L.T.T., Okatani, T.: Zero-shot versus many-shot: Unsupervised\ntexture anomaly detection. In: WACV. pp. 5564–5572 (2023)\n2. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Mvtec ad–a comprehensive\nreal-world dataset for unsupervised anomaly detection. In: CVPR. pp. 9592–9600\n(2019)\n3. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Uninformed students:\nStudent-teacher anomaly detection with discriminative latent embeddings. In:\nCVPR. pp. 4183–4192 (2020)\n\n\f16\n\nG. Lu et al.\n\n4. Cai, Y., Chen, H., Cheng, K.T.: Rethinking autoencoders for medical anomaly\ndetection from a theoretical perspective. In: MICCAI. pp. 544–554 (2024)\n5. Cao, Y., Xu, X., Zhang, J., Cheng, Y., Huang, X., Pang, G., Shen, W.: A survey\non visual anomaly detection: Challenge, approach, and prospect. arXiv preprint\narXiv:2401.16402 (2024)\n6. Cao, Y., Zhang, J., Frittoli, L., Cheng, Y., Shen, W., Boracchi, G.: Adaclip: Adapting clip with hybrid learnable prompts for zero-shot anomaly detection. In: ECCV.\npp. 55–72 (2024)\n7. Chen, G., Yao, W., Song, X., Li, X., Rao, Y., Zhang, K.: Plot: Prompt learning\nwith optimal transport for vision-language models. In: ICLR (2023)\n8. Chen, X., Han, Y., Zhang, J.: A zero-/few-shot anomaly classification and segmentation method for cvpr 2023 vand workshop challenge tracks 1&amp;2: 1st place on\nzero-shot ad and 4th place on few-shot ad. arXiv preprint arXiv:2305.17382 (2023)\n9. Deng, H., Zhang, Z., Bao, J., Li, X.: Anovl: Adapting vision-language models for\nunified zero-shot anomaly localization. arXiv preprint arXiv:2308.15939 (2023)\n10. Fang, Q., Lv, W., Su, Q.: Af-clip: Zero-shot anomaly detection via anomaly-focused\nclip adaptation. In: ACM MM. pp. 4846–4855 (2025)\n11. Gong, H., Chen, G., Wang, R., Xie, X., Mao, M., Yu, Y., Chen, F., Li, G.: Multitask learning for thyroid nodule segmentation with thyroid region prior. In: ISBI.\npp. 257–261 (2021)\n12. Gong, T., Chu, Q., Liu, B., Zhou, W., Yu, N.: Fe-clip: Frequency enhanced clip\nmodel for zero-shot anomaly detection and segmentation. In: ICCV. pp. 21220–\n21230 (2025)\n13. Gu, Z., Zhu, B., Zhu, G., Chen, Y., Tang, M., Wang, J.: Anomalygpt: Detecting\nindustrial anomalies using large vision-language models. In: AAAI. vol. 38, pp.\n1932–1940 (2024)\n14. Guo, J., Lu, S., Zhang, W., Chen, F., Li, H., Liao, H.: Dinomaly: The less is\nmore philosophy in multi-class unsupervised anomaly detection. In: CVPR. pp.\n20405–20415 (2025)\n15. Gutman, D., Codella, N.C., Celebi, E., Helba, B., Marchetti, M., Mishra, N.,\nHalpern, A.: Skin lesion analysis toward melanoma detection: A challenge at the\ninternational symposium on biomedical imaging (isbi) 2016, hosted by the international skin imaging collaboration (isic). arXiv preprint arXiv:1605.01397 (2016)\n16. Hamada, A.: Br35h: Brain tumor detection 2020. https://www.kaggle.com/\ndatasets/ahmedhamada0/brain-tumor-detection (2020), kaggle dataset\n17. He, J., Cao, M., Peng, S., Xie, Q.: Rareclip: Rarity-aware online zero-shot industrial\nanomaly detection. In: ICCV. pp. 24478–24487 (2025)\n18. Ho, C.H., Peng, K.C., Vasconcelos, N.: Long-tailed anomaly detection with learnable class names. In: CVPR. pp. 12435–12446 (2024)\n19. Jeong, J., Zou, Y., Kim, T., Zhang, D., Ravichandran, A., Dabeer, O.: Winclip:\nZero-/few-shot anomaly classification and segmentation. In: CVPR. pp. 19606–\n19616 (2023)\n20. Jezek, S., Jonak, M., Burget, R., Dvorak, P., Skotak, M.: Deep learning-based\ndefect detection of metal parts: evaluating current methods in complex conditions.\nIn: ICUMT. pp. 66–71 (2021)\n21. Jiang, M., Han, S., Huang, H.: Anomaly detection with score distribution discrimination. In: SIGKDD. pp. 984–996 (2023)\n22. Khattak, M.U., Rasheed, H., Maaz, M., Khan, S., Khan, F.S.: Maple: Multi-modal\nprompt learning. In: CVPR. pp. 19113–19122 (2023)\n\n\fDIVE\n\n17\n\n23. Li, X., Zhang, Z., Tan, X., Chen, C., Qu, Y., Xie, Y., Ma, L.: Promptad: Learning\nprompts with only normal samples for few-shot anomaly detection. In: CVPR. pp.\n16838–16848 (2024)\n24. Li, X., Sun, X., Meng, Y., Liang, J., Wu, F., Li, J.: Dice loss for data-imbalanced\nnlp tasks. In: ACL. pp. 465–476 (2020)\n25. Li, Z., Yan, Y., Wang, X., Ge, Y., Meng, L.: A survey of deep learning for industrial\nvisual anomaly detection. Artif. Intell. Rev. 58(9), 279 (2025)\n26. Lin, T.Y., Goyal, P., Girshick, R., He, K., Dollár, P.: Focal loss for dense object\ndetection. In: ICCV. pp. 2980–2988 (2017)\n27. Lu, G., Lin, X., Pavlovski, M., Zhang, X., Zhou, F.: Targeted detection of anomalous merchants on integrated payment platforms via multifaceted transaction representation learning. In: IEEE BigData. pp. 2170–2178 (2024)\n28. Lu, G., Zhou, F., Pavlovski, M., Zhou, C., Jin, C.: A robust prioritized anomaly\ndetection when not all anomalies are of primary interest. In: ICDE. pp. 775–788\n(2024)\n29. Lu, Y., Liu, J., Zhang, Y., Liu, Y., Tian, X.: Prompt distribution learning. In:\nCVPR. pp. 5206–5215 (2022)\n30. Ma, J., Xie, W., Ye, H., Li, D., Fang, L.: Aligning and prompting anything for\nzero-shot generalized anomaly detection. In: AAAI. vol. 39, pp. 5964–5972 (2025)\n31. Ma, W., Zhang, X., Yao, Q., Tang, F., Wu, C., Li, Y., Yan, R., Jiang, Z., Zhou,\nS.K.: Aa-clip: Enhancing zero-shot anomaly detection via anomaly-aware clip. In:\nCVPR. pp. 4744–4754 (2025)\n32. Mishra, P., Verk, R., Fornasier, D., Piciarelli, C., Foresti, G.L.: Vt-adl: A vision\ntransformer network for image anomaly detection and localization. In: ISIE. pp.\n01–06 (2021)\n33. Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry,\nG., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models\nfrom natural language supervision. In: ICML. pp. 8748–8763 (2021)\n34. Salehi, M., Sadjadi, N., Baselizadeh, S., Rohban, M.H., Rabiee, H.R.: Multiresolution knowledge distillation for anomaly detection. In: CVPR. pp. 14902–14912\n(2021)\n35. Shou, H., Lu, G., Pavlovski, M., Zhou, F.: Read: Robust and efficient anomaly\ndetection under data contamination and limited supervision. In: SIGKDD. pp.\n2586–2596 (2025)\n36. Tabernik, D., Šela, S., Skvarč, J., Skočaj, D.: Segmentation-based deep-learning\napproach for surface-defect detection. J. Intell. Manuf. 31(3), 759–776 (2020)\n37. Tajbakhsh, N., Gurudu, S.R., Liang, J.: Automated polyp detection in colonoscopy\nvideos using shape and context information. IEEE Trans. Med. Imaging 35(2),\n630–644 (2015)\n38. Wei, R., He, Z., Pavlovski, M., Zhou, F.: Gad: A generalized framework for anomaly\ndetection at different risk levels. In: CIKM. pp. 2513–2522 (2024)\n39. Xu, H., Pang, G., Wang, Y., Wang, Y.: Deep isolation forest for anomaly detection.\nIEEE Trans. Knowl. Data Eng. 35(12), 12591–12604 (2023)\n40. Xu, H., Wang, Y., Wei, J., Jian, S., Li, Y., Liu, N.: Fascinating supervisory signals\nand where to find them: Deep anomaly detection with scale learning. In: ICML.\npp. 38655–38673 (2023)\n41. Yao, H., Zhang, R., Xu, C.: Visual-language prompt tuning with knowledge-guided\ncontext optimization. In: CVPR. pp. 6757–6767 (2023)\n42. Zhang, J., He, H., Chen, X., Xue, Z., Wang, Y., Wang, C., Xie, L., Liu, Y.: Gpt4v-ad: Exploring grounding potential of vqa-oriented gpt-4v for zero-shot anomaly\ndetection. In: IJCAI. pp. 3–16 (2024)\n\n\f18\n\nG. Lu et al.\n\n43. Zhang, X., Xu, M., Qiu, D., Yan, R., Lang, N., Zhou, X.: Mediclip: Adapting clip\nfor few-shot medical image anomaly detection. In: MICCAI. pp. 458–468 (2024)\n44. Zhou, K., Yang, J., Loy, C.C., Liu, Z.: Conditional prompt learning for visionlanguage models. In: CVPR. pp. 16816–16825 (2022)\n45. Zhou, K., Yang, J., Loy, C.C., Liu, Z.: Learning to prompt for vision-language\nmodels. Int. J. Comput. Vis. 130(9), 2337–2348 (2022)\n46. Zhou, Q., Pang, G., Tian, Y., He, S., Chen, J.: Anomalyclip: Object-agnostic\nprompt learning for zero-shot anomaly detection. In: ICLR (2024)\n47. Zhou, Y., Xu, X., Song, J., Shen, F., Shen, H.T.: Msflow: Multiscale flow-based\nframework for unsupervised anomaly detection. IEEE Trans. Neural Netw. Learn.\nSyst. (2024)\n48. Zhu, J., Ong, Y.S., Shen, C., Pang, G.: Fine-grained abnormality prompt learning\nfor zero-shot anomaly detection. In: ICCV. pp. 22241–22251 (2025)\n49. Zhu, J., Pang, G.: Toward generalist anomaly detection via in-context residual\nlearning with few-shot sample prompts. In: CVPR. pp. 17826–17836 (2024)\n50. Zou, Y., Jeong, J., Pemula, L., Zhang, D., Dabeer, O.: Spot-the-difference selfsupervised pre-training for anomaly detection and segmentation. In: ECCV. pp.\n392–408 (2022)\n\n\fDIVE\n\nA\n\nAppendix\n\nA.1\n\nPrompt Template for Generating Descriptions of Normality\nand Abnormality\n\n19\n\nAs detailed in the main manuscript, DIVE utilizes a deep-level text embedding\ninjection strategy to abstract generic anomaly concepts. To acquire rich and\ndiverse textual descriptions of normality and abnormality, we leverage the advanced reasoning capabilities of Large Language Models (LLMs). Specifically,\nthe GPT-4o model is applied to generate these descriptive textual priors. The\nexact prompt template used to query the model is provided below:\nPrompt Template for Generating Descriptions\nSystem Prompt:\nYou are a cross-domain expert in anomaly detection (e.g., industrial manufacturing, medical imaging). Your task is to provide a comprehensive\nand diverse set of generic visual descriptions for both anomalous (defective) and normal (flawless) states. These descriptions should be abstract\nenough to apply across various domains.\nInstruction:\nList at least 100 diverse descriptions for the anomalous state (e.g., crack,\nscratch, stain) and at least 35 descriptions for the normal state (e.g.,\nflawless surface, uniform texture).\nOutput format:\nPlease provide the results exactly as a Python dictionary with two keys:\n“Abnormal Lexicon” and “Normal Lexicon”. Each value must be a list of\nstrings. Every single description in the lists must strictly follow this exact\nsyntactic template: “a photo of an object with [specific state/condition]”.\nBased on the aforementioned prompt, the GPT-4o model generated a comprehensive dictionary containing 100 abnormal and 35 normal descriptions. These\ndescriptions cover a wide range of structural, textural, and color-related states\ncharacterizing both normality and abnormality. A truncated example of the standard output format is presented below:\n{\n\" Abnormal Lexicon \" : [\n\" a photo of an object\n\" a photo of an object\n\" a photo of an object\n\" a photo of an object\n...\n],\n\" Normal Lexicon \" : [\n\" a photo of an object\n\" a photo of an object\n\nwith\nwith\nwith\nwith\n\na\na\na\na\n\ncrack \" ,\nstain \" ,\ncolor shift \" ,\ntexture mismatch \" ,\n\nwith a flawless surface \" ,\nwith uniform texture \" ,\n\n\f20\n\nG. Lu et al.\n\" a photo of an object with a clean appearance \" ,\n...\n]\n\n}\n\nDue to space constraints, we only list a few representative examples above. The\ncomplete set of generated textual descriptions utilized in our experiments is\navailable in our code repository at https://github.com/ZhouF-ECNU/DIVE.\nA.2\n\nExtended Details of Datasets and Baselines\n\nDataset Statistics. Table 4 summarizes the detailed statistics of the twelve\ndatasets used in our experiments. Notably, for the MVTec and DTD datasets,\na small portion of the training data is partitioned to construct a validation set,\nwhich is utilized for hyperparameter tuning for DIVE and the baseline models.\nTo faithfully simulate real-world industrial and clinical scenarios where defects or\ndiseases are inherently rare events, we resampled the datasets to introduce a class\nimbalance. Excluding the three medical datasets (ISIC, ColonDB, and TN3K)\nused for segmentation evaluation, the proportion of anomalous samples in the\ntesting data is constrained to a small minority, ranging from approximately 9.1%\n(e.g., Br35H and MPDD) to 18.1% (e.g., SDD) across the evaluated datasets.\nTable 4: Detailed statistics of the twelve datasets evaluated in our experiments. Cls.\nand Seg. denote whether the dataset provides corresponding annotations and is utilized\nfor anomaly classification (image-level) and anomaly segmentation (pixel-level) tasks,\nrespectively. The symbol ‘-’ indicates that the specific data split or task is not applicable\nto the dataset in our zero-shot setting.\nDomain\n\nDataset\n\nTraining\n\nTesting\n\nTask\n\nNormal Anomaly Normal Anomaly Cls. Seg.\n\nMVTec\nDTD\nVisa\nIndustrial\nMPDD\nSDD\nBTAD\n\n4,096\n1,007\n-\n\n423\n240\n-\n\n3,269\n847\n9,621\n1,064\n181\n451\n\n334\n120\n1,200\n107\n40\n90\n\n✓\n✓\n✓\n✓\n✓\n✓\n\n✓\n✓\n✓\n✓\n✓\n✓\n\nHeadCT\nBr35H\nBrainMRI\nMedical\nISIC\nColonDB\nTN3K\n\n-\n\n-\n\n100\n1,500\n98\n-\n\n10\n150\n10\n379\n380\n614\n\n✓\n✓\n✓\n×\n×\n×\n\n×\n×\n×\n✓\n✓\n✓\n\nOverview of Baseline Models. To comprehensively evaluate the performance\nof our proposed DIVE, we conduct extensive comparisons against five recent\n\n\fDIVE\n\n21\n\nstate-of-the-art (SOTA) baseline models in the field of zero-shot anomaly detection. These selected competitors include AnomalyCLIP (ICLR’ 2024), AdaCLIP (ECCV’ 2024), AF-CLIP (MM’ 2025), AA-CLIP (CVPR’ 2025), and\nTPS (AAAI’ 2025). Brief descriptions of these five baseline models are provided\nas follows:\n– AnomalyCLIP proposes an object-agnostic prompt learning framework designed to capture normal and abnormal semantics independent of specific\nforeground object categories.\n– AdaCLIP introduces a hybrid prompt learning approach that jointly adapts\nvisual and textual spaces by generating image-aware prompts and imposing\ntoken-level attention constraints to achieve precise cross-modal alignment.\n– AF-CLIP leverages a two-branch prompt learning architecture incorporating a text-driven local anomaly focusing mechanism to simultaneously capture global semantics and selectively enhance fine-grained representations of\nactual defective regions.\n– AA-CLIP combines dual-perspective prompting to decouple object semantics from defect appearances, along with a token-adaptive masking mechanism that selectively focuses on critical anomalous cues to sharpen anomaly\nperception.\n– TPS addresses the granularity mismatch between anomaly classification and\nsegmentation by generating fine-grained text prompts for precise pixel-level\nalignment, and leverages a joint learning mechanism to model the complementary dependencies between the two tasks.\nA.3\n\nMathematical Formulation of the RCPRO Metric\n\nIn this section, we provide the step-by-step mathematical derivation for our\nnewly proposed evaluation metric, RCPRO (Region-Calibrated PRO). To avoid\nany ambiguity, please note that the mathematical notations defined herein are\nself-contained and limited to this section, bearing no relation to the symbols\ndefined in the main manuscript.\nThe final RCPRO metric is formulated by calculating the Area Under the\nCurve (AUC). We plot this curve by evaluating our newly defined RegionCalibrated score on the Y-axis against the standard PRO score on the X-axis\nacross varying anomaly score thresholds. Next, we detail the computation of\nthe proposed Region-Calibrated score. This score is fundamentally designed to\nevaluate the average quality of all predicted anomalous regions. Specifically, at\nt\na given anomaly score threshold t, let P t = {P1t , P2t , . . . , PM\n} denote the set of\nextracted anomalous connected components (regions) from the prediction mask,\nwhere M is the total number of predicted regions. The overall Region-Calibrated\nscore at threshold t, denoted as RCt , is computed as the average of the individual\ncalibrated scores across all predicted regions:\n  \\text {RC}^t = \\frac {1}{M} \\sum _{m=1}^{M} \\text {RC}(P_m^t), \n\n(7)\n\n\f22\n\nG. Lu et al.\n\nt\nt\nwhere RC(Pm\n) is the quality score assigned to the mth predicted region Pm\n.\nTo determine this individual quality score, let T = {T1 , T2 , . . . , TN } represent\nthe set of connected ground-truth anomalous regions present in the image, where\nt\nN is the total number of true defect regions. For a specific predicted region Pm\n, if\nit has absolutely no overlap with any ground-truth anomalous region, its score is\nt\nt\nt\npenalized to 0, i.e., RC(Pm\n) = 0, if ∀Tn ∈ T, |Pm\n∩Tn | = 0. Conversely, if Pm\ndoes\nintersect with the ground truth, we identify its best-matched region, denoted as\nt\n∩ Tn |.\nTn∗ , which shares the maximum overlapping area: Tn∗ = arg max|Pm\nTn ∈T\n\nSubsequently, we establish a filtering mechanism to ensure the validity of this\nt\nand Tn∗ is deemed negligibly small (i.e.,\nprediction. If the overlap between Pm\nless than a predefined threshold τ , which is empirically set to 0.05 × |Tn∗ | in our\nt\n)\nsetting), the prediction is also considered a false alarm. Its quality score RC(Pm\nis penalized to 0:\n  \\text {RC}(P_m^t) = 0, \\quad \\text {if } |P_m^t \\cap T_{n^*}| &lt; \\tau . \n(8)\nThe objective of these conditions is to penalize false positives in normal regions.\nFor predictions that successfully pass the aforementioned filtering stage, we\nfurther evaluate their precision to penalize over-segmentation of anomaly regions.\nt\n), which quantifies\nTo this end, we compute an excess area ratio, denoted as E(Pm\nthe proportion of the predicted region that redundantly expands beyond the\n|P t |−|P t ∩T ∗ |\nt\n) = m |T m∗ | n .\nboundaries of the matched ground-truth anomaly Tn∗ : E(Pm\nn\nTo suppress excessively inflated predictions that dilute localization accuracy, we\nintroduce an inverse decay penalty controlled by an excess tolerance threshold\nt\n) for a valid\nθexc (set to 2.0 in our experiments). The final quality score RC(Pm\npredicted region is thus formulated as:\n  \\text {RC}(P_m^t) = \\begin {cases} 1, &amp; \\text {if } \\text {E}(P_m^t) \\le \\theta _{exc} \\\\ \\frac {\\theta _{exc}}{\\text {E}(P_m^t)}, &amp; \\text {if } \\text {E}(P_m^t) &gt; \\theta _{exc} \\end {cases} \n\n(9)\n\nThis mechanism guarantees that a precisely localized prediction within the acceptable tolerance receives a maximum score of 1, whereas predictions that aggressively over-segment the anomalous region are proportionally downgraded.\n\n\f</code></pre></article>\n        \n</main>\n\n<script src=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js\"></script>\n<script>\n\nfunction initTheme() {\n  const saved = localStorage.getItem('kb-theme') || 'light';\n  document.documentElement.setAttribute('data-theme', saved);\n  updateThemeIcon(saved);\n}\nfunction toggleTheme() {\n  const cur = document.documentElement.getAttribute('data-theme') || 'light';\n  const next = cur === 'light' ? 'dark' : 'light';\n  document.documentElement.setAttribute('data-theme', next);\n  localStorage.setItem('kb-theme', next);\n  updateThemeIcon(next);\n}\nfunction updateThemeIcon(t) {\n  const btn = document.getElementById('theme-toggle-btn');\n  if (btn) btn.innerHTML = t === 'dark' ? '☀️' : '🌙';\n}\ndocument.addEventListener('DOMContentLoaded', initTheme);\n\nfunction setViewMode(m) {\n  const grid = document.getElementById('bento-grid-view');\n  const list = document.getElementById('list-table-view');\n  const bGrid = document.getElementById('view-grid-btn');\n  const bList = document.getElementById('view-list-btn');\n  if (m === 'list') {\n    if (grid) grid.style.display = 'none';\n    if (list) list.style.display = 'flex';\n    if (bGrid) bGrid.classList.remove('active');\n    if (bList) bList.classList.add('active');\n  } else {\n    if (grid) grid.style.display = 'grid';\n    if (list) list.style.display = 'none';\n    if (bGrid) bGrid.classList.add('active');\n    if (bList) bList.classList.remove('active');\n  }\n  localStorage.setItem('kb-view', m);\n}\ndocument.addEventListener('DOMContentLoaded', () => {\n  const s = localStorage.getItem('kb-view') || 'grid';\n  setViewMode(s);\n});\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  document.querySelectorAll('pre').forEach(pre => {\n    const b = document.createElement('button');\n    b.className = 'copy-code-btn';\n    b.innerText = 'Copy';\n    b.onclick = () => {\n      const c = pre.querySelector('code') ? pre.querySelector('code').innerText : pre.innerText;\n      navigator.clipboard.writeText(c).then(() => {\n        b.innerText = 'Copied!';\n        setTimeout(() => { b.innerText = 'Copy'; }, 2000);\n      });\n    };\n    pre.appendChild(b);\n  });\n});\n\nwindow.addEventListener('keydown', (e) => {\n  if ((e.key === '/' || (e.metaKey && e.key === 'k')) && document.activeElement.tagName !== 'INPUT' && document.activeElement.tagName !== 'TEXTAREA') {\n    e.preventDefault();\n    const q = document.getElementById('global-search-input');\n    if (q) q.focus();\n  }\n});\n\n// Scrollspy for TOC\nwindow.addEventListener('scroll', () => {\n  const headers = document.querySelectorAll('.article-body h1, .article-body h2, .article-body h3');\n  const scrollPos = window.scrollY + 100;\n  headers.forEach(h => {\n    if (h.offsetTop <= scrollPos) {\n      const id = h.getAttribute('id');\n      if (id) {\n        document.querySelectorAll('.reading-sidebar a').forEach(a => {\n          a.classList.toggle('active', a.getAttribute('href') === '#' + id);\n        });\n      }\n    }\n  });\n});\n\ndocument.addEventListener(\"DOMContentLoaded\", function() {\n  if (window.renderMathInElement) {\n    renderMathInElement(document.body, {\n      delimiters: [\n        {left: '$$', right: '$$', display: true},\n        {left: '$', right: '$', display: false},\n      ],\n      throwOnError : false\n    });\n  }\n});\n</script>\n\n</body>\n</html>\n"