"<!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>PromptMoE: Generalizable Zero-Shot Anomaly Detection\nvia Visually-Guided Prompt Mixtures\nYuheng Shao1,2 , Lizhang Wang1 , Changhao Li1 , Peixian Chen2 , Qinyuan Liu1, 3 *\n1\n\narXiv:2511.18116v1 [cs.CV] 22 Nov 2025\n\nSchool of Computer Science and Technology, Tongji University\n2\nAnt Group\n3\nKey Laboratory of Embedded System and Service Computing, Ministry of Education, Tongji University\n{yuhengshao, lizhangwang, chli, liuqy}@tongji.edu.cn, peixian.cpx@antgroup.com\nAbstract\nZero-Shot Anomaly Detection (ZSAD) aims to identify\nand localize anomalous regions in images of unseen object classes. While recent methods based on vision-language\nmodels like CLIP show promise, their performance is constrained by existing prompt engineering strategies. Current\napproaches, whether relying on single fixed, learnable, or\ndense dynamic prompts, suffer from a representational bottleneck and are prone to overfitting on auxiliary data, failing to\ngeneralize to the complexity and diversity of unseen anomalies. To overcome these limitations, we propose PromptMoE.\nOur core insight is that robust ZSAD requires a compositional\napproach to prompt learning. Instead of learning monolithic\nprompts, PromptMoE learns a pool of expert prompts, which\nserve as a basis set of composable semantic primitives, and\na visually-guided Mixture-of-Experts (MoE) mechanism to\ndynamically combine them for each instance. Our framework\nmaterializes this concept through a Visually-Guided Mixture\nof Prompt (VGMoP) that employs an image-gated sparse\nMoE to aggregate diverse normal and abnormal expert state\nprompts, generating semantically rich textual representations\nwith strong generalization. Extensive experiments across 15\ndatasets in industrial and medical domains demonstrate the\neffectiveness and state-of-the-art performance of PromptMoE.\n\nIntroduction\nAnomaly detection is a crucial technology with widespread\napplications, such as ensuring quality in industrial manufacturing (Bergmann et al. 2019; Jezek et al. 2021; Zou et al.\n2022; Wang et al. 2024) and assisting in medical diagnosis (Buda, Saha, and Mazurowski 2019; Huang et al. 2024).\nFor example, in automated production lines, models must\naccurately detect subtle defects like scratches, blemishes, or\ndeformations. In practice, however, new product categories\nand unforeseen defect types frequently emerge, making it\ninfeasible to collect extensive labeled data or retrain models\nfor every new class. This has highlighted the importance of\nZero-Shot Anomaly Detection (ZSAD), which aims to detect anomalies in object categories that are not seen during\ntraining. ZSAD is both essential and inherently challenging.\nRecently, the emergence of large-scale vision-language\nmodels, particularly CLIP (Radford et al. 2021), offers new\n* Corresponding author.\nCopyright © 2026, Association for the Advancement of Artificial\nIntelligence (www.aaai.org). All rights reserved.\n\nAbnormal Visual Feature\nNormal Visual Feature\nVisual Querying\n&amp; Routing (Normal)\nVisual Querying\n&amp; Routing (Abnormal)\n\n(a) Monolithic Prompt\nNormal Prompt\nAbnormal Prompt\n\n(b) Compositional Prompt\nNormal\nState Pool\nAggregation\n\nAggregation\n\nAbnormal\nState Pool\n\nFigure 1: (a) Monolithic Prompt vs. (b) Compositional\nPrompt. Unlike monolithic prompts with fixed representations, our compositional prompts employs visual querying to\ndynamically aggregate expert prompts, treated as semantic\nprimitives, into an instance-specific textual representation.\n\npossibilities for ZSAD due to their strong generalization\nand zero-shot recognition capabilities. CLIP, trained on massive image-text pairs, learns a shared semantic space that\naligns visual and textual information. Motivated by this, recent studies have explored adapting CLIP for ZSAD. Some\nmethods (Jeong et al. 2023; Chen, Han, and Zhang 2023a)\nreformulate ZSAD as an image-text matching task using\nhand-crafted prompts to describe “normal” and “abnormal”\nstates. To reduce the need for manual design, later methods\nlike AnomalyCLIP (Zhou et al. 2024) introduced learnable\nprompts that are optimized on auxiliary datasets.\nAlthough prompt-based methods have shown promising results, they face notable limitations in representational\npower and generalization. Firstly, the single-prompt strategy,\nwhether manually designed or learned as a single normal/abnormal pair, suffers from a clear representational bottleneck,\n\n\fas a fixed prompt vector struggles to capture the diverse\npatterns of normality and abnormality in unseen classes.\nSecondly, simply increasing the number of learnable static\nprompts is not a viable solution, as it significantly increases\nthe risk of overfitting to the auxiliary data; the model tends\nto memorize specific pattern-prompt combinations from the\ntraining set instead of learning generalizable abstract concepts. Furthermore, approaches (Cao et al. 2024; Qu et al.\n2024) inspired by CoCoOp (Zhou et al. 2022) that dynamically generate prompts from visual instances often rely on a\nsingle mapping network to handle all visual variations, making it difficult to generate specialized prompts for specific,\nfine-grained anomaly patterns. Finally, the overfitting issue\ninherent in static designs persists even in deep prompting\napproaches. As demonstrated by previous work (Zhou et al.\n2024), when static learnable prompts are inserted into the\ntext encoder’s intermediate layers, they are effective only in\nshallow stages. Applying them to deeper layers harms zeroshot detection on unseen classes, revealing a critical generalization failure of static prompt designs.\nTo address the aforementioned challenges, we propose\nPromptMoE, a novel framework that shifts prompt learning\nfrom a monolithic to a compositional paradigm, as conceptually illustrated in Fig. 1. Our key insight is that to effectively\nrepresent the open-ended and diverse nature of normal and\nabnormal patterns in ZSAD, a compositional representation\ncapability for prompts is key, rather than learning a fixed\nor single dynamic prompt. Accordingly, PromptMoE shifts\nthe paradigm from learning a monolithic state description\nto learning a basis set of composable semantic primitives\n(i.e., expert prompts) and a router to dynamically combine\nthem based on the visual instance. This Mixture-of-Experts\n(MoE) approach allows for the creation of a rich variety\nof instance-specific prompts from a finite set of parameters, while the sparse activation inherent to MoE helps mitigate overfitting. Our framework implements this strategy\nthrough a novel Visually-Guided Mixture of Prompt (VGMoP) module, which employs an image-gated sparse MoE\nfor specialized selection from distinct expert pools to construct fine-grained, instance-adaptive textual prompts. This\nprocess is further regularized by expert load balancing and\ndecoupling losses to enhance the diversity of the expert pool,\nthereby improving generalization to unseen classes.\nOur main contributions are summarized as follows:\n• We propose PromptMoE, a framework for ZSAD that replaces monolithic prompts with a compositional learning\nparadigm. It employs a MoE mechanism to dynamically\ncombine a learned basis of semantic primitives, enhancing generalization and mitigating overfitting.\n• We design a VGMoP module to realize this paradigm.\nIt utilizes an image-gated sparse router and distinct expert pools to dynamically compose specialized normal\nand abnormal state prompts for each visual instance.\n• Extensive experiments 15 industrial and medical datasets\ndemonstrate that our method achieves SOTA performance, validating its effectiveness on the ZSAD task.\n\nFigure 2: ZSAD performance of PromptMoE compared to\nstate-of-the-art methods. Left: I-AUROC. Right: P-PRO.\n\nRelated Work\nZero-Shot Anomaly Detection\nRecent research in ZSAD has been significantly advanced\nby Vision-Language Models (VLM) like CLIP (Radford\net al. 2021), which typically reframe the task as image-text\nmatching. Early pioneering works, such as WinCLIP (Jeong\net al. 2023), introduce a prompt ensembling strategy, generating rich textual descriptions by combining numerous handcrafted templates with state words. To overcome the reliance\non manual design, AnomalyCLIP (Zhou et al. 2024) proposes prompt learning, which optimizes learnable vectors to\nreplace fixed textual prompts, thereby automatically learning general anomaly concepts.\nHowever, static learnable prompts show limited adaptability to different visual instances, leading subsequent research toward dynamic, visually-guided prompt generation.\nFor instance, AdaCLIP (Cao et al. 2024) combines static\nand dynamic prompts, while VCP-CLIP (Qu et al. 2024) injects visual context at multiple stages of the text encoder.\nAnother approach, taken by Bayes-PFL (Qu et al. 2025),\nmodels the prompt space as a learnable probability distribution and generates diverse prompts via sampling. Similarly, FAPrompt (Zhu et al. 2025) learns a set of finegrained prompts and adapts them using a visual prior extracted from the test image. While these methods enhance\ninstance-adaptability, they often rely on complex generative\nor probabilistic modeling. In contrast, our work explores using a MoE mechanism to achieve visually-guided prompt\ngeneration in a compositional manner.\n\nMixture of Experts\nMixture-of-Experts is a classic conditional computation\nparadigm that effectively scales model capacity without a\nproportional increase in computational cost by activating\nonly a sparse subset of “expert” subnetworks for each input (Shazeer et al. 2017). This strategy has recently been\nwidely and successfully applied to scale large-scale language models to trillions of parameters (Fedus, Zoph, and\nShazeer 2022) and has also been adapted for vision models (Riquelme et al. 2021). In these mainstream applications, MoE typically functions as a dynamic router that selects one of several expert MLP layers to process each input token. In contrast, our PromptMoE framework explores\n\n\fC Cosine Similarity\n\nText Encoder\n\nCompositional\nPrompt\n\nVision Encoder\n\nVGMoP\n\nProj.\n\nPromptMoE\n\nC\n\nC\n\nAnomaly Score\n\nAnomaly Map\n\nGT\n\nFigure 3: Framework of PromptMoE.\n\nProblem Formulation\n\nImage-Gated\nSparse Router\n\nCrossAttention\n\n𝑛𝑛\n𝐬𝐬𝐸𝐸,2\n\n··· ···\n\nTop-k\nSelection\n\n𝑛𝑛\n𝐬𝐬2,𝑀𝑀\n𝑛𝑛\n𝐬𝐬𝐸𝐸,𝑀𝑀\n\n[class] 𝑸𝑸1··· 𝑸𝑸𝑀𝑀𝑞𝑞\n\nAbnormal Expert Weights\n\nAbnormal Prompt Pool\n𝑎𝑎\n𝐬𝐬1,1\n\n𝑎𝑎\n𝐬𝐬1,2\n\n··· ···\n\n𝑎𝑎\n𝐬𝐬1,𝑀𝑀\n\n𝑎𝑎\n𝐬𝐬2,2\n\n··· ···\n\n𝑎𝑎\n𝐬𝐬2,𝑀𝑀\n\n𝑎𝑎\n𝐬𝐬𝐸𝐸,1\n\n𝑎𝑎\n𝐬𝐬𝐸𝐸,2\n\n··· ···\n\n𝑎𝑎\n𝐬𝐬𝐸𝐸,𝑀𝑀\n\n𝑎𝑎\n𝐬𝐬2,1\n\n···\n\nWe propose PromptMoE, a framework that utilizes visuallyguided prompt mixtures to improve generalization to unseen classes, thereby enhancing ZSAD performance. As illustrated in Fig. 3, given an input image x, a vision en(l)\ncoder extracts comprehensive patch-level features Fx ∈\nDx\nR(HW +1)×Dx and a global feature Fcls\n, where H\nx ∈ R\nand W denote the number of patches, and Dx is the feature dimension. The core innovation of PromptMoE is the\nVGMoP module, detailed in Fig. 4. It takes the visual fea(l)\ntures Fx as input and dynamically generates fine-grained,\n(l)\ninstance-specific normal and abnormal textual prompts, Tn\n(l)\nand Ta , for each visual instance. Finally, layer-wise simi(l)\nlarities between textual embeddings FT and patch features\n(l)\nFx are aggregated to produce the anomaly map M.\n\nLearnable\n\n𝑛𝑛\n𝐬𝐬𝐸𝐸,1\n\n···\n\nOverview\n\nForezn\n\n··· ···\n\n𝑛𝑛\n𝐬𝐬1,𝑀𝑀\n\n[class] 𝑸𝑸1··· 𝑸𝑸𝑀𝑀𝑞𝑞\n\n···\n\nThe goal of ZSAD is to detect and segment anomalous\nregions in images, especially for object classes that are\nunseen during training. Formally, given an input image\nx ∈ Rh×w×3 , the model aims to predict an image-level\nanomaly score s as well as a pixel-level anomaly map M ∈\nRh×w . We utilize an auxiliary training dataset Dtrain =\ntrain\n{(xi , ci , mi )}N\n, where each sample consists of an imi=1\nage xi , an image-level label ci , and a pixel-level anomaly\nmask mi . The label ci ∈ {0, 1} indicates whether the image is normal (ci = 0) or abnormal (ci = 1), and the\nmask mi ∈ {0, 1}h×w provides pixel-wise annotations for\ntest\nanomalous regions. The test set Dtest = {xj }N\nj=1 contains\nimages from unseen classes that are disjoint from those in\nthe training set, i.e., Ctrain ∩ Ctest = ∅. The model is trained\nto learn a generalizable patterns of normality and abnormality from Dtrain , and to achieve the detection of anomalies\nin unseen classes within Dtest .\n\n𝒗𝒗𝑎𝑎\n\nΣ\n\n··· ···\n\n···\n\n𝒌𝒌𝑎𝑎\n\nMixture\nText\nPrompt\n\nΣ\n\n𝑛𝑛\n𝐬𝐬1,2\n\n𝑛𝑛\n𝐬𝐬2,2\n\n𝑛𝑛\n𝐬𝐬2,1\n\n···\n\n𝒒𝒒𝑎𝑎\n···\n\n𝒗𝒗𝑛𝑛\n\nNormal Prompt Pool\n𝑛𝑛\n𝐬𝐬1,1\n\n···\n\n···\n𝒒𝒒𝑛𝑛\n\n𝒌𝒌𝑛𝑛\n\nNormal Expert Weights\nTop-k\nSelection\n\n···\n\nMethod\n\nVisually-Guided\nMixture of Prompt\n\n···\n\na novel application of MoE in prompt engineering: we repurpose the MoE mechanism as a strategy for compositional\nprompt generation. Under this framework, the “experts” are\nlearnable prompt embedding segments, and an image-gated\nrouter learns to select a specialized subset of these experts\nto dynamically construct a highly adaptive textual representation for each visual instance.\n\nFigure 4: Architecture of our proposed Visually-Guided\nMixture of Prompt (VGMoP) module. A sparse router,\nguided by cross-attention between learnable queries and image features, dynamically selects and aggregates top-k experts from respective prompt pools to construct instancespecific normal and abnormal text prompts.\n\nVisually-Guided Mixture of Prompt\nPrevious ZSAD method (Zhou et al. 2024) introduces learnable pairs of normal and abnormal text prompts to guide pretrained CLIP models in distinguishing these two concepts,\nthereby avoiding tedious manual template design. However,\nsuch single, fixed prompts possess limited expressive power,\nstruggling to adequately represent the complex and diverse\nanomaly patterns found in unseen classes. Although some\nsubsequent studies (Cao et al. 2024; Qu et al. 2024) attempt\nto dynamically generate prompts using visual features to enhance instance adaptability, their effectiveness is often constrained by the inherent representational bottlenecks of visual encoders. Furthermore, simply increasing the number of\nprompts or their complexity can easily lead to model overfitting on seen classes, consequently impairing its generalization ability to unseen classes.\nTo address these limitations, we propose VGMoP, a\nvisually-guided prompt mixture that effectively utilizes\nricher prompt information to enhance generalization to unseen classes. Unlike fixed or single dynamically-generated\nprompts, VGMoP employs an image-gated sparse MoE\nmechanism. This adaptively selects and aggregates a sparse\n\n\fsubset of relevant expert prompts from a pool for the current\nvisual query instance, thereby constructing distinct textual\nrepresentations for normal and abnormal states.\nMixture Text Prompt Structure. Under the VGMoP\nstrategy, we construct two mixture text prompts for each visual instance x: a normal-state prompt Tn ∈ RNn ×D and\nan abnormal-state prompt Ta ∈ RNa ×D , where D denotes\nthe token embedding dimension. The prompt are defined as:\nTn = [Snagg ][cls][Qctx ],\n\n(1)\nTa = [Snagg ][Saagg ][cls][Qctx ],\nwhere Snagg ∈ RMn ×D represents the aggregated normal\nstate. Inspired by Li et al. (2024), we append an aggregated\nabnormal state suffix Saagg ∈ RMa ×D to Snagg to construct\nthe abnormal-state prompt. Both Snagg and Saagg are generated\nby the visually-guided MoE mechanism. Qctx ∈ RMq ×D\ndenotes a set of learnable context tokens shared by both\nprompts, and [cls] denotes the embedding of a given category name or a generic placeholder such as “object”. The\nresulting Tn and Ta provide the text encoder with dynamically adapted, instance-specific semantic guidance.\nVisually-Guided MoE for State Aggregation. To\nachieve effective compositional representations and enhance generalization to unseen classes, Snagg and Saagg are\ngenerated using a visually-guided MoE procedure applied\nindependently for each layer l ∈ I. For each layer, the\nprocess begins by constructing a comprehensive visual\n(l)\nrepresentation Fx ∈ R(HW +1)×Dx , obtained by concatenating the patch features of the layer with the global\nfeature Fcls\nx . A set of learnable, layer-specific state queries\n(l)\n(l)\nq\n∈ RNq ×D then attend to Fx via a cross-attention\nlayer to extract fine-grained, state-relevant visual contextual\nrepresentations O(l) ∈ RNq ×D , computed as:\n(l)\n\n(l)\n\n(l)\nQ(l) = q(l) , K (l) = F(l)\n= F(l)\nx WK , V\nx WV ,\n!\n(l) (l) ⊤\nQ K\n√\nO(l) = Softmax\nV (l) ,\nD\n(l)\n\n(2)\n\n(l)\n\nwhere WK , WV ∈ RDx ×D are linear projection matrices\n(l)\nmapping Fx to dimension D. The routing representation is\nthen obtained by average pooling: r(l) = mean(O(l) ) ∈ RD .\nThis representation r(l) is fed into a layer-specific imagegated sparse router G(l) (·), composed of a two-layer MLP\n(i.e., Linear-ReLU-Linear). The router produces routing logits z(l) for the corresponding layer-specific expert prompt\n(l)\npool E (l) = {sj ∈ RM ×D }E\nj=1 . From these logits, we\n(l)\nselect the top-k values, denoted as ztop , and retrieve their\n(l)\nassociated expert prompts {stop,i }ki=1 . Normalized gating\n(l)\nweights are then computed as w(l) = Softmax(ztop ), which\n(l)\nare used to aggregate the layer-specific state prompt Sagg :\n\nS(l)\nagg =\n\nk\nX\ni=1\n\n(l) (l)\n\nwi stop,i .\n\n(3)\n\nNote that we utilize independent expert prompt pools for\nnormal and abnormal states, En and Ea respectively, and apply this Visually-Guided MoE procedure to each. This separated design is intended to provide specialized representational spaces for normality and abnormality, thereby enhancing generalization to complex patterns in unseen classes.\nAuxiliary Loss. For each visual instance, VGMoP selects\nk expert state prompts from the expert pool. However, during training, prompts that perform better in the early stages\nare more likely to be repeatedly selected by the sparse router,\nleading to imbalanced prompt utilization. This imbalance\nmay cause the prompt pool to degenerate into a fixed combination of prompt states, undermining the dynamics and sparsity of selection. Drawing inspiration from prior research\n(Shazeer et al. 2017; Fedus, Zoph, and Shazeer 2022), this\nloss encourages a uniform average contribution from all experts across the batch, defined as:\n\n!2 \nE\nB\nX\nX\nX\n1\n(l)\nE\nLbalance = α\npi,j  ,\nB\n(4)\nj=1\ni=1\nl∈I\n\n(l)\n\np\n\n= Softmax(z(l) ),\n\nwhere B is the batch size, E is the number of experts, p(l)\nis the router’s output probability distribution over experts at\nlayer l, and α is the loss weight. In practice, we find this\nloss is most effective when combined with a learning rate\nwarmup schedule during the initial training epochs.\nTo further enhance the generalization ability of state\nprompts, we introduce an expert decoupling loss, Ldecouple ,\naimming to promote representational diversity within the expert prompt pool, ensuring that individual state prompt learn\n(l)\n(l)\ndiscriminative features. Let s̄j = mean(sj ) ∈ RD denote\n(l)\n\nthe mean embedding representation of each state prompt sj\nfrom the prompt pool E (l) . These are then normalized to\nyield ŝj = s̄j /∥s̄j ∥2 . The normalized mean representations\n(l)\nŝj form the rows of a matrix Ŝ(l) ∈ RE×D . The expert\ndecoupling loss Ldecouple is defined as:\nX\nLdecouple = β\n∥Ŝ(l) (Ŝ(l) )T − IE ∥2F ,\n(5)\nl∈I\n\nwhere β is a hyperparameter weight, IE is the identity matrix, and ∥·∥2F denotes the squared Frobenius norm. This loss\npromotes orthogonality among the mean representations of\ndifferent expert prompts within each layer’s pool, enhancing\nthe overall model’s diversity.\n\nDiscussion\nIn summary, the design of our PromptMoE framework addresses several key considerations. First, to effectively utilize the rich yet redundant patch features from the visual\nencoder, we employ a query-driven cross-attention mechanism. This mechanism learns to actively distill state-relevant\nvisual signals from the numerous patches, avoiding the loss\nof critical local information that can occur with simple average pooling. Second, this query-and-distill mechanism is\nextended layer-wise, enabling the generation of fine-grained\n\n\ftextual prompts that correspond to visual features at diverse\nsemantic depths. Finally, dedicated auxiliary losses are introduced to ensure the MoE system trains stably and generalizes effectively: a load balancing loss maintains the router’s\ndynamism, while a decoupling loss enhances generalization\nto unseen classes by promoting expert diversity.\n\nTraining and Inference\nPromptMoE computes the pixel-level anomaly map M by\naggregating similarity maps over a predefined set of visual\nencoder layers I. For each layer l ∈ I, the map is derived\n(l)\nfrom the similarity between its patch features Fx and the\n(l)\ncorresponding textual embedding FT :\n)/τ ),\n\n(6)\n\nl∈I\n\nwhere Up(·) upsamples the similarity map to (h, w) and τ\nis a temperature parameter. The image-level anomaly score\ns combines the peak value of the anomaly map M with the\nsimilarity between the global image feature Fcls\nx and the fi(max(I))\n:\nnal layer’s textual embedding FT\ns=\n\n1\n(max(I)) ⊤\n(max(M) + Softmax(Fcls\n/τ ′ )).\nx FT\n2\n\n(7)\n\nLtotal = BCE(s, c) + Lbalance + Ldecouple\n| {z } |\n{z\n}\nClassify\n\nAuxiliary\n\n+ Dice(M, m) + Focal(M, m) .\n|\n{z\n}\n\nHazelnut\n\npcb1\n\npcb3\n\nbottle\n\nbracket_white\n\nconnector\n\nISIC\n\ncvc-colondb\n\nImage\n\nSimilar to previous works (Zhou et al. 2024; Gu et al.\n2024; Cao et al. 2024), PromptMoE supervises the anomaly\nmap M using Dice (Milletari, Navab, and Ahmadi 2016) and\nFocal (Lin et al. 2017) losses against the ground truth mask\nm. In addition, the anomaly score s is optimized using BCE\nloss with the ground truth label c. The overall loss Ltotal is:\n\n(8)\n\nSegment\n\nExperiments\nExperiment Settings\nDatasets. To comprehensively evaluate the generalization capability of our proposed PromptMoE on the ZSAD\ntask, we conduct extensive experiments on 15 real-world\ndatasets spanning both industrial manufacturing and medical diagnosis domains. We utilize seven widely-used industrial benchmarks, including MVTec AD (Bergmann et al.\n2019), VisA (Zou et al. 2022), MPDD (Jezek et al. 2021),\nBTAD (Mishra et al. 2021), SDD (Tabernik et al. 2020),\nDAGM (Wieler and Hahn 2007), and DTD-Synthetic (Aota,\nTong, and Okatani 2023); as well as eight medical datasets\nfrom diverse modalities and application scenarios, including HeadCT (Salehi et al. 2021), BrainMRI (Kanade and\nGumaste 2015), Br35H (Hamada 2020), ISIC (Codella\net al. 2018), CVC-ColonDB (Tajbakhsh, Gurudu, and Liang\n2015), CVC-ClinicDB (Bernal et al. 2015), Kvasir (Jha et al.\n2019), and Endo (Hicks et al. 2021). Following the standard\nZSAD setting, we primarily train our model on the MVTec\n\nAnomalyCLIP\n\n(l) ⊤\n\nSoftmax(Up(F(l)\nx FT\n\nImplementation details. We utilize the pre-trained CLIP\n(Radford et al. 2021) (ViT-L/14@336px) released by OpenAI as our backbone, with all of its parameters frozen during\ntraining. All input images are resized to 518 × 518 pixels.\nWe extract patch features from the {6, 12, 18, 24}-th layers\nof the 24-layer visual encoder. The model is trained for 15\nepochs using the Adam optimizer with a batch size of 16\nand a learning rate of 0.001, employing a warm-up strategy\nduring the first 3 epochs.\nFor our VGMoP module, we set the number of queries\nNq = 8 and experts E = 8, from which we sparsely select\nthe top k = 4 for aggregation; its cross-attention utilizes 8\nheads and its router has a hidden dimension of 256. The resulting normal and abnormal state sequences have lengths\nMn = 5 and Ma = 6, respectively, while the shared context\nQctx has a length of Mq = 8. The auxiliary loss coefficients\nα and β are set to 0.01 and 0.005, respectively. All experiments are conducted on a RTX3090 using PyTorch 1.13.1.\n\nAdaCLIP\n\nX\n\nMetrics. To evaluate the performance of our model, we\nfollow the standard protocols used in previous works (Zhou\net al. 2024). For the image-level anomaly detection, we report the AUROC and AP. For the pixel-level anomaly localization, we use pixel-wise AUROC and the area under the\nPer-Region Overlap curve (PRO) (Bergmann et al. 2019).\n\nPromptMoE\n\nM=\n\nAD dataset and then perform zero-shot inference and evaluation on the other 14 datasets. To evaluate performance on\nMVTec AD itself, we train our model on VisA, a dataset\nwith a disjoint set of object categories.\n\nFigure 5: Qualitative comparison of anomaly localization results across different ZSAD methods.\n\nComparisons with State-of-the-Art Methods\nWe compare PromptMoE against recent SOTA methods, including WinCLIP (Jeong et al. 2023), APRIL-GAN (Chen,\nHan, and Zhang 2023b), AnomalyCLIP (Zhou et al. 2024),\nAdaCLIP (Cao et al. 2024), and FAPrompt (Zhu et al. 2025).\nFor a fair comparison, all results are cited from their original papers, while any missing values are reproduced using\nthe official code under a unified setting.\nQuantitative Comparisons. We quantitatively compare\nPromptMoE against recent SOTA methods across 15 industrial and medical datasets. The detailed results in Table 1,\n\n\fIndustrial\n\nMetric\n\nAPRIL-GAN AnomalyCLIP\n\nAdaCLIP\n\n(86.1, 93.5)\n(78.0, 81.4)\n(73.0, 80.2)\n(73.6, 68.6)\n(79.8, 71.4)\n(94.4, 83.8)\n(86.4, 95.0)\n\n(91.5, 96.2)\n(82.1, 85.4)\n(77.0, 82.0)\n(88.3, 87.3)\n(84.7, 80.0)\n(97.5, 92.3)\n(93.5, 97.0)\n\n(92.0, 96.4) (91.9, 95.7) (93.8, 97.2)\n(83.0, 84.9) (84.5, 86.8) (85.0, 88.2)\n(72.1, 77.6) (80.6, 83.3) (82.3, 84.5)\n(91.6, 92.4) (92.0, 92.2) (93.4, 95.7)\n(81.2, 72.6) (98.6, 95.9) (97.4, 94.0)\n(96.5, 95.7) (98.9, 95.7) (98.9, 96.4)\n(92.8, 97.0) (95.9, 98.3) (95.9, 98.1)\n\n(63.7, 66.7) (81.6, 81.1) (81.6, 82.0)\n\n(87.8, 88.6)\n\n(87.0, 88.0) (91.7, 92.5) (92.4, 93.4)\n\n(87.6, 44.0)\n(94.2, 86.8)\n(94.1, 83.2)\n(60.8, 25.0)\n(79.8, 65.1)\n(82.4, 66.2)\n(95.3, 86.9)\n\n(91.1, 81.4)\n(95.5, 87.0)\n(96.5, 88.7)\n(94.2, 74.8)\n(90.6, 67.8)\n(95.6, 91.0)\n(97.9, 92.3)\n\n(86.8, 33.8) (90.6, 83.3) (91.8, 83.2)\n(95.1, 71.3) (95.9, 87.5) (95.6, 89.2)\n(96.4, 62.2) (96.5, 87.9) (96.8, 88.8)\n(87.7, 17.7) (95.6, 75.2) (94.9, 80.6)\n(71.7, 17.6) (98.3, 93.6) (98.1, 95.6)\n(97.0, 40.9) (98.3, 95.4) (97.8, 93.9)\n(94.1, 24.9) (98.3, 93.1) (98.3, 93.2)\n\nAverage\n\n(39.8, 12.5) (79.1, 49.3) (84.8, 65.3)\n\n(94.5, 83.3)\n\n(89.8, 38.4) (96.2, 88.0) (96.2, 89.2)\n\nHeadCT\nBrainMRI\nBr35H\n\n(56.5, 58.4) (81.8, 80.2) (89.1, 89.4)\n(73.9, 81.7) (86.6, 91.5) (89.3, 90.9)\n(78.4, 78.8) (80.5, 82.2) (93.1, 92.9)\n\n(93.4, 91.6)\n(90.3, 92.2)\n(94.6, 94.7)\n\n(93.4, 92.2) (94.8, 93.5) (98.2, 98.2)\n(94.9, 94.2) (95.5, 95.6) (96.0, 96.6)\n(95.7, 95.7) (97.8, 97.5) (97.9, 97.7)\n\nAverage\n\n(69.6, 73.0) (83.0, 84.6) (90.5, 91.1)\n\nAverage\n\nCLIP\n\nWinCLIP\n\nMVTec AD (38.4, 11.3) (85.1, 64.6)\nVisA\n(46.6, 14.8) (79.6, 56.8)\nMPDD\n(62.1, 33.0) (76.4, 48.9)\nPixel-level\nBTAD\n(30.6, 4.4) (72.7, 27.3)\n(AUROC, PRO)\nSDD\n(39.0, 8.9) (68.8, 24.2)\nDAGM\n(28.2, 2.9) (87.6, 65.7)\nDTD-Synthetic (33.9, 12.5) (83.9, 57.8)\n\nImage-level\n(AUROC, AP)\nMedical\n\nDatasets\n\nMVTec AD (74.1, 87.6) (91.8, 96.5)\nVisA\n(66.4, 71.5) (78.1, 81.2)\nMPDD\n(54.3, 65.4) (63.6, 69.9)\nImage-level\nBTAD\n(34.5, 52.5) (68.2, 70.9)\n(AUROC, AP)\nSDD\n(65.7, 45.2) (84.3, 77.4)\nDAGM\n(79.6, 59.0) (91.8, 79.5)\nDTD-Synthetic (71.6, 85.7) (93.2, 92.6)\n\n(92.8, 92.8)\n\n(94.7, 94.0) (96.0, 95.5) (97.4, 97.5)\n\n(89.4, 77.2)\n(78.4, 64.6)\n(80.5, 60.7)\n(75.0, 36.2)\n(81.9, 54.9)\n\n(89.7, 78.4)\n(81.9, 71.3)\n(82.9, 67.8)\n(78.9, 45.6)\n(84.1, 63.6)\n\n(85.4, 5.3) (90.9, 81.2) (91.1, 81.4)\n(79.3, 6.5) (84.6, 74.7) (84.3, 74.9)\n(85.3, 14.6) (84.7, 70.1) (84.5, 70.9)\n(79.4, 12.3) (81.2, 47.8) (81.6, 48.8)\n(84.0, 10.5) (86.4, 67.2) (86.3, 68.0)\n\n(44.0, 14.8) (68.5, 30.8) (81.0, 58.2)\n\n(83.5, 65.3)\n\n(82.7, 9.8) (85.6, 68.2) (85.6, 68.8)\n\nISIC\n(33.1, 5.8) (83.3, 55.1)\nCVC-ColonDB (49.5, 15.8) (70.3, 32.5)\nCVC-ClinicDB (47.5, 18.9) (51.2, 13.8)\nPixel-level\n(AUROC, PRO)\nKvasir\n(44.6, 17.7) (69.7, 24.5)\nEndo\n(45.2, 15.9) (68.2, 28.3)\nAverage\n\nFAPrompt PromptMoE\n\nTable 1: ZSAD performance comparison on industrial and medical domains. Best results are in bold, second-best are underlined.\nvisually summarized by the radar chart in Fig. 2, clearly indicate that our PromptMoE demonstrates comprehensive superiority over competing methods in both image-level and\npixel-level metrics. For instance, it achieves a 93.8% Imagelevel AUROC on the MVTec AD benchmark (+1.8% over\nthe runner-up). This strong generalization is further validated on medical datasets, notably on HeadCT, where our\nmodel surpasses the next-best method by a significant 3.4%\nin AUROC and 4.7% in AP. The exceptional performance\non the unseen medical domain, despite being trained solely\non industrial data, strongly validates the success of our\nvisually-guided compositional prompts in learning generalizable concepts of normality and abnormality.\nQualitative Comparisons. To provide a visual intuition\nof the superiority of PromptMoE, we present a series of\nanomaly localization results in Fig. 5, comparing qualitatively against AnomalyCLIP and AdaCLIP. As can be observed, the results from competing methods are often imprecise, suffering from issues such as false positives on normal regions or incomplete coverage of defective areas. In\ncontrast, the anomaly maps generated by our PromptMoE\nnot only focus more accurately on the true defects but\nalso exhibit highlighting that aligns more closely with the\nactual anomaly contours. These results suggest that our\nvisually-guided compositional prompt mechanism, by generating more discriminative textual representations for each\n\ninstance, enables a finer-grained image-text alignment that\nleads to superior localization performance.\n\nFigure 6: Activation frequencies of normal and abnormal experts across training and test datasets.\nAnalysis of Expert Activation. To gain deeper insight\ninto the dynamic routing behavior of the VGMoP module,\nwe analyze its expert activation patterns. As illustrated in\nFig. 6, we compute the cumulative activation frequency for\neach expert in both the normal and abnormal prompt pools\non the seen dataset (MVTec AD) and across several unseen\n\n\fdatasets.\nThe results clearly reveal that the normal and abnormal\nbranches learn two distinct and highly task-adaptive routing\nstrategies. For the normal state, the router’s selections consistently converge to a small, fixed set of core experts across\nall test datasets. This indicates that our model successfully\ndistills a core set of highly generalizable semantic primitives\nfor the concept of “normality” from the diverse training data.\nIn stark contrast, the expert activation for the abnormal\nstate remains highly dynamic and sparse across different unseen datasets, demonstrating that the model flexibly composes different expert primitives for varied anomaly patterns. For instance, we observe that a general-purpose expert\n(e.g., E3) is combined with a dataset-specific subset of other\nexperts (e.g., higher activation of E7 and E8 on VisA vs.\nE1 and E6 on MPDD). Furthermore, the specific activation\nweights for the instances in Fig. 1 reveal that the router assigns non-uniform weights to the selected experts, forming a\nmeaningful weighted combination rather than a simple average. This provides further evidence of the router’s nuanced,\ninstance-specific decision-making.\n\nAblation Studies\nAnalysis of the Compositional Prompting. To validate\nthe effectiveness of our proposed compositional prompting strategy, we conduct an ablation study progressively\nbuilding from a simple static prompt baseline to our full\nPromptMoE model. As shown in Table 2, the “Static\nPrompt” baseline (using a single learnable prompt) yields\nlimited performance. While “Static Ensemble”, which uses\na set of static prompts and averages their outputs, provides some improvement, its effectiveness remains constrained. Notably, replacing the static ensemble with “VGMoP” (single-layer, without auxiliary losses) leads to a significant performance boost (a +0.9% gain in I-AUC on\nMVTec AD). This strongly demonstrates that the core advantage of our method stems from the dynamic, visuallyguided composition of experts, rather than merely increasing\nthe number of static prompts. Finally, our PromptMoE, benefiting from its multi-layer prompt design and regularization\nfrom auxiliary losses, achieves the best performance, fully\nvalidating the superiority of our compositional framework.\nConfiguration\n\nMVTec AD\n\nFigure 7: Effect of Ldecouple loss on MoE training dynamics.\nthat in the absence of Ldecouple (dashed lines), expert representations become redundant (reflected by the increasing\nvalue of Ldecouple ), which in turn leads to a sharp degradation\nof Lbalance and ultimately harms the model’s I-AUC performance. Conversely, when both losses are used (solid lines),\nboth auxiliary losses are effectively suppressed to healthy\nlevels, and the model achieves superior final performance.\nThis strongly demonstrates that the expert diversity enforced\nby Ldecouple is a crucial prerequisite for achieving effective\nload balancing and optimal performance.\nAnalysis on the Load Balancing loss. To further validate\nthe necessity of Lbalance , we conduct an ablation study on\nits coefficient α. As shown in Table 3, completely removing\nthe load balancing loss (α = 0) leads to a significant performance drop. A moderate weight (α = 0.01) effectively\npromotes expert balancing and yields the best performance.\nHowever, an excessively high weight (α = 0.1) might overpenalize the router’s specialization, which also negatively\nimpacts the main task’s performance.\nWeight α\nα = 0 (w/o Lbalance )\nα = 0.01\nα = 0.1\n\nMVTec AD\n\nVisA\n\nI-AUC\n\nPRO\n\nI-AUC\n\nPRO\n\n92.1\n93.8\n92.9\n\n82.5\n83.2\n83.1\n\n83.4\n85.0\n84.2\n\n88.2\n89.2\n89.2\n\nTable 3: Ablation study on the weight α of Lbalance .\n\nVisA\n\nI-AUC\n\nPRO\n\nI-AUC\n\nPRO\n\nConclusion\n\nStatic Prompt\n+Static Ensemble\n+VGMoP\n\n91.7\n92.2\n93.1\n\n82.0\n82.9\n83.3\n\n82.4\n83.3\n84.1\n\n88.0\n88.3\n89.0\n\nPromptMoE\n\n93.8\n\n83.2\n\n85.0\n\n89.2\n\nIn this paper, we have demonstrated that reframing prompt\nlearning as a compositional paradigm is an effective approach to tackling the generalization challenge in ZSAD.\nOur proposed PromptMoE, through its visually-guided MoE\nmechanism, successfully learns to dynamically construct\ntailored textual prompts for each instance from a basis set of\nlearnable semantic primitives. This approach overcomes the\nrepresentational bottlenecks and overfitting risks associated\nwith monolithic prompts. The SOTA performance achieved\nacross 15 industrial and medical datasets strongly supports\nour central conclusion: learning how to compose, rather than\nlearning a single complete prompt, is key to enhancing a\nmodel’s ability to handle the diversity of unseen anomalies.\n\nTable 2: Ablation on the effectiveness of compositional\nprompting strategy.\nSynergy of Expert Diversity and Load Balancing. To\nvalidate the synergy between our two auxiliary losses, we\nvisualize the evolution of key metrics during training with\nand without Ldecouple in Fig. 7. The results clearly show\n\n\fAcknowledgments\nThis work was supported in part by the National\nKey Research and Development Program of China\n(2022YFB4501704); the National Science Foundation of\nChina (62222312, 62473285); the Shanghai Science and\nTechnology Innovation Action Plan Project of China\n(22511100700); and the Fundamental Research Funds for\nthe Central Universities.\n\nReferences\nAota, T.; Tong, L. T. T.; and Okatani, T. 2023. Zero-shot\nversus many-shot: Unsupervised texture anomaly detection.\nIn Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 5564–5572.\nBergmann, P.; Fauser, M.; Sattlegger, D.; and Steger, C.\n2019. MVTec AD–A comprehensive real-world dataset\nfor unsupervised anomaly detection. In Proceedings of\nthe IEEE/CVF Conference on Computer Vision and Pattern\nRecognition, 9592–9600.\nBernal, J.; Sánchez, F. J.; Fernández-Esparrach, G.; Gil, D.;\nRodrı́guez, C.; and Vilariño, F. 2015. WM-DOVA maps\nfor accurate polyp highlighting in colonoscopy: Validation\nvs. saliency maps from physicians. Computerized Medical\nImaging and Graphics, 43: 99–111.\nBuda, M.; Saha, A.; and Mazurowski, M. A. 2019. Association of genomic subtypes of lower-grade gliomas with\nshape features automatically extracted by a deep learning\nalgorithm. Computers in Biology and Medicine, 109: 218–\n225.\nCao, Y.; Zhang, J.; Frittoli, L.; Cheng, Y.; Shen, W.; and Boracchi, G. 2024. Adaclip: Adapting clip with hybrid learnable prompts for zero-shot anomaly detection. In European\nConference on Computer Vision, 55–72. Springer.\nChen, X.; Han, Y.; and Zhang, J. 2023a. April-gan: A zero/few-shot anomaly classification and segmentation method\nfor CVPR 2023 VAND Workshop Challenge Tracks 1&amp;2:\n1st Place on Zero-shot AD and 4th Place on Few-shot AD.\narXiv Preprint arXiv:2305.17382.\nChen, X.; Han, Y.; and Zhang, J. 2023b. A zero-/few-shot\nanomaly classification and segmentation method for CVPR\n2023 (VAND) Workshop Challenge Tracks 1 &amp;2. 1st Place\non Zero-shot AD and 4th Place on Few-shot AD, 2305:\n17382.\nCodella, N. C.; Gutman, D.; Celebi, M. E.; Helba, B.;\nMarchetti, M. A.; Dusza, S. W.; Kalloo, A.; Liopyris, K.;\nMishra, N.; Kittler, H.; et al. 2018. Skin lesion analysis toward melanoma detection: A challenge at the 2017 International Symposium on Biomedical Imaging (ISBI), hosted\nby the International Skin Imaging Collaboration (ISIC). In\n2018 IEEE 15th International Symposium on Biomedical\nImaging (ISBI 2018), 168–172. IEEE.\nFedus, W.; Zoph, B.; and Shazeer, N. 2022. Switch transformers: Scaling to trillion parameter models with simple\nand efficient sparsity. Journal of Machine Learning Research, 23(120): 1–39.\n\nGu, Z.; Zhu, B.; Zhu, G.; Chen, Y.; Tang, M.; and Wang,\nJ. 2024. Anomalygpt: Detecting industrial anomalies using\nlarge vision-language models. In Proceedings of the AAAI\nConference on Artificial Intelligence, 1932–1940.\nHamada, A. 2020. Br35H :: Brain Tumor Detection 2020.\nKaggle.\nHicks, S. A.; Jha, D.; Thambawita, V.; Halvorsen, P.; Hammer, H. L.; and Riegler, M. A. 2021. The EndoTect\n2020 challenge: evaluation and comparison of classification, segmentation and inference time for endoscopy. In\nInternational Conference on Pattern Recognition, 263–274.\nSpringer.\nHuang, C.; Jiang, A.; Feng, J.; Zhang, Y.; Wang, X.; and\nWang, Y. 2024. Adapting visual-language models for generalizable anomaly detection in medical images. In Proceedings of the IEEE/CVF Conference on Computer Vision and\nPattern Recognition, 11375–11385.\nJeong, J.; Zou, Y.; Kim, T.; Zhang, D.; Ravichandran, A.;\nand Dabeer, O. 2023. Winclip: Zero-/few-shot anomaly\nclassification and segmentation. In Proceedings of the\nIEEE/CVF Conference on Computer Vision and Pattern\nRecognition, 19606–19616.\nJezek, S.; Jonak, M.; Burget, R.; Dvorak, P.; and Skotak, M.\n2021. Deep learning-based defect detection of metal parts:\nevaluating current methods in complex conditions. In 2021\n13th International Congress on Ultra Modern Telecommunications and Control Systems and Workshops (ICUMT), 66–\n71. IEEE.\nJha, D.; Smedsrud, P. H.; Riegler, M. A.; Halvorsen, P.;\nDe Lange, T.; Johansen, D.; and Johansen, H. D. 2019.\nKvasir-seg: A segmented polyp dataset. In International\nConference on Multimedia Modeling, 451–462. Springer.\nKanade, P. B.; and Gumaste, P. 2015. Brain tumor detection\nusing MRI images. Brain, 3(2): 146–150.\nLi, X.; Zhang, Z.; Tan, X.; Chen, C.; Qu, Y.; Xie, Y.; and\nMa, L. 2024. Promptad: Learning prompts with only normal\nsamples for few-shot anomaly detection. In Proceedings of\nthe IEEE/CVF Conference on Computer Vision and Pattern\nRecognition, 16838–16848.\nLin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; and Dollár, P.\n2017. Focal loss for dense object detection. In Proceedings\nof the IEEE International Conference on Computer Vision,\n2980–2988.\nMa, J.; Zhao, Z.; Yi, X.; Chen, J.; Hong, L.; and Chi, E. H.\n2018. Modeling task relationships in multi-task learning\nwith multi-gate mixture-of-experts. In Proceedings of the\n24th ACM SIGKDD International Conference on Knowledge Discovery &amp; Data Mining, 1930–1939.\nMilletari, F.; Navab, N.; and Ahmadi, S.-A. 2016. V-net:\nFully convolutional neural networks for volumetric medical\nimage segmentation. In 2016 Fourth International Conference on 3D Vision (3DV), 565–571. IEEE.\nMishra, P.; Verk, R.; Fornasier, D.; Piciarelli, C.; and Foresti,\nG. L. 2021. VT-ADL: A vision transformer network for image anomaly detection and localization. In 2021 IEEE 30th\nInternational Symposium on Industrial Electronics (ISIE),\n01–06. IEEE.\n\n\fQu, Z.; Tao, X.; Gong, X.; Qu, S.; Chen, Q.; Zhang, Z.;\nWang, X.; and Ding, G. 2025. Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection. In Proceedings of\nthe Computer Vision and Pattern Recognition Conference,\n30398–30408.\nQu, Z.; Tao, X.; Prasad, M.; Shen, F.; Zhang, Z.; Gong, X.;\nand Ding, G. 2024. VCP-CLIP: A visual context prompting\nmodel for zero-shot anomaly segmentation. In European\nConference on Computer Vision, 301–317. Springer.\nRadford, A.; Kim, J. W.; Hallacy, C.; Ramesh, A.; Goh, G.;\nAgarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.;\net al. 2021. Learning transferable visual models from natural language supervision. In International Conference on\nMachine Learning, 8748–8763. PMLR.\nRiquelme, C.; Puigcerver, J.; Mustafa, B.; Neumann, M.;\nJenatton, R.; Susano Pinto, A.; Keysers, D.; and Houlsby,\nN. 2021. Scaling vision with sparse mixture of experts.\nAdvances in Neural Information Processing Systems, 34:\n8583–8595.\nSalehi, M.; Sadjadi, N.; Baselizadeh, S.; Rohban, M. H.; and\nRabiee, H. R. 2021. Multiresolution knowledge distillation\nfor anomaly detection. In Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition,\n14902–14912.\nShazeer, N.; Mirhoseini, A.; Maziarz, K.; Davis, A.; Le, Q.;\nHinton, G.; and Dean, J. 2017. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer.\narXiv Preprint arXiv:1701.06538.\nTabernik, D.; Šela, S.; Skvarč, J.; and Skočaj, D. 2020.\nSegmentation-based deep-learning approach for surfacedefect detection. Journal of Intelligent Manufacturing,\n31(3): 759–776.\nTajbakhsh, N.; Gurudu, S. R.; and Liang, J. 2015. Automated polyp detection in colonoscopy videos using shape\nand context information. IEEE Transactions on Medical\nImaging, 35(2): 630–644.\nWang, C.; Zhu, W.; Gao, B.-B.; Gan, Z.; Zhang, J.; Gu, Z.;\nQian, S.; Chen, M.; and Ma, L. 2024. Real-iad: A realworld multi-view dataset for benchmarking versatile industrial anomaly detection. In Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition,\n22883–22892.\nWieler, M.; and Hahn, T. 2007. Weakly supervised learning\nfor industrial optical inspection. In DAGM Symposium in,\nvolume 6, 11.\nZhou, K.; Yang, J.; Loy, C. C.; and Liu, Z. 2022. Conditional\nprompt learning for vision-language models. In Proceedings\nof the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 16816–16825.\nZhou, Q.; Pang, G.; Tian, Y.; He, S.; and Chen, J. 2024.\nAnomalyCLIP: Object-agnostic Prompt Learning for Zeroshot Anomaly Detection. In The Twelfth International Conference on Learning Representations.\nZhu, J.; Ong, Y.-S.; Shen, C.; and Pang, G. 2025. Finegrained abnormality prompt learning for zero-shot anomaly\ndetection. In Proceedings of the IEEE/CVF International\nConference on Computer Vision, 22241–22251.\n\nZou, Y.; Jeong, J.; Pemula, L.; Zhang, D.; and Dabeer, O.\n2022. Spot-the-difference self-supervised pre-training for\nanomaly detection and segmentation. In European Conference on Computer Vision, 392–408. Springer.\n\n\fAppendix\nThis supplementary material provides additional details and\nanalyses for our work. Specifically, we supplement with:\n(A) complete implementation details; (B) additional ablation studies to validate the effectiveness of our key design\nchoices; (C) visualization analysis of expert semantics; (D)\ndetailed statistics for all datasets used; and (E) more exhaustive, category-level performance results on key benchmarks.\n\nA. Implementation details\nWe utilize the pre-trained CLIP model (ViT-L/14@336px)\nreleased by OpenAI (Radford et al. 2021) as our backbone,\nwith all of its parameters frozen during training. All input\nimages are resized to 518×518 pixels. We extract patch features from the {6, 12, 18, 24}-th layers of the 24-layer visual\nencoder. The model is trained for 15 epochs using the Adam\noptimizer with betas set to (0.6, 0.999) and a batch size of\n16. The learning rate is scheduled with a linear warm-up for\nthe first 3 epochs, reaching a final value of 0.001. For our\nVGMoP module, we set the number of queries Nq = 8 and\nexperts E = 8 for both the normal and abnormal branches,\nfrom which we sparsely select the top k = 4 for aggregation; its cross-attention utilizes 8 heads and its router has a\nhidden dimension of 256. The resulting normal and abnormal state sequences have lengths of Mn = 5 and Ma = 6,\nrespectively, while the learnable shared context Qctx has a\nlength of Mq = 8. The coefficients for the auxiliary losses,\nα for Lbalance and β for Ldecouple , are set to 0.01 and 0.005,\nrespectively. For similarity calculations, the temperature parameters for the pixel-level τ and image-level τ ′ computations are set to 0.07 and 0.01. During inference, the final\npixel-level anomaly map M is smoothed with a Gaussian\nfilter with a sigma of 4. All experiments are conducted on a\nNVIDIA GeForce RTX 3090 GPU using PyTorch 1.13.1.\n\nB. Additional Ablations\nAnalysis on Visual Feature Layers We investigate the\nimpact of using different combinations of feature layers\nfrom the visual encoder, with results presented in Table 4.\nThe experiment clearly indicates that fusing multi-level features consistently improves overall performance compared\nto using only the final layer’s (L24) features. The strategy of\nutilizing all four layers ({6, 12, 18, 24}) achieves the most\nrobust and best overall performance across both datasets.\nTable 4: Ablation study on the set of visual feature layers.\nWe report average Image-level AUROC and Pixel-level PRO\nscore (%).\nSelected Layers\n\nMVTec AD\n\n6\n\n!\n!\n!\n\n12\n!\n!\n!\n\nVisA\n\nAnalysis of Expert Sharing Strategies. Inspired by parameter sharing paradigms in multi-task learning, such as\nMMoE (Ma et al. 2018), we further investigate the possibility of sharing components between the normal and abnormal state-prompting branches. Although our default design\nwith separate components aims to ensure expert specialization through task isolation, a unified expert pool or a shared\ncross-attention mechanism could theoretically improve parameter efficiency by learning lower-level, shared semantic\nprimitives. To validate the necessity and superiority of our\nseparated design, we conduct the following ablation study.\nTable 5: Ablation study on expert sharing strategies.\nMVTec AD\n\nConfiguration\n\nVisA\n\nI-AUC\n\nPRO\n\nI-AUC\n\nPRO\n\nSeparate Components\n\n93.8\n\n83.2\n\n85.0\n\n89.2\n\nw/ Shared Prompt Pool\nw/ Shared Cross-Atte.\nw/ Shared Both\n\n91.4\n92.9\n90.9\n\n82.8\n83.1\n82.5\n\n83.3\n84.2\n82.6\n\n87.8\n88.8\n87.9\n\nAs shown in Table 5, the results clearly indicate that all\nforms of parameter sharing lead to a performance drop compared to our default Separate Components design. Specifically, sharing either the cross-attention module (‘w/ Shared\nCross-Atte.’) or the expert prompt pool (‘w/ Shared Prompt\nPool’) impairs performance, while sharing both components\n(‘w/ Shared Both’) results in the most significant degradation. This outcome strongly validates our core design hypothesis: providing independent and specialized representational pathways for the semantically adversarial tasks of\nmodeling normality and abnormality is crucial for avoiding\nnegative transfer and achieving optimal zero-shot detection\nperformance.\nAnalysis of MoE Hyperparameters. We further investigate the impact of two key hyperparameters in our VGMoP\nmodule: the total number of experts (E) and the number\nof selected experts (k). As shown in Table 6, we observe\nthat increasing the total number of experts (from 8 to 16)\nprovides a richer pool of semantic primitives, which leads\nto consistent performance gains in pixel-level metrics PRO.\nHowever, this does not always translate to a corresponding improvement in image-level metrics I-AUC. Furthermore, the results indicate that selecting half of the experts\n(k/E = 50%) achieves the best performance balance. Considering all factors, our final model adopts the E = 8, k = 4\nconfiguration, as it provides the most robust and efficient\nperformance across all metrics.\n\n18\n\n24\n\nI-AUC\n\nPRO\n\nI-AUC\n\nPRO\n\nC. Visualization\n\n!\n!\n\n!\n!\n!\n!\n!\n\n93.2\n93.3\n93.4\n93.5\n93.8\n\n83.2\n84.1\n83.1\n83.2\n83.2\n\n83.9\n84.0\n84.7\n84.6\n85.0\n\n89.1\n89.1\n89.3\n89.2\n89.2\n\nAnalysis of Expert Semantics. To gain deeper insight\ninto the learned semantic structure of our expert prompt\npools, we visualize the mean embeddings of each expert\nfrom both the normal and abnormal pools using t-SNE, as\nshown in Fig. 8.\nThe results clearly reveal two distinct semantic distributions for the expert pools. The normal experts form a com-\n\n\fTable 6: Ablation study on the number of experts (E) and\nselected experts (k) for VGMoP.\nParameters\n\nMVTec AD\n\nE\n\nk\n\nI-AUC\n\nPRO\n\nI-AUC\n\nPRO\n\n4\n\n4\n\n92.5\n\n83.0\n\n83.7\n\n88.6\n\n8\n\n1\n2\n4\n\n92.0\n92.6\n93.8\n\n83.0\n83.2\n83.2\n\n84.0\n84.3\n85.0\n\n89.0\n89.0\n89.2\n\n16\n\n2\n4\n8\n\n92.2\n92.9\n93.0\n\n82.8\n82.9\n84.0\n\n84.1\n84.2\n84.7\n\n88.9\n89.1\n89.3\n\nVisA\n\npact cluster in the feature space, which indicates that our\nmodel has learned a semantically consistent set of core representations for the relatively convergent concept of “normality”. In stark contrast, the abnormal experts are highly\ndispersed, occupying a broad area of the feature space.\nThis strongly demonstrates that our method has successfully\nlearned a diverse and discriminative set of “semantic primitives” for the open-ended and varied concept of “abnormality”. This observed pattern of “normal converging, abnormal diverging” not only visually validates the effectiveness\nof our independent expert pool design but also showcases\nthe significant potential of our compositional framework for\nhandling unseen anomalies.\n\nD. Datasets\nTo comprehensively evaluate the generalization capability\nof our proposed PromptMoE on the ZSAD task, we utilize\n15 public datasets spanning industrial manufacturing and\nmedical diagnosis domains. As detailed in Table 7, these\ndatasets encompass diverse object and texture classes, different imaging modalities, and a wide range of anomaly patterns.\n\nE. Detailed Results\nFor a more detailed comparison, this section presents\ncategory-level results of our PromptMoE on key benchmarks\nincluding MVTec AD (Bergmann et al. 2019), VisA (Zou\net al. 2022), MPDD (Jezek et al. 2021), BTAD (Mishra et al.\n2021), and DTD-Synthetic (Aota, Tong, and Okatani 2023)\nin Table 8-12.\n\nFigure 8: t-SNE visualization of the mean embeddings of\nexperts from the Normal and Abnormal prompt pools. Each\npoint represents a single expert.\n\n\fDataset\n\nType\n\nModalities\n\nCategories (|C|)\n\nSamples (Normal, Anomalous)\n\nIndustrial\n\nMVTec AD (Bergmann et al. 2019)\nVisA (Zou et al. 2022)\nMPDD (Jezek et al. 2021)\nBTAD (Mishra et al. 2021)\nSDD (Tabernik et al. 2020)\nDAGM (Wieler and Hahn 2007)\nDTD-Synthetic (Aota, Tong, and Okatani 2023)\n\nObject &amp; Texture\nObject\nObject\nObject\nObject\nTexture\nTexture\n\nPhotography\nPhotography\nPhotography\nPhotography\nPhotography\nPhotography\nPhotography\n\n15\n12\n6\n3\n1\n10\n12\n\n(467, 1258)\n(962, 1200)\n(176, 282)\n(451, 290)\n(181, 74)\n(6996, 1054)\n(357, 947)\n\nMedical\n\nTable 7: Details of the 15 datasets used in our experiments. For ZSAD, we only utilize the test splits of these datasets. Sample\ncounts for MVTec AD and VisA reflect their test sets.\nDomain\n\nHeadCT (Salehi et al. 2021)\nBrainMRI (Kanade and Gumaste 2015)\nBr35H (Hamada 2020)\nISIC (Codella et al. 2018)\nCVC-ColonDB (Tajbakhsh, Gurudu, and Liang 2015)\nCVC-ClinicDB (Bernal et al. 2015)\nKvasir (Jha et al. 2019)\nEndo (Hicks et al. 2021)\n\nBrain\nBrain\nBrain\nSkin\nColon\nColon\nColon\nColon\n\nRadiology (CT)\nRadiology (MRI)\nRadiology (MRI)\nPhotography\nEndoscopy\nEndoscopy\nEndoscopy\nEndoscopy\n\n1\n1\n1\n1\n1\n1\n1\n1\n\n(100, 100)\n(98, 155)\n(1500, 1500)\n(0, 379)\n(0, 380)\n(0, 612)\n(0, 1000)\n(0, 200)\n\nTable 8: Category-level performance on the MVTec AD dataset. We report Image-level (I-AUROC, I-AP) and Pixel-level (PAUROC, PRO) scores (%).\nCategory\n\nImage-level\n\nPixel-level\n\nI-AUROC\n\nI-AP\n\nP-AUROC\n\nPRO\n\n100\n99.6\n100.0\n99.2\n97.8\n\n100\n99.8\n100.0\n99.7\n99.4\n\n99.0\n97.9\n99.2\n96.4\n97.4\n\n90.6\n75.9\n96.9\n73.0\n94.5\n\nBottle\nCable\nCapsule\nHazelnut\nMetal Nut\nPill\nScrew\nToothbrush\nTransistor\nZipper\n\n93.8\n82.6\n91.3\n96.9\n95.7\n84.1\n87.1\n89.4\n92.5\n96.6\n\n98.2\n89.5\n98.2\n98.3\n99.0\n96.8\n94.4\n95.0\n90.7\n99.0\n\n91.0\n80.0\n96.2\n96.9\n79.1\n87.6\n98.3\n93.5\n68.8\n95.5\n\n83.8\n70.0\n87.0\n95.4\n80.6\n92.4\n84.9\n90.7\n55.1\n77.2\n\nAverage\n\n93.8\n\n97.2\n\n91.8\n\n83.2\n\nTextures\nCarpet\nGrid\nLeather\nTile\nWood\nObjects\n\n\fTable 9: Category-level performance on the VisA dataset.\nCategory\n\nImage-level\n\nPixel-level\n\nI-AUROC\n\nI-AP\n\nP-AUROC\n\nPRO\n\nCandle\nCapsules\nCashew\nChewinggum\nFryum\nMacaroni1\nMacaroni2\nPCB1\nPCB2\nPCB3\nPCB4\nPipe Fryum\n\n87.4\n72.2\n82.3\n97.6\n92.1\n88.9\n74.6\n91.0\n75.6\n66.3\n95.8\n96.4\n\n90.2\n84.0\n92.5\n99.0\n96.2\n89.5\n74.7\n91.2\n75.4\n71.5\n95.2\n98.3\n\n98.8\n96.8\n88.3\n99.1\n96.1\n99.2\n98.7\n94.0\n93.4\n89.3\n94.2\n98.8\n\n95.1\n87.5\n93.2\n91.5\n88.4\n92.9\n89.6\n87.8\n82.2\n76.2\n90.4\n95.5\n\nAverage\n\n85.0\n\n88.1\n\n95.6\n\n89.2\n\nTable 10: Category-level performance on the MPDD dataset.\nCategory\n\nImage-level\n\nPixel-level\n\nI-AUROC\n\nI-AP\n\nP-AUROC\n\nPRO\n\nBracket black\nBracket brown\nBracket white\nConnector\nMetal plate\nTubes\n\n80.0\n63.3\n91.1\n74.8\n88.7\n95.8\n\n81.4\n76.0\n92.6\n63.0\n95.9\n98.3\n\n97.8\n94.6\n99.8\n95.2\n94.7\n98.6\n\n92.6\n87.1\n96.2\n81.1\n81.2\n94.9\n\nAverage\n\n82.3\n\n84.5\n\n96.8\n\n88.8\n\nTable 11: Category-level performance on the BTAD dataset.\nCategory\n\nImage-level\n\nPixel-level\n\nI-AUROC\n\nI-AP\n\nP-AUROC\n\nPRO\n\n01\n02\n03\n\n98.8\n83.4\n98.1\n\n99.5\n97.4\n90.3\n\n95.4\n93.2\n96.1\n\n77.8\n72.4\n91.6\n\nAverage\n\n93.4\n\n95.7\n\n94.9\n\n80.6\n\n\fTable 12: Category-level performance on the DTD-Synthetic dataset.\nCategory\n\nImage-level\n\nPixel-level\n\nI-AUROC\n\nI-AP\n\nP-AUROC\n\nPRO\n\nWoven 001\nWoven 127\nWoven 104\nStratified 154\nBlotchy 099\nWoven 068\nWoven 125\nMarbled 078\nPerforated 037\nMesh 114\nFibrous 183\nMatted 069\n\n100.0\n87.9\n98.6\n100.0\n100.0\n96.8\n100.0\n99.2\n94.6\n87.2\n98.5\n88.0\n\n100.0\n89.6\n99.7\n100.0\n100.0\n98.1\n100.0\n99.8\n98.8\n94.7\n99.7\n96.8\n\n99.8\n94.1\n95.8\n99.4\n99.6\n99.0\n99.7\n99.3\n96.2\n95.5\n99.4\n99.5\n\n99.2\n89.4\n92.0\n99.2\n96.8\n92.1\n96.8\n97.7\n89.7\n79.3\n98.6\n87.6\n\nAverage\n\n95.9\n\n98.1\n\n98.3\n\n93.2\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"