"<!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>Published as a conference paper at ICLR 2026\n\nMRAD: Z ERO -S HOT A NOMALY D ETECTION WITH\nM EMORY-D RIVEN R ETRIEVAL\nChaoran Xu1,2 , Chengkan Lv1,2 , Qiyu Chen1,2 , Feng Zhang1,2∗, Zhengtao Zhang1,2\nInstitute of Automation, Chinese Academy of Sciences, Beijing, China\n2\nSchool of Artificial Intelligence, University of Chinese Academy of Sciences, Beijing, China\n{xuchaoran2024, chengkan.lv, chenqiyu2021,\nzhengtao.zhang, feng.zhang}@ia.ac.cn\n\narXiv:2602.00522v1 [cs.CV] 31 Jan 2026\n\n1\n\nA BSTRACT\nZero-shot anomaly detection (ZSAD) often leverages pretrained vision or visionlanguage models, but many existing methods use prompt learning or complex\nmodeling to fit the data distribution, resulting in high training or inference cost\nand limited cross-domain stability. To address these limitations, we propose\nMemory-Retrieval Anomaly Detection method (MRAD), a unified framework that\nreplaces parametric fitting with a direct memory retrieval. The train-free base\nmodel, MRAD-TF, freezes the CLIP image encoder and constructs a two-level\nmemory bank (image-level and pixel-level) from auxiliary data, where featurelabel pairs are explicitly stored as keys and values. During inference, anomaly\nscores are obtained directly by similarity retrieval over the memory bank. Based\non the MRAD-TF, we further propose two lightweight variants as enhancements:\n(i) MRAD-FT fine-tunes the retrieval metric with two linear layers to enhance\nthe discriminability between normal and anomaly; (ii) MRAD-CLIP injects the\nnormal and anomalous region priors from the MRAD-FT as dynamic biases into\nCLIP’s learnable text prompts, strengthening generalization to unseen categories.\nAcross 16 industrial and medical datasets, the MRAD framework consistently\ndemonstrates superior performance in anomaly classification and segmentation,\nunder both train-free and training-based settings. Our work shows that fully leveraging the empirical distribution of raw data, rather than relying only on model\nfitting, can achieve stronger anomaly detection performance. The code will be\npublicly released at https://github.com/CROVO1026/MRAD.\n\n1\n\nI NTRODUCTION\n\nAnomaly detection (AD) seeks to identify regions or samples that deviate substantially from normal\npatterns (Pang et al., 2021; Ruff et al., 2021), with broad impact in industrial inspection (Bergmann\net al., 2019; 2020; Chen et al., 2024a; 2025a; Qu et al., 2023) and medical imaging (Qin et al., 2022;\nFang et al., 2025b). Labeled data in the target domain is often scarce or unavailable, motivating\ninterest in ZSAD (Zhou et al., 2024; Chen et al., 2025b). The key challenge is to bridge the semantic\ngap between generic pretrained features and domain-specific anomaly patterns in the absence of\ntarget-domain supervision, while preserving both efficiency and accuracy (Fang et al., 2025a).\nVision-language pretrained models (VLMs), such as CLIP (Radford et al., 2021), learn powerful cross-modal representations via contrastive training on large-scale image-text pairs, enabling\nnew possibilities for ZSAD. CLIP-based ZSAD approaches fall into two paradigms. Promptensemble (Guo et al., 2023b; Li et al., 2022) methods employ hand-crafted templates (e.g., “normal object,” “defective object”) to match visual features without training, as in WinCLIP (Jeong\net al., 2023) and CLIP-AD (Chen et al., 2024b). However, their generalization is constrained by\nprompt set size/diversity and domain expertise, and they often struggle in complex scenes. Promptoptimization (Guo et al., 2023a) methods replace or augment text prompts with learnable vectors\nfor domain adaptation. For instance, AnomalyCLIP (Zhou et al., 2024) introduces object-agnostic\nprompts and a diagonal prominent attention map (DPAM) to strengthen local anomaly detection;\n∗\n\nCorresponding author.\n\n1\n\n\fPublished as a conference paper at ICLR 2026\n\nTrain data\n\nTrain data\n\nLabel\n\n/\nFeature\nExtractor\n\nFeature-label\nMemory Bank\n\nLoss\n\nTrainable\nModel\n\nFeature\nExtractor\n\nPrediction\n\nRetrieval\nQuery feature\n\na feature-to-label mapping\n\nTest data\n\n(a) Existing ZSAD Method\n\nPrediction\n\nTest data\n\n(b) Our MRAD\n\nFigure 1: Most existing ZSAD methods parameterize and fit p(y | x) solely via a trainable model,\nwhich may cause information loss. Our MRAD is to directly access the empirical training distribution by retrieving from a feature-label memory bank. The dashed line denotes the inference process.\nAdaCLIP (Cao et al., 2024) and FAPrompt (Zhu et al., 2025) combine static and dynamic prompts\nto enhance cross-domain generalization.\nWhile recent works make great progress, several important limitations persist: (1) Prompt learning,\nfeature engineering, and vision-branch fine-tuning increase architectural complexity, which weakens\ngeneralization and raises computation cost. (2) Relying solely on auxiliary learners (e.g., prompt\nlearners or MLPs) to fit the conditional distribution p(y | x) may result in information loss. (3)\ndynamic prompt composition is sensitive to the source of “dynamic” information, which materially\naffects pixel-level segmentation and vision-text alignment.\nOur recent analysis across datasets shows that similarity to sets of normal and abnormal features reliably reflects the degree of normality while preserving subtle intrinsic variations (see section 3.1.1).\nMotivated by this observation, we propose a novel ZSAD framework MRAD, which replaces parametric fitting with a direct feature-label retrieval paradigm as shown in Figure 1. Specifically, we\nconstruct a two-level memory bank that explicitly stores feature-label pairs as keys and values. During inference, anomaly scores are obtained via similarity retrieval, thereby reducing training cost,\noverfitting, and information loss. Based on this train-free MRAD model (MRAD-TF), we propose\ntwo lightweight enhancements: (i) MRAD-FT, which only adds two linear layers to fine-tune the\nretrieval metric, improves both classification and segmentation at low training cost; (ii) MRADCLIP, which injects region priors from MRAD-FT into learnable CLIP text prompts as dynamic\nbiases, enhances localization and generalization to unseen categories. This variant improves upon\nconventional dynamic prompt learning, which shows insufficient effectiveness in unseen categories.\nIn summary, this paper makes the following main contributions:\n• We present MRAD, a simple yet effective framework for ZSAD. Built upon a two-level\nmemory bank, MRAD-TF achieves competitive detection performance under a trainingfree setting via similarity retrieval. Furthermore, with a few trainable parameters, the finetuned MRAD-FT variant can significantly enhance the discriminative ability.\n• We further propose the MRAD-CLIP variant, which optimizes traditional CLIP-based\nprompt learning methods by injecting normal and anomalous region priors from MRADFT into learnable prompts. This guides the model to focus on anomalous regions, improves\nits performance on unseen categories, and enables precise local anomaly detection.\n• Trained on a single auxiliary dataset, MRAD variants outperform existing state-of-the-art\nmethods (e.g., AnomalyCLIP, FAPrompt) on 16 industrial and medical datasets, demonstrating superior cross-domain generalization and robustness.\n\n2\n\nR ELATED W ORK\n\nCLIP and Fine-tuning Adaptation. CLIP (Radford et al., 2021) aligns visual and textual representations via contrastive learning on large-scale image-text pairs, delivering strong cross-modal\nrepresentations and zero-shot transfer, yet performance on downstream tasks still hinges on prompt\ndesign. To improve adaptation, CoOp (Zhou et al., 2022b) replaces prompt context words with learnable vectors to automatically optimize prompts and CoCoOp (Zhou et al., 2022a) adds an image2\n\n\fPublished as a conference paper at ICLR 2026\n\nconditioned encoder to generate dynamic prompts for better generalization. Tip-Adapter (Zhang\net al., 2022) caches and fuses features to adapt quickly without updating the backbone, improving\nfew-shot performance. Building on CLIP, many ZSAD methods adopt CoOp-style prompt learning, which partly reduces reliance on manual prompt engineering. However, challenges persist in\ncross-domain generalization and in precisely modeling normal/abnormal semantics, especially at\nthe pixel level. Our core idea is closer in spirit to Tip-Adapter, caching raw features and making\nretrieval-based decisions, but ZSAD is open-set rather than closed-set classification, which makes it\nchallenging to build and maintain a cache that covers both normal and anomalous distributions.\nZero-shot Anomaly Detection. ZSAD can leverage large vision-language models to enable crosscategory, supervision-free detection, typically aligning image features with normal/abnormal semantics using manual or learnable prompts (Gu et al., 2024; Qu et al., 2024). Early works such\nas WinCLIP (Jeong et al., 2023), APRIL-GAN (Chen et al., 2023), and CLIP-AD (Chen et al.,\n2024b) rely on hand-crafted prompt templates, limiting generalization. To enhance anomaly awareness, methods like AnomalyCLIP (Zhou et al., 2024) and AdaCLIP (Cao et al., 2024) introduce\nlearnable context tokens to mitigate cross-domain semantic bias and improve domain-specific adaptation; FAPrompt (Zhu et al., 2025) further refines dynamic prompt design while retaining a similar training/inference paradigm. More recent methods, such as AA-CLIP (Ma et al., 2025) with\nanomaly-aware textual anchors and Bayes-PFL (Qu et al., 2025) with bayesian prompt modeling\nplus residual cross-model attention, pursue broader prompt-space coverage and finer feature alignment. Despite these advances, most methods still only fit the data-label distribution with a single\nnewly trained component, which will lead to information loss and reduced generalization.\n\n3\n\nMRAD: M EMORY-R ETRIEVAL A NOMALY D ETECTION\n\n3.1\n\nOVERVIEW\n\n3.1.1\n\nE XPLANATION OF O UR M OTIVATION\n\n(a)\n\n(b)\n\nFigure 2: Mean similarity scores for different query-key relations (queries from four datasets; keys\nand values from VisA). (a) Train-free setting: the consistent ordering Nq Nk &gt; Aq Nk and Aq Ak &gt;\nNq Ak shows that similarity to normal/abnormal keys provides stable discriminative signals. (b)\nFine-tune setting: a lightweight fine-tuning further enlarges the margin between Aq Ak and Nq Ak ,\ndemonstrating that fine-tuning improves separability while preserving the same ordering.\nBased on the similarity distributions of a frozen CLIP image encoder, we conduct a cross-dataset\nstudy by taking patch features from dataset-a as queries and patch features from dataset-b as keys.\nLet K be the set of anomalous and normal keys; let V be a one-hot label matrix aligned with the\nkeys. For a query feature q, we define its retrieval-based anomaly and normal similarity scores as\nh\n\u0001 i\nsanom (q) = softmax qK ⊤ /τ V ,\n(1)\nh\nia\n\u0001\nsnorm (q) = softmax qK ⊤ /τ V\n= 1 − sanom (q).\n(2)\nn\n\nwhere τ is the temperature, [·]a selects the “anomalous” channel. In words, sanom (q) is the softmax\nsimilarity score that q assigns to anomalous keys, while snorm (q) is assigned to normal keys. Then\n3\n\n\fPublished as a conference paper at ICLR 2026\n\nClass Token\n\nTrain Data\n\n(a) MRAD-TF/FT\n...\n\nFeature-Label Memory Bank\nImage-level\n\n...\n\nNc\n\nMean\n\n...\n\nnrom\ni\n\nμ\n\nImage Encoder\n\nPatch Tokens\n\nQuery Feature\nVV-attn Layers\n\n1 0\n\nμnorm\n2\n\n1 0\n\n0 1\n\nμanom\nNp\nμnorm\nNp\n\n0 1\n1 0\n\nQcls\n\nKcls Vcls\n\nQpat\n\nKpat Vpat\n\n...\n\nClassification logits\n\n/\n\nCross-Atten Module\n\nNp\n\nKpat：Vpat\n\nKcls：Vcls\n\n...\n\nQuery Image\n\n0 1\n1 0\n\nk cls\n2\n\nk cls\nNc\n\n...\n\n1-gt\n\nVIT Layers\n\nμ1anom\nμ1norm\n\n...\n\nμianom\n\nVV-attn Layers\n\n0 1\n\nk\n\nStack\n\nPixel-level\n\ncls\n1\n\n...\n\n...\n\n...\n\nk icls\n\ngt\n\n...\n\nVIT Layers\n\n+\n\nAnomaly\nScore\n\nSegmentation logits\n\nNormal Prompt\n...\n\nRegion Prior\n\ngood object\n\nAnomaly Map\nL1\n\nLinear\n\na\n\nb\n\n+\n...\n\ntnorm/tanom\n\n...\n\nLinear\n\nbn\n\nTopk\nmean\n\nQpat\n\nText Encoder\n\n+\n\nLN\n\nC\n\n...\n\ndamaged object\n\nAnomaly Prompt\n\n[0 1]/[1 0] norm/anom one-hot label C Cosine similarity\n\n+ Element wise sum\n\nElement wise multiplication\n\n(b) MRAD-CLIP\n\nFigure 3: Overall architecture of the proposed MRAD framework. (a) MRAD-TF/FT: query features from a frozen CLIP image encoder are matched to a two-level feature-label memory bank;\nMRAD-TF uses direct similarity retrieval, while MRAD-FT adds linear layers into cross-atten module. (b) MRAD-CLIP: priors from MRAD-FT are injected as dynamic biases into learnable text\nprompts, enhancing cross-modal alignment and anomaly localization.\nlet ΩA and ΩN denote the index sets of anomalous and normal queries, we aggregate four datasetlevel statistics as follows:\nX\nX\nAq Ak = |Ω1A |\nsanom (qu ),\nNq Ak = |Ω1N |\nsanom (qu ),\n(3)\nu∈ΩA\n\nAq Nk = |Ω1A |\n\nX\n\nu∈ΩN\n\nsnorm (qu ) = 1 − Aq Ak ,\n\nNq Nk = |Ω1N |\n\nu∈ΩA\n\nX\n\nsnorm (qu ) = 1 − Nq Ak . (4)\n\nu∈ΩN\n\nHere, for example, Nq Ak is precisely the mean anomaly similarity score (sanom (q)) of all normal\nqueries. Across datasets we consistently observe Nq Nk &gt; Aq Nk and Aq Ak &gt; Nq Ak (Figure 2(a)),\nindicating that similarity score sanom (q) is a stable anomaly discriminative signal. Motivated by this\nobservation, we replace parametric fitting with similarity retrieval, as adopted in MRAD. Furthermore, as described in section 3.2.3, we introduce a lightweight fine-tuning strategy to further enlarge\nthe Aq Ak –Nq Ak gap. (Figure 2(b)). More details see Appendix C.1.\n3.1.2\n\nA PPROACH OVERVIEW\n\nAs shown in Figure 3, given an auxiliary dataset, MRAD-TF freezes the CLIP image encoder to\nextract class and patch tokens from the auxiliary dataset, building a two-level feature-label memory\nbank. During inference, a query image retrieves against this memory to produce an image-level\nanomaly score and a pixel-level anomaly map. To further improve discriminability with little cost,\nMRAD-FT adds two linear layers into cross-atten module to fine-tune the retrieval metric while\nkeeping the backbone frozen. Based on MRAD-FT, we propose MRAD-CLIP, which injects region priors into learnable CLIP prompts, improving generalization and anomaly localization beyond\nconventional prompt-learning methods. In summary, this retrieval-based access to the original data\ndistribution highlights the strong potential of such paradigms for robust anomaly detection.\n3.2\n3.2.1\n\nMRAD: F ROM T RAIN - FREE TO F INE - TUNE\nF EATURE –L ABEL M EMORY BANK\n\nObserving that retrieval against normal/abnormal features is strongly discriminative, we replace\ntrainable explicit classifiers with a two-level feature–label memory bank. We split the frozen CLIP\n4\n\n\fPublished as a conference paper at ICLR 2026\n\nimage encoder into a global branch ϕcls (emitting the class token) and a local branch ϕvv (V-V\nattention, emitting patch tokens), which share the same pretrained weights. For the i-th image Ii ,\nthe global feature and the u-th patch feature are\nkicls = ϕcls (Ii ) ∈ Rd ,\n\nd\nfi,u = ϕ(u)\nvv (Ii ) ∈ R ,\n\n(5)\n\nwhere features are ℓ2 -normalized for stable retrieval. Given a binary mask label, we downsample it\nto the patch grid of ϕvv and use M̃i,u to denote the label at the u-th patch.\nFor an anomalous image, we obtain two region prototypes by averaging patch features inside and\noutside the annotated abnormal region, respectively. We denote these patch-level prototypes as\nµanom\n(only patches with M̃i,u = 1) and µnorm\n(only patches with M̃i,u = 0). For a normal-labeled\ni\ni\nimage, we only compute the normal prototype µnorm\n(equivalently, M̃i ≡ 0). Let enorm = [1, 0]⊤\ni\n⊤\nand eanom = [0, 1] denote one-hot labels. The memory bank thus has two levels:\n(i) an image-level memory that stores each global feature kicls with its normal/abnormal label enorm\nand eanom ;\ntogether with their\nand µanom\n(ii) a patch-level memory that stores the region prototypes µnorm\ni\ni\ncorresponding labels enorm and eanom .\nFinally, stacking keys and values yields the matrix form\nKcls ∈ RNc ×d ,\n\nVcls ∈ RNc ×2 ,\n\nKpat ∈ RNp ×d ,\n\nVpat ∈ RNp ×2 ,\n\n(6)\n\nwhere Nc is the number of image-level entries and Np &gt; Nc is the number of patch-level entries.\n3.2.2\n\nMRAD-TF: T RAIN - FREE BASE MODEL\n\nFor a query image I, we obtain global and patch queries Qcls , Qpat = ϕ(I) ∈ Rd , Ru×d . The\nretrieval-based detection process in cross-atten module is defined as:\nh\ni\n\u0001\nn/a\n⊤\nYcls = softmax Qcls Kcls\n/τ Vcls\n,\nYcls ∈ R1×2 ,\n(7)\nn/a\nh\ni\n\u0001\nn/a\n⊤\nYseg\n= softmax Qpat Kpat\n/τ Vpat\n,\nYseg ∈ Ru×2 .\n(8)\nn/a\n\nwhere [·]n/a selects the normal/anomaly channel. Here Yseg represents segmentation logits and\na\ncorresponds to the anomaly similarity\ndenotes the per-patch normal/anomalous score. Note that Yseg\na\nis upsampled to form\nscore sanom (q) introduced in section 3.1.1. For pixel-level segmentation, Yseg\nthe anomaly map M̂ . For image-level classification, the final anomaly score is computed as:\na\nS(I) = Ycls\n+ TopKMean(M̂ ),\n\n(9)\n\nWe define TopKMean(M̂ ) as the average of the top-k largest values in the upsampled anomaly map\nM̂ , which emphasizes high-confidence anomalous regions while suppressing background noise.\n3.2.3\n\nMRAD-FT: L IGHTWEIGHT F INE - TUNING\n\nAs shown in Figure 2, under the train-free setting, the discriminative margins between normal and\nabnormal similarities are limited. We therefore apply a lightweight fine-tuning that calibrates the retrieval metric to better align normal and abnormal semantics. As a result, the dataset-level statistics\n(e.g., Aq Ak − Nq Ak ) exhibit larger separations, leading to more reliable anomaly decisions. Specifically, for query-key pairs, we insert two linear mappings Wq , Wk ∈ Rd×d , replacing the QK ⊤ in\nsection 3.2.2 with (QWq )(KWk )⊤ . The fine-tuned retrieval process is defined as:\n\"\n#\n\u0012\n\u0013\n(Qcls Wq cls )(Kcls Wk cls )⊤\nn/a\nYcls = softmax\n+ Mρ (Qcls , Kcls ) Vcls\n,\n(10)\nτ\nn/a\n\"\n#\n\u0012\n\u0013\n⊤\n(Qpat Wq seg )(Kpat Wk seg )\nn/a\n.\n(11)\nYseg = softmax\n+ Mρ (Qpat , Kpat ) Vpat\nτ\nn/a\n\n5\n\n\fPublished as a conference paper at ICLR 2026\n\nTo stabilize training, we apply a similarity dropout operator Mρ (·, ·) that masks the top-ρ% highest\nsimilarities in the QK ⊤ matrix for each query, setting their logits to −∞ during training (retaining all matches during inference). This prevents trivial self-matching in single-dataset settings and\nencourages robust discrimination on less similar features. Given the classification label y and segmentation mask M , the objective function combines classification and segmentation losses:\nL = Lcls + Lseg = BCE(Ycls , y) + Dice(Yseg , M ) + Focal(Yseg , M ),\n\n(12)\n\nwhere BCE(·, ·) denotes a binary cross-entropy loss, Dice(·, ·) denotes a dice loss (Li et al., 2019),\nand Focal(·, ·) denotes a focal loss (Lin et al., 2017).\n3.3\n\nMRAD-CLIP: DYNAMIC P ROMPT- LEARNING E XTENSION\n\nTo leverage language priors while keeping the vision branch frozen, we augment the CLIP prompt\nwith learnable context tokens and inject image-specific priors from MRAD-FT.\nStatic, object-agnostic prompts. We prepend E learnable context tokens to the textual templates\n“good object” and “damaged object” to form the class-agnostic prompts:\nP n = [V1n ][V2n ] · · · [VEn ][good object],\nP a = [V1a ][V2a ] · · · [VEa ][damaged object].\n\n(13)\n\nPrior-guided dynamic bias. Given a query image, we threshold the anomaly map from MRAD-FT\nto separate anomalous and normal regions, and average the patch features in each region to obtain\nprototypes. These prototypes are projected through lightweight linear layers into bias vectors bn/a ,\nn/a\nwhich are then added to the E context tokens to form the image-specific dynamic prompts Pdyn .\nn\nPdyn\n= [V1n +bn ] [V2n +bn ] · · · [VEn +bn ][good object],\na\nPdyn\n= [V1a +ba ] [V2a +ba ] · · · [VEa +ba ][damaged object],\n\n(14)\n\nPrompt-conditioned cosine classifier. Given the CLIP text encoder T (·) (following the same setting as AnomalyCLIP) and\n\u0001 ℓ2 normalization Norm(·),\n\u0001we obtain the normalized text embeddings\nn\na\ntnorm = Norm T (Pdyn\n) and tanom = Norm T (Pdyn\n) from the CLIP text encoder. Then we use\nthe prompt-conditioned cosine classifier to predict:\n\u0012\n\u0013\n\u0001\n\u0001\u0003\n1\u0002\nn/a\nYseg\n= softmax\ncos tnorm , Qpat , cos tanom , Qpat\n∈ Ru×2 ,\n(15)\nτ\nwhere cos(t, Qpat ) returns the vector of cosine similarities between t and all patch features. The\na\nto the original image resolution and the\nrefined anomaly map is then obtained by upsampling Yseg\nimage-level anomaly score follows Equation 9. Only the text-side parameters are trained while the\nvision encoder and the MRAD memories remain frozen. We use the same losses as in Equation 12\nfor classification and segmentation, resulting in a prompt-conditioned refinement that improves local\nalignment and reduces background false positives with negligible extra parameters.\n\n4\n\nE XPERIMENTS\n\n4.1\n\nE XPERIMENTAL S ETUP\n\nDatasets. We evaluate the ZSAD performance on 16 public datasets, covering both industrial\nand medical domains. In the industrial domain, we adopt eight widely used datasets: MVTecAD (Bergmann et al., 2019), VisA (Zou et al., 2022), BTAD (Mishra et al., 2021), MPDD (Jezek\net al., 2021), SDD (Jezek et al., 2021), KSDD2 (Božič et al., 2021), DAGM (Wieler &amp; Hahn,\n2007), and DTD-Synthetic (Aota et al., 2023). In the medical domain, we include eight datasets:\nHeadCT (Salehi et al., 2021), BrainMRI (Kanade &amp; Gumaste, 2015), Br35H (Hamada., 2020),\nCVC-ColonDB (Tajbakhsh et al., 2015), CVC-ClinicDB (Bernal et al., 2015), Endo (Hicks et al.,\n2021), Kvasir (Jha et al., 2019), and ISIC (Codella et al., 2018). Following the ZSAD setting, we use\na single industrial dataset as the auxiliary training source and directly test on the remaining industrial\nand all medical datasets. By default, VisA is adopted as the auxiliary dataset to build the memory\nbank, since its categories are disjoint from the others; when evaluating VisA itself, we instead use\nMVTec-AD as the auxiliary dataset. More details see Appendix B.\n6\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 1: ZSAD results on 16 datasets. Top: pixel-level (P-AUROC% / PRO%). Bottom: image-level\n(I-AUROC% / I-AP%). Higher is better. Red and Blue denote the best and second-best trainingbased results per dataset/metric; Orange highlights better results under train-free setting.\n(a) Pixel-level ZSAD (P-AUROC% / PRO%).\nMethod →\n\nT RAIN - FREE METHODS\n\nDataset ↓\n\nWinCLIP MRAD-TF AdaCLIP AnomalyCLIP FAPrompt MRAD-FT MRAD-CLIP\n(CVPR’23)\n(Ours)\n(ECCV’24)\n(ICLR’24)\n(ICCV’25)\n(Ours)\n(Ours)\n\nT RAINING - BASED METHODS\n\nIndustrial\nMVTec-AD\nVisA\nBTAD\nMPDD\nDTD-Synthetic\nSDD\nKSDD2\nDAGM\n\n(85.1, 64.6)\n(79.6, 56.8)\n(71.4, 32.8)\n(71.2, 48.9)\n(78.4, 51.0)\n(55.9, 14.7)\n(75.4, 69.2)\n(75.5, 44.4)\n\n(86.7, 63.5)\n(91.0, 71.0)\n(80.5, 36.3)\n(92.7, 76.2)\n(90.7, 73.8)\n(85.0, 63.0)\n(94.9, 87.1)\n(86.9, 66.1)\n\n(86.8, 33.8)\n(95.1, 71.3)\n(87.7, 17.1)\n(95.2, 10.8)\n(94.1, 24.9)\n(79.5, 4.9)\n(85.8, 72.9)\n(76.2, 56.3)\n\n(91.1, 81.4)\n(95.5, 87.0)\n(93.3, 69.3)\n(96.2, 79.7)\n(97.6, 88.3)\n(90.1, 62.9)\n(97.9, 94.9)\n(96.5, 88.4)\n\n(90.6, 83.3)\n(95.9, 87.5)\n(91.7, 69.0)\n(96.7, 75.9)\n(97.7, 89.4)\n(89.3, 63.9)\n(97.4, 93.2)\n(95.6, 89.1)\n\n(92.2, 85.4)\n(95.9, 89.1)\n(94.7, 74.3)\n(97.4, 90.6)\n(97.2, 90.8)\n(91.0, 71.2)\n(98.8, 89.8)\n(96.1, 74.9)\n\n(93.0, 86.8)\n(95.9, 88.0)\n(95.4, 72.8)\n(97.9, 90.6)\n(98.1, 89.8)\n(93.0, 72.0)\n(98.9, 95.6)\n(97.4, 90.3)\n\nMedical\nISIC\nCVC-ColonDB\nCVC-ClinicDB\nKvasir\nEndo\n\n(83.5, 55.1)\n(64.8, 28.4)\n(70.7, 32.5)\n(69.8, 31.0)\n(68.2, 28.3)\n\n(84.4, 72.1)\n(77.6, 59.6)\n(81.6, 59.0)\n(77.1, 52.3)\n(82.7, 60.0)\n\n(85.4, 5.3)\n(79.3, 6.5)\n(84.3, 14.6)\n(79.4, 12.3)\n(84.0, 10.5)\n\n(88.4, 78.1)\n(81.9, 71.4)\n(85.9, 69.6)\n(81.9, 45.7)\n(86.3, 67.3)\n\n(88.9, 81.2)\n(82.5, 70.7)\n(84.7, 68.1)\n(82.0, 43.9)\n(86.5, 67.2)\n\n(90.9, 83.6)\n(82.8, 72.9)\n(85.9, 72.2)\n(83.9, 52.7)\n(87.3, 70.0)\n\n(91.3, 83.4)\n(84.7, 73.9)\n(87.3, 73.9)\n(84.3, 52.7)\n(88.3, 71.6)\n\nAverage\n\n(73.0, 42.9) (85.5, 64.6)\n\n(85.6, 26.2)\n\n(91.0, 75.7)\n\n(90.7, 75.6) (91.9, 78.3)\n\n(92.7, 80.1)\n\nMethod →\n\nT RAIN - FREE METHODS\n\nDataset ↓\n\nWinCLIP MRAD-TF AdaCLIP AnomalyCLIP FAPrompt MRAD-FT MRAD-CLIP\n(CVPR’23)\n(Ours)\n(ECCV’24)\n(ICLR’24)\n(ICCV’25)\n(Ours)\n(Ours)\n\n(b) Image-level ZSAD (I-AUROC% / I-AP%).\nT RAINING - BASED METHODS\n\nIndustrial\nMVTec-AD\nVisA\nBTAD\nMPDD\nDTD-Synthetic\nSDD\nKSDD2\nDAGM\n\n(91.8, 95.1)\n(78.1, 77.5)\n(83.3, 84.1)\n(61.5, 69.2)\n(63.8, 83.5)\n(54.8, 37.7)\n(77.5, 43.9)\n(58.5, 59.1)\n\n(79.0, 90.0)\n(75.0, 79.1)\n(86.3, 90.3)\n(67.9, 73.8)\n(79.1, 89.6)\n(80.0, 66.3)\n(90.4, 82.6)\n(78.7, 80.6)\n\n(92.0, 96.4)\n(83.0, 84.9)\n(91.6, 92.4)\n(76.4, 80.4)\n(92.8, 97.0)\n(77.5, 65.7)\n(90.5, 77.7)\n(77.6, 72.7)\n\n(91.5, 96.2)\n(82.1, 85.4)\n(89.1, 91.1)\n(73.7, 76.5)\n(94.5, 97.7)\n(82.7, 73.8)\n(90.8, 76.5)\n(98.0, 97.7)\n\n(91.9, 95.7)\n(84.5, 86.8)\n(91.2, 89.1)\n(76.9, 85.9)\n(95.4, 97.8)\n(83.4, 75.3)\n(94.4, 86.9)\n(98.0, 98.1)\n\n(92.3, 96.6)\n(85.5, 87.8)\n(94.5, 97.7)\n(79.9, 80.6)\n(94.1, 97.8)\n(83.8, 75.8)\n(92.9, 86.6)\n(98.0, 98.1)\n\n(94.0, 97.4)\n(85.7, 88.3)\n(92.8, 94.2)\n(81.8, 83.4)\n(96.0, 98.4)\n(83.9, 76.2)\n(95.1, 88.9)\n(98.4, 98.6)\n\nMedical\nHeadCT\nBrainMRI\nBr35H\n\n(83.7, 81.6) (69.3, 73.6)\n(92.0, 90.7) (94.1, 96.8)\n(80.5, 82.2) (91.0, 92.1)\n\n(93.4, 92.2)\n(94.9, 94.2)\n(95.7, 95.7)\n\n(95.3, 95.2)\n(96.1, 92.3)\n(97.3, 96.1)\n\n(96.0, 96.4) (96.2, 96.9)\n(95.7, 95.6) (96.9, 97.0)\n(97.0, 95.4) (97.7, 96.5)\n\n(97.1, 97.6)\n(97.0, 97.4)\n(97.9, 97.6)\n\nAverage\n\n(75.1, 73.2) (81.0, 83.2)\n\n(87.8, 86.3)\n\n(90.1, 88.9)\n\n(91.3, 91.2) (92.0, 91.9)\n\n(92.7, 92.5)\n\nEvaluation metrics. For image-level classification tasks, we report Area Under the Receiver Operating Characteristic Curve (AUROC) and Average Precision (AP). For segmentation tasks, we adopt\npixel-level AUROC and the Per-Region Overlap (PRO) metric to assess localization performance.\nImplementation details. We follow prior work and use the publicly available CLIP (ViT-L/14-336)\npretrained weights, with input resolution unified to 518 × 518. We extract both class token and patch\ntokens from the last layer of the image encoder to construct the memory bank: when using MVTecAD as the auxiliary dataset, the memory bank contains 1725/2976 (class/patch) entries; when using\nVisA, it contains 2162/3093 entries. For MRAD-CLIP, we set the learnable prompt length to 12.\nWe train with the Adam (Kingma &amp; Ba, 2014) optimizer, using a learning rate of 5 × 10−4 and\nbatch size of 8. MRAD-FT is trained for only 1 epoch, followed by MRAD-CLIP for 5 epochs.\nDuring training, the vision backbone is frozen and only our lightweight modules are updated. All\nexperiments are conducted on a single NVIDIA RTX 3090 (24GB). We report the averaged results\nacross all categories of each target dataset. More details see Appendix A.1.\n7\n\n\fPublished as a conference paper at ICLR 2026\n\nMedical domain\n\nMRAD AnomalyCLIP AdaCLIP\n\nGT\n\nIndustrial domain\n\nCable\n\nCarpet\n\nHazelnut\n\nPlate\n\nPcb\n\nTile\n\nToothbrush Transistor\n\nTubes\n\nWood\n\nColon\n\nColon\n\nSkin\n\nSkin\n\nFigure 4: Comparison of anomaly segmentation results between MRAD-CLIP and other methods.\n\n4.2\n\nC OMPARISON WITH S TATE - OF - THE - ART METHODS\n\nQuantitative Comparison. As shown in Table 1, we report results on 16 datasets spanning industrial and medical domains. MRAD-TF already surpasses prior train-free baselines (e.g., WinCLIP),\nindicating that direct access to the empirical feature-label distribution is highly effective. Building on\nthis train-free model, the MRAD-FT further outperforms training-based methods (e.g., FAPrompt,\nAnomalyCLIP) on both pixel-level and image-level metrics. Further, MRAD-CLIP attains stateof-the-art results for ZSAD with consistent margins over the strongest prior work (including our\nMRAD-FT), indicating that dynamic prompts conditioned on region priors strengthen cross-domain\ngeneralization and sharpen localization. Taken together, these results demonstrate that our MRAD\nis a strong ZSAD method, and can be easily extended in a principled manner to achieve state-ofthe-art performance, underscoring the effectiveness and flexibility of the framework. We provide\nmore detailed analyses of the mechanism behind MRAD’s cross-class retrieval generalization in the\nAppendix A.2 and C.2.\nQualitative Comparison. In industrial datasets (diverse materials, textures, and imaging conditions), MRAD-FT and MRAD-CLIP consistently rank among the top on both image-level and pixellevel metrics. They also exhibit low across-dataset variance and minimal rank fluctuations, indicating robustness to background clutter and fine-grained defects. In medical datasets (large morphological variability and strong domain shift), the same pattern holds: the lightweight metric calibration\nand prior-guided prompting preserve decision margins and localization quality under cross-domain\ntransfer. Figure 4 visualizes anomaly maps from both industrial and medical datasets. Qualitatively, the resulting heatmaps show fewer background false positives, tighter anomaly boundaries,\nand smoother localization of large defective regions across domains. These observations mirror the\nquantitative gains and further support the method’s stability and generalization. A comparison of\nparameter counts and inference time with other methods is provided in the Appendix C.3. More\nvisualization results are provided in Appendix D.\n4.3\n\nA BLATION S TUDY\n\nWe conduct extensive ablation studies to examine the contributions of different components in the\nMRAD framework. All results are reported on representative industrial or medical datasets. The\nmain findings are summarized below, while additional ablations and more details are provided in\nAppendix C.4 for completeness.\nAblation on TF/FT/CLIP. Across six industrial datasets, as shown in Figure 5, the radar plots\nreveal a clear monotonic trend. MRAD-TF establishes competitive performance, while adding two\nlinear layers in MRAD-FT yields consistent gains on both image-level (I-AUROC/I-AP) and pixellevel (P-AUROC/PRO) metrics. This indicates that lightweight fine-tuning effectively enhances the\ndiscriminability of classification and segmentation. Based on this, MRAD-CLIP further improves\nespecially the pixel-level metrics by dynamic prompt learning with region priors, while also yielding\nsmall but consistent gains on image-level scores. The outward expansion of the curves across all axes\nconfirms that each component contributes complementary benefits, delivering stable improvements\nrather than dataset-specific spikes.\n8\n\n\fPublished as a conference paper at ICLR 2026\n\nPixel-level AUROC\n\nDTD\n\n80\n\nDAGM\n\nKSDD2\n\nPixel-level PRO\n\nVisA\n\n85\n\n90\n\n95\n\nDTD\n\n100\n30\n\nMVTec DAGM\n\nMPDD\n\nImage-level AUROC\n\nVisA\n\n47\n\nKSDD2\n\n65\n\n82\n\nDTD\n\n100\n60\n\nMVTec DAGM\n\nMPDD\n\nMRAD-TF\n\nKSDD2\n\nMRAD-FT\n\nImage-level AP\n\nVisA\n\n70\n\n80\n\n90\n\nDTD\n\n100\n60\n\nMVTec DAGM\n\nMPDD\n\nVisA\n\nKSDD2\n\n70\n\n80\n\n90\n\n100\n\nMVTec\n\nMPDD\n\nMRAD-CLIP\n\nFigure 5: Ablation results of different MRAD variants. Radar charts on six industrial datasets\ncompare image-level (I-AUROC/I-AP) and pixel-level (P-AUROC/PRO) metrics.\nTable 2: Ablation on dynamic prompt biases. Results are reported as Pixel-level (AUROC, PRO)\nand Image-level (AUROC, AP). The best performance in each column is highlighted in bold.\nMVTec-AD\n\nbias (bn/a )\nstatic (baseline)\n+ class token\n+ cross-patch\n+ anomaly prior\n+ dual prior\n\nVisA\n\nKvasir\n\nHeadCT\n\nPixel\n\nImage\n\nPixel\n\nImage\n\nPixel\n\nImage\n\n(91.5, 82.9)\n(86.2, 54.9)\n(92.5, 85.7)\n(92.8, 85.2)\n(93.0, 86.8)\n\n(92.0, 96.3)\n(89.6, 95.1)\n(93.0, 96.9)\n(93.6, 97.3)\n(94.0, 97.4)\n\n(95.6, 87.3)\n(95.1, 86.8)\n(95.3, 88.6)\n(95.6, 88.1)\n(95.9, 88.0)\n\n(85.4, 87.9)\n(84.9, 87.7)\n(85.2, 88.4)\n(85.6, 88.2)\n(85.7, 88.3)\n\n(83.5, 49.5)\n(79.0, 45.2)\n(83.0, 50.0)\n(83.7, 51.8)\n(84.3, 52.7)\n\n(96.1, 97.0)\n(90.4, 90.8)\n(97.4, 97.6)\n(96.5, 96.7)\n(97.1, 97.6)\n\nAblation on dynamic prompt biases. We change only the source of the additive bias in MRADCLIP’s dynamic prompts and keep all other components fixed. Table 2 reports pixel-level (AUROC/PRO) and image-level (AUROC/AP) results on four datasets. The static variant (no bias;\nequivalent to AnomalyCLIP) serves as the baseline. Bias from the class token (similar to CoCoOp)\ndegrades segmentation and cross-domain robustness, indicating that global features alone are insufficient. Introducing cross-patch attention (two learnable queries attending to patch features) improves\nZSAD performance, suggesting that conditioning prompts on region-level context helps generalization to unseen categories. Guided by this observation, conditioning on the MRAD-FT anomaly\nprior yields consistent image-level and pixel-level gains. Furthermore, injecting both normal and\nanomalous priors (dual prior) achieves nearly the best and most robust performance across datasets.\nThese results indicate that local region-aware biases with explicit priors are crucial for ZSAD, while\nglobal-only features tend to weaken performance. More details see Appendix C.4.\n\nPixel AUROC (%)\n\nAblation: Effect of Memory Size on Pixel AUROC (MVTec AD)\nMemory size ablation. We ablate the patch93.5\nlevel memory by random subsampling to n ∈\n93.0\n{Full, 2000, 1000, 500, 100}. For each n, we av92.5\n92.0\nerage across multiple random subsamplings and\n91.5\nreport pixel AUROC on MVTec-AD for MRAD91.0\nFT and MRAD-CLIP (Figure 6). As n decreases,\n90.5\nboth methods show a smooth but minor decline,\n90.0\ndue to the reduced prototype coverage in the memMRAD-FT (Pixel AUROC)\n89.5\nMRAD-CLIP (Pixel AUROC)\nory bank. However, the drop is only within a few\n89.0\nFull\n2000\n1000\n500\n100\ntenths, demonstrating the strong robustness of the\nPatch-Memory Size (n)\nMRAD framework. Relatively, MRAD-CLIP is\nmore robust even under small memory sizes, ex- Figure 6: Metrics about the ablation of Memhibiting smaller drops and lower variance, primar- ory size.\nily because it does not rely on precise dynamic biases from prompts and can already benefit from\ncoarse regional priors. In practice, we believe the diversity-aware memory even with a small-size\nmemory (n ≥ 100) can track near-full performance under typical budgets.\n\n5\n\nC ONCLUSION\n\nIn this paper, we explore an alternative to mainstream parametric fitting for anomaly detection by\ndirectly exploiting the empirical distribution of auxiliary data. Building on this idea, we propose\n9\n\n\fPublished as a conference paper at ICLR 2026\n\nMRAD as a unified memory-driven retrieval framework. The base model, MRAD-TF, constructs\na two-level memory bank on top of a frozen vision backbone and solves both classification and\nsegmentation via similarity retrieval. Further, we develop two lightweight variants, MRAD-FT and\nMRAD-CLIP. Experiments across diverse industrial and medical benchmarks show that all variants\nexhibit strong zero-shot capability and robust performance under cross-domain evaluation. We believe this paradigm provides a simple and robust baseline for ZSAD, and it lays the foundation for\nscaling to larger datasets and online or incremental settings.\n\nACKNOWLEDGMENTS\nThis work is supported by the National Science and Technology Major Project (2022ZD0119400),\nthe National Natural Science Foundation of China (Grant Nos. 62303458 and 62303461), and the\nBeijing Municipal Natural Science Foundation (China) (Grant No. 4252053).\n\nR EPRODUCIBILITY S TATEMENT\nTo facilitate reproducibility and completeness, we include an Appendix composed of five sections.\nIn Appendix A, we provide implementation details of MRAD, including model components, training/inference recipes, full hyperparameter settings, with additional mechanism explanations and\nretrieval visualizations. Appendix B describes the key statistics of datasets used in our experiments\nand evaluation protocols under the ZSAD setting. Appendix C reports additional experimental results, including motivation studies, ablation analyses, as well as evaluations under a broader range\nof experimental settings. Appendix D presents extended qualitative analyses and visualizations of\nour method. In addition, the usage details of LLMs are provided in Appendix E.\n\nR EFERENCES\nToshimichi Aota, Lloyd Teh Tzer Tong, and Takayuki Okatani. Zero-shot versus many-shot: Unsupervised texture anomaly detection. In Proceedings of the IEEE/CVF Winter Conference on\nApplications of Computer Vision, pp. 5564–5572, 2023.\nJinan Bao, Hanshi Sun, Hanqiu Deng, Yinsheng He, Zhaoxiang Zhang, and Xingyu Li. Bmad:\nBenchmarks for medical anomaly detection, 2024. URL https://arxiv.org/abs/2306.\n11876.\nPaul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition, pp. 9592–9600, 2019.\nPaul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Uninformed students:\nStudent-teacher anomaly detection with discriminative latent embeddings. In Proceedings of the\nIEEE/CVF conference on computer vision and pattern recognition, pp. 4183–4192, 2020.\nJorge Bernal, F Javier Sánchez, Gloria Fernández-Esparrach, Debora Gil, Cristina Rodrı́guez, and\nFernando Vilariño. Wm-dova maps for accurate polyp highlighting in colonoscopy: Validation\nvs. saliency maps from physicians. Computerized medical imaging and graphics, 43:99–111,\n2015.\nJakob Božič, Domen Tabernik, and Danijel Skočaj. Mixed supervision for surface-defect detection:\nFrom weakly to fully supervised learning. Computers in Industry, 129:103459, 2021.\nYunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng, Weiming Shen, and Giacomo Boracchi. Adaclip: Adapting clip with hybrid learnable prompts for zero-shot anomaly detection. In\nEuropean Conference on Computer Vision, pp. 55–72. Springer, 2024.\nQiyu Chen, Huiyuan Luo, Chengkan Lv, and Zhengtao Zhang. A unified anomaly synthesis strategy\nwith gradient ascent for industrial anomaly detection and localization. In European Conference\non Computer Vision, pp. 37–54. Springer, 2024a.\n10\n\n\fPublished as a conference paper at ICLR 2026\n\nQiyu Chen, Huiyuan Luo, Haiming Yao, Wei Luo, Zhen Qu, Chengkan Lv, and Zhengtao Zhang.\nCenter-aware residual anomaly synthesis for multiclass industrial anomaly detection. IEEE Transactions on Industrial Informatics, 21(9):7276–7286, 2025a.\nQiyu Chen, Zhen Qu, Wei Luo, Haiming Yao, Yunkang Cao, Yuxin Jiang, Yinan Duan, Huiyuan\nLuo, Chengkan Lv, and Zhengtao Zhang. Cops: Conditional prompt synthesis for zero-shot\nanomaly detection. arXiv preprint arXiv:2508.03447, 2025b.\nXuhai Chen, Yue Han, and Jiangning Zhang. A zero-/few-shot anomaly classification and segmentation method for cvpr 2023 (vand) workshop challenge tracks 1 &amp;2. 1st Place on Zero-shot AD\nand 4th Place on Few-shot AD, 2305:17382, 2023.\nXuhai Chen, Jiangning Zhang, Guanzhong Tian, Haoyang He, Wuhao Zhang, Yabiao Wang,\nChengjie Wang, and Yong Liu. Clip-ad: A language-guided staged dual-path model for zeroshot anomaly detection. In International Joint Conference on Artificial Intelligence, pp. 17–33.\nSpringer, 2024b.\nNoel CF Codella, David Gutman, M Emre Celebi, Brian Helba, Michael A Marchetti, Stephen W\nDusza, Aadi Kalloo, Konstantinos Liopyris, Nabin Mishra, Harald Kittler, et al. Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical\nimaging (isbi), hosted by the international skin imaging collaboration (isic). In 2018 IEEE 15th\ninternational symposium on biomedical imaging (ISBI 2018), pp. 168–172. IEEE, 2018.\nAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas\nUnterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An\nimage is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint\narXiv:2010.11929, 2020.\nQingqing Fang, Wenxi Lv, and Qinliang Su. Af-clip: Zero-shot anomaly detection via anomalyfocused clip adaptation. arXiv preprint arXiv:2507.19949, 2025a.\nQingqing Fang, Qinliang Su, Wenxi Lv, Wenchao Xu, and Jianxing Yu. Boosting fine-grained visual\nanomaly detection with coarse-knowledge-aware adversarial learning. In Proceedings of the AAAI\nConference on Artificial Intelligence, volume 39, pp. 16532–16540, 2025b.\nZhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Hao Li, Ming Tang, and Jinqiao Wang.\nFilo: Zero-shot anomaly detection by fine-grained description and high-quality localization. In\nProceedings of the 32nd ACM International Conference on Multimedia, pp. 2041–2049, 2024.\nZixian Guo, Bowen Dong, Zhilong Ji, Jinfeng Bai, Yiwen Guo, and Wangmeng Zuo. Texts as\nimages in prompt tuning for multi-label image recognition. In Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition, pp. 2808–2817, 2023a.\nZiyu Guo, Renrui Zhang, Longtian Qiu, Xianzheng Ma, Xupeng Miao, Xuming He, and Bin Cui.\nCalip: Zero-shot enhancement of clip with parameter-free attention. In Proceedings of the AAAI\nConference on Artificial Intelligence, volume 37, pp. 746–754, 2023b.\nA.\n\nHamada.\nBr35h:\nBrain tumor detection 2020.\nOnline.\nhttps://www.kaggle.com/datasets/ahmedhamada0/brain-tumor-detection, 2020.\n\nAvailable:\n\nSteven A Hicks, Debesh Jha, Vajira Thambawita, Pål Halvorsen, Hugo L Hammer, and Michael A\nRiegler. The endotect 2020 challenge: evaluation and comparison of classification, segmentation\nand inference time for endoscopy. In International Conference on Pattern Recognition, pp. 263–\n274. Springer, 2021.\nJongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang, Avinash Ravichandran, and Onkar\nDabeer. Winclip: Zero-/few-shot anomaly classification and segmentation. In Proceedings of the\nIEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19606–19616, 2023.\nStepan Jezek, Martin Jonak, Radim Burget, Pavel Dvorak, and Milos Skotak. Deep learning-based\ndefect detection of metal parts: evaluating current methods in complex conditions. In 2021 13th\nInternational congress on ultra modern telecommunications and control systems and workshops\n(ICUMT), pp. 66–71. IEEE, 2021.\n11\n\n\fPublished as a conference paper at ICLR 2026\n\nDebesh Jha, Pia H Smedsrud, Michael A Riegler, Pål Halvorsen, Thomas De Lange, Dag Johansen,\nand Håvard D Johansen. Kvasir-seg: A segmented polyp dataset. In International conference on\nmultimedia modeling, pp. 451–462. Springer, 2019.\nPranita Balaji Kanade and PP Gumaste. Brain tumor detection using mri images. Brain, 3(2):\n146–150, 2015.\nDiederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint\narXiv:1412.6980, 2014.\nBoyi Li, Kilian Q Weinberger, Serge Belongie, Vladlen Koltun, and René Ranftl. Language-driven\nsemantic segmentation. arXiv preprint arXiv:2201.03546, 2022.\nXiaoya Li, Xiaofei Sun, Yuxian Meng, Junjun Liang, Fei Wu, and Jiwei Li. Dice loss for dataimbalanced nlp tasks. arXiv preprint arXiv:1911.02855, 2019.\nTsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense\nobject detection. In Proceedings of the IEEE international conference on computer vision, pp.\n2980–2988, 2017.\nWenxin Ma, Xu Zhang, Qingsong Yao, Fenghe Tang, Chenxu Wu, Yingtai Li, Rui Yan, Zihang\nJiang, and S Kevin Zhou. Aa-clip: Enhancing zero-shot anomaly detection via anomaly-aware\nclip. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 4744–4754,\n2025.\nPankaj Mishra, Riccardo Verk, Daniele Fornasier, Claudio Piciarelli, and Gian Luca Foresti. Vt-adl:\nA vision transformer network for image anomaly detection and localization. In 2021 IEEE 30th\nInternational Symposium on Industrial Electronics (ISIE), pp. 01–06. IEEE, 2021.\nGuansong Pang, Chunhua Shen, Longbing Cao, and Anton Van Den Hengel. Deep learning for\nanomaly detection: A review. ACM computing surveys (CSUR), 54(2):1–38, 2021.\nZiyuan Qin, Huahui Yi, Qicheng Lao, and Kang Li. Medical image understanding with pretrained\nvision language models: A comprehensive study. arXiv preprint arXiv:2209.15517, 2022.\nZhen Qu, Xian Tao, Fei Shen, Zhengtao Zhang, and Tao Li. Investigating shift equivalence of convolutional neural networks in industrial defect segmentation. IEEE Transactions on Instrumentation\nand Measurement, 72:1–17, 2023.\nZhen Qu, Xian Tao, Mukesh Prasad, Fei Shen, Zhengtao Zhang, Xinyi Gong, and Guiguang Ding.\nVcp-clip: A visual context prompting model for zero-shot anomaly segmentation. In European\nConference on Computer Vision, pp. 301–317. Springer, 2024.\nZhen Qu, Xian Tao, Xinyi Gong, Shichen Qu, Qiyu Chen, Zhengtao Zhang, Xingang Wang, and\nGuiguang Ding. Bayesian prompt flow learning for zero-shot anomaly detection. In Proceedings\nof the Computer Vision and Pattern Recognition Conference, pp. 30398–30408, 2025.\nAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal,\nGirish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual\nmodels from natural language supervision. In International conference on machine learning, pp.\n8748–8763. PMLR, 2021.\nLukas Ruff, Jacob R Kauffmann, Robert A Vandermeulen, Grégoire Montavon, Wojciech Samek,\nMarius Kloft, Thomas G Dietterich, and Klaus-Robert Müller. A unifying review of deep and\nshallow anomaly detection. Proceedings of the IEEE, 109(5):756–795, 2021.\nMohammadreza Salehi, Niousha Sadjadi, Soroosh Baselizadeh, Mohammad H Rohban, and\nHamid R Rabiee. Multiresolution knowledge distillation for anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 14902–14912,\n2021.\nNima Tajbakhsh, Suryakanth R Gurudu, and Jianming Liang. Automated polyp detection in\ncolonoscopy videos using shape and context information. IEEE transactions on medical imaging,\n35(2):630–644, 2015.\n12\n\n\fPublished as a conference paper at ICLR 2026\n\nMatthias Wieler and Tobias Hahn. Weakly supervised learning for industrial optical inspection. In\nDAGM symposium in, volume 6, pp. 11, 2007.\nVitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. Draem-a discriminatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF international\nconference on computer vision, pp. 8330–8339, 2021.\nRenrui Zhang, Wei Zhang, Rongyao Fang, Peng Gao, Kunchang Li, Jifeng Dai, Yu Qiao, and Hongsheng Li. Tip-adapter: Training-free adaption of clip for few-shot classification. In European\nconference on computer vision, pp. 493–510. Springer, 2022.\nKaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Conditional prompt learning for\nvision-language models. In Proceedings of the IEEE/CVF conference on computer vision and\npattern recognition, pp. 16816–16825, 2022a.\nKaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for visionlanguage models. International Journal of Computer Vision, 130(9):2337–2348, 2022b.\nQihang Zhou, Guansong Pang, Yu Tian, Shibo He, and Jiming Chen. Anomalyclip: Object-agnostic\nprompt learning for zero-shot anomaly detection. In International Conference on Learning Representations, 2024.\nJiawen Zhu, Yew-Soon Ong, Chunhua Shen, and Guansong Pang. Fine-grained abnormality prompt\nlearning for zero-shot anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2025.\nYang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and Onkar Dabeer. Spot-the-difference\nself-supervised pre-training for anomaly detection and segmentation. In European conference on\ncomputer vision, pp. 392–408. Springer, 2022.\n\n13\n\n\fPublished as a conference paper at ICLR 2026\n\nA PPENDIX\nA\n\nI MPLEMENTATION D ETAILS A ND BASELINES\n\nA.1\n\nI MPLEMENTATION D ETAILS\n\nWe follow prior work and use the publicly available CLIP (ViT-L/14-336) pretrained weights, with\ninput resolution unified to 518 × 518. We extract both class token and patch tokens from the last\nlayer of the image encoder to construct the memory bank: when using MVTec-AD as the auxiliary\ndataset, the memory bank contains 1725/2976 (class/patch) entries; when using VisA, it contains\n2162/3093 entries.\nFor MRAD-CLIP, we set the length of the learnable prompt to 12 and set the replacing token number\nto 4 in text encoder. Training is performed with the Adam optimizer (Kingma &amp; Ba, 2014), using\na learning rate of 5 × 10−4 and a batch size of 8. MRAD-FT is trained for 1 epoch, followed by\nMRAD-CLIP for 5 epochs.\nFor cross-dataset evaluation, when testing on MVTec-AD, training and memory bank construction\nare performed on VisA, and vice versa. Unless otherwise specified, the batch size is set to 8, and\nthe retrieval temperature coefficient τ is fixed to 1. For computing image-level anomaly scores, we\nuse the top-k mean aggregation in Equation 9, where k is set to 1% of the total number of pixels in\nthe anomaly map. In MRAD-FT, we set similarity-masking threshold ρseg = 20% for segmentation\nand ρcls = 5% for classification. In MRAD-CLIP, the threshold for generating anomaly priors is set\nto 0.5 by default. All experiments are conducted on a single NVIDIA RTX 3090 GPU (24GB). We\nreport averaged results across all categories of each target dataset.\nA.2\n\nM ECHANISM B EHIND C ROSS -C LASS R ETRIEVAL G ENERALIZATION IN MRAD\n\nWe reformulate zero-shot anomaly detection (ZSAD) as a retrieval problem over a feature–label\nmemory, instead of compressing the entire auxiliary set (e.g., VisA) into a parametric classifier\nhead. All features and labels from the auxiliary dataset are preserved verbatim in the memory bank,\nallowing query samples from other datasets to fully retrieve and compare against these prototypes.\nBecause every stored prototype participates in the final similarity computation, this design avoids\nthe information-loss issues inherent to collapsing a rich empirical distribution into a small set of\nclassifier weights.\nDuring training, each sample is required to retrieve not only its own category but also prototype\nclusters from all other categories in the memory. In other words, the query representation is always\nmatched against a global, multi-class memory bank. This training procedure effectively simulates\nthe deployment scenario where the model must perform cross-class, cross-scenario retrieval, forcing\nit to learn category-agnostic anomaly patterns rather than depending on category-specific textures or\ncontextual correlations.\nAt inference time, new unseen categories simply act as new query samples. They are evaluated\nagainst the same fixed memory, using exactly the same retrieval mechanism as during training.\nConsequently, the retrieved prototypes remain aligned with the learned, category-agnostic anomaly\nrepresentation. This yields stronger robustness and more reliable generalization both across classes\nand across datasets.\nA.3\n\nM ORE DETAILS ABOUT MRAD MODULES\n\nA.3.1\n\nD ETAILS ABOUT I MAGE E NCODER\n\nIn our framework, the memory bank is constructed directly from the frozen CLIP image encoder.\nSpecifically, we adopt the frozen Vision Transformer (ViT) (Dosovitskiy et al., 2020) backbone of\nCLIP, which encodes each input image into a sequence of patch embeddings along with a class\ntoken. Standard Q-K attention in the ViT encoder often focuses heavily on a few dominant tokens, which benefits global object recognition but may suppress fine-grained local semantics. For\nanomaly segmentation, however, local context is critical. To mitigate this bias, we adopt a V-V attention mechanism to all ViT layers inspired by prior work. By default, we employ V-V attention to\n14\n\n\fPublished as a conference paper at ICLR 2026\n\nobtain patch features for memory-bank construction, training, and inference, while the original Q-K\nattention is retained to generate global features.\nConcretely, unlike standard self-attention where both Q and K are projected from the same input\nfeatures, V-V attention replaces them entirely with the value embeddings V . The attention thus takes\nthe form\n\u0010\n\u0011\nOutput = Softmax\n\nV√\nV⊤\nd\n\nV,\n\n(16)\n\nwhich enforces interactions purely among value tokens and encourages each token to attend primarily to its local context. This design mitigates the dominance of a single strong embedding and\nsuppresses bias from global object tokens. As a result, the attention map exhibits a more diagonal\nstructure, encouraging each token to focus primarily on its corresponding local context rather than\nbeing distracted by distant high-activation regions.\nIn practice, this modification preserves local visual semantics in the feature representation, leading to\ntighter anomaly boundaries and fewer background false positives. We provide only a brief overview\nhere and refer readers to Zhou et al. (2024) for the complete derivation.\nA.3.2\n\nD ETAILS ABOUT T EXT E NCODER\n\nTo refine the textual space in MRAD-CLIP, we follow prior CLIP-based ZSAD works (Zhou et al.,\n2024; Cao et al., 2024; Qu et al., 2024) and introduce a lightweight prompt tuning strategy. The\nCLIP text encoder remains frozen, and we insert a small set of randomly initialized learnable prompt\ntokens starting from a lower layer and moving upward. At each Transformer block, these tokens are\nconcatenated with the original token sequence so that self-attention can mix them with the textual\nfeatures. After the block, the used prompts are discarded and a fresh set is initialized for the next\nlayer. This step-by-step design provides gradual calibration and prevents prompt drift. Throughout\ntraining, only the prompts are updated, while the backbone weights remain fixed. This progressively\nrefines the textual space to better encode normal and abnormal semantics with very few trainable\nparameters. The specific parameter settings follow AnomalyCLIP (Zhou et al., 2024).\nA.4\n\nBASELINES AND E XPERIMENTAL PROTOCOL\n\nTo ensure fairness, we follow a unified experimental protocol: VisA is used as the auxiliary dataset\nfor training by default, and evaluation is conducted on all other datasets. Baselines and reproduction\ndetails are given as follows.\nWinCLIP (Jeong et al., 2023) is the first work to employ frozen CLIP for ZSAD. The trainingfree approach employs window/patch sampling and computes text-image similarity at the region\nlevel to localize anomalies. Anomaly scores are aggregated from the dissimilarity between visual\npatches and a textual description of normality. As the official implementation of WinCLIP is unavailable, we adopt the reproduced code for re-implementation under our unified protocol.\nAdaCLIP (Cao et al., 2024) introduces learnable prompts for CLIP and optimizes them on auxiliary anomaly-detection data. It proposes static prompts (shared across images) and dynamic prompts\n(generated per test image), as well as their hybrid, to adapt CLIP to ZSAD. We follow the authors’\nsettings where applicable, while using the official code to retrain it with our protocol.\nAnomalyCLIP (Zhou et al., 2024) learns object-agnostic text prompts that capture generic normality and abnormality, encouraging the model to focus on abnormal regions instead of category\nsemantics. This design improves cross-domain generalization for ZSAD. We follow the authors’\nsettings where applicable, while using the official code to retrain it with our protocol.\nFAPrompt (Zhu et al., 2025) targets fine-grained ZSAD by learning abnormality prompts formed\nby a compound of shared normal tokens and a few learnable abnormal tokens. It further introduces\na data-dependent abnormality prior to produce dynamic learning prompts on each test image. We\nfollow the authors’ settings where applicable, while using the official code to retrain it with our\nprotocol.\n15\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 3: Key statistics of the 16 industrial and medical datasets used in our study.\nDomain\n\nDataset\n\nClasses Normal Samples Anomaly Samples\n\nData type\n\nMask Labels\n\nMVTec-AD\nVisA\nBTAD\nMPDD\nIndustrial\nDTD-Synthetic\nSDD\nKSDD2\nDAGM\n\n15\n12\n3\n6\n12\n1\n1\n10\n\n467\n962\n451\n176\n357\n181\n894\n2000\n\n1258\n1200\n290\n282\n947\n74\n110\n2000\n\nobject &amp; texture\nobject\nobject &amp; texture\nobject\ntexture\nobject\nobject\ntexture\n\n✓\n✓\n✓\n✓\n✓\n✓\n✓\n✓\n\nHeadCT\nBrainMRI\nBr35H\nISIC\nCVC-ColonDB\nCVC-ClinicDB\nKvasir\nEndo\n\n1\n1\n1\n1\n1\n1\n1\n1\n\n100\n98\n1500\n0\n0\n0\n0\n0\n\n100\n155\n1500\n379\n380\n612\n1000\n200\n\nbrain\nbrain\nbrain\nskin\ncolon\ncolon\ncolon\ncolon\n\n×\n×\n×\n✓\n✓\n✓\n✓\n✓\n\nMedical\n\nB\n\nM ORE DETAILS ABOUT DATASETS\n\nB.1\n\nDATASETS\n\nWe evaluate the ZSAD performance on 16 public datasets, covering both industrial and medical domains. In the industrial domain, we adopt eight widely used benchmarks: MVTecAD (Bergmann et al., 2019), VisA (Zou et al., 2022), BTAD (Mishra et al., 2021), MPDD (Jezek\net al., 2021), SDD (Jezek et al., 2021), KSDD2 (Božič et al., 2021), DAGM (Wieler &amp; Hahn,\n2007), and DTD-Synthetic (Aota et al., 2023). In the medical domain, we include eight datasets:\nHeadCT (Salehi et al., 2021), BrainMRI (Kanade &amp; Gumaste, 2015), Br35H (Hamada., 2020),\nCVC-ColonDB (Tajbakhsh et al., 2015), CVC-ClinicDB (Bernal et al., 2015), Endo (Hicks et al.,\n2021), Kvasir (Jha et al., 2019), and ISIC (Codella et al., 2018). We resize all images and their\ncorresponding segmentation masks to 518 × 518 for consistency across datasets. For datasets that\ndo not provide segmentation labels or classification labels, we restrict the evaluation to pixel-level or\nimage-level metrics accordingly. As shown in Table 3, it summarizes the datasets used in our study,\nincluding 8 industrial and 8 medical benchmarks. For each dataset, we list the number of categories,\nnormal and anomaly samples, data type, and whether segmentation labels are provided. These\nbenchmarks cover diverse domains, ensuring that our evaluation spans a wide range of anomaly\ndetection scenarios.\n\nC\n\nA DDITIONAL EXPERIMENTAL RESULTS\n\nC.1\n\nE XTENDED CROSS - DATASET SIMILARITY ANALYSIS\n\nTo complement Figure 2 in the main text, we extend the query-key similarity analysis from the four\ndatasets in the main text to all benchmarks. Following section 3.1.1, we report the four statistics\nAq Ak , Aq Nk , Nq Ak , and Nq Nk under the same protocol. We conduct the cross-dataset study by\ntaking patch features-labels from VisA as keys-values and patch features from other datasets as\nqueries. By definition, Nq Ak is the average anomaly-similarity sanom (q) over all normal queries,\nAq Ak is the average anomaly-similarity over anomalous queries, and Nq Nk /Aq Nk are the corresponding averages of the normal-similarity snorm (q) for normal/anomalous queries.\nFigs. 7–8 extend the query-key similarity study to another eight datasets. In the train-free setting\n(Figure 7), the per-dataset means of the four relations Nq Nk , Aq Nk , Aq Ak , and Nq Ak follow a\nconsistent ordering Nq Nk &gt; Aq Nk and Aq Ak &gt; Nq Ak across datasets, showing that similarity to\nnormal/abnormal keys provides stable discriminative signals without training. This observation is\n16\n\n\fPublished as a conference paper at ICLR 2026\n\nTrain­Free: NqNk / AqNk / AqAk / NqAk\n\nNqNk­TF\n\nMean similarity score\n\n0.7\n\nAqNk­TF\n\nAqAk­TF\n\nNqAk­TF\n\n0.6\n0.5\n0.4\n0.3\n0.2\n0.1\n0.0\n\nDTD\n\nSDD\n\nKSDD2\n\nDAGM\n\nClinicDB\n\nColonDB\n\nKvasir\n\nEndo\n\nFigure 7: Train-Free per-dataset mean similarity scores across eight datasets.\n\nFine­Tune: NqNk / AqNk / AqAk / NqAk\n\nNqNk­FT\n\nMean similarity score\n\n1.0\n\nAqNk­FT\n\nAqAk­FT\n\nNqAk­FT\n\n0.8\n\n0.6\n\n0.4\n\n0.2\n\n0.0\n\nDTD\n\nSDD\n\nKSDD2\n\nDAGM\n\nClinicDB\n\nColonDB\n\nKvasir\n\nEndo\n\nFigure 8: Fine-Tuned per-dataset mean similarity scores across eight datasets.\n\nconsistent with the conclusions reported in the main text. After lightweight fine-tuning (MRADFT; Figure 8), the same ordering is preserved while holding stronger separability. Figure 9 summarizes this effect via the margins ∆(A) = Aq Ak − Nq Ak and ∆(N ) = Nq Nk − Aq Nk : both margins\ngrow substantially on every dataset, confirming that fine-tuning enlarges the gap between positive\nand negative relations. The central insight of our method is to leverage the discriminative margin as\nthe basis for anomaly detection.\n\nSimilarity Margins: TF vs FT\n0.5\n\n(AqAk NqAk)­TF\n(AqAk NqAk)­FT\n\n(NqNk AqNk)­TF\n(NqNk AqNk)­FT\n\nMargin (higher is better)\n\n0.4\n\n0.3\n\n0.2\n\n0.1\n\n0.0\n\nDTD\n\nSDD\n\nKSDD2\n\nDAGM\n\nClinicDB\n\nColonDB\n\nKvasir\n\nEndo\n\nFigure 9: Per-dataset similarity margins under Train-Free and Fine-Tuned settings.\n17\n\n\fPublished as a conference paper at ICLR 2026\n\n(a) MRAD-TF\n\n(b) MRAD-FT\n\nFigure 10: t-SNE visualization of normal and anomalous prototypes from VisA and MVTec.\n\nC.2\n\nT-SNE V ISUALIZATION\n\nTo further illustrate the underlying mechanism of our approach, we visualize the feature space of\nMRAD-TF and MRAD-FT using t-SNE on VisA and MVTec. Fig. 10(a,b) show four types of\nprototypes: VisA-Normal, VisA-Anomaly, MVTec-Normal, and MVTec-Anomaly.\nIn the MRAD-TF setting (Fig. 10a), the pretrained CLIP visual encoder induces a feature space\nin which normal and abnormal prototypes from different categories and datasets tend to separate\nalong a common direction within local mixed-class neighborhoods, even though the global structure is still strongly class-clustered and far from linearly separable by a single hyperplane. This\nindicates that CLIP not only aligns multiple categories, but also encodes a weak yet consistent\n“anomaly direction”: abnormal prototypes are systematically shifted relative to normal ones in the\nhigh-dimensional space. MRAD-TF directly exploits this structure. Instead of learning an additional classifier head on the source domain, it stores normal/abnormal prototypes of all classes into\na memory bank and decides whether a query feature has moved along this anomaly direction by\ncross-class similarity retrieval. Since similarities to all stored prototypes jointly contribute to the final decision, the shared anomaly direction can be reused by target-domain anomalies: their relation\nto source-domain anomaly prototypes becomes the main decision signal. As a result, even without\nany fine-tuning, MRAD-TF maintains competitive ZSAD performance on MVTec.\nIn the MRAD-FT setting (Fig. 10b), we further amplify this implicit anomaly direction and remove\nits dependence on specific classes. During training, samples from one class are forced to retrieve\nand learn against memory prototypes from all other classes, effectively simulating “class-shifted”\nor “dataset-shifted” deployment inside the source domain. In parallel, a lightweight metric calibration via linear Q/K projections aligns queries and memory into a shared subspace, in which the\nanomaly direction becomes more coherent and salient. The t-SNE visualization shows that, after\nfine-tuning, abnormal prototypes from different datasets form a tighter, nearly class-agnostic cluster, while normal prototypes are pushed further away and retain only a weak class-cluster structure.\nIn other words, fine-tuning reconstructs the weak anomaly signal that originally lived near classboundary fringes into an explicit, class-agnostic “universal anomaly pattern.” Consequently, when\nnew categories from the target domain are introduced, one can still perform global retrieval over the\nsame source-domain memory and reliably align samples to this universal anomaly pattern via their\nrelative distances, yielding stronger cross-class and cross-domain generalization and more discriminative similarity scores. Fig. 2 in Sec. 3.1.1 further demonstrates cross-domain positive anomaly\nsimilarities and contrasts the separability before and after fine-tuning.\n18\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 4: Comparison with recent SOTA methods. We report I-AUROC, P-AUROC, inference time\nper image (ms), and training cost measured on a single RTX 3090 (trainable parameters, per-epoch\ntime, model size, and peak GPU memory). Red = best, blue = second best.\nAccuracy &amp; inference\nMethod\nWinCLIP\nMRAD-TF (ours)\nAdaCLIP\nAnomalyCLIP\nFAPrompt\nMRAD-FT (ours)\nMRAD-CLIP (ours)\n\nC.3\n\nTraining cost (RTX 3090)\n\nI-AUROC P-AUROC Inf. (ms/img)\n75.1\n81.0\n87.8\n90.1\n91.3\n92.0\n92.7\n\n73.0\n85.5\n85.6\n91.6\n90.7\n91.9\n92.7\n\n840.3\n198.3\n226.2\n177.6\n233.1\n198.8\n203.0\n\nParams\n–\n–\n10,665,472\n5,555,200\n9,612,256\n2,755,584\n9,491,968\n\nTime / epo (s) Model-size (MB) Mem (GB)\n–\n–\n753\n341\n449\n334\n353\n\n–\n–\n41\n22\n39\n10\n54\n\n–\n–\n12.0\n7.9\n11.0\n7.8\n9.4\n\nM ORE COMPARISON WITH S TATE - OF - THE - ART METHODS\n\nAll statistics in Table 4 are obtained under a unified protocol. The number of trainable parameters is\ntaken directly from the official implementations of each method. Performance metrics (I-AUROC /\nP-AUROC) are reported as the average results across all 16 datasets used in our benchmark. Inference time is measured on the MVTec-AD dataset, averaged per image, with the GPU kept in an idle\nstate to ensure fair comparison. Training-time and memory statistics on the right are measured on a\nsingle RTX 3090, and the reported values correspond to per-epoch wall-clock time, checkpoint size\non disk, and peak GPU memory usage during training.\nFrom Table 4, MRAD-CLIP attains the highest overall detection accuracy, while MRAD-FT delivers\nthe second-best performance with far fewer trainable parameters than other learnable baselines. In\naddition to accuracy, our models are economical to train: MRAD-FT uses a much smaller checkpoint\nand lower peak GPU memory, and converges within a single epoch; MRAD-CLIP also converges\nin only a few epochs while keeping training overhead moderate. By contrast, existing prompttuning methods such as AdaCLIP, AnomalyCLIP, and FAPrompt rely on larger parameter budgets,\nhigher memory usage, and longer training schedules. Overall, these results indicate that the MRAD\nframework is both lightweight and training-friendly, achieving state-of-the-art performance under\nsubstantially reduced computational and resource costs.\nC.4\n\nE XTENDED ABLATIONS\n\nAblation on dynamic prompt biases. In the main paper we ablated the source of additive bias\nfor MRAD-CLIP’s dynamic prompts while keeping all other components fixed. We observed that\nconditioning prompts on region-level context improves ZSAD. Motivated by these findings, we further provide a comprehensive comparison of three bias sources on all datasets in our benchmark:\n(i) cross-patch context, implemented by two learnable queries attending to patch tokens via a crossattention mechanism, (ii) anomaly prior distilled from MRAD-FT, and (iii) dual prior that injects\nboth normal and anomalous priors from MRAD-FT. The implementation strictly follows the main\nprotocol with the same backbone, only the bias source is varied, while prompt length and all other\nhyperparameters are kept fixed. Tables 5 and 6 report the pixel-level (AUROC/PRO) and imagelevel (AUROC/AP) results of different bias sources across all datasets. It can be observed that our\ndual prior design in MRAD-CLIP consistently achieves the best overall performance, outperforming both the cross-patch and anomaly prior variants. It is also noteworthy that all three variants\nsurpass AnomalyCLIP (Zhou et al., 2024), the representative ZSAD method with static prompts,\nhighlighting the effectiveness of introducing learnable dynamic priors into the textual space.\nAblation on mask threshold. We conduct ablation experiments on the similarity-masking threshold ρ in MRAD-FT by varying it as a hyperparameter, while keeping all other components fixed. For\nrigor, image-level evaluation is performed solely with Ycls , whereas pixel-level evaluation directly\nuses Yseg . As shown in Figure 11, moderate masking not only prevents overfitting caused by trivial\nself-matching in single-dataset settings, but also encourages the model to search for consistent abnormal cues across less similar features. Based on these results, we set ρseg = 20% for segmentation\nand ρcls = 5% for classification in all subsequent experiments.\n19\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 5: Pixel-level results (AUROC / PRO) for three bias sources across datasets.\nDataset\n\nCross-patch\n\nAnomaly prior\n\nDual prior\n\nIndustrial\nMVTec-AD\nVisA\nBTAD\nMPDD\nDTD-Synthetic\nSDD\nKSDD2\nDAGM\n\n92.5 / 85.7\n95.3 / 88.6\n94.4 / 68.2\n97.8 / 90.3\n97.5 / 90.7\n90.2 / 72.0\n97.8 / 93.3\n95.4 / 88.2\n\n92.8 / 85.2\n95.6 / 88.1\n95.1 / 71.1\n97.7 / 88.8\n98.4 / 90.3\n87.3 / 67.8\n97.9 / 93.8\n96.6 / 90.1\n\n93.0 / 86.8\n95.9 / 88.0\n95.4 / 72.8\n97.9 / 90.6\n98.1 / 89.8\n93.0 / 72.0\n98.9 / 95.6\n97.4 / 90.3\n\nMedical\nISIC\nCVC-ColonDB\nCVC-ClinicDB\nKvasir\nEndo\n\n90.7 / 82.5\n84.6 / 72.0\n85.3 / 70.7\n83.0 / 50.0\n87.5 / 68.9\n\n91.7 / 83.9\n84.7 / 74.0\n86.8 / 73.0\n83.7 / 51.8\n88.2 / 71.1\n\n91.3 / 83.4\n84.7 / 73.9\n87.3 / 73.9\n84.3 / 52.7\n88.3 / 71.6\n\nAverage\n\n91.7 / 78.6\n\n92.0 / 79.2\n\n92.7 / 80.1\n\nTable 6: Image-level results (AUROC / AP) for three bias sources across datasets.\nDataset\n\nCross-patch\n\nAnomaly prior\n\nDual prior\n\nIndustrial\nMVTec-AD\nVisA\nBTAD\nMPDD\nDTD-Synthetic\nSDD\nKSDD2\nDAGM\n\n93.0 / 96.9\n85.2 / 88.4\n93.1 / 97.8\n83.4 / 86.2\n94.2 / 97.7\n82.6 / 73.1\n92.4 / 86.0\n97.8 / 98.6\n\n93.6 / 97.3\n85.6 / 88.2\n92.0 / 94.7\n81.7 / 83.6\n95.9 / 98.4\n81.8 / 69.6\n92.9 / 85.8\n97.9 / 98.1\n\n94.0 / 97.4\n85.7 / 88.3\n92.8 / 94.2\n81.8 / 83.4\n96.0 / 98.4\n83.9 / 76.2\n95.1 / 88.9\n98.4 / 98.6\n\nMedical\nHeadCT\nBrainMRI\nBr35H\n\n97.4 / 97.6\n96.9 / 97.4\n97.7 / 97.1\n\n96.5 / 96.7\n96.7 / 97.2\n97.4 / 97.1\n\n97.1 / 97.6\n97.0 / 97.4\n97.9 / 97.6\n\nAverage\n\n92.1 / 92.4\n\n92.0 / 91.5\n\n92.7 / 92.5\n\nAblation on the two-level memory bank. To understand the role of each branch, we perform\nablations by selectively removing one level of memory at a time. First, when we discard the imagelevel memory and retain only the pixel-level memory, the image-level anomaly score is obtained\nby aggregating pixel-wise scores via top-K pooling. Compared with the full dual-level memory,\nthis variant consistently yields lower I-AUROC on most datasets (Fig. 12), sometimes with a noticeable margin, indicating that the image-level memory provides complementary and more stable\nglobal evidence on top of pixel-level anomalies. Conversely, when we remove the pixel-level memory and only keep the image-level branch, the model loses meaningful localization ability and the\nimage-level performance also degrades, since it no longer benefits from the compensating top-K\naggregation from the segmentation branch. Together, these ablations show that strong and robust\nimage-level detection relies on the complementary contribution of both image-level and pixel-level\nmemories.\nC.5\n\nE FFECT OF C HANGING THE AUXILIARY DATASET\n\nBeyond the default setting where VisA is used as the auxiliary dataset, we also study how MRAD\nbehaves when the memory bank is built from other sources. For each candidate auxiliary dataset in\n20\n\n\fPublished as a conference paper at ICLR 2026\n\nMask threshold ablation\n\n96\n\nPixel &amp; Image AUROC (single axes with twin y)\n90\n89\n\n95\n94\n\nMVTec Pixel AUROC\nVisA Pixel AUROC\n\n93\n\nImage AUROC\n\nPixel AUROC\n\n88\n87\nMVTec Image AUROC\nVisA Image AUROC\n86\n85\n92\n91\n\n84\n83\n0\n\n5\n\n10\n15\nMask threshold (%)\n\n20\n\n25\n\nFigure 11: Metrics about the ablation on mask threshold.\nAblation Study on Two-Level Memory Bank\n\n100\n\n98.0\n\n95\n\n94.5\n\n97.0\n\n94.3\n\n92.3\n\nI-AUROC (%)\n\n90\n\n91.8\n\n91.7\n\n94.1\n\n97.3\n97.2\n\n93.2\n92.3\n\n91.6\n\n90.0\n85.5\n\n85\n\n83.7\n\n80\n\n79.4\n\n75\n\n70\n\n88.2\n\n83.9\n\nFull Dual-Level Memory\nW/o Image-Level Memory\nW/o Pixel-Level Memory\nMVTec\n\nVisA\n\n82.0\n82.7\n\n79.9\n78.9\n\n73.8\n\nMPDD\n\nDAGM\n\nDataset\n\nSDD\n\nBTAD\n\nDTD\n\nBr35\n\nFigure 12: Ablation on two-level memory bank.\n\nTable 7, we train MRAD-FT and MRAD-CLIP using this dataset alone to construct the memory and\nthen evaluate zero-shot anomaly detection on MVTec-AD.\nThe key factor here is not whether the auxiliary dataset is “larger” or “stronger” in an absolute\nsense, but whether it allows MRAD to learn a cross-class anomaly pattern that can be reused at\ntest time. MRAD’s training objective requires each query to retrieve and compare across prototypes\nfrom multiple classes, so the auxiliary source must contain sufficiently diverse normal and anomalous samples for a class-agnostic anomaly pattern to emerge in the source-domain feature space.\nThis explains why industrial datasets with reasonable category or defect-shape diversity (e.g., VisA,\nBTAD, MPDD, DTD-Synthetic) all support relatively stable zero-shot performance in Table 7: their\nprototypes cover multiple modes of industrial appearance, allowing the model to repeatedly “use\nanomalies from class A to retrieve against classes B/C” during training and thus form a transferable\nanomaly pattern.\nUnder these auxiliary sources, pixel-level performance remains consistently strong and generally\nsurpasses AnomalyCLIP, whereas image-level performance exhibits larger variation. This variation\nmainly arises from the class token being more sensitive to global image statistics: for example,\nDTD-Synthetic is a texture-style dataset with 12 nominal classes but highly similar backgrounds\nand appearances, so its class tokens provide limited semantic diversity and the resulting image-level\nmemory tends to encode repetitive texture patterns rather than discriminative semantics, thereby\nweakening image-level classification.\n21\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 7: Effect of changing the auxiliary dataset used to build the memory bank. Each auxiliary\ndataset is used alone for training, and we report zero-shot performance on MVTec-AD (P-AUROC\n/ I-AUROC). For reference, AnomalyCLIP trained on VisA achieves 91.1 / 91.5.\nDomain\n\nAux. dataset\n\nClasses Normal Anomaly MRAD-FT MRAD-CLIP\n\nVisA\nBTAD\nMPDD\nIndustrial\nDTD-Synthetic\nSDD\nKSDD2\n\n12\n3\n6\n12\n1\n1\n\n962\n451\n176\n357\n181\n894\n\n1200\n290\n282\n947\n74\n110\n\n92.2 / 92.3\n92.0 / 92.5\n91.1 / 87.3\n91.3 / 88.7\n88.1 / 82.5\n90.2 / 86.3\n\n93.0 / 94.0\n91.0 / 92.2\n91.2 / 89.2\n91.5 / 89.8\n88.9 / 87.8\n92.1 / 92.8\n\nCVC-ClinicDB\nKvasir\n\n1\n1\n\n0\n0\n\n612\n1000\n\n87.5 / 75.0\n86.0 / 70.6\n\n88.1 / 79.7\n84.6 / 73.1\n\nMedical\n\nIn contrast, when the auxiliary dataset collapses to essentially a single industrial category (e.g.,\nSDD, KSDD2), the model has almost no opportunity to practice genuine cross-class retrieval during training. The anomaly prototypes then only capture one specific defect morphology and fail to\ninduce a transferable anomaly pattern; consequently, MRAD-FT shows more noticeable degradation on MVTec-AD. The situation becomes even more extreme when the auxiliary source is both\nsingle-category and strongly out-of-domain, as with medical datasets such as CVC-ClinicDB and\nKvasir: their prototype distributions differ substantially from industrial imagery, so the memory\nbank lacks both cross-class contrast and appearance statistics aligned with the target domain. In this\nregime, cross-domain retrieval becomes intrinsically difficult and the performance drop is the most\npronounced.\nOverall, Table 7 indicates that MRAD is not tied to VisA or any particular auxiliary dataset. As\nlong as the auxiliary source lies within a related domain and provides sufficient category and appearance diversity, MRAD-FT and MRAD-CLIP can learn a class-agnostic anomaly pattern in the\nsource domain and maintain relatively stable performance under cross-dataset evaluation. Significant degradation mainly occurs when the auxiliary dataset offers very limited semantic coverage or\nexhibits a large domain shift relative to the target, but even in these extreme cases the model does not\ncollapse, which is consistent with our design intuition that MRAD relies on learning a transferable\nanomaly pattern from a sufficiently diverse prototype space rather than on a specific dataset choice.\nC.6\n\nA DDITIONAL DATASET E XPERIMENTS\nTable 8: Image-level performance on the Liver CT ZSAD benchmark (I-AUROC / I-AP).\nMethod\n\nI-AUROC\n\nI-AP\n\n63.7\n66.3\n61.6\n63.6\n65.0\n67.0\n67.5\n\n52.7\n62.1\n52.5\n60.7\n60.1\n60.2\n60.9\n\nWinCLIP\nMRAD-TF\nAdaCLIP\nAnomalyCLIP\nFAPrompt\nMRAD-FT\nMRAD-CLIP\n\nTo further examine the applicability of MRAD in medical imaging scenarios, we additionally include\na Liver CT dataset from BMAD Bao et al. (2024), which contains 1,493 CT slices with image-level\nanomaly annotations. Following the same ZSAD protocol as in the main paper, we evaluate several\nrepresentative baselines together with our MRAD variants. Table 8 reports image-level AUROC and\nAP.\n22\n\n\fPublished as a conference paper at ICLR 2026\n\nAcross all methods, MRAD-FT and MRAD-CLIP achieve the strongest AUROC and competitive\nAP, indicating that the proposed retrieval-based memory framework can generalize beyond industrial\nimaging and remain effective under medical CT imagery with different appearance statistics.\nC.7\n\nS TABILITY AND ROBUSTNESS A NALYSIS\n\nTable 9: Stability across random seeds on MVTec-AD. We report mean P-AUROC and I-AUROC\nover multiple runs and the maximum deviation from the mean (in percentage points).\nMethod\n\nP-AUROC (mean)\n\nI-AUROC (mean)\n\nMax deviation\n\n92.2\n92.7\n\n91.9\n93.6\n\n≤ 0.5\n≤ 0.4\n\nMRAD-FT\nMRAD-CLIP\n\nTable 10: Robustness to test-time perturbations on MVTec-AD. We report image-level and pixellevel performance on the original test set and on a perturbed version with additive noise and brightness adjustment.\nOriginal Test Set\nMethod\n\nNoisy + Brightness\n\nP-AUROC\n\nI-AUROC\n\nP-AUROC\n\nI-AUROC\n\n92.2\n93.0\n\n92.3\n94.0\n\n91.6\n92.6\n\n91.1\n92.8\n\nMRAD-FT\nMRAD-CLIP\n\nWe further examine the stability of MRAD with respect to random initialization and its robustness\nunder simple distribution shifts.\nVariance across random seeds. To quantify the effect of randomness, we run MRAD-FT and\nMRAD-CLIP on MVTec-AD with multiple random seeds and report the mean performance across\nruns. As shown in Table 9, both P-AUROC and I-AUROC exhibit very small fluctuations (within\n±0.5 percentage points), and the means closely match the single-run numbers reported in the main\npaper.\nRobustness to simple distribution shifts. We then evaluate robustness to common test-time perturbations by applying a random brightness increase or decrease of 15% and additive Gaussian noise\nwith a standard deviation of 5 to the MVTec-AD test images, and re-evaluating the models on the\nperturbed set. Table 10 summarizes the results. Both MRAD-FT and MRAD-CLIP show only mild\ndegradation, with drops in P-AUROC and I-AUROC below 1 percentage point. MRAD-CLIP is\nslightly more robust overall, and its performance under these perturbations remains higher than that\nof prior prompt-based baselines on the clean MVTec-AD set. These findings suggest that MRAD\nmaintains reasonable robustness to typical illumination and low-level noise shifts and does not collapse under moderate degradation of image quality.\nC.8\n\nI NSTANTIATING A NOMALY P ROTOTYPES FROM S YNTHETIC PATCHES\n\nTable 11: Effect of replacing real anomalies with synthetic patches when constructing anomaly\nprototypes.\nMethod\n\nAnomaly source\n\nP-AUROC\n\nI-AUROC\n\nMRAD-FT\n\nReal anomalies\nSynthetic patches\nReal anomalies\nSynthetic patches\n\n92.2\n89.2\n93.0\n83.1\n\n92.3\n79.7\n94.0\n76.1\n\nMRAD-CLIP\n\n23\n\n\fPublished as a conference paper at ICLR 2026\n\nA natural question is whether MRAD-TF/FT can be instantiated without real anomalies, using only\nnormal images (without masks) with synthetic anomaly patches. This setting probes how far MRAD\ncan reduce its dependence on real defect samples.\nConcretely, we use VisA as the auxiliary dataset to construct normal prototypes, and follow a\nDRAEM-style Zavrtanik et al. (2021) local perturbation scheme (Cut&amp;Paste) to synthesize anomalous regions on normal images. These synthetic regions are then used to build the anomaly memory,\nwhile all other training and evaluation settings are kept unchanged. We finally evaluate zero-shot\nanomaly detection on MVTec-AD. Table 11 compares the performance when anomaly prototypes\nare constructed from real anomalies (the default setting in the main paper) versus from synthetic\npatches.\nAs shown in Table 11, replacing real anomalies with synthetic patches leads to a noticeable degradation, especially for MRAD-CLIP at the image level. This is consistent with our intuition: the\nretrieval mechanism in MRAD relies on the anomaly prototypes in the memory bank to cover real\ndefect patterns, while synthetic anomalies mainly mimic local texture perturbations and lack the\nsemantic diversity of real industrial defects, making cross-category retrieval less reliable.\nOverall, operating in the “normal data + synthetic anomalies” regime leads to a clear degradation\nin performance under our current configuration, yet the setting remains informative from a weaksupervision standpoint. Even when anomaly prototypes are derived solely from synthetic patches,\nMRAD-FT still yields segmentation performance at a practically usable level, indicating that a\nmemory-based retrieval framework can, in principle, function in the absence of real anomalies and\nconstitutes a promising basis for extending ZSAD to purely synthetic-supervision scenarios.\nC.9\n\nF INE - GRAINED ZSAD PERFORMANCE\n\nIn this section, we report fine-grained subset-level ZSAD performance on the representative MVTecAD and VisA datasets, with per-category results summarized in Tables 13–20. Compared to the\naggregated metrics in the main text, these detailed breakdowns offer a clearer view of category-level\nperformance, highlighting the robustness of MRAD-CLIP and its variants across diverse anomaly\ntypes.\nC.10\n\nC OMPARISON WITH ADDITIONAL BASELINE\n\nTo further evaluate the contribution of the proposed memory-retrieval design, an additional baseline\nwas constructed by equipping AnomalyCLIP with a simple “vanilla” memory bank. This variant follows the general idea of reference-based matching used in prior few-shot anomaly detection\nmethods, but adapted to the zero-shot setting. The goal is to isolate the effect of incorporating a\nmemory mechanism while preserving AnomalyCLIP’s original prompt–patch inference pipeline.\nThe implementation keeps AnomalyCLIP’s original zero-shot prediction (based on prompt–patch\ncosine similarity). In addition, a patch-level memory bank is built using all samples from the auxiliary dataset (VisA), following the setting used in our retrieval-based methods. For each query\npatch, a nearest-neighbor discrepancy score is computed against this reference patch set. The final\nanomaly score is obtained by combining this discrepancy with AnomalyCLIP’s zero-shot output.\nThis design represents the simplest and most direct form of a vanilla memory mechanism integrated\ninto AnomalyCLIP, without modifying its architecture or training strategy.\nTable 12 reports the pixel-level AUROC on seven datasets. We find that adding this vanilla memory\nbank to AnomalyCLIP does not bring meaningful improvement. On some datasets (e.g., BTAD,\nClinicDB), the performance even drops. We believe this mainly happens because nearest-neighbor\npatch retrieval works in FSAD, where reference and query images usually share the same object\nor background, but it does not transfer to ZSAD, where categories differ and cross-dataset patch\nmatching becomes unreliable.\nIn contrast, both MRAD-FT and MRAD-CLIP achieve consistently stronger performance. This\nadvantage stems from the fact that MRAD explicitly stores discriminative feature–label prototypes\nand supports cross-category, cross-domain retrieval, which is crucial for generalizable zero-shot\nanomaly detection. These results further validate the effectiveness of the proposed memory-retrieval\ndesign as a key component of the MRAD framework.\n24\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 12: Pixel-level AUROC comparison between AnomalyCLIP, AnomalyCLIP with a vanilla\nmemory bank, and the MRAD variants.\nDataset\n\nAnomalyCLIP\n\nAnomalyCLIP + VanillaMB\n\nMRAD-FT\n\nMRAD-CLIP\n\nMVTec\nBTAD\nMPDD\nSDD\nKSDD2\nKvasir\nClinicDB\n\n91.1\n93.3\n96.2\n90.1\n97.9\n81.9\n85.9\n\n91.0\n89.2\n96.5\n90.3\n98.2\n82.0\n85.3\n\n92.2\n94.7\n97.4\n91.0\n98.8\n83.9\n85.9\n\n93.0\n95.4\n97.9\n93.0\n98.9\n84.3\n87.3\n\nTable 13: Fine-grained pixel-level AUROC (%) on MVTec-AD. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n89.5\n77.0\n86.9\n95.4\n82.2\n94.3\n96.7\n61.0\n80.0\n89.6\n77.6\n86.9\n74.7\n93.4\n91.6\n\n81.9\n70.1\n90.1\n97.0\n93.0\n90.1\n99.0\n75.6\n81.0\n91.3\n93.7\n87.7\n67.0\n96.4\n86.9\n\n83.8\n85.6\n86.2\n94.8\n90.6\n98.7\n97.8\n55.4\n77.5\n99.2\n83.9\n93.4\n71.4\n91.2\n91.8\n\n90.4\n78.9\n95.8\n98.8\n97.3\n97.2\n98.6\n74.6\n91.8\n97.5\n94.7\n91.9\n70.8\n96.4\n91.2\n\n90.3\n79.5\n95.2\n99.0\n96.9\n97.5\n98.5\n71.4\n90.5\n97.4\n95.7\n89.7\n69.8\n96.4\n91.8\n\n90.6\n78.7\n97.0\n99.5\n98.1\n97.1\n99.0\n74.3\n92.8\n97.5\n96.8\n96.5\n71.2\n98.1\n95.2\n\n92.2\n78.4\n97.8\n99.4\n98.4\n97.5\n99.1\n79.4\n91.3\n97.6\n97.0\n96.1\n75.0\n98.0\n96.7\n\nmean\n\n85.1\n\n86.7\n\n86.8\n\n91.1\n\n90.6\n\n92.2\n\n93.0\n\nD\n\nV ISUALIZATION\n\nIn this section, we report the anomaly map visualizations obtained from MRAD-CLIP across all\ndatasets used in our experiments (Figure 13–Figure 37). These examples cover representative categories from each dataset, providing a more detailed view of the model’s anomaly segmentation\ncapability. The results highlight the robustness of our method in capturing fine-grained defects and\ndomain-specific anomalies across both industrial and medical scenarios.\n\nE\n\nU SE OF L ARGE L ANGUAGE M ODELS (LLM S )\n\nIn preparing this manuscript, we made limited use of large language models (LLMs), specifically\nfor translation, grammar correction, and minor language polishing. The LLMs were not involved in\nresearch ideation, experimental design, data analysis, or substantive writing of the scientific content.\n\n25\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 14: Fine-grained pixel-level PRO (%) on MVTec-AD. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n76.4\n42.9\n62.1\n84.1\n57.0\n81.6\n91.1\n31.8\n65.0\n68.5\n51.2\n67.7\n43.4\n74.1\n71.7\n\n62.5\n24.7\n57.8\n89.9\n78.5\n67.5\n97.3\n38.9\n48.3\n68.9\n88.5\n42.0\n43.9\n91.1\n52.6\n\n26.9\n15.2\n65.7\n19.6\n46.2\n42.3\n55.9\n20.7\n37.0\n75.3\n7.7\n25.6\n6.7\n58.3\n3.4\n\n80.8\n64.0\n87.6\n90.0\n75.4\n92.5\n92.2\n71.1\n88.1\n88.0\n87.4\n88.5\n58.2\n91.5\n65.4\n\n81.0\n68.2\n83.9\n94.1\n81.6\n93.3\n95.7\n70.9\n87.6\n89.7\n89.3\n87.3\n59.0\n92.3\n75.1\n\n82.0\n65.3\n92.4\n98.0\n92.7\n92.2\n97.1\n68.0\n91.2\n89.4\n93.1\n87.0\n55.1\n95.0\n82.4\n\n84.7\n69.8\n94.7\n96.5\n84.8\n92.9\n97.8\n75.7\n92.6\n90.4\n91.3\n89.5\n58.7\n94.3\n88.2\n\nmean\n\n64.6\n\n63.5\n\n33.8\n\n81.4\n\n83.3\n\n85.4\n\n86.8\n\nTable 15: Fine-grained image-level AUROC (%) on MVTec-AD. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n99.2\n86.5\n72.9\n100.0\n98.8\n93.9\n100.0\n97.1\n79.1\n83.3\n100.0\n87.5\n88.0\n99.4\n91.5\n\n81.5\n68.2\n78.6\n96.3\n92.1\n65.6\n100.0\n33.9\n69.1\n64.5\n99.6\n79.4\n71.2\n99.3\n85.6\n\n95.6\n79.0\n89.3\n100.0\n99.2\n95.5\n100.0\n79.9\n92.6\n83.9\n99.7\n95.2\n82.0\n98.5\n89.4\n\n88.7\n70.3\n89.5\n99.9\n97.8\n97.2\n99.8\n92.4\n81.1\n82.1\n100.0\n85.3\n93.9\n96.9\n98.4\n\n89.8\n74.7\n92.4\n100.0\n97.9\n96.5\n99.9\n89.7\n89.6\n85.0\n99.7\n85.6\n81.7\n98.0\n98.4\n\n91.9\n81.8\n92.3\n100.0\n99.1\n93.9\n100.0\n71.3\n86.4\n87.5\n99.7\n95.6\n86.8\n98.9\n99.6\n\n92.7\n92.0\n96.4\n100.0\n98.9\n93.0\n100.0\n78.8\n85.8\n86.7\n99.7\n97.2\n89.1\n99.0\n99.9\n\nmean\n\n91.8\n\n79.0\n\n92.0\n\n91.5\n\n91.9\n\n92.3\n\n94.0\n\nTable 16: Fine-grained image-level AP (%) on MVTec-AD. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n98.3\n86.2\n93.4\n99.9\n99.8\n96.3\n100.0\n97.9\n96.5\n88.4\n99.9\n96.7\n74.9\n98.8\n98.9\n\n94.1\n80.4\n94.0\n98.9\n97.3\n77.5\n100.0\n76.0\n89.5\n84.5\n99.8\n91.8\n70.6\n99.8\n95.8\n\n98.6\n87.3\n97.8\n100.0\n99.7\n97.5\n100.0\n95.6\n98.6\n93.0\n99.9\n97.9\n83.8\n99.5\n97.1\n\n96.8\n81.7\n97.8\n99.9\n99.3\n98.5\n99.9\n98.1\n95.3\n92.9\n100.0\n93.9\n92.1\n99.2\n99.5\n\n96.7\n82.9\n98.4\n100.0\n99.3\n98.1\n100.0\n97.5\n97.9\n93.6\n99.9\n93.8\n78.9\n99.4\n99.5\n\n97.7\n89.5\n98.4\n100.0\n99.7\n97.0\n100.0\n93.3\n97.1\n95.4\n99.9\n98.3\n83.6\n99.7\n99.9\n\n97.9\n95.4\n99.2\n100.0\n99.6\n96.6\n100.0\n95.2\n97.0\n94.5\n99.9\n98.9\n86.4\n99.7\n100.0\n\nmean\n\n95.1\n\n90.0\n\n96.4\n\n96.2\n\n95.7\n\n96.6\n\n97.4\n\n26\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 17: Fine-grained pixel-level AUROC (%) on VisA. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe fryum\n\n88.9\n81.6\n84.7\n93.3\n88.5\n70.9\n59.3\n61.2\n71.6\n85.3\n94.4\n75.4\n\n95.0\n84.7\n92.0\n98.1\n92.5\n91.9\n93.7\n81.9\n86.8\n86.9\n92.8\n95.6\n\n98.6\n96.1\n97.2\n99.2\n93.6\n98.8\n98.2\n90.7\n91.3\n87.7\n94.6\n95.7\n\n98.8\n94.9\n93.7\n99.2\n94.6\n98.3\n97.6\n94.0\n92.4\n88.3\n95.7\n98.2\n\n98.9\n96.3\n95.2\n99.3\n94.4\n98.2\n96.8\n96.0\n92.7\n88.2\n97.1\n98.1\n\n98.9\n96.5\n95.1\n99.5\n95.2\n99.0\n97.7\n92.5\n92.9\n88.9\n96.8\n97.4\n\n98.9\n95.4\n97.9\n99.5\n94.3\n98.8\n97.6\n92.3\n91.4\n88.7\n96.8\n98.2\n\nmean\n\n79.6\n\n91.0\n\n95.1\n\n95.5\n\n95.9\n\n95.9\n\n95.9\n\nTable 18: Fine-grained pixel-level PRO (%) on VisA. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe fryum\n\n83.5\n35.3\n76.4\n70.4\n77.4\n34.3\n21.4\n26.3\n37.2\n56.1\n80.4\n82.3\n\n91.2\n47.3\n72.5\n82.4\n69.1\n73.9\n77.0\n43.8\n63.0\n67.8\n80.6\n83.3\n\n71.6\n80.3\n45.6\n53.9\n55.6\n86.6\n84.8\n52.3\n77.5\n76.2\n84.3\n86.3\n\n96.5\n78.9\n91.9\n90.9\n86.8\n89.7\n83.9\n80.7\n78.2\n76.8\n89.4\n96.1\n\n95.8\n84.9\n90.0\n90.1\n87.1\n89.9\n80.3\n87.3\n77.8\n77.8\n91.7\n97.2\n\n95.9\n85.5\n92.1\n93.9\n89.1\n93.0\n85.1\n88.1\n80.4\n79.3\n91.7\n95.2\n\n94.6\n79.4\n93.8\n91.8\n88.5\n93.3\n85.1\n84.3\n76.0\n82.1\n90.3\n96.4\n\nmean\n\n56.8\n\n71.0\n\n71.3\n\n87.0\n\n87.5\n\n89.1\n\n88.0\n\nTable 19: Fine-grained image-level AUROC (%) on VisA. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe fryum\n\n95.4\n85.0\n92.1\n96.5\n80.3\n76.2\n63.7\n73.6\n51.2\n73.4\n79.6\n69.7\n\n73.9\n73.4\n79.7\n98.1\n86.5\n70.1\n62.2\n55.1\n62.9\n65.6\n95.1\n76.9\n\n95.9\n81.1\n89.6\n98.5\n89.5\n86.3\n56.7\n74.0\n71.1\n75.2\n89.6\n88.8\n\n80.9\n82.7\n76.0\n97.2\n92.7\n86.7\n72.2\n85.2\n62.0\n61.7\n93.9\n92.3\n\n87.2\n91.6\n90.5\n97.6\n96.5\n83.1\n71.4\n68.2\n66.4\n68.6\n95.4\n97.4\n\n82.0\n93.0\n89.3\n97.7\n93.2\n85.6\n79.4\n83.3\n66.3\n64.7\n97.1\n94.1\n\n82.8\n91.5\n90.6\n97.6\n93.5\n85.6\n78.4\n83.4\n64.8\n68.9\n97.1\n94.3\n\nmean\n\n78.1\n\n75.0\n\n83.0\n\n82.1\n\n84.5\n\n85.5\n\n85.7\n\nMVTec - cable\n\nMRAD\n\nGT\n\nMVTec - bottle\n\nFigure 13: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n27\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 20: Fine-grained image-level AP (%) on VisA. Best per row in bold.\nCategory\n\nWinCLIP\n\nMRAD-TF\n\nAdaCLIP\n\nAnomalyCLIP\n\nFAPrompt\n\nMRAD-FT\n\nMRAD-CLIP\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe fryum\n\n95.6\n80.9\n95.2\n98.8\n92.5\n64.5\n65.2\n74.6\n44.2\n66.2\n70.1\n82.1\n\n76.0\n83.5\n90.6\n99.2\n93.6\n68.4\n60.2\n58.5\n65.1\n72.9\n95.8\n85.7\n\n96.4\n86.7\n95.4\n99.4\n95.1\n85.0\n54.3\n73.5\n71.6\n77.9\n89.8\n93.9\n\n82.6\n89.4\n89.3\n98.8\n96.6\n85.5\n70.8\n86.7\n64.4\n69.4\n94.3\n96.3\n\n89.7\n96.2\n95.9\n99.1\n98.4\n82.5\n68.5\n72.5\n68.2\n76.5\n95.6\n98.6\n\n84.4\n95.8\n95.4\n99.1\n96.7\n84.7\n79.0\n84.8\n68.8\n71.1\n96.7\n97.0\n\n86.2\n95.0\n96.1\n99.1\n97.0\n85.7\n78.0\n84.9\n67.9\n74.9\n96.8\n97.1\n\nmean\n\n77.5\n\n79.1\n\n84.9\n\n85.4\n\n86.8\n\n87.8\n\n88.3\n\nMVTec - carpet\n\nMRAD\n\nGT\n\nMVTec - capsule\n\nFigure 14: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nMVTec - hazelnut\n\nMRAD\n\nGT\n\nMVTec - grid\n\nFigure 15: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nMVTec – metal_nut\n\nMRAD\n\nGT\n\nMVTec - leather\n\nFigure 16: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n28\n\n\fPublished as a conference paper at ICLR 2026\n\nMVTec - screw\n\nMRAD\n\nGT\n\nMVTec - pill\n\nFigure 17: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nMVTec - toothbrush\n\nMRAD\n\nGT\n\nMVTec - tile\n\nFigure 18: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nMVTec - wood\n\nMRAD\n\nGT\n\nMVTec - transistor\n\nFigure 19: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nVisA - candle\n\nMRAD\n\nGT\n\nMVTec - zipper\n\nFigure 20: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n29\n\n\fPublished as a conference paper at ICLR 2026\n\nVisA - cashew\n\nMRAD\n\nGT\n\nVisA - capsules\n\nFigure 21: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nVisA - fryum\n\nMRAD\n\nGT\n\nVisA - chewinggum\n\nFigure 22: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nVisA – pcb1\n\nMRAD\n\nGT\n\nVisA - macaroni\n\nFigure 23: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nVisA – pcb3\n\nMRAD\n\nGT\n\nVisA – pcb2\n\nFigure 24: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n30\n\n\fPublished as a conference paper at ICLR 2026\n\nVisA – pipe_fryum\n\nMRAD\n\nGT\n\nVisA–pcb4\n\nFigure 25: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nBTAD - 02\n\nMRAD\n\nGT\n\nBTAD - 01\n\nFigure 26: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nMPDD - bracket\n\nMRAD\n\nGT\n\nBTAD - 03\n\nFigure 27: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nMPDD – metal_plate\n\nMRAD\n\nGT\n\nMPDD - tubes\n\nFigure 28: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n31\n\n\fPublished as a conference paper at ICLR 2026\n\nKSDD2 - electrical commutators\n\nMRAD\n\nGT\n\nSDD - electrical commutators\n\nFigure 29: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nDTD - marbled_078\nmarbled\n\nMRAD\n\nGT\n\nDTD - blotchy_099\nblotchy\n\nFigure 30: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nDTD–woven_001\n\nMRAD\n\nGT\n\nDTD–perforated_037\n\nFigure 31: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nDAGM–class4\n\nMRAD\n\nGT\n\nDAGM–class1\n\nFigure 32: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n32\n\n\fPublished as a conference paper at ICLR 2026\n\nDAGM–class9\n\nMRAD\n\nGT\n\nDAGM–class7\n\nFigure 33: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nBrainMRI–brain\n\nMRAD\n\nGT\n\nHeadCT–brain\n\nFigure 34: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nISIC–skin\n\nMRAD\n\nGT\n\nBr35H–brain\n\nFigure 35: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\nCVC-ColonDB–colon\n\nMRAD\n\nGT\n\nCVC-ClinicDB–colon\n\nFigure 36: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n33\n\n\fPublished as a conference paper at ICLR 2026\n\nEndo–colon\n\nMRAD\n\nGT\n\nKvasir–colon\n\nFigure 37: Anomaly maps of MRAD-CLIP across various categories. The first row shows the\nground-truth annotations, and the second row shows the predicted anomaly maps.\n\n34\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"