"<!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>MoECLIP: Patch-Specialized Experts for Zero-shot Anomaly Detection\nJun Yeong Park\n\nJunYoung Seo\nMinji Kang\nYonsei University, Seoul, Korea\n\nYu Rang Park*\n\nAbstract\n\n\u0012\u0017 \u0019\u001a\u0018\u0013\u0012\n\n\u0011\u0017\u0011\u0012\u0010 \u0010\u0015\u0012\u0001\u001e\u0018\n\n\u0006\u0010\u0012\u0018\u000e\u001a \u0016\u0018\u0012\u000e\b\u001c\n\n\u0001\u001a\b\u001c\u001e\u0018\n\n­\u0010\u0017\u001e\u0018\u001c\n\n\u0001\u001a\b\u001c\u001e\u0018\n\n­\u0010\u0017\u001e\u0018\u001c\n\n\u0010\u001d\u0013\u000f\u0012\u0017\u0010\u0018\u0014\u000e\n\n\b\u0014\u0012\u001c\u0012 \u0012\u0005\n\u0001\u001a\u000e\u001a\u001e\u0001 \u0004\u0013\u0003\u000f\u0002\n\n\n\n\u0007\u0012\u0018\u000e\u001a \u0016\u0018\u0012\u000e\b\u001c\n\nThe CLIP model’s outstanding generalization has driven recent success in Zero-Shot Anomaly Detection (ZSAD) for\ndetecting anomalies in unseen categories. The core challenge in ZSAD is to specialize the model for anomaly detection tasks while preserving CLIP’s powerful generalization capability. Existing approaches attempting to solve\nthis challenge share the fundamental limitation of a patchagnostic design that processes all patches monolithically\nwithout regard for their unique characteristics. To address this limitation, we propose MoECLIP, a Mixtureof-Experts (MoE) architecture for the ZSAD task, which\nachieves patch-level adaptation by dynamically routing\neach image patch to a specialized Low-Rank Adaptation\n(LoRA) expert based on its unique characteristics. Furthermore, to prevent functional redundancy among the LoRA\nexperts, we introduce (1) Frozen Orthogonal Feature Separation (FOFS), which orthogonally separates the input feature space to force experts to focus on distinct information, and (2) a simplex equiangular tight frame (ETF) loss\nto regulate the expert outputs to form maximally equiangular representations. Comprehensive experimental results\nacross 14 benchmark datasets spanning industrial and medical domains demonstrate that MoECLIP outperforms existing state-of-the-art methods. The code is available at\nhttps://github.com/CoCoRessa/MoECLIP.\n\n\u0001\u001a\b\u001c\u001e\u0018\n\n\b\u0014\u0012\u001c\u0012 \u0012\u0005 \u0004\u0013\u0003\u000f\u0002\n\n­\u0010\u0017\u001e\u0018\u001c\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0018\u0017\u0016\u0015\u0014\u0013\u0012\u0014\u0012\u001c\u001a\u001d\u0011\n\n\u0007\u0002\u0006\u0017\n\u0011\u0017\u0011\u0012\u0010\n\u0010\u0015\u0012\u0001\u001e\u0018\n\n\u001f\u001e\u001d\u001c\n\u0010\u0015\u0012\u0001\u001e\u0018\n\n\u0016\u001a\u001c\u0015\u0014\n\u001b\u001e\u001a\u001c\u0019\u0018\u001e\u0017\n\n\u001f\u001e\u001d\u001c\n\u001b\u001e\u001a\u001c\u0019\u0018\u001e\u0017\n\n\u001c\u0001\u0012\u001c\u001d\u000e\u0017\u0005\u0004\u0010 \u0003\u0016\u0015\u0014\u0013\u0012 \u0019\u0017\u0002\u0014\u0001 \u0015\u0017\u0018 \u0012\u001a\u0015\n\n\u0011\u0017\u0011\u0012\u0010 \u0010\u0015\u0012\u0001\u001e\u0018\n\u0012\n\n\u0016\u001a\u001c\u0015\u0014 \u001b\u001e\u001a\u001c\u0019\u0018\u001e\u0017\n\u0012\u0019\u001c\u001e\u0018\n\u001f\u001a\u000f\u0012\u001c\u001d\u000e\u0017\u0013 \u0019\u0017\u0013\u0014\u0012\u0011\n\n\u0012\n\n\b\n\n\u001b\u001b\u000f\n\n\n\n\u0012\n\u001d\b\u001e\u0018\u001c \n\n\u0016\n\n\u001d\b\u001e\u0018\u001c  ··· \u001d\b\u001e\u0018\u001c \u0007\n\u001f\u001b \u0003\u0012\u0017\u0017\n\n\n\n\u0007\n\n\u0013\u0012\u0017\u0011\u0010\u001e\n\u000f\u0011\u000e\u0011 \u001a\u0018\u0011\u001c\n\n\u001d\b\u001e\u0018\u001c \n\n···\n\narXiv:2603.03101v2 [cs.CV] 4 Mar 2026\n\npjk000011@yonsei.ac.kr seojy@yonsei.ac.kr mnzzy@yonsei.ac.kr yurangpark@yuhs.ac\n\n\n\n···\n\u0010\u0012\u000e\u001a\n\n\u001a\b\n\n\u0007\u0014\u0006\u0017\u0005\u0004\u0010 \u0003\u0002\u0014\u0001 \u0015\u0017\u0016\n\n\u001d\b\u001e\u0018\u001c \n\n\u001d\b\u001e\u0018\u001c \n\n\u001d\b\u001e\u0018\u001c \u0007\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u001c\u0018\u0017\u0016\u0015\u0014\u0013\u0012\n\nFigure 1. Comparison between existing CLIP-Adapter based\nmethod and our MoECLIP. (a) The general CLIP-based ZSAD\nframework. (b) Existing methods apply a uniform adaptation to\nall patches, regardless of their unique characteristics. (c) In contrast, our MoECLIP utilizes a Mixture of Experts to achieve patchspecialized adaptation, dynamically routing each patch to experts\nthat are differentiated by FOFS and an ETF loss.\n\nposing a significant constraint in data-scarce environments.\nAs an alternative to overcome these limitations, the ZeroShot Anomaly Detection (ZSAD) paradigm [7, 8, 29, 38,\n45, 55] has emerged, leveraging the rich visual-semantic understanding of Vision-Language Models (VLMs) like Contrastive Language-Image Pretraining (CLIP) [46] to enhance generalization for unseen classes. As illustrated in\nFig. 1(a), the core idea of CLIP-based ZSAD is to detect anomalies by measuring the similarity between patch\nembeddings and text embeddings. However, CLIP is pretrained for global semantic understanding, making it suboptimal for detecting localized anomalies [35]. Thus, a\nkey challenge is adapting CLIP for anomaly detection while\npreserving its powerful generalization capability.\nMotivated by this challenge, recent ZSAD methods have\nattempted to enhance image patch representations for the\nanomaly detection task. PromptAD [35] and AnomalyCLIP [55] seek to focus on local regions by replacing\nCLIP’s QKV Attention with V-V Attention. Parameter-\n\n1. Introduction\nVisual Anomaly Detection (AD) [6] aims to identify\nanomalous regions that deviate from normal patterns and\nserves as a critical technology in various fields, including\nindustrial defect detection [3, 12, 56], medical image diagnosis [5, 17]. Due to the scarcity of anomalous samples,\ncollecting labeled anomaly data is impractical, making Unsupervised Anomaly Detection (UAD) the traditional AD\nparadigm [11, 22, 24, 25, 47, 53], where models learn only\nfrom normal data to detect anomalies. However, UAD is\nstill predicated on the availability of sufficient normal data,\n* Corresponding author.\n\n1\n\n\f2. Related Work\n\nEfficient Fine-Tuning (PEFT) [23] methods, such as AdaCLIP [7] and AA-CLIP [38], introduce prompting Tokens or Adapters to improve anomaly detection performance while preserving CLIP’s generalization capability.\nHowever, these methods share a limitation: as depicted in\nFig. 1(b), they follow a patch-agnostic design that performs\nuniform adaptation across all patches, without considering\nthat different image regions represent distinct structures or\nsemantics (e.g., object components, backgrounds).\nTo address these limitations, we propose MoECLIP, a\nnovel framework that utilizes Patch-Specialized Experts.\nThe core idea of MoECLIP, as depicted in Fig. 1(c), is\nto strategically integrate a Mixture of Experts (MoE) [50]\nmodule into the CLIP Vision Encoder, which dynamically\nroutes each image patch to the most suitable expert based on\nits unique characteristics. Specifically, to preserve CLIP’s\ngeneralization capability and avoid overfitting on auxiliary datasets, MoECLIP adopts a PEFT-based feature adaptation approach, where MoE experts are implemented as\nlightweight Low-Rank Adaptation (LoRA) [28] modules.\nHowever, a naive ensemble of LoRA experts can lead to\nfunctional redundancy, where experts learn similar functions. To prevent this and promote expert specialization,\nwe employ two complementary strategies: Frozen Orthogonal Feature Separation (FOFS) enforces expert separation\nat the input stage by orthogonally separating the feature\nspace, ensuring non-overlapping feature subspaces by construction, while at the output stage, a simplex equiangular\ntight frame (ETF) [43] loss regularizes expert outputs to follow an equiangular target structure, ensuring clear differentiation. Through this design, MoECLIP overcomes the limitations of existing uniform adaptation methods, enabling\nfine-grained patch-level adaptation and enhancing generalization performance across diverse datasets.\nOur key contributions are summarized as follows:\n1. Pioneering a MoE-based architecture for Zero-Shot\nAnomaly Detection. We are the first to introduce an approach to the ZSAD task that dynamically routes each\nimage patch to a specialized expert, establishing a new\nparadigm of patch-level adaptation for this task.\n2. Novel Mechanisms for Expert Specialization. To prevent functional redundancy and boost differentiation\namong LoRA experts, we introduce Frozen Orthogonal\nFeature Separation (FOFS), which orthogonally separates the input feature space, and a simplex equiangular tight frame (ETF) loss that enforces an equiangular\nstructure on expert outputs.\n3. State-of-the-art performance on comprehensive benchmark datasets. In comprehensive experiments on 14\nbenchmark datasets spanning industrial and medical domains, MoECLIP achieves state-of-the-art (SOTA) performance in both the anomaly classification and segmentation tasks of ZSAD.\n\n2.1. Zero-Shot Anomaly Detection (ZSAD)\nZSAD, where generalization performance on unseen\nclasses is critical, has made significant strides based on\nthe CLIP model. WinCLIP [29], the first study to apply\nCLIP to ZSAD, proposes a method for calculating similarity between handcrafted text prompts and multi-scale image patches. Subsequent research has attempted various\napproaches to better adapt CLIP for the anomaly detection task. April-GAN [8] and CLIP-AD [9] seek to enhance CLIP’s patch representations by introducing a linear adapter. AnomalyCLIP [55] and FiLo [19] utilize a\nprompt learning approach, introducing learnable parameters to the text prompt. Bayes-PFL [45] treats the text\nprompt space as a learnable probability distribution from\na Bayesian inference perspective. AdaCLIP [7] and VCPCLIP [44] use a hybrid prompt approach to enhance the\nalignment of text and patch embeddings. AA-CLIP [38]\ncombines a loss function to increase the separability of normal and abnormal text embeddings with a Residual Adapter.\nIn this way, there have been various attempts in the ZSAD\nfield to improve text and image patch representations. However, all approaches to enhancing image patch representations share a common limitation: they apply the same,\nmonolithic transformation to all patches, without considering their unique individual characteristics. This patchagnostic approach fundamentally undermines the model’s\nability to identify fine-grained anomaly patterns.\n\n2.2. Mixture of Experts (MoE)\nMixture-of-Experts (MoE) [33, 50] is a conditional computation architecture wherein a gating network dynamically\nactivates only a small subset of experts best suited for a\ngiven input, enabling massive-scale expansion and excellent generalization performance. Owing to these properties,\nMoE has been a key strategy for building large-scale models [13, 14, 21, 31, 32], and its application has recently expanded to the field of reconstruction-based Unsupervised\nAnomaly Detection (UAD) [20, 39]. However, two significant gaps remain. First, the application of MoE to the\ngeneralization-critical ZSAD task remains entirely unexplored. Second, existing methods to MoE’s functional redundancy problem [10, 37] typically attempt to enforce differentiation by applying output-level constraints, such as\ncontrastive loss [16] or orthogonality regularization [15].\nHowever, these methods are limited as they fail to address\nfeature overlap at both the input and output stages of experts. Our MoECLIP is the first to address both gaps: we\nintroduce MoE to the ZSAD task to solve the patch-agnostic\nproblem, and ensure robust expert specialization by applying FOFS and the ETF loss to control differentiation at both\nthe input and output stages of the LoRA experts.\n2\n\n\f3. Preliminaries\n\n4. Methods\n\n3.1. Low-Rank Adaptation (LoRA)\n\n4.1. Problem Definition\n\nLow-Rank Adaptation (LoRA) [28] is a Parameter-Efficient\nFine-Tuning (PEFT) technique that freezes the pretrained\nweight matrix W0 ∈ Rd1 ×d2 and injects a trainable, lowrank update ∆W = BA, where down projection matrix\nA ∈ Rr×d2 and up-projection matrix B ∈ Rd1 ×r are\nthe trainable matrices. The final adapted weight is computed as W = W0 + ∆W . Since the rank r satisfies\nr ≪ min(d1 , d2 ), this method significantly reduces the\nnumber of trainable parameters compared to simple linear\nadapters and reduces the risk of overfitting.\n\nWe follow the standard ZSAD setting [38, 45, 55], training\nour model via supervised learning on an auxiliary dataset\nof seen categories Ds , and then evaluating on unseen categories Du (Ds ∩ Du = ∅). During the test phase, for the\ni-th image Xi ∈ RH×W ×3 , the model outputs an imagelevel Anomaly Score Ŝ ∈ [0, 1] and a pixel-level Anomaly\nMap M̂ ∈ [0, 1]H×W .\n\n4.2. Overview\nFig. 2 illustrates the overall framework of MoECLIP. The\ncore design of MoECLIP is to adapt the model for the\nanomaly detection task by integrating MoE modules at the\noutput-level of multi-level layers, all while keeping the Vision Encoder weights frozen to preserve CLIP’s generalization capability. Inside the MoE modules, a router dynamically selects the optimal expert based on the unique characteristics of each patch. Furthermore, to prevent functional\nredundancy and induce expert differentiation, we introduce\ntwo novel mechanisms: (1) Frozen Orthogonal Feature Separation (FOFS) at the LoRA input, which orthogonally separates the feature space to force experts to focus on different subspaces, and (2) a simplex Equiangular Tight Frame\n(ETF) loss at the LoRA output, which regulates the expert\noutput features to be maximally equiangular.\n\n3.2. Mixture of Experts (MoE)\nA Mixture-of-Experts (MoE) [50] consists of a router R and\nK expert networks, which in our study are implemented as\nLoRA modules, each denoted as {En (x) = Bn An x}K\nn=1 .\nThe Router takes the input x and computes routing scores\nthat determine the importance of each expert. Then, Top-k\nrouting is applied, activating only the k ≤ K experts with\nthe highest routing scores, and their scores are renormalized\nto yield the final routing scores, as shown in Eq. (1):\n\n  \\label {eq:Router} \\hat {R}_{n} = \\begin {cases} \\dfrac {{R}_{n}(x)} {\\sum _{m \\in {top}({R(x)},k)} {R}_{m}(x)}, &amp; \\text {if } n \\in \\text {top}({R(x)},k), \\\\ 0, &amp; \\text {otherwise.} \\end {cases} \n\n4.3. MoE-based Feature Adaptation\n\n(1)\nThe final output x of the MoE is obtained by taking the\nweighted sum of each expert’s output using the routing\nscores as weights, as shown in Eq. (2):\n′\n\n  \\label {eq:moe_output} \\mathrm {x}' = \\sum _{n=1}^{K} \\hat {R}_{n}(x) {E}_n({x}) \n\nWe integrate PEFT-based Mixture of LoRA Expert modules\nat multiple layers, enabling each image patch to dynamically select the optimal combination of experts and adapt\nits representation across different levels of abstraction, all\nwhile keeping the CLIP Vision Encoder frozen.\nThe MoE module at the l-th layer receives the corresponding patch feature Fil ∈ Rd for the i-th patch and\nl\nlearns a residual Fi,expert\n∈ Rd to perform feature adaptal\ntion. However, a naive residual addition (i.e., Fil + Fi,expert\n)\ncan cause a norm mismatch, which destabilizes training and\ndegrades CLIP’s generalization capability. Inspired by AACLIP [38], we address this by normalizing the MoE output\nto match the ℓ2 norm of the original feature while preserving its direction:\n\n(2)\n\n3.3. Simplex Equiangular Tight Frame (ETF)\nA Simplex Equiangular Tight Frame (ETF) [43] is a geometrically optimal structure for the perfect separation of a\nset of K vectors W = [w1 , . . . , wK ] ∈ Rm×K . All its properties are captured by its ideal Gram matrix Gideal ∈ RK×K ,\nas shown in Eq. (3):\n  \\label {eq:ideal_etf} {G}_{n,m}^\\text {ideal} = {w}_n^\\top {w}_m = \\begin {cases} 1, &amp; \\text {if } n = m, \\\\ -\\frac {1}{K-1}, &amp; \\text {if } n \\neq m. \\end {cases} \n\n  \\label {eq:norm_expert_output} F^l_{i,\\text {norm}} = F^l_{i, \\text {expert}} \\cdot \\frac {\\|F^l_i\\|_2}{\\|F^l_{i, \\text {expert}}\\|_2 + \\epsilon } \n\n(3)\n\n(4)\n\nwhere ∥ · ∥2 denotes the ℓ2 norm and ϵ is a small constant\nfor numerical stability. Subsequently, the normalized outl\nput Fi,norm\nis combined with the original Fil via a weighted\nresidual connection, controlled by λMoE , to yield the patch\nl\nfeature Fi,MoE\n, as shown in Eq. (5):\n\nwhere this condition holds for ∀n, m ∈ [1, . . . , K]. This\nstructure implies that all vectors have the same ℓ2 norm and\nare maximally separable (equiangular), with a pairwise co1\nsine similarity of − K−1\n. In this study, we use an auxiliary\nloss function to enforce this ETF structure on our expert\noutputs (detailed in Sec. 4.4).\n\n  \\label {eq:final_moe_output} F^l_{i, \\text {MoE}} = \\lambda _{\\text {MoE}} \\cdot F^l_{i,\\text {norm}} + (1 - \\lambda _{\\text {MoE}}) \\cdot F^l_i \n\n3\n\n(5)\n\n\f···\n\n\b\b\u0010\n\u0019­\n\n\b\b\u0010\n\u0019\n\n\u001f\u001a\n\n\u001f­\n\n\u001f\n\n\u0011\u001d\u0002\u0019\n\u0017 \u0006\u0015\u0018\u001a\n\n\u0011\u001d\u0002\u0019\n\u0017 \u0006\u0015\u0018­\n\n\u0011\u001d\u0002\u0019\n\u0017 \u0006\u0015\u0018\n\n···\n\n\u001f\n\n\u0004\b\u0018\u0011\u001d\u0005\u0005\n\n\u001f \u001e \u001c \u0018\u0011\u001d\u0005\u0005\n\u000f\u000e\u000f \u001c\u001b\u000f\u0016\u001e \u0015 \u001b\u000e\u0016\u0018 \u001e \u001e \u0012\b\u001b\u000f\u0015\u0012\u0018\u0017\u0016\u0015\u001b \u0015\u0011\u0012\u0016\u0012\u0018\u001a\u001e\n\n\b\b\u0010 \u0019­\n\n \u0006\u001d\n\u0015\u0006\u0001\n\n···\n\n\u0016\u001c\b\u0018\u0004\u0018\u001a\u0012\u0011\n\u0012\u001c\u0016 \u001d\u0010\n\n\b\b\u0010 \u0019\n\n \u0006\u001d\u0018\n\n \u0006\u001d\u0018\n\u0016\u001c\b\u0018\u0004\u0018\u001a\u0012\u0011\n\u0012\u001c\u0016 \u001d\u0010\n\u0015\u0006\u0001\n\n\u0001\u001e\u000e\u001c\b \u001e\n\u0014\u0017\u0012\u000e\u001c\u001e\u0016\n\n···\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n···\n\n···\n\n\u0003\u0012\u001e\u0016\u0010\n\n\u0015\u0006\u0001\n \u0006\u001d\n\u0015\u0006\u0001\n\n\u0015\u0003\u0001\u0005 \u0018\u0010\u0007\n\n\u0003\u0012 \u001e\u0011\n\n\u0005\u0013\u0012\u0004\u001e\n\n­ \u001a\u0012\u0016\n\u0016\u0018 \u0010\u001b\u001a\u001c\u0016\u0018\u000e\n\n\u0003\u0012\u001e\u0016\u0010\n\u0014\n\n\n\n\u0007\n\n\b\b\u0010\n\u0019\n\n\u0007\u0001  \u0007\u001e \u0006\n\n\u0007\u0015\u0017\u0007\u0015\n\n···\n\n\u0003\u0012\u001e\u0016\u0010\n\n\n\n\u0007\n\n\u0018\u001b\n\n\n\u0007 \u001a\u0018\u0016\u0013\n\n\n\n\n\n\u0007\n\n\u0018\u001b\n\n\u0007 \u0013\u0018\u001e\n\n\n\n\u0007 \u001a\u0018\u0016\u0013\n\n\n\n\u0007 \u0013\u0018\u001e\n\n\u0019 \u0006\n\u001a\u001a\n\n\n\n\n\n\u0007\u000f\u0014\u0014\n\n\u000f\u0016\u0018\n\n\u0019 \u0006\n\n\u0007 \u000f\u0014\u0014\n\n\u000f\u0016\u0018\n\n\n\u000f\u0016\u0018\n\n\n\n\n\u0007\u000f\u0014\u0014\n\n\u000f\u0016\u0018\n\n\n\u0019\u001d\n\n\u001f\u001e\u001d\u001c\n\u001b\u001a\u0019\u0018\u0017\u001e\u0016\n\n\n\n\n\u0007 \u000f\u0014\u0014\n\n\u001f\u0014\n\u001f\u0015\n\n\u000f\u0014\u0014 \u0010\u000f\u0012\u001c\u0019\b\u0010\u0014\u001e\u0016\u0012\u0004\u001e\u0010\u0014\u0004\u0004\u0016\u001e\u0004\u0012\u001c \u0018\u001a\n\u0019 \u0006\n\n^\n\n\u0015\u0014\n\n\u0018\u001b\n\n\n\n\u0007 \u001a\u0018\u0016\u0013\n\n\n\n\u0007 \u0013\u0018\u001e\n\n\u0014\u001a\u0018\u0013\u0012\u0011\u0010 \u0019\u0018\u0016\u001e\n\n\n\n\u0018\u001b\n\n\n\n\u0007 \u001a\u0018\u0016\u0013\n\n\n\n\u0007 \u0013\u0018\u001e\n\n\u0011\u001d\u0002\u0019\n\u0017 \u0006\u0015\u0018\n\n\u001f\u0018\u000e\n\n···\n\n\u001e\n\n^\n\n\u0007\n\n\b\b\u0010\n\u0019\u001a\n\n···\n\n\u0011 \u0006 \u001e\n\b\u0006\u001d \n\n\u0015\u0006\u0001\u0018 \u0007\u001e\u0015\u0001\u0017\u001e\u0001\u001c \u0015\u0001\u001d\n\n\u001f\u001e\u001d\u001c\u001b\n\n\u000f\u0012\u001c\u0019\b\u0010\n\u0007\u001e\u0012\u001c\u0006\u0016\u001e\n\n\u0018\u0006\u001c\u001e\u0016\n\n\b\b\u0010 \u0019\u001a\n\n···\n\n\u001f\u001e\u001d\u001c\u001b\n\n\u0003\u0012\u001e\u0016\u0010\n\n\u001f\u001e\u001d\u001c\u001b\u001f\u001a\u0019\u0018\u0017\u0016\u0015\u001b\u001e\u0014\u001b\u0013\u001e\u0016\u0012\u001b\u001d\u0019\u0011\u0015\u0016\u0018\u0010\n\u0015\u001c\u0016\u0018\b \u0015\u0007\u0006 \u0005\n\u0004\u001d\u0017\u0003\u001b\n\u0002\u001d\u0007\u0015\u0001\n\n\u001f\u001e\u001d\u001c\u001b­\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u0018\u001a\u0010\u001b\u001a\u0019\u0018\u0017\u001e\u0016\n\u0003 \u0002\u0001 \n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u001f\u001e\u001d\u001c\u001b\u001a\n\n\u001f\u0010\u0003\u0012\u001e\u0016\n\n\u0007 \u0011\u0017\u0018\u001b\u0007\u0006\u0012 \u0015\u001b\u001b\u001b\u001b\u001b\u0005\u0012\u0018\u0004 \u0015\u0010\n\n\n\n\u0017\n\n\u001e\n\n\u0007\u0018\u0019\u0012\u0011\u0010\u0003\u0018\n\u0002\u0010\u0001 \u0019\u001e\u0010\u0003\u0018\n\n\u0014 \u001a\u0018\u0016\u0013\u0012\u0011\u0010\u000f\u0016\u0018\u0013\u000e\u001c\n\u0019\u0018\u0017\u0016\u001d\u0015\u001d\u0018\u001d\u0014\u0018\u000e\n\n\u000e\u0018\u0013\u0012\u0011\u0010\u000f\n\n\u0015\u0018\u0016\u0013\u0012\u0011\u0010\u000f\u0016\u0018\u0013\u000e\u001c\n\u0019\u0018\u0017\u0016\u001d\u0015\u001d\u0018\u001d\u0014\u0018\u0013\u0012\u0011\u0010\u000f\n\n··· \u0016\u001c\b\u0018\u0004\u0018\u001a\u0012\u0011\n\u0012\u001c\u0016 \u001d\u0010\n\nFigure 2. The framework of MoECLIP. MoE is integrated into multiple layers of the CLIP Vision Encoder, enabling dynamic expert\nrouting for each image patch to learn patch-specific representations for ZSAD. Within each MoE, FOFS enforces expert specialization\nby orthogonally separating the feature space and ETF loss further enhances expert diversity by maximizing the equiangular separation of\nexpert outputs. PAA then aggregates the refined patch features across multiple scales to capture anomalies of different sizes.\n\n4.4. Expert Specialization\n\nthat randomly initialized orthogonal A matrices can achieve\nperformance comparable to learned ones.\n\nIn this section, we introduce Frozen Orthogonal Feature\nSeparation (FOFS) and the ETF loss to enforce expert specialization and prevent functional redundancy. We also\nemploy a standard balance loss to prevent expert collapse,\nwhich supports this specialization.\n\nETF loss: Even though FOFS enforces distinct roles for\nthe experts at the input stage, their learnable LoRA B matrices can still converge to similar feature spaces, leading\nto output stage functional redundancy. To address this, we\nintroduce the ETF loss Letf , which enforces the K expert output vectors to be maximally equiangular. Given\nE l ∈ RL×K×d representing the outputs of K experts for L\npatches at a layer l, we first ℓ2 -normalize each expert vector\neli,n ∈ Rd . Then, the Gram matrix Gli ∈ RK×K is computed for each patch i = 1, . . . , L, as shown in Eq. (7),\n\nFrozen Orthogonal Feature Separation (FOFS): The\ncore idea of FOFS is to separate the d-dimensional input feature Fil ∈ Rd into K non-overlapping subspaces\nc1 , . . . , cK , forcing each expert to focus solely on one subspace. Specifically, the LoRA matrix An ∈ Rr×d for the\nn-th expert is defined as a block matrix. In this matrix, only\nthe columns corresponding to the n-th subspace cn are filled\nwith a random orthogonal matrix Qn ∈ Rr×dn obtained via\nQR decomposition [18], while all other columns are zero\nmatrices 0. FOFS can be formulated as:\n  &amp; \\hspace {0.8em} \\begin {aligned} &amp; {Q}_n = (\\mathrm {qr}_{{Q}}(C_n))^T, \\quad \\text {where } C_n \\sim \\mathcal {N}(0, \\text {I})_{d_n \\times r} \\\\ &amp; A_n = [{0}_{r \\times d_1}, \\dots , {0}_{r \\times d_{n-1}}, {Q}_n, {0}_{r \\times d_{n+1}}, \\dots , {0}_{r \\times d_K}] \\raisetag {1.4\\baselineskip } \\end {aligned} &amp;&amp; \\label {eq:fofs}\n\n  \\label {eq:gram} (G^l_i)_{n,m} = (\\hat {e}^l_{i,n})^\\top \\hat {e}^l_{i,m} \n\n(7)\n\nwhere êi,n and êi,m denote the ℓ2 -normalized outputs of expert n and m for the i-th patch, respectively. The Letf encourages all Gli to approximate the ideal equiangular Gram\nmatrix Gideal (Eq. (3)), and is calculated as follows:\n\n(6)\n\nwhere An ATm = 0 for all n ̸= m, ensuring mutual orthogoPK\nnality, and the subspace dimensions satisfy n=1 dn = d.\nFOFS provides two key advantages. First, it inherently\nprevents redundant knowledge learning by forcing each expert to focus on a physically distinct feature subspace from\ninitialization. Second, freezing the An matrix helps preserve CLIP’s generalization capability and reduces the risk\nof overfitting on auxiliary datasets. This frozen approach is\ninspired by recent LoRA research [57], which demonstrated\n\n  \\label {eq:etf_loss} \\begin {split} \\mathcal {L}_{etf} &amp;= \\sum _{l} \\left ( \\frac {1}{L} \\sum _{i=1}^{L} \\| G_i^{l} - G^{\\mathrm {ideal}} \\|_F^2 \\right ) \\\\ &amp;= \\sum _{l} \\left ( \\frac {1}{LK^2} \\sum _{i=1}^{L}\\sum _{n=1}^{K}\\sum _{m=1}^{K} \\big ((G^l_i)_{n,m} - G^{\\mathrm {ideal}}_{n,m}\\big )^2 \\right ) \\end {split} \n\n(8)\nBy enforcing expert outputs to span diverse and equiangular\ndirections at each stage, Letf complements FOFS by further\nboosting expert specialization at the output stage.\n4\n\n\fThis text-aligned feature V l,s is then used to calculate the\nl,s\nanomaly map M̂N/A\n∈ RH×W ×2 for the l-th layer and s-th\nscale, as shown in Eq. (12),\n\nBalance loss: To prevent expert collapse and ensure assignments are distributed evenly, we use the standard balance loss [39, 50] Lbal , as shown in Eq. (9),\n\n  \\label {eq:anomaly_map_lr} \\hat {M}_{N/A}^{l,s} = \\text {softmax}(\\phi (\\mathrm {cos}(V^{l,s}, T_{{N/A}}))) \n  \\label {eq:balance_loss} \\mathcal {L}_{bal} = \\sum _{l} \\left [ \\text {CV}^2\\left (\\sum _{i=1}^{L} R(F^l_i)\\right ) \\right ] \n\nwhere ϕ denotes an interpolation function that resizes the\nmap to the original image dimensions, and cos(·, ·) represents the cosine similarity.\n\nwhere L is the number of patches, R(Fil ) ∈ RK is the routing probability vector and CV2 (·) denotes the squared Coefficient of Variation (detailed in supplementary Sec. B.5).\n\nAnomaly Score: The image-level anomaly score is determined by the semantic alignment between the patch feaf\ntures F̂PAA\nfrom the final layer and the text features. To\nf\nenhance this alignment, F̂PAA\npasses through a Depth-wise\nAdapter. This adapter, inspired by MobileNet [27], uses\na 1D depthwise separable convolution, which combines a\nDepth-wise and a Point-wise convolution to efficiently capture features with fewer parameters, making it lightweight\nand less prone to overfitting. The resulting features are then\naggregated into Vimage ∈ Rd via Global Average Pooling.\nThe Depth-wise Adapter can be calculated as:\n\n4.5. Patch Average Aggregation (PAA)\nThe CLIP Vision Encoder’s (ViT) fixed-size patch division\nlimits its ability to effectively detect anomalies of varying\nscales. To our knowledge, while previous works [34, 42]\nuse patch aggregation to leverage contextual information,\nthese methods are limited to only the test phase, thus failing\nto integrate multi-scale awareness during the training phase.\nWe therefore apply the parameter-free Patch Average Aggregation (PAA) module during the training phase to the rel\nfined patch features FMoE\n∈ RL×d . By enabling each patch\nto leverage neighboring context, PAA incorporates multiscale awareness to integrate fragmented anomaly patterns\nacross boundaries, enhancing structural robustness.\nTo apply PAA, we first reshape√ the√patch embeddings\nl\nFMoE\ninto a 2D spatial grid P l ∈ R L× L×d . A new patch\nfeature p̂lh,w is generated by calculating the average of all\npatch features within an s × s sliding window centered at\ncoordinate (h, w), as shown in Eq. (10),\n\n  \\begin {aligned} &amp;\\hat {F}_{\\mathrm {dw}} = GELU({DwConv1d}({LN}(\\hat {F}^{f}_{\\mathrm {PAA}}))) \\\\ &amp;V_{\\mathrm {image}} = \\frac {1}{L} \\sum _{i=1}^{L} {PwConv1d}(\\hat {F}_{\\mathrm {dw}})_i \\end {aligned} \n\n(13)\n\nwhere LN (·) is a Layer Normalization. The Vimage is compared with the text embeddings TA and TN via cosine similarity, yielding the anomaly score vector ŜN/A ∈ R2 , as\nshown in Eq. (14),\n  \\label {eq:anomaly_score} \\hat {S}_{N/A} = \\mathrm {cos}\\left (V_{\\mathrm {image}}, [T_A, T_N]\\right ) \n\n  \\label {eq:paa} \\hat {p}^l_{h,w} = \\frac {1}{s^2} \\sum _{u=-\\lfloor s/2 \\rfloor }^{\\lfloor s/2 \\rfloor } \\sum _{v=-\\lfloor s/2 \\rfloor }^{\\lfloor s/2 \\rfloor } p^l_{h+u, w+v} \n\n(10)\n\n(14)\n\nwhere [ · , · ] denotes the concatenation operation, and ŜA is\nfinally used as the image-level anomaly score.\n\nwhere plh+u,w+v denotes the original patch feature at coordinate (h + u, w + v), and s is a positive odd integer representing the window size. This aggregation process is performed independently for each scale s, extracting multiple\nsets of patch features P̂ l,s . Finally, P̂ l,s is reshaped back\ninto F̂Pl,sAA ∈ RL×d to form the multi-scale patch features.\n\n4.7. Loss Functions\nFollowing previous works [7, 8, 19, 38, 55], we employ\na combination of Focal [36] and Dice Loss [40] for the\nanomaly segmentation loss Lseg , and the Binary CrossEntropy loss for the anomaly classification objective Lac ,\nas shown in Eq. (15),\n\n4.6. Anomaly Map and Anomaly Score\n\n  \\label {eq:loss_ac_seg} \\begin {aligned} \\mathcal {L}_{seg} &amp;= \\sum _{l} \\sum _{s} \\Big [ \\text {Focal}(\\hat {M}^{l,s}_{N/A}, M) + \\text {Dice}(\\hat {M}^{l,s}_{N/A}, M)\\Big ] \\\\ \\mathcal {L}_{ac} &amp;= \\text {BCE}(\\hat {S}_A, S) \\end {aligned} \n\nTo compute the final outputs, we first prepare the representative text features TA and TN from text prompts. Following AA-CLIP [38], we pass a set of text prompts (detailed in\nsupplementary Sec. B.4) through the pretrained CLIP Text\nEncoder and obtain TA , TN ∈ Rd by averaging the outputs of their corresponding text prompt sets. These features\nare subsequently used to calculate the pixel-level Anomaly\nMap and the image-level Anomaly Score.\n\n(15)\nwhere M ∈ RH×W denotes the pixel-level ground-truth\nsegmentation mask, and S denotes the image-level label indicating whether the image is anomalous.\nThe final loss function can be expressed as:\n\nl,s\nAnomaly Map: First, the PAA features F̂PAA\nare aligned\nwith the text space via a trainable projection layer Projl ,\nyielding V l,s ∈ RL×d , as shown in Eq. (11):\n\n  \\label {eq:proj_layer} V^{l,s} = Proj_l(\\hat {F}^{l,s}_{{PAA}}) \n\n(12)\n\n(9)\n\n  \\label {eq:total_loss} \\mathcal {L}_{total} = \\mathcal {L}_{seg} + \\mathcal {L}_{ac} + \\lambda _{etf} \\mathcal {L}_{etf} + \\lambda _{bal} \\mathcal {L}_{bal} \n\n(16)\n\nwhere Letf and Lbal are the auxiliary losses for expert specialization, calculated as in Eq. (8) and Eq. (9) respectively.\n\n(11)\n5\n\n\fTable 1. Comparison with state-of-the-art methods across industrial and medical domains under the ZSAD setting. The symbol † indicates\nresults obtained from models re-trained under our setting. The best performance is in bold and the second-best is underlined.\nmetric\n\nImage-level\n(AUROC, AP)\n\nPixel-level\n(AUROC, AP)\n\nWinCLIP [29]\n(CVPR 2023)\n\nApril-GAN [8]\n(CVPRw 2023)\n\nAnomalyCLIP [55]\n(ICLR 2024)\n\n†AdaCLIP [7]\n(ECCV 2024)\n\n†AA-CLIP [38]\n(CVPR 2025)\n\nBayes-PFL [45]\n(CVPR 2025)\n\nMoECLIP\n(Ours)\n\nMVTec-AD\nVisA\nIndustrial\nBTAD\nRSDD\nDTD-Synthetic\nBrain MRI\nHead CT\nMedical\nLiver CT\nRetina OCT\nAverage\n\n(91.8, 95.1)\n(78.1, 77.5)\n(83.3, 84.1)\n(85.3, 65.3)\n(95.0, 97.9)\n(45.1, 80.3)\n(83.7, 81.6)\n(66.5, 56.1)\n(53.7, 44.3)\n(75.8, 75.8)\n\n(86.1, 93.6)\n(77.5, 80.8)\n(73.4, 69.6)\n(72.7, 68.3)\n(85.5, 94.0)\n(58.8, 87.8)\n(86.9, 87.9)\n(54.7, 49.6)\n(65.6, 60.5)\n(73.5, 76.9)\n\n(91.9, 96.2)\n(82.1, 85.4)\n(92.5, 94.2)\n(74.0, 73.2)\n(93.3, 97.7)\n(70.8, 90.6)\n(95.1, 95.3)\n(68.2, 63.4)\n(74.7, 73.9)\n(82.5, 85.5)\n\n(91.5, 96.1)\n(83.0, 85.5)\n(91.6, 92.4)\n(83.8, 80.1)\n(91.5, 96.3)\n(79.5, 94.5)\n(95.7, 93.2)\n(62.6, 54.2)\n(70.3, 69.4)\n(83.3, 84.6)\n\n(90.9, 96.0)\n(79.2, 83.7)\n(94.8, 97.5)\n(94.9, 94.2)\n(92.5, 97.7)\n(79.6, 94.4)\n(95.4, 94.3)\n(58.4, 49.7)\n(83.4, 83.8)\n(85.5, 87.9)\n\n(92.2, 96.1)\n(86.8, 89.3)\n(93.0, 96.7)\n(91.3, 89.7)\n(93.5, 97.7)\n(81.9, 94.5)\n(95.4, 93.2)\n(61.7, 55.2)\n(83.7, 81.8)\n(86.6, 88.2)\n\n(93.9, 96.8)\n(83.6, 86.2)\n(93.1, 98.0)\n(95.3, 95.1)\n(95.5, 98.6)\n(88.5, 97.1)\n(96.6, 94.5)\n(74.0, 64.6)\n(85.5, 84.9)\n(89.6, 90.6)\n\nMVTec-AD\nVisA\nIndustrial\nBTAD\nRSDD\nDTD-Synthetic\nBrain MRI\nLiver CT\nRetina OCT\nColonDB\nMedical\nClinicDB\nCVC-300\nEndo\nKvasir\nAverage\n\n(85.1, 18.0)\n(79.6, 5.0)\n(71.4, 11.2)\n(95.1, 2.1)\n(82.5, 11.6)\n(95.4, 23.5)\n(97.1, 8.0)\n(88.8, 22.0)\n(64.8, 14.3)\n(70.7, 19.4)\n(44.0, 5.0)\n(68.2, 23.8)\n(69.8, 27.5)\n(77.9, 14.7)\n\n(87.6, 40.8)\n(94.2, 25.8)\n(91.4, 32.4)\n(99.3, 33.1)\n(96.5, 67.7)\n(94.4, 37.1)\n(95.5, 5.3)\n(88.6, 35.4)\n(78.3, 23.3)\n(85.0, 38.5)\n(92.9, 26.8)\n(84.0, 48.8)\n(79.7, 43.0)\n(89.8, 35.2)\n\n(88.1, 38.6)\n(95.5, 21.2)\n(94.2, 42.0)\n(98.6, 17.8)\n(96.2, 54.0)\n(96.0, 57.5)\n(93.0, 2.9)\n(91.8, 47.1)\n(81.6, 34.0)\n(84.3, 41.1)\n(95.8, 56.4)\n(85.4, 49.7)\n(81.4, 43.1)\n(90.9, 38.9)\n\n(89.7, 43.0)\n(95.5, 28.6)\n(95.4, 47.0)\n(99.6, 33.2)\n(96.4, 57.7)\n(94.5, 35.6)\n(97.0, 9.4)\n(94.4, 55.5)\n(81.0, 26.5)\n(85.7, 45.8)\n(91.1, 25.9)\n(86.2, 54.1)\n(82.9, 51.3)\n(91.5, 39.5)\n\n(91.6, 45.4)\n(94.7, 24.2)\n(95.6, 49.4)\n(99.4, 41.7)\n(97.6, 61.7)\n(96.7, 55.1)\n(97.2, 9.3)\n(95.4, 62.3)\n(82.8, 31.5)\n(89.2, 49.8)\n(96.5, 53.9)\n(88.6, 57.7)\n(86.0, 52.9)\n(93.2, 45.8)\n\n(91.9, 48.4)\n(95.5, 29.2)\n(95.6, 48.6)\n(99.6, 35.7)\n(98.2, 66.7)\n(95.7, 42.9)\n(96.5, 6.2)\n(95.5, 55.0)\n(82.9, 30.7)\n(88.2, 49.1)\n(96.6, 51.6)\n(89.4, 58.9)\n(85.6, 53.4)\n(93.2, 44.3)\n\n(92.5, 45.7)\n(95.6, 26.1)\n(96.8, 50.4)\n(99.7, 35.9)\n(98.8, 62.7)\n(97.3, 61.3)\n(97.2, 10.8)\n(96.2, 66.3)\n(85.4, 34.8)\n(89.7, 49.9)\n(97.0, 53.0)\n(91.0, 62.5)\n(88.1, 57.6)\n(94.3, 47.5)\n\nDomain\n\nDataset\n\n5. Experiments\n\nthe output of the l-th layers of the Vision Encoder, where\nl ∈ {6, 12, 18, 24}, and their outputs are used to compute\nthe final outputs. For the model configuration, we set the\ntotal number of experts K to 4 with Top-2 routing via a\nlinear router layer R, a LoRA rank r to 8, MoE residual\nweight λMoE to 0.1, PAA scales s ∈ {1, 3, 5}, the auxiliary\nloss weights λetf and λbal to 0.01. The model is trained for\n20 epochs using the Adam Optimizer with a learning rate of\n5 × 10−4 . All experiments are conducted on 2 × NVIDIA\nTesla V100 16GB GPUs. More details can be found in supplementary Sec. B.3.\n\n5.1. Experimental Setup\nDatasets: We evaluate our model’s performance on a comprehensive suite of 14 datasets, spanning 5 industrial and 9\nmedical datasets. The industrial datasets include MVTecAD [3], VisA [58], BTAD [41], RSDD [54], and DTDSynthetic [1]. The medical datasets cover various tasks,\nincluding Head CT [48] for brain tumor detection, three\ndatasets from the BMAD benchmarks [2] (BrainMRI, Liver\nCT, and Retina OCT), and five datasets for colon polyp\ndetection (CVC-ColonDB [51], CVC-ClinicDB [4], CVC300 [52], Endo [26], and Kvasir [30]). We use VisA as the\ntraining dataset for all evaluations on other datasets. To ensure a fair comparison, VisA [58] results are obtained using\na model trained on MVTec-AD [3]. A detailed description\nof the datasets is provided in supplementary Sec. B.1.\n\n5.2. Comparison with State-of-the-art methods\nTab. 1 presents a comprehensive ZSAD performance\ncomparison between MoECLIP and recent state-of-the-art\n(SOTA) methods, including WinCLIP [29], April-GAN [8],\nAnomalyCLIP [55], AdaCLIP [7], AA-CLIP [38], and\nBayes-PFL [45]. For fairness, all competing models are\ntrained on VisA as the auxiliary dataset under a unified setting (detailed in supplementary Sec. B.2).\nOverall, our MoECLIP consistently achieves SOTA performance across both domains. Specifically, for image-level\nmetrics, it further yields improvements of 3.0\\% in AUROC\nand 2.4\\% in AP. For pixel-level metrics, MoECLIP outperforms the second-best method by 1.1\\% in average AUROC and 1.7\\% in average AP. These results confirm that\n\nEvaluation Metrics: We evaluate ZSAD performance on\nboth image-level classification and pixel-level segmentation\nusing the Area Under the Receiver Operating Characteristic\n(AUROC) and Average Precision (AP).\nImplementation details: We utilize the OpenCLIP ViTL/14-336 architecture pre-trained by OpenAI [46] as our\nbackbone. All parameters of the pretrained CLIP model\nare kept frozen during training, and all input images are resized to 518 × 518. Our MoE modules are integrated at\n6\n\n\fFigure 3. Visualization of Grad-CAM and Patch Selection Map for each expert at layer 18. The Ground Truth image is shown on the\nfar left. The top row (Grad-CAM) highlights each expert’s focus region. The bottom row (Patch Selection) illustrates the patches where\nthe corresponding expert was the router’s Top-1 choice (shown in green). The value in each subplot title represents the expert’s average\nrenormalized routing weight based on the Top-1 setting for its Top-1 assigned patches.\n\nthe router’s decisions (bottom row, patch selection maps),\nwhich show the Top-1 selected expert for visual clarity.\nThe visualization demonstrates a clear functional differentiation. The Grad-CAM reveals that the experts have learned\nto focus on distinct regions of the image: Expert 1 focuses\non the anomaly, Expert 2 on the object body, Expert 3 on the\nbackground, and Expert 4 is rarely utilized (detailed in supplementary Sec. E.1). The Patch Selection maps show that\nthe router allocates patches in alignment with these focus\npatterns: Expert 1 is the Top-1 choice for anomaly-related\nand some background patches, whereas Experts 2 and 3\nmainly receive object-body and background patches, respectively. Furthermore, the average routing weights show\ncomparable values across Expert 1, 2, and 3. Expert 4’s\nweight is unrepresentative, being rarely selected. This confirms the anomaly is identified by dynamic combination of\nfunctionally distinct, patch-specialized experts, not a single\none, demonstrating content-based routing. More visualizations for the other layers and the Top-2 selected experts are\nprovided in supplementary Sec. G.2.\nFig. 4 provides a comparison of Anomaly Maps between\nMoECLIP and existing SOTA methods on both industrial\nand medical domains. Due to its patch-specialized expert\ndesign, MoECLIP delivers more accurate and fine-grained\nanomaly localization than existing methods.\n\nFigure 4. Visualization of Anomaly Maps comparing MoECLIP with previous ZSAD methods across industrial and medical domains. The first column shows the Ground Truth, and the\nremaining columns show anomaly maps from each method.\n\nour patch-level dynamic routing is substantially more effective for ZSAD than uniform adaptation strategies employed\nin previous works. Furthermore, the strong performance on\nmedical datasets shows that patch-specialized experts, despite being trained only on industrial data, transfer and generalize robustly to distinct medical domains.\n\n5.4. Ablation Study\n\n5.3. Visualization\n\nImpact of components: Tab. 2 presents ablation results\non the 2 industrial datasets and 2 medical datasets to evaluate the impact of the key components in MoECLIP. Specifically, (a) Compared to the Vanilla CLIP baseline, the model\n\nFig. 3 visualizes the behavior of the 18th-layer experts\non the MVTec-AD hazelnut class to assess whether MoECLIP performs patch-specialized routing. We analyze both\nthe experts’ focus regions (top row, Grad-CAM [49]) and\n7\n\n\fTable 2. Ablation study on the different components of MoECLIP, evaluated on industrial datasets MVTec-AD and DTD-Synthetic, and\nmedical datasets Head CT and ColonDB using (Pixel-level AUROC, Image-level AUROC) metrics. The best performance is in bold.\nDatasets\nComponents of MoECLIP\n\nMVTec-AD\n\nDTD-Synthetic\n\nHead CT\n\nColonDB\n\nAverage\n\nbase\n\nVanilla CLIP\n\n(38.4, 74.1)\n\n(33.9, 71.6)\n\n(−, 56.5)\n\n(49.5, −)\n\n(40.6, 67.4)\n\n(a)\n(b)\n(c)\n(d)\n(e)\n\nw/o FOFS &amp; ETF Loss\nw/o FOFS\nw/o ETF Loss\nw/o Depth-wise Adapter\nw/o PAA\n\n(91.6, 91.7)\n(92.0, 92.8)\n(92.2, 92.7)\n(92.0, 92.5)\n(92.1, 92.8)\n\n(97.8, 93.1)\n(98.3, 93.9)\n(98.2, 93.4)\n(98.1, 93.8)\n(98.1, 94.7)\n\n(−, 94.4)\n(−, 95.0)\n(−, 96.1)\n(−, 94.5)\n(−, 93.1)\n\n(84.1, −)\n(85.3, −)\n(84.6, −)\n(85.0, −)\n(81.9, −)\n\n(91.2, 93.1)\n(91.9, 93.9)\n(91.7, 94.1)\n(91.7, 93.6)\n(90.7, 93.5)\n\nOurs\n\nMoECLIP\n\n(92.5, 93.9)\n\n(98.8, 95.5)\n\n(−, 96.6)\n\n(85.4, −)\n\n(92.2, 95.3)\n\n\u001f\u001e\u001d\u001c\u001d\u001b\u001a\u0019\u0018\u0017\u0016\u0015\n\u0015\u0014\u0013\u0012\u001e\u0011\u0018\u0010\n\n\u001f\n\n\u0018 \u001f\n\n\u0018 \u0018\u0015\b \u0018\u0007\u0016\u0006\u0006\n\n\u001f\n\n\u001e\u001d\u001c\u001b\n\n\u001e\u001d\u001f\u001a\n\n\u001e\u001d\u001c\u0019\n\n\u001f\n\n\u001e\u001d\u0019\u001c \u0016\u001e\u001d\u001e\u0017 \u001e\u001d\u001e\u0015\n\n\u001f\n\n\u001e\u001d\u001e\u0019 \u0016\u001e\u001d\u001e\u001c \u001e\u001d\u001e\u001f\n\n\u0015\u0014\u0013\u0012\u001e\u0011\u0018\u000f \u001e\u001d\u001c\u001b\n\n\u001f\n\n\u001e\u001d\u001e\u0018\n\n\u001e\u001d\u0019\u001a\n\n\u001e\u001d\u0019\u001c\n\n\u001f\n\n\u0016\u001e\u001d\u001e\u001b\n\n\u001e\u001d\u001e\u0019\n\n\u001f\n\n\u0015\u0014\u0013\u0012\u001e\u0011\u0018\u000e \u001e\u001d\u001f\u001a\n\n\u001e\u001d\u001e\u0018\n\n\u001f\n\n\u001e\u001d\u0017\u0018\n\n\u0016\u001e\u001d\u001e\u0017 \u0016\u001e\u001d\u001e\u001b\n\n\u001e\u001d\u001c\u0019\n\n\u001e\u001d\u0019\u001a\n\n\u001e\u001d\u0017\u0018\n\n\u001f\n\n\u001e\u001d\u001e\u0015\n\n\u001e\u001d\u001e\u001b\n\n\u001f\n\n\u0016\u001e\u001d\u001f\u001e\n\n\u0016\u001e\u001d\u001f\u001e\n\n\u001f\n\n\u0016\u001e\u001d\u001e\u001c \u0016\u001e\u001d\u001e\u001b\n\n\u0016\u001e\u001d\u001e\u001b\n\n\u0017\u0012\n\u0017\u0013\n\n\u0010\u0005\u0004\n\n\u0004\u0005\u0003\n\n\u0017\u0014\n\n\u0004\u0005\u0004\n\n\u0017\u0015\n\n\u001e\u001d\u001e\u001c\n\n\u001f\n\n\u0016\u001e\u001d\u001e\u0018\n\n\u0016\u001e\u001d\u001e\u0018\n\n\u001f\n\n\u0015\u0014\u0013\u0012\u001e\u0011\u0018\n\n\u001e\u001d\u001e\u001f\n\n\u001e\u001d\u001e\u001c\n\n\u001f\u001e\u001d\u001a\n\u001f\u001a\u001d\u001b\n\n\u001f\u001b\u001d\u001f\n\u001f\u001b\u001d\u0016\n\n\u0015\u0014\u0013\u0012\u0011\u0010\u000f\u000e\n\b\u0007\u0012\u0010\u000f\u000e\n\n\u001f\u001e\u001d\u001f\n\u001f\u001e\u001d\u001b\n\u001f\u001c\u001d\u001b\n\n\u001f\u001b\u001d\u0019\n\n\u001f\u001a\u001d\u0018\n\n\u001f\u001a\u001d\u001c\n\u001f\u001a\u001d\u001b\n\n\u001f\u001b\u001d\u0017\n\n\u001f\u001b\u001d\u001c\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0012\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0011\n\n\u001f\u001a\u001d\u0019\n\u001f\u001b\u001d\u0017\n\n\u0017\u0018\n\n\u0002\u0004\u0005\u0003\n\n\u001e\u001d\u001e\u001b\n\n\u001f\u001e\u001d\u001c\n\n\u0017\u0016\n\u0002\u0010\u0005\u0004\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0018\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0015\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0014\n\n\u001a\u0019\u0018\u0017\u0016\u0015\u0014\u0013\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u0010\n\n\u001f\u001e\u001d\u001c\u001b\u001a\u0019\u000f\n\nFigure 6. Ablation Study on the Number of Experts K (from 1\nto 8) on the MVTec-AD dataset.\n\nFigure 5. Ablation Study on Inter-Expert similarity heatmap\nat layer 18. The heatmap shows the average pairwise cosine similarity between expert features, computed on the MVTec-AD test\nset. Values approaching +1 (red) indicate high redundancy, while\nvalues approaching 0 (white) or negative values (blue) signify successful differentiation.\n\nExpert 1 and 2. Finally, the full MoECLIP model, combining FOFS with the ETF Loss, minimizes all remaining\nsimilarity, bringing the value between Expert 1 and 2 down\nto 0.02. This demonstrates that our approach forces experts\nto learn specialized, non-overlapping functions.\n\nlacking specialization still achieves a significant performance improvement. However, this model performs worse\nthan our MoECLIP model as it suffers from functional redundancy (Fig. 5), which our proposed FOFS and ETF Loss\nsolve to achieve the final performance. (b-c) Removing either the FOFS strategy or the ETF Loss individually causes\na performance drop, confirming both components are complementary and essential for resolving the functional redundancy mentioned in (a). (d) Removing the Depth-wise\nAdapter degrades both image-level and pixel-level performance, indicating its effectiveness in refining features. (e)\nNotably, removing the PAA module causes a significant performance decrease on medical datasets. This highlights that\naggregating multi-scale contextual information via PAA is\nimportant for medical domains.\n\nImpact of the Number of Experts: As shown in Fig. 6,\nincreasing the number of experts does not necessarily lead\nto performance improvements in the ZSAD task. We empirically set K = 4 as it yields the best results across both\npixel-level and image-level AUROC. This suggests a tradeoff: too few experts may under-specialize, while too many\ncan cause functional redundancy.\nAdditional analyses are provided in supplementary Sec. C\n\n6. Conclusion\nIn this paper, we propose MoECLIP, a novel MoE-based\nframework that introduces patch-level adaptation to the\nZSAD task, overcoming the patch-agnostic design limitations of existing approaches. MoECLIP achieves this by dynamically routing each image patch to a specialized LoRA\nexpert based on its unique characteristics. Furthermore, to\nsolve the inherent functional redundancy problem in MoE\nand force expert differentiation, FOFS orthogonally separates the input feature space, and an ETF loss enforces an\nideal equiangular structure on the expert outputs. With this\ndesign, MoECLIP demonstrates its effectiveness and practical utility through comprehensive experiments on benchmark datasets spanning industrial and medical domains,\nconsistently outperforming existing SOTA methods.\n\nFunctional Redundancy: To quantitatively assess functional redundancy, we analyze the inter-expert cosine similarity as shown in Fig. 5. This matrix is computed by averaging the similarity between expert-specific features, which\nare derived by averaging all patch features that selected that\nexpert (via Top-k) within each image, across the MVTecAD dataset. The Original MoE exhibits high similarity,\nwith the value between Expert 1 and 2 reaching 0.45, indicating significant functional redundancy. While introducing\nthe FOFS strategy alone substantially reduces this similarity, a notable positive similarity of 0.24 persists between\n8\n\n\fAcknowledgement\n\nual learning. IEEE Transactions on Multimedia, 2025. 2,\n18\n[11] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and\nRomaric Audigier. Padim: a patch distribution modeling\nframework for anomaly detection and localization. In International conference on pattern recognition, pages 475–489.\nSpringer, 2021. 1\n[12] Hanqiu Deng and Xingyu Li. Anomaly detection via reverse\ndistillation from one-class embedding. In Proceedings of\nthe IEEE/CVF conference on computer vision and pattern\nrecognition, pages 9737–9746, 2022. 1\n[13] Nan Du, Yanping Huang, Andrew M Dai, Simon Tong,\nDmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi\nZhou, Adams Wei Yu, Orhan Firat, et al. Glam: Efficient\nscaling of language models with mixture-of-experts. In International conference on machine learning, pages 5547–\n5569. PMLR, 2022. 2\n[14] William Fedus, Barret Zoph, and Noam Shazeer. Switch\ntransformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39, 2022. 2\n[15] Jinyuan Feng, Zhiqiang Pu, Tianyi Hu, Dongmin Li, Xiaolin Ai, and Huimu Wang. Omoe: Diversifying mixture of\nlow-rank adaptation by orthogonal finetuning. arXiv preprint\narXiv:2501.10062, 2025. 2\n[16] Jinyuan Feng, Chaopeng Wei, Tenghai Qiu, Tianyi Hu,\nand Zhiqiang Pu. Comoe: Contrastive representation for\nmixture-of-experts in parameter-efficient fine-tuning. arXiv\npreprint arXiv:2505.17553, 2025. 2, 18\n[17] Tharindu Fernando, Harshala Gammulle, Simon Denman,\nSridha Sridharan, and Clinton Fookes. Deep learning for\nmedical anomaly detection–a survey. ACM Computing Surveys (CSUR), 54(7):1–37, 2021. 1\n[18] Walter Gander. Algorithms for the qr decomposition. Res.\nRep, 80(02):1251–1268, 1980. 4\n[19] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Hao\nLi, Ming Tang, and Jinqiao Wang. Filo: Zero-shot anomaly\ndetection by fine-grained description and high-quality localization. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 2041–2049, 2024. 2, 5\n[20] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Wei\nGe, Ming Tang, and Jinqiao Wang. Anomalymoe: Towards\na language-free generalist model for unified visual anomaly\ndetection. arXiv preprint arXiv:2508.06203, 2025. 2\n[21] Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song,\nRuoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi\nWang, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning\ncapability in llms via reinforcement learning. arXiv preprint\narXiv:2501.12948, 2025. 2\n[22] Jia Guo, Shuai Lu, Weihang Zhang, Fang Chen, Huiqi Li,\nand Hongen Liao. Dinomaly: The less is more philosophy in\nmulti-class unsupervised anomaly detection. In Proceedings\nof the Computer Vision and Pattern Recognition Conference,\npages 20405–20415, 2025. 1\n[23] Zeyu Han, Chao Gao, Jinyang Liu, Jeff Zhang, and Sai Qian\nZhang. Parameter-efficient fine-tuning for large models: A\ncomprehensive survey. arXiv preprint arXiv:2403.14608,\n2024. 2\n\nThis research was supported by the Korea Institute for Advancement of Technology (KIAT) grant funded by the Korea Government (MOTIE) (No. P0023675, HRD Program\nfor Industrial Innovation).\n\nReferences\n[1] Toshimichi Aota, Lloyd Teh Tzer Tong, and Takayuki\nOkatani. Zero-shot versus many-shot: Unsupervised texture\nanomaly detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages\n5564–5572, 2023. 6, 13\n[2] Jinan Bao, Hanshi Sun, Hanqiu Deng, Yinsheng He, Zhaoxiang Zhang, and Xingyu Li. Bmad: Benchmarks for medical\nanomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages\n4042–4053, 2024. 6, 13\n[3] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. Mvtec ad–a comprehensive real-world\ndataset for unsupervised anomaly detection. In Proceedings\nof the IEEE/CVF conference on computer vision and pattern\nrecognition, pages 9592–9600, 2019. 1, 6, 12\n[4] Jorge Bernal, F Javier Sánchez, Gloria FernándezEsparrach, Debora Gil, Cristina Rodrı́guez, and Fernando\nVilariño. Wm-dova maps for accurate polyp highlighting\nin colonoscopy: Validation vs. saliency maps from physicians. Computerized medical imaging and graphics, 43:99–\n111, 2015. 6, 13\n[5] Erdi Çallı, Ecem Sogancioglu, Bram Van Ginneken, Kicky G\nvan Leeuwen, and Keelin Murphy. Deep learning for chest xray analysis: A survey. Medical image analysis, 72:102125,\n2021. 1\n[6] Yunkang Cao, Xiaohao Xu, Jiangning Zhang, Yuqi Cheng,\nXiaonan Huang, Guansong Pang, and Weiming Shen. A survey on visual anomaly detection: Challenge, approach, and\nprospect. arXiv preprint arXiv:2401.16402, 2024. 1\n[7] Yunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng,\nWeiming Shen, and Giacomo Boracchi. Adaclip: Adapting\nclip with hybrid learnable prompts for zero-shot anomaly detection. In European Conference on Computer Vision, pages\n55–72. Springer, 2024. 1, 2, 5, 6, 14\n[8] Xuhai Chen, Yue Han, and Jiangning Zhang. April-gan:\nA zero-/few-shot anomaly classification and segmentation\nmethod for cvpr 2023 vand workshop challenge tracks 1&amp;2:\n1st place on zero-shot ad and 4th place on few-shot ad. arXiv\npreprint arXiv:2305.17382, 2023. 1, 2, 5, 6, 14\n[9] Xuhai Chen, Jiangning Zhang, Guanzhong Tian, Haoyang\nHe, Wuhao Zhang, Yabiao Wang, Chengjie Wang, and Yong\nLiu. Clip-ad: A language-guided staged dual-path model for\nzero-shot anomaly detection. In International Joint Conference on Artificial Intelligence, pages 17–33. Springer, 2024.\n2\n[10] Yawen Cui, Jian Zhao, Zitong Yu, Rizhao Cai, Xun Wang,\nLei Jin, Alex C Kot, Li Liu, and Xuelong Li. Cmoa: Contrastive mixture of adapters for generalized few-shot contin-\n\n9\n\n\f[24] Haoyang He, Yuhu Bai, Jiangning Zhang, Qingdong He,\nHongxu Chen, Zhenye Gan, Chengjie Wang, Xiangtai Li,\nGuanzhong Tian, and Lei Xie. Mambaad: Exploring state\nspace models for multi-class unsupervised anomaly detection. Advances in Neural Information Processing Systems,\n37:71162–71187, 2024. 1\n[25] Liren He, Zhengkai Jiang, Jinlong Peng, Wenbing Zhu,\nLiang Liu, Qiangang Du, Xiaobin Hu, Mingmin Chi, Yabiao\nWang, and Chengjie Wang. Learning unified reference representation for unsupervised multi-class anomaly detection. In\nEuropean Conference on Computer Vision, pages 216–232.\nSpringer, 2024. 1\n[26] Steven A Hicks, Debesh Jha, Vajira Thambawita, Pål\nHalvorsen, Hugo L Hammer, and Michael A Riegler. The\nendotect 2020 challenge: evaluation and comparison of classification, segmentation and inference time for endoscopy.\nIn Pattern Recognition. ICPR International Workshops and\nChallenges: Virtual Event, January 10-15, 2021, Proceedings, Part VIII, pages 263–274. Springer, 2021. 6, 14\n[27] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry\nKalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv\npreprint arXiv:1704.04861, 2017. 5\n[28] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan AllenZhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al.\nLora: Low-rank adaptation of large language models. ICLR,\n1(2):3, 2022. 2, 3\n[29] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang,\nAvinash Ravichandran, and Onkar Dabeer. Winclip: Zero/few-shot anomaly classification and segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision\nand Pattern Recognition, pages 19606–19616, 2023. 1, 2, 6,\n14\n[30] Debesh Jha, Pia H Smedsrud, Michael A Riegler, Pål\nHalvorsen, Thomas De Lange, Dag Johansen, and Håvard D\nJohansen. Kvasir-seg: A segmented polyp dataset. In\nMultiMedia modeling: 26th international conference, MMM\n2020, Daejeon, South Korea, January 5–8, 2020, proceedings, part II 26, pages 451–462. Springer, 2020. 6, 14\n[31] Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux,\nArthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna,\nFlorian Bressand, et al. Mixtral of experts. arXiv preprint\narXiv:2401.04088, 2024. 2\n[32] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao\nChen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam\nShazeer, and Zhifeng Chen. Gshard: Scaling giant models\nwith conditional computation and automatic sharding. arXiv\npreprint arXiv:2006.16668, 2020. 2\n[33] Dengchun Li, Yingzi Ma, Naizheng Wang, Zhengmao Ye,\nZhiyuan Cheng, Yinghao Tang, Yan Zhang, Lei Duan, Jie\nZuo, Cal Yang, et al. Mixlora: Enhancing large language\nmodels fine-tuning with lora-based mixture of experts. arXiv\npreprint arXiv:2404.15159, 2024. 2\n[34] Xurui Li, Ziming Huang, Feng Xue, and Yu Zhou. Musc:\nZero-shot industrial anomaly classification and segmentation with mutual scoring of the unlabeled images. In The\n\nTwelfth International Conference on Learning Representations, 2024. 5\n[35] Yiting Li, Adam Goodge, Fayao Liu, and Chuan-Sheng Foo.\nPromptad: Zero-shot anomaly detection using text prompts.\nIn Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1093–1102, 2024. 1\n[36] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and\nPiotr Dollár. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer\nvision, pages 2980–2988, 2017. 5, 15\n[37] Boan Liu, Liang Ding, Li Shen, Keqin Peng, Yu Cao, Dazhao\nCheng, and Dacheng Tao. Diversifying the mixture-ofexperts representation for language models with orthogonal\noptimizer. arXiv preprint arXiv:2310.09762, 2023. 2\n[38] Wenxin Ma, Xu Zhang, Qingsong Yao, Fenghe Tang,\nChenxu Wu, Yingtai Li, Rui Yan, Zihang Jiang, and S Kevin\nZhou. Aa-clip: Enhancing zero-shot anomaly detection via\nanomaly-aware clip. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 4744–4754,\n2025. 1, 2, 3, 5, 6, 14, 15, 18\n[39] Shiyuan Meng, Wenchao Meng, Qihang Zhou, Shizhong Li,\nWeiye Hou, and Shibo He. Moead: A parameter-efficient\nmodel for multi-class anomaly detection. In European Conference on Computer Vision, pages 345–361. Springer, 2024.\n2, 5, 15\n[40] Fausto Milletari, Nassir Navab, and Seyed-Ahmad Ahmadi.\nV-net: Fully convolutional neural networks for volumetric\nmedical image segmentation. In 2016 fourth international\nconference on 3D vision (3DV), pages 565–571. Ieee, 2016.\n5, 16\n[41] Pankaj Mishra, Riccardo Verk, Daniele Fornasier, Claudio\nPiciarelli, and Gian Luca Foresti. Vt-adl: A vision transformer network for image anomaly detection and localization. In 2021 IEEE 30th International Symposium on Industrial Electronics (ISIE), pages 01–06. IEEE, 2021. 6, 13\n[42] Yurui Pan, Lidong Wang, Yuchao Chen, Wenbing Zhu,\nBo Peng, and Mingmin Chi. Pa-clip: Enhancing zeroshot anomaly detection through pseudo-anomaly awareness.\narXiv preprint arXiv:2503.01292, 2025. 5\n[43] Vardan Papyan, XY Han, and David L Donoho. Prevalence\nof neural collapse during the terminal phase of deep learning\ntraining. Proceedings of the National Academy of Sciences,\n117(40):24652–24663, 2020. 2, 3\n[44] Zhen Qu, Xian Tao, Mukesh Prasad, Fei Shen, Zhengtao\nZhang, Xinyi Gong, and Guiguang Ding. Vcp-clip: A visual\ncontext prompting model for zero-shot anomaly segmentation. In European Conference on Computer Vision, pages\n301–317. Springer, 2024. 2\n[45] Zhen Qu, Xian Tao, Xinyi Gong, Shichen Qu, Qiyu Chen,\nZhengtao Zhang, Xingang Wang, and Guiguang Ding.\nBayesian prompt flow learning for zero-shot anomaly detection. In Proceedings of the Computer Vision and Pattern\nRecognition Conference, pages 30398–30408, 2025. 1, 2, 3,\n6, 14\n[46] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya\nRamesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,\nAmanda Askell, Pamela Mishkin, Jack Clark, et al. Learning\n\n10\n\n\fSolomon. Asymmetry in low-rank adapters of foundation\nmodels. arXiv preprint arXiv:2402.16842, 2024. 4\n[58] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang,\nand Onkar Dabeer. Spot-the-difference self-supervised pretraining for anomaly detection and segmentation. In European conference on computer vision, pages 392–408.\nSpringer, 2022. 6, 13\n\ntransferable visual models from natural language supervision. In International conference on machine learning, pages\n8748–8763. PmLR, 2021. 1, 6, 15\n[47] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard\nSchölkopf, Thomas Brox, and Peter Gehler. Towards total recall in industrial anomaly detection. In Proceedings\nof the IEEE/CVF conference on computer vision and pattern\nrecognition, pages 14318–14328, 2022. 1\n[48] Mohammadreza Salehi, Niousha Sadjadi, Soroosh\nBaselizadeh, Mohammad H Rohban, and Hamid R Rabiee. Multiresolution knowledge distillation for anomaly\ndetection.\nIn Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages\n14902–14912, 2021. 6, 14, 18\n[49] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das,\nRamakrishna Vedantam, Devi Parikh, and Dhruv Batra.\nGrad-cam: Visual explanations from deep networks via\ngradient-based localization. In Proceedings of the IEEE international conference on computer vision, pages 618–626,\n2017. 7\n[50] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy\nDavis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixtureof-experts layer. arXiv preprint arXiv:1701.06538, 2017. 2,\n3, 5, 15\n[51] Nima Tajbakhsh, Suryakanth R Gurudu, and Jianming\nLiang. Automated polyp detection in colonoscopy videos\nusing shape and context information. IEEE transactions on\nmedical imaging, 35(2):630–644, 2015. 6, 13\n[52] David Vázquez, Jorge Bernal, F Javier Sánchez, Gloria\nFernández-Esparrach, Antonio M López, Adriana Romero,\nMichal Drozdzal, and Aaron Courville. A benchmark for endoluminal scene segmentation of colonoscopy images. Journal of healthcare engineering, 2017(1):4037190, 2017. 6,\n13\n[53] Julian Wyatt, Adam Leach, Sebastian M Schmon, and\nChris G Willcocks. Anoddpm: Anomaly detection with denoising diffusion probabilistic models using simplex noise.\nIn Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 650–656, 2022. 1\n[54] Haomin Yu, Qingyong Li, Yunqiang Tan, Jinrui Gan, Jianzhu\nWang, Yangli-ao Geng, and Lei Jia. A coarse-to-fine model\nfor rail surface defect detection. IEEE Transactions on Instrumentation and Measurement, 68(3):656–666, 2018. 6,\n13\n[55] Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, and\nJiming Chen. Anomalyclip: Object-agnostic prompt learning for zero-shot anomaly detection.\narXiv preprint\narXiv:2310.18961, 2023. 1, 2, 3, 5, 6, 14\n[56] Bingke Zhu, Zhaopeng Gu, Guibo Zhu, Yingying Chen,\nMing Tang, and Jinqiao Wang. Adformer: Generalizable\nfew-shot anomaly detection with dual cnn-transformer architecture. IEEE Transactions on Instrumentation and Measurement, 2024. 1\n[57] Jiacheng Zhu, Kristjan Greenewald, Kimia Nadjahi, Haitz\nSáez De Ocáriz Borde, Rickard Brüel Gabrielsson, Leshem\nChoshen, Marzyeh Ghassemi, Mikhail Yurochkin, and Justin\n\n11\n\n\fMoECLIP: Patch-Specialized Experts for Zero-shot Anomaly Detection\nSupplementary Material\nContents\n\nA. Algorithm Implementation\n\nA. Algorithm Implementation\n\n12\n\nAlgorithm 1 provides pseudocode to illustrate MoECLIP’s\ncore feature adaptation logic with specialization.\n\nB. Additional Information\n\n12\n\nAlgorithm 1 MoE Feature Adaptation with Specialization\n\nB.1. Data Descriptions . . . . . . . . . . . . . .\n\n12\n\nInput: Patch features F l ∈ RL×d from the l-th ViT layer;\nMoE module M l with K experts; Top-k value k.\n\nB.2. Comparison Method Details . . . . . . . . .\n\n14\n\nl\nOutput: Adapted patch features FMoE\n; ETF Loss Letf .\n\nB.3. Detailed Experimental Setup . . . . . . . . .\n\n15\n\nB.4. Text Prompt . . . . . . . . . . . . . . . . .\n\n15\n\nB.5. Details of Balance Loss . . . . . . . . . . .\n\n15\n\nB.6. Details of Focal Loss and Dice Loss . . . . .\n\n15\n\n\\triangleright  Step 1: FOFS-based expert initialization\nexperts {Enl (Aln , Bnl )}K\nn=1 using FOFS\n(Eq. (6)); Aln frozen, Bnl trainable.\n\n1: Initialize\n\n\\triangleright  Step 2: Routing scores for all patches\nl\n\n2: Rl ← Softmax(Router (F l ))\n\n(Rl ∈ RL×K )\n\n\\triangleright  Step 3: Perform patch-wise routing and adaptation\n← [ ] \\triangleright  Initialize list to collect expert outputs for\nETF loss\n4: for each patch i = 1, . . . , L do\n5:\nExtract patch routing scores Ril from Rl .\n6:\nCompute normalized Top-k weights R̂il (Eq. (1)).\n7:\n\\triangleright  Compute all K expert outputs\n8:\nEi ← [Enl (Fil ) for n = 1, . . . , K]\n9:\nE.append(Ei )\n10:\n\\triangleright  Compute P\nweighted sum using normalized weights\nK\nl\nl\n11:\nFi,expert\n← n=1 R̂i,n\n· Ei,n\n\\triangleright  Normalization and residual connection\n12:\nl\nl\nl\n13:\nFi,norm\n← Fi,expert\n· (||Fil ||2 /(||Fi,expert\n||2 + ϵ))\nl\nl\n14:\nFi,MoE\n← λM oE · Fi,norm\n+ (1 − λM oE ) · Fil\n15: end for\n3: E\n\nC. Additional Experimental Analysis\n\n16\n\nC.1. Analysis of Model Configurations . . . . . .\n\n16\n\nC.2. Analysis of Training on Medical Data . . . .\n\n18\n\nC.3. Analysis of Computation Overhead . . . . .\n\n18\n\nD. Theoretical Grounding for MoE in ZSAD\n\n18\n\nE. Analysis of Expert Specialization\n\n19\n\nE.1. Expert Utilization . . . . . . . . . . . . . .\n\n19\n\nE.2. Expert Interpretability . . . . . . . . . . . .\n\n19\n\nF. Detailed Quantitative Results\n\n16: Etensor ← Stack(E) \\triangleright  Shape: L × K × d\n17: Compute ETF Loss Letf from Etensor (Eq. (8)).\nl\n18: return FMoE\n, Letf\n\n20\n\nF.1. Performance Results for All Categories . . .\n\n20\n\nF.2. Inter-Expert Similarity . . . . . . . . . . . .\n\n20\n\nB. Additional Information\nB.1. Data Descriptions\n\nG. More Visualization Results\nG.1. Multi-layer and Multi-Scale Maps . . . . . .\n\n20\n\nG.2. Grad-CAM and Patch Selection Map . . . .\n\n20\n\nG.3. Final Anomaly Map . . . . . . . . . . . . .\n\n20\n\nH. Limitations and Future Work\n\nWe evaluated the zero-shot anomaly detection (ZSAD) performance of our proposed method on a total of 14 publicly\navailable datasets, including five industrial and nine medical\ndatasets, as presented in Tab. 3.\n\n20\n\n• MVTec-AD [3] is a benchmark dataset widely used for\nindustrial anomaly detection. It comprises 15 object categories, with images captured by high-resolution industrial\ncameras. In this study, we use only the test set, which\ncontains 467 normal and 1,258 anomalous images. Each\n\n20\n\n12\n\n\fTable 3. Summary of key statistics for the 14 publicly available industrial and medical datasets used in our study. It reports the number of\nclasses, normal and anomalous images, and data types. The last column indicates the availability of evaluation (Pixel-level / Image-level),\nwhere ’X’ denotes cases not applicable due to the absence of ground truth masks or normal images.\nDomain\n\nDataset\n\n#Classes\n\n#Normal Images\n\n#Anomalous Images\n\nData Types\n\nEvaluation (Pixel / Image)\n\nIndustrial\n\nMVTec\nVisA\nBTAD\nRSDD\nDTD-synthetic\n\n15\n12\n3\n1\n12\n\n467\n962\n451\n387\n375\n\n1,258\n1,200\n290\n387\n947\n\nobject &amp; texture\nobject\nobject &amp; texture\ntexture\ntexture\n\n(O, O)\n(O, O)\n(O, O)\n(O, O)\n(O, O)\n\nMedical\n\nBrain MRI\nHead CT\nLiver CT\nRetina OCT\nColonDB\nClinicDB\nCVC-300\nEndo\nKvasir\n\n1\n1\n1\n1\n1\n1\n1\n1\n1\n\n640\n100\n833\n1,041\n0\n0\n0\n0\n0\n\n1,013\n100\n660\n764\n380\n612\n60\n200\n1,000\n\nbrain\nbrain\nLiver\nRetina\nColon\nColon\nColon\nColon\nColon\n\n(O, O)\n(X, O)\n(O, O)\n(O, O)\n(O, X)\n(O, X)\n(O, X)\n(O, X)\n(O, X)\n\nanomalous image is accompanied by a pixel-level defect\nmask, enabling both image-level classification and pixellevel anomaly segmentation evaluation.\n\n640 normal and 1,013 anomalous images. Each anomalous image is accompanied by a pixel-level defect mask,\nenabling both image-level classification and pixel-level\nanomaly segmentation evaluation.\n\n• VisA [58] is a benchmark dataset for industrial anomaly\ndetection that includes surface and structural defects of\nmanufactured products. It comprises 12 object categories,\nsuch as PCB, capsules, and candle. In this study, we employ only the test set, which contains 962 normal and\n1,200 anomalous images. Each anomalous image provides a pixel-level defect mask, allowing both image-level\nclassification and pixel-level anomaly segmentation evaluation.\n\n• Liver CT [2] is a medical dataset composed of liver CT\nscans. We utilize its test set, which consists of 833 normal and 660 anomalous images. Pixel-level segmentation\nmasks are provided, enabling both image-level classification and pixel-level anomaly segmentation evaluation.\n• Retina OCT [2] is a medical dataset consisting of retinal images captured using Optical Coherence Tomography (OCT). We utilize its test set, which consists of 1,041\nnormal and 764 anomalous images. Pixel-level annotations of anomalous regions are provided, enabling both\nimage-level and pixel-level evaluation.\n\n• BTAD [41] is an industrial anomaly detection dataset collected from real manufacturing environments. It includes\nthree product categories. In this study, we use only the\ntest set, which contains 451 normal and 290 anomalous\nimages.\n\n• CVC-ColonDB [51] is a medical anomaly detection dataset consisting of polyp images captured from\ncolonoscopy procedures. The dataset contains 380\nanomalous images, each accompanied by a pixel-level\nmask, but no normal samples. Due to the absence of normal data, we use this dataset exclusively for pixel-level\nanomaly segmentation evaluation.\n\n• RSDD [54] is an industrial anomaly detection dataset\ndesigned for rail surface defect detection, consisting of\ntwo object-type categories. In this study, we use the test\nset, which includes 387 normal and 387 anomalous images. Pixel-level annotations are provided, allowing both\nimage-level classification and pixel-level anomaly segmentation evaluation.\n\n• CVC-ClinicDB [4] is a medical anomaly detection\ndataset composed of polyp images obtained from\ncolonoscopy examinations. Similar to CVC-ColonDB,\nit provides pixel-level segmentation masks and contains\n612 anomalous images without any normal samples.\nThus, it is used exclusively for pixel-level anomaly segmentation evaluation.\n\n• DTD-Synthetic [1] is a dataset generated by synthesizing data from 12 texture categories. Despite being synthetically created, it provides pixel-level anomaly masks,\nallowing evaluation at both the image and pixel levels. In\nthis study, the dataset includes 375 normal images and\n947 anomalous images.\n\n• CVC-300 [52] is a medical anomaly detection dataset\nconsisting of polyp images captured from colonoscopy\nprocedures. It contains only 60 anomalous images with\npixel-level annotations and no normal samples. Ac-\n\n• Brain MRI [2] is a medical dataset consisting of brain\nMRI scans used for detecting various types of brain lesions. In this study, we use the test set, which includes\n\n13\n\n\fcordingly, we use this dataset exclusively for pixel-level\nanomaly segmentation evaluation.\n\nencoder—into the joint embedding space. This approach\nenhances CLIP from a classification-only model to one\ncapable of segmentation, allowing it to visually highlight\nwhere anomalies occur. We evaluate the model using the\nofficial pre-trained weights.\n\n• Endo [26] is a medical anomaly detection dataset for\npolyp detection, comprising colon endoscopy images. It\ncontains 200 anomalous images with pixel-level annotations and no normal samples. Consequently, this dataset\nis evaluated exclusively on pixel-level anomaly segmentation.\n\n• AnomalyCLIP [55] argues that the original CLIP model\nlacks the ability to distinguish between normal and abnormal concepts, which leads to degraded zero-shot anomaly\ndetection (ZSAD) performance. To address this issue,\nthis paper proposes an object-agnostic prompt learning\nstrategy. Instead of explicitly including object class\nnames, the method learns text prompts designed to capture generic indicators of normality and abnormality.\nThese prompts are trained through a glocal context optimization process that combines global and local losses on\nan auxiliary dataset, while the visual encoder is fine-tuned\nusing a Diagonally Prominent Attention Map (DPAM) to\nenhance local visual features. This approach allows the\nmodel to focus on shared anomaly patterns rather than\nobject-specific semantics, enabling better generalization\nto unseen object categories. We evaluate the model using\nthe official pre-trained weights.\n\n• Kvasir [30] is a medical anomaly detection dataset consisting of colon endoscopy images. It contains 1,000\nanomalous images, each annotated with pixel-level masks\nfor polyps, and includes no normal samples. In this\nstudy, we employ this dataset exclusively for pixel-level\nanomaly segmentation evaluation.\n• Head CT [48] is a medical dataset consisting of head CT\nscans used for detecting brain anomalies such as hemorrhages and tumors. In this study, we employ the refined\nversion curated by AdaCLIP [7]. The test set comprises\n100 normal and 100 anomalous images. As this version\nprovides only image-level labels, it is used exclusively for\nimage-level anomaly classification.\n\nB.2. Comparison Method Details\n\n• AdaCLIP [7] highlights the limitations of existing Static\nPrompt and Dynamic Prompt-based models, as well as\nthe shortcomings of simple image-level detection approaches. To address these issues, this paper introduces a\nhybrid learnable prompts mechanism that combines static\nprompts—which provide basic adaptation for zero-shot\nanomaly detection (ZSAD)—with Dynamic Prompts that\nenable dynamic adaptation. These prompts are applied\nto both the image encoder and the text encoder. In addition, a Hybrid Semantic Fusion module is introduced to\nenhance image-level detection performance. We re-train\nthe model using the official code and configuration.\n\nFor a fair comparison, we unify the backbone to OpenCLIP\nViT-L/14-336 across all baselines except WinCLIP [29],\nwhere we cite standard ViT-B/16+ -240 results [29, 45] as\nthe official code is unavailable. Furthermore, all competing\nmodels that require an auxiliary training phase are evaluated\nusing weights trained on the VisA dataset under this unified\nsetting (conversely, weights trained on MVTec-AD are used\nwhen evaluating on VisA).\n• WinCLIP [29] identifies that the original CLIP model is\ntrained only on global embeddings, and its last visual feature maps before pooling are not well aligned with the\nlanguage space, which limits its zero-shot segmentation\nperformance. To address this issue, this paper proposes\na window-based strategy. In this approach, the input image is divided into multi-scale sliding windows, and each\nmasked image is independently passed through the CLIP\nimage encoder to extract window-level global features\nthat are aligned with the language space. In addition,\na Compositional Prompt Ensemble is introduced, which\ncombines state words and prompt templates to better define normal and anomalous conditions. We use the results\nof WinCLIP reported in [29, 45].\n\n• AA-CLIP [38] is the first to identify the unique anomaly\nunawareness problem of the original CLIP model — its\ninability to distinguish subtle semantic differences between normal and anomalous concepts. To address this\nissue, this paper proposes an effective two-stage adaptation strategy. In the first stage, the visual encoder is kept\nfrozen, and the text encoder is adapted using a Residual\nAdapter and a Disentangle Loss to clearly separate normal and abnormal text anchors. In the second stage, the\nlearned text anchors are fixed, and the visual encoder is\nfine-tuned with a Residual Adapter so that its patch-level\nfeatures align with these text anchors. This controlled\ntwo-stage approach preserves CLIP’s strong generalization ability while efficiently injecting anomaly-aware information, thereby improving zero-shot performance. We\nre-train the model using the official code and configuration.\n\n• APRIL-GAN [8] points out that the patch-level image\nfeatures in the original CLIP model are not properly\nmapped to a joint embedding space aligned with text features. To address this limitation, this paper introduces\nadditional linear layers that map fine-grained patch features—extracted from multiple stages of the CLIP image\n\n• Bayes-PFL [45] points out the excessive engineering re14\n\n\fTable 4. Templates used for the Text Prompts\n\nquired for manual prompt design and the limited generalization ability of simple learnable prompts. To address this issue, this paper proposes Bayesian Prompt\nFlow Learning, which models the text prompt space as a\nlearnable probabilistic distribution from a Bayesian perspective. A Prompt Flow Module and a Residual CrossModal Attention Module are introduced to strengthen the\nalignment between dynamically generated text embeddings and fine-grained image patch features. We evaluate\nthe model using the official pretrained weights.\n\nState\nPrompt Template\nNormal Prompt\n\nAbnormal Prompt\n\nPrompt\n{}\na photo of a {}\n[class]\nthe [class]\na [class]\n[class] with damage\n[class] with defect\n[class] with flaw\ndamaged [class]\nbroken [class]\n\nB.3. Detailed Experimental Setup\nTo mitigate this issue, we employ an auxiliary balance loss\nLbal [39, 50], based on the squared Coefficient of Variation\n(CV2 ), that penalizes uneven load distribution. The CV2 is\ncomputed from the batch load vector B l , which represents\nthe total routing weight assigned to each of the K experts\nfrom all L patches at layer l, as shown in Eq. (B.1),\n\nWe implement MoECLIP using the OpenCLIP ViT-L/14336 architecture pre-trained by OpenAI [46], as our frozen\nbackbone. All input images are uniformly resized to 518 ×\n518. We integrate our MoE modules at the output of the l-th\nlayers of the Vision Encoder, where l ∈ {6, 12, 18, 24}, and\ntext features are extracted from the final layer of the text encoder. During the training phase, we apply data augmentation [38] with a 0.5 probability for each transformation, including random affine transformation, color jitter, random\nrotation, random horizontal flip, and random vertical flip.\nFor the model configuration, we set the total number of experts K to 4 with Top-2 routing via a linear router layer R,\na LoRA rank r to 8, a LoRA scaling factor α to 16, and a\nLoRA dropout rate of 0.05. We also set the MoE residual\nweight λM oE to 0.1, and the normalization ϵ to 1 × 10−6 .\nThe PAA module utilizes scales s ∈ {1, 3, 5}, and the auxiliary loss weights λetf and λbal are both set to 0.01. The projection layer used for aligning features to the text space is\nshared across all PAA scales within the same encoder layer.\nWe train the model for 20 epochs using the Adam optimizer\nwith β1 set to 0.5, β2 set to 0.999, and a batch size of 2.\nThe initial learning rate is 5 × 10−4 , which is decayed by\na factor of 0.5 at 16,000 and 32,000 iterations using a MultiStepLR scheduler. All experiments are conducted on 2 ×\nNVIDIA Tesla V100 16GB GPUs and an Intel(R) Xeon(R)\nGold 5120 CPU @ 2.20GHz, using PyTorch 2.3.1.\n\n  \\label {eq:cv_calculation} \\text {CV}^2(B^l) = \\frac {\\sigma (B^l)^2}{\\mu (B^l)^2 + \\epsilon }, \\quad \\text {where } B^l = \\sum _{i=1}^{L} R(F^l_i) \n(B.1)\nwhere R(Fil ) ∈ RK is the routing probability vector for\nthe i-th patch; µ(B l ) and σ(B l ) are the mean and standard\ndeviation of the load vector B l ; and ϵ is a small constant\n(1 × 10−6 ) for numerical stability. The final balance loss\nLbal is the sum of this CV2 value across all MoE layers,\nforcing the load distribution to be uniform by minimizing\nthe variance, as shown in Eq. (B.2):\n\n  \\label {eq:total_balance_loss} \\mathcal {L}_{bal} = \\sum _{l} \\left [ \\text {CV}^2\\left (\\sum _{i=1}^{L} R(F^l_i)\\right ) \\right ] = \\sum _{l} \\left [ \\text {CV}^2(B^l) \\right ] \n(B.2)\n\nB.6. Details of Focal Loss and Dice Loss\nFocal Loss: In anomaly segmentation, the extreme imbalance between vast normal regions and small anomalous areas causes standard Cross-Entropy loss to be overwhelmed\nby easy negative samples. This issue is mitigated by the Focal Loss [36], which down-weights the contribution of these\nhigh-confidence predictions to effectively focus learning on\nmisclassified or ambiguous samples. The Focal loss is defined as:\n\nB.4. Text Prompt\nFollowing the methodology of AA-CLIP [38], we adopt\nidentical prompt templates and descriptors as specified in\nTab. 4. Throughout the training and inference phases, the\n”[class]” token is substituted with the class-specific description, while either the normal or anomaly descriptor is\ninjected into the template.\n\n  \\label {eq:focal_loss} \\mathcal {L}_{Focal} = -\\frac {1}{N} \\sum _{i=1}^{N} (1 - p_i)^\\gamma \\log (p_i) \n\n(B.3)\n\nwhere N is the total number of pixels, pi is the predicted\nprobability, and γ is the focusing parameter that controls\nthe down-weighting rate of easy negative samples. As γ increases, the loss contribution of well-classified pixels (pi →\n1) is suppressed more aggressively, forcing the model to focus on hard, misclassified pixels with low predicted probabilities (pi → 0). In our implementation, we set γ to 2.\n\nB.5. Details of Balance Loss\nIn our MoE-based architecture, the router selects the optimal Top-k experts for each patch. A common failure mode\nis expert collapse, where the network favors a small subset of experts, which prevents genuine specialization because under-utilized experts receive few training signals.\n\n15\n\n\fFigure 7. Ablation study of hyperparameters on the MVTec-AD dataset.\nTable 5. Ablation study on different backbones, image resolutions,\nand patch sizes, evaluated on the MVTec-AD dataset. The best\nperformance is in bold.\n\nDice Loss: Complementing Focal Loss, the Dice Loss [40]\nis employed to directly optimize the overlap between the\npredicted anomaly map and the ground-truth mask. It is\nparticularly effective for small anomalous regions, as it is\ninsensitive to the dominance of large background regions.\nThe Dice loss is defined as:\n  \\label {eq:dice_loss} \\mathcal {L}_{Dice} = 1 - \\frac {2 \\sum _{i=1}^{N} y_i \\hat {y}_i}{\\sum _{i=1}^{N} y_i + \\sum _{i=1}^{N} \\hat {y}_i} \n\nBackbone\nViT-B/32-224\nViT-B/16-224\nViT-L/14-224\nViT-L/14-336\nViT-L/14-336\nViT-L-14-336\n\n(B.4)\n\nwhere yi and ŷi denote the ground truth and the predicted\nprobability for the i-th pixel in the image, respectively. Minimizing this loss effectively maximizes the overlap between\nthe prediction and the ground truth.\n\nPatch size\n32\n16\n14\n14\n14\n14\n\nImage Resolution\n448×448\n448×448\n518×518\n448×448\n518 × 518\n602×602\n\nImage-level\n\nPixel-level\n\nAUROC\n\nAP\n\nAUROC\n\nAP\n\n82.7\n87.9\n91.8\n93.1\n93.9\n93.3\n\n91.8\n94.7\n95.8\n96.7\n96.8\n96.7\n\n88.4\n90.9\n91.3\n91.0\n92.5\n91.1\n\n28.5\n39.3\n42.7\n45.2\n45.7\n45.4\n\nperformance. This indicates that r = 8 provides sufficient\ncapacity, while a higher rank may increase the risk of overfitting to the auxiliary dataset.\nThe Top-k analysis using a total of 4 experts demonstrates that k = 2 (Top-2 routing) clearly outperforms other\nvalues. This finding suggests that using more experts can be\ndetrimental to ZSAD performance, possibly by introducing\nnoise or redundant information, whereas k = 2 provides the\noptimal balance of specialized features.\n\nC. Additional Experimental Analysis\nC.1. Analysis of Model Configurations\nAnalysis of Model Hyperparameters: Fig. 7 presents\nthe results of our model hyper-parameter analysis on the\nMVTec-AD dataset. We first analyze the image adapt\nweight λMoE , which balances the original CLIP feature\nl\nFil against the adapted MoE feature Fi,norm\n(Eq. (5)). A\nsmall value of 0.1 yields the best performance, while relying more heavily on the adapted features via larger λMoE\nvalues causes a significant performance degradation after\n0.4. This strongly suggests that relying too heavily on the\nadapted features damages the vital generalization capability\npreserved in the original frozen CLIP features.\nFor the auxiliary loss weights, both λ1 (ETF) and λ2\n(Balance) achieve optimal results at 0.01. Disabling these\nlosses or weighting them too heavily degrades ZSAD performance, confirming that a small amount of regularization\nis crucial for expert specialization and stability.\nThe LoRA rank r analysis shows that performance peaks\nat r = 8. Increasing the rank does not guarantee better\n\nAnalysis of Backbone, Resolution, and Patch Size: In\nTab. 5, we analyze the influence of backbone, patch size,\nand image resolution. First, a clear trend emerges with\npatch size: decreasing the patch size from 32 (ViT-B/32)\nto 16 (ViT-B/16) significantly improves performance. This\nsuggests that smaller patches provide more detailed local\ninformation, which is crucial for identifying anomalous regions. Similarly, scaling the model backbone from ViT-B to\nViT-L also yields a substantial performance increase, confirming the benefit of a larger model capacity. Regarding\nimage resolution, performance generally improves when increasing the size from 448×448 to 518×518 using the ViTL/14-336 model. However, we observe a performance drop\nwhen increasing the resolution further to 602 × 602. This\nindicates a potential trade-off, suggesting that resolutions\nsignificantly larger than the model’s pre-training resolution\n\n16\n\n\f(336 × 336) may not be optimal. Based on this analysis,\nthe ViT-L/14-336 model using a 518 × 518 input resolution\nachieves the best performance. Therefore, we select this\nconfiguration as the default backbone for MoECLIP.\n\nSingle-layer vs. Multi-layer Features: In Tab. 8, we further examine the contribution of features extracted from\nindividual ViT layers compared to a multi-layer ensemble. Using a single layer yields highly different performance characteristics depending on depth: early layers\n(e.g., Layer 6) provide limited semantic discrimination, resulting in lower image-level AUROC and AP scores, while\ndeeper layers (e.g., Layers 12, 18, and 24) yield progressively stronger results due to richer semantic abstractions.\nHowever, none of the single-layer configurations surpass\nthe multi-layer ensemble, which aggregates features from\nLayers 6, 12, 18, and 24. The ensemble achieves the best\nperformance across both image-level and pixel-level metrics, demonstrating that complementary information from\nmultiple hierarchical stages is essential for robust anomaly\ndetection. These results highlight the benefit of leveraging\nmulti-layer ViT features rather than relying on a single feature depth.\n\nFixed-Prompt Ensemble vs. Learnable Prompt: In\nTab. 6, we investigate the impact of our text prompt design. The default MoECLIP configuration utilizes an ensembling strategy based on a set of fixed base prompts (e.g.,\n“a photo of a”) combined with state-specific words (“damaged”, “broken”, etc.) and the class name. We compare this\nfixed prompt ensemble strategy against an alternative design based on prompt tuning, where the base prompts are\nreplaced with learnable parameters. The results indicate\nthat our fixed-prompt design achieves higher AUROC/AP\nscores than the learnable-parameter variant at both the image and pixel levels. This suggests that while prompt tuning\noffers flexibility, it may be prone to overfitting on the auxiliary dataset. Our use of a fixed-prompt ensemble appears to\nbetter preserve the generalization capabilities of the original\nCLIP model, leading to superior ZSAD performance.\n\nTable 8. Ablation study on the multi-layer feature ensemble.\nThe table compares our ’Ensemble’ method (aggregating 4 layers) against configurations using features from only a single ViT\nlayer (6, 12, 18, or 24). The best performance is in bold.\n\nTable 6. Comparison of fixed vs. learnable text prompt strategies.\nThe table compares our default fixed-prompt ensemble against\na learnable prompt tuning variant, evaluated on the MVTec-AD\ndataset. The best performance is in bold.\nMethod\n\nMoECLIP (Fixed)\nMoECLIP (Learnable)\n\nImage-level\n\nPrompt\ntn = a photo of a [class]\nta = a photo of a [state][class]\ntn = [V1 ][V2 ][V3 ][V4 ][class]\nta = [W1 ][W2 ][W3 ][W4 ][state][class]\n\nLayers\n\nPixel-level\n\nAUROC\n\nAP\n\nAUROC\n\nAP\n\n93.9\n\n96.8\n\n92.5\n\n45.7\n\n92.2\n\n96.3\n\n91.9\n\n44.1\n\nAnalysis of MoE Module Placement: In Tab. 7, we analyze the effect of placing MoE modules at different ViT\nlayers. We observe that integrating modules in a concentrated block—either at the shallow layers (e.g., 1–4) or the\ndeep layers (e.g., 20–24)—yields suboptimal results. Similarly, a dense integration across 8 layers (e.g., 3, 6, 9...24)\nalso underperforms, particularly in Pixel-Level AUROC. In\ncontrast, our chosen strategy of sparsely integrating modules at four key layers (6, 12, 18, and 24) achieves superior\nAUROC and AP scores at both the image and pixel levels.\nThese results suggest that integrating MoE capacity strategically across a few key stages leverages complementary\nrepresentations from different depths more effectively than\neither concentrated or overly dense approaches.\n\nAUROC\n\nAP\n\nLayer 6\nLayer 12\nLayer 18\nLayer 24\n\n76.0\n90.0\n92.0\n91.6\n\n87.4\n95.0\n96.3\n95.7\n\n83.4\n91.7\n91.0\n91.4\n\n28.9\n43.7\n43.4\n42.6\n\nEnsemble\n\n93.9\n\n96.8\n\n92.5\n\n45.7\n\nTable 9. Ablation study on the multi-scale configuration of PAA.\nThe best performance is in bold.\nPAA Scale s\n\nImage-Level\n\nPixel-Level\n\nAUROC\n\nAP\n\nAUROC\n\nAP\n\n1, 2, 3, 4\n20, 21, 22, 23, 24\n3, 6, 9, 12, 15, 18, 21, 24\n\n91.0\n91.8\n92.3\n\n96.2\n96.6\n96.5\n\n92.2\n91.6\n90.9\n\n43.6\n43.4\n45.3\n\n6, 12, 18, 24\n\n93.9\n\n96.8\n\n92.5\n\n45.7\n\nPixel-Level\nAP\n\nAnalysis of PAA Scale Configuration: In Tab. 9, we\nanalyze the impact of scale configurations in Patch Average Aggregation (PAA). The original feature (s = 1) provides the baseline performance, whereas using single larger\nscales (s = 3 or 5) degrades performance by obscuring finegrained details. Conversely, the multi-scale combination\n(s ∈ {1, 3, 5}) achieves the highest accuracy, confirming\nthat integrating local details (s = 1) with contextual fields\n(s = 3, 5) is essential. Thus, a balanced combination of the\noriginal feature and mid-range scales is optimal.\n\nTable 7. Ablation study on the layer placement of MoE modules.\nThe best performance is in bold.\nMoE Integration Layers\n\nImage-Level\nAUROC\n\n17\n\nImage-Level\n\nPixel-Level\n\nAUROC\n\nAP\n\nAUROC\n\nAP\n\n1\n3\n5\n1, 3\n1, 5\n3, 5\n\n92.8\n92.3\n91.8\n90.7\n92.2\n92.0\n\n96.0\n96.5\n96.5\n95.2\n96.5\n96.4\n\n92.1\n91.2\n91.5\n92.4\n91.9\n90.0\n\n44.1\n42.8\n43.2\n45.2\n45.2\n43.7\n\n1, 3, 5\n\n93.9\n\n96.8\n\n92.5\n\n45.7\n\n\fAnalysis of MoE Configurations: We analyze robustness across router design, expert capacity, and expert constraint mechanisms in Tab. 10. Increasing capacity via\ndeeper MLP routers or full-rank experts leads to overall\nperformance degradation, suggesting reduced generalization. Alternative constraints on experts (contrastive [16],\ncosine similarity [10]) also underperform our FOFS+ETF.\nIn Tab. 11, we assess router stability by injecting adaptive\nGaussian noise ϵ ∼ N (0, (α·σ)2 ) into routing logits, where\nσ is the logit standard deviation. Even at α = 1.0, the performance remains stable with Pixel-level AUROC exhibiting zero degradation (maintaining 92.5) and Image-level\nAUROC dropping by only a marginal 0.5. This strong resilience indicates that the router forms highly confident and\nsharp routing distributions, where expert assignment decisions are not easily flipped by logit noise. These results confirm MoECLIP’s robustness to diverse configurations and\ninternal perturbations.\n\naverage, while the medical-domain model shows a modest\nimprovement in mean AUROC (1.8% for Image-level and\n0.6% for Pixel-level), the most significant gains are in Average Precision (AP). The model improves the mean Imagelevel AP by 3.4% and the Pixel-level AP by a substantial\n6.7% across the 8 medical datasets. This confirms that using an auxiliary dataset from the same domain is an effective strategy for enhancing ZSAD performance. The large\ngains in AP, which is particularly sensitive to the precision\nof localization and false positives, suggest that in-domain\ntraining primarily improves the model’s confidence and accuracy in identifying true anomalous regions.\nTable 12. Comparison of MoECLIP’s ZSAD performance on 8\nunseen medical datasets, when trained on a same-domain medical\nauxiliary dataset (Brain MRI) versus an out-of-domain industrial\ndataset (VisA). The best performance is in bold.\nMoECLIP (Industrial)\n\nTable 10. Robustness analysis of expert configurations and router\ndesigns on the MVTec-AD dataset evaluated by (AUROC, AP).\nThe best performance is in bold.\nImage-Level\n\nMethod\n\nPixel-Level\n\nAUROC\n\nAP\n\nAUROC\n\nAP\n\nMLP Router\nFull-Rank Expert\nContrastive Constraint\nSimilarity Constraint\n\n93.3\n92.8\n92.4\n92.7\n\n97.1\n96.7\n96.2\n96.7\n\n92.1\n91.9\n91.7\n91.9\n\n45.5\n46.0\n45.6\n45.5\n\nMoECLIP\n\n93.9\n\n96.8\n\n92.5\n\n45.7\n\n0.0\n0.2\n0.4\n0.6\n0.8\n1.0\n\nImage-Level\nAP\n\nAUROC\n\nAP\n\n93.8\n93.6\n93.7\n93.7\n93.5\n93.3\n\n96.8\n96.7\n96.7\n96.7\n96.7\n96.4\n\n92.5\n92.5\n92.5\n92.5\n92.5\n92.5\n\n45.7\n45.7\n45.6\n45.5\n45.6\n45.6\n\nPixel-level\n(AUROC, AP)\n\nImage-level\n(AUROC, AP)\n\nPixel-level\n(AUROC, AP)\n\nHead CT\nLiver CT\nRetina OCT\nColonDB\nClinicDB\nCVC-300\nEndo\nKvasir\n\n(96.6, 94.5)\n(74.0, 64.6)\n(85.5, 84.9)\n–\n–\n–\n–\n–\n\n–\n(97.2, 10.8)\n(96.2, 66.3)\n(85.4, 34.8)\n(89.7, 49.9)\n(97.0, 53.0)\n(91.0, 62.5)\n(88.1, 57.6)\n\n(98.8, 99.0)\n(77.2, 70.8)\n(85.7. 84.4)\n–\n–\n–\n–\n–\n\n–\n(97.7, 10.3)\n(95.9, 60.1)\n(88.7, 52.1)\n(90.4, 57.9)\n(97.8, 73.0)\n(90.3, 65.3)\n(88.4, 62.7)\n\nAverage\n\n(85.4, 81.3)\n\n(92.1, 47.8)\n\n(87.2, 84.7)\n\n(92.7, 54.5)\n\nAs analyzed in Tab. 13, patch-level routing entails a modest\noverhead (+39ms, 0.2G FLOPs). However, our lightweight\nLoRA experts and sparse Top-k routing strategy reduce\npeak memory by 34.3% and parameters by 1.7% compared to AA-CLIP (single expert) [38], while boosting AUROC on MVTec-AD by 3.0% and 0.9% at the image and\npixel levels, respectively, offering a favorable trade-off for\nZSAD.\n\nPixel-Level\n\nAUROC\n\nImage-level\n(AUROC, AP)\n\nC.3. Analysis of Computation Overhead\n\nTable 11. Robustness of the routing mechanism to logit perturbation on the MVTec-AD dataset evaluated by AUROC and AP.\nPerturbation (α)\n\nMoECLIP (Medical)\n\nDataset\n\nTable 13. Evaluation of computation overhead and ZSAD performance (AUROC, AP).\nModel\n\nC.2. Analysis of Training on Medical Data\nWhile MoECLIP trained on the industrial dataset demonstrates strong generalization performance to unseen medical\ndatasets, a performance gap due to the industrial-medical\ndomain shift remains. This suggests that ZSAD performance can be further enhanced by leveraging an auxiliary\ndataset from the same medical domain. To investigate this,\nwe train an additional MoECLIP model using the Brain\nMRI [48] dataset as the auxiliary source, as it provides both\ncategory labels and segmentation ground truths. The results\nare presented in Tab. 12, where the model is evaluated on\nthe 8 other medical datasets excluding Brain MRI itself. On\n\nParams (M)\n\nInference\nTime (ms)\n\nPeak GPU\nMemory (MB)\n\nFLOPs (G)\n\nMVTec-AD\nImage-level\n\nPixel-level\n\nAA-CLIP\n(Single Expert)\n\n441.3\n\n119.6\n\n13,853.8\n\n1120.6\n\n(90.9, 96.0)\n\n(91.6, 45.4)\n\nMoECLIP\n\n433.6\n\n158.9\n\n9,096.4\n\n1120.8\n\n(93.9, 96.8)\n\n(92.5, 45.7)\n\nD. Theoretical Grounding for MoE in ZSAD\nZero-Shot Anomaly Detection (ZSAD) requires capturing\nhighly diverse and heterogeneous visual primitives from\nauxiliary data to generalize to unseen anomalies. However,\nwhen adapting a monolithic model to learn these diverse\npatterns simultaneously, the network frequently encounters\n\n18\n\n\foptimization challenges due to gradient conflicts. Let θ denote the shared parameters of a monolithic network, and\nlet ℓi and ℓj be the patch-specific losses for distinct patch\nfeatures Fil and Fjl . The gradient conflict can be mathematically expressed as:\n(D.1)\n\nThis negative cosine similarity indicates destructive interference during backpropagation, which impedes model convergence and degrades generalization performance.\nTo fundamentally address this optimization bottleneck,\nMoECLIP employs a Mixture-of-Experts (MoE) architecture that decouples the parameter space. For a given LoRAbased expert n with a frozen down-projection matrix An\nand a learnable up-projection matrix Bn , the gradient of the\ntotal loss L with respect to Bn is formulated through conditional routing:\n  \\nabla _{B_{n}}\\mathcal {L} = \\sum _{i} \\hat {R}_{n}(F_{i}^{l})\\, \\frac {\\partial \\ell _{i}}{\\partial \\mathbf {y}_{i,n}}\\, (A_{n}F_{i}^{l})^{\\top }, \n\nFigure 8. Comparison of training loss curves between the Single\nExpert Model and MoECLIP.\n\nstructive gradient interference leads to more stable and efficient optimization in the ZSAD setting.\n\n(D.2)\n\nE. Analysis of Expert Specialization\nE.1. Expert Utilization\n\nwhere R̂n (Fil ) is the routing probability assigned to expert\nn for patch Fil , and yi,n = Bn An (Fil ) is the output of expert n for patch i. This formulation demonstrates that the\nparameter update for each expert is strictly conditioned on\nits routing weights, effectively isolating the gradients of heterogeneous patches.\nFOFS further strengthens this isolation by assigning each\nexpert n to a disjoint input subspace cn . Because An extracts only the cn -partition of the input, the effective gradient signal (An Fil ) for expert n is computed from a strictly\nnon-overlapping region of the feature dimension, independent of any other expert m ̸= n. This structural information\nseparation at the input level ensures that gradient updates\nacross experts do not interfere, regardless of their innerproduct relationship. Crucially, FOFS enforces orthogonality only on LoRA A matrices (input projections), not on\noutputs. After orthogonal projection, each expert applies\ndistinct learnable B matrices and outputs are aggregated via\ngating This architectural design enables the final representation to freely model the non-orthogonal, overlapping feature\ninteractions necessary for detecting multi-faceted anomalies. Orthogonality in the input subspace serves as a beneficial inductive bias for specialization without limiting the\nmodel’s representational flexibility. Complementarily, the\nETF constraint prevents experts from collapsing into redundant representations in the output space by maximizing the\npairwise angle between the expert outputs êi,n and êi,m .\nThis synergistic design—FOFS for input-level information separation and ETF for output-level diversity—\nmitigates gradient interference at both stages. Fig. 8 empirically validates that MoECLIP converges 1.3× faster than\nthe Single Expert model, demonstrating that mitigating de-\n\nThe low activation of Expert 4 in Fig. 3 reflects datasetspecific characteristics rather than redundancy. MVTec-AD\ninherently lacks the specific patterns that Expert 4 specializes in. Fig. 9 shows that expert utilization varies across\ndatasets, demonstrating that each expert captures distinct\npatch characteristics. This confirms specialization rather\nthan over-parameterization. Since ZSAD targets unseen\ndatasets with unpredictable characteristics, retaining experts that may be underutilized on specific datasets is crucial\nfor robust generalization.\n3.5\n27.6\n\nExpert 2\n\n3.5\n\n8.1\n\n15.5\n\n23.9\n\n73.9\n\n63.1\n\n50.9\n10.0\n8.0\n\nTec\n\n10.3\n\n17.2\n\n30.0\n\n45.0\n\n5.7\n8.3\n\n49.9\n\nExpert 4\n12.8\n10.6\n\n28.3\n\n13.1\n\n22.5\n19.6\n\n17.1\n19.2\n\n19.7\n22.5\n\n11.0\n\n16.0\n\n33.5\n\n22.2\n\n79.4\n16.8\n\n21.9\n\n22.3\n\n21.1\n\n25.2\n28.1\n\n63.5\n44.6\n\n7.2\n10.9\n2.5\n\n36.0\n\n41.4\n\n36.7\n\n27.4\n\n36.6\n\nDT\n\nMV\n\nExpert 3\n\n1.9\n36.1\n\n17.9\n\n-AD\nBT\nAD\n\nUtilization (%)\n\nExpert 1\n100\n90\n80\n70\n60\n50\n40\n30\n20\n10\n0\n\nRS\nD-S DD\nyn\nthe\ntic\nBra\ninM\nRI\nHe\nad\nCT\nLiv\ner\nRe CT\ntin\naO\nCT\nCo\nlon\nDB\nCli\nnic\nDB\nCV\nC-3\n00\nEn\ndo\nKv\nasi\nr\n\n  \\cos \\!\\left (\\nabla _{\\theta }\\ell _{i},\\,\\nabla _{\\theta }\\ell _{j}\\right ) &lt; 0. \n\nFigure 9. Distribution of Top-2 expert utilization (%) at layer 18.\nThe stacked bars illustrate the average proportion of routing assignments among the four experts for each dataset.\n\nE.2. Expert Interpretability\nWe quantitatively validated expert specialization by measuring the average visual properties of patches assigned to\neach expert: Sobel Gradient (edge strength), Contrast (pixel\n\n19\n\n\fG.2. Grad-CAM and Patch Selection Map\n\nstd), and Shannon Entropy (pattern complexity). Tab. 14\nconfirms the experts on BrainMRI exhibit functional differentiation. Expert 4 captures the non-informative background (near-zero stats), while Expert 1 attends to homogeneous regions with low variability. In contrast, Expert 2 specializes in strong structural edges (Highest Gradient) and\nExpert 3 focuses on high-complexity patterns (Highest Entropy). This confirms that MoECLIP disentangles patches\ninto distinct visual features—ranging from background to\nstructural edges and complex patterns—providing the quantitative explainability crucial for medical domains.\n\nFigs. 12 to 15 visualize the focus region and expert routing\nfor the independent MoE modules integrated at layers 6, 12,\n18, and 24, spanning from low-level to high-level features.\n\nG.3. Final Anomaly Map\nFigs. 16 to 35 illustrate the anomaly map results across multiple categories in industrial and medical datasets.\n\nH. Limitations and Future Work\nAlthough MoECLIP model achieves high ZSAD performance across 14 benchmark datasets, it possesses the following limitations. 1) The current study primarily focused\non enhancing performance by effectively adapting patch\nfeatures for the ZSAD task. Consequently, the potential\nfor synergistic improvements through advanced text feature adaptation and utilization with the MoECLIP model remains an underexplored area. 2) While MoECLIP provides\nanomaly maps to visualize anomalous regions, it does not\noffer explicit explanations as to why the model identifies\na specific area as an anomaly. This lack of explainability\nis a significant drawback, particularly in medical domains.\nTo address these limitations and extend the scope of this\nresearch, we plan to investigate replacing the current CLIPbased backbone with a Multimodal LLM-based backbone.\nThis approach aims to construct a model capable of generating text-based explanations for anomalies and explore\na more sophisticated language-vision synergy for enhanced\ngeneralization performance.\n\nTable 14. Quantitative analysis of expert specialization using lowlevel visual features at layer 18 on BrainMRI (Top-1 selection).\nExpert\n\nGradient (∇)\n\nContrast (σ)\n\nEntropy (H)\n\nSpecialization\n\nExpert 1\nExpert 2\nExpert 3\nExpert 4\n\n48.7\n152.2\n137.0\n0.7\n\n17.7\n66.9\n60.9\n0.2\n\n1.7\n5.4\n5.7\n0.03\n\nLow-variance regions\nStructural edges\nComplex patterns\nBackground\n\nF. Detailed Quantitative Results\nF.1. Performance Results for All Categories\nIn Tab. 15, we report the detailed class-wise performance\non the MVTec, VisA, BTAD, and DTD-Synthetic datasets.\n\nF.2. Inter-Expert Similarity\nFig. 10 provides a comparison of inter-expert cosine similarity for both the Original MoE baseline lacking FOFS &amp;\nETF Loss and our MoECLIP model across layers 6, 12, 18,\nand 24. This matrix is computed by averaging the similarity\nbetween expert-specific features, which are derived by averaging all patch features that selected that expert (via Topk) within each image, across the MVTec-AD dataset. The\nresults demonstrate the effectiveness of our specialization\nstrategies, FOFS and ETF Loss. While the baseline exhibits\nsignificant redundancy with high similarity scores among\nexperts, our model minimizes this overlap, particularly in\nthe intermediate layers. This confirms that our approach\nsuccessfully enforces experts to learn distinct functions.\n\nG. More Visualization Results\nG.1. Multi-layer and Multi-Scale Maps\nTo demonstrate the complementarity of Multi-Level features, we visualize anomaly maps from various layers (6,\n12, 18, 24) and scales (s ∈ {1, 3, 5}). As shown in Fig. 11,\nwe observe that deeper layers excel at highlighting finegrained details, while larger scales cover broader contexts.\nLeveraging this synergy, our Multi-Layer &amp; Multi-Scale\nEnsemble yields more accurate segmentation results compared to single configuration.\n\n20\n\n\fTable 15. Class-wise performance results on the MVTec-AD, VisA, BTAD, and DTD-Synthetic datasets.\n\nDataset\n\nMVTec-AD\n\nVisA\n\nBTAD\n\nDTD-Synthetic\n\nImage-Level\n\nClass\n\nPixel-Level\n\nAUROC\n\nAP\n\nAUROC\n\nAP\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal nut\npill\nscrew\ntile\ntransistor\ntoothbrush\nwood\nzipper\n\n95.4\n76.7\n95.6\n99.9\n99.5\n97.4\n100\n93.8\n86.9\n89.2\n99.4\n81.0\n96.1\n98.6\n98.6\n\n98.7\n86.8\n99.2\n100\n99.8\n99.7\n100\n98.6\n97.4\n95.6\n99.8\n80.4\n98.5\n99.6\n99.6\n\n91.4\n82.8\n95.5\n99.6\n98.0\n97.9\n99.4\n77.8\n87.9\n98.5\n98.7\n71.9\n95.6\n98.0\n96.9\n\n60.7\n16.3\n27.8\n82.1\n33.6\n63.2\n55.8\n30.5\n30.0\n35.5\n70.4\n12.5\n34.4\n68.2\n58.7\n\nAverage\n\n93.9\n\n96.8\n\n92.5\n\n45.7\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npip fryum\n\n88.5\n83.4\n84.8\n98.6\n90.2\n80.6\n57.0\n72.0\n79.5\n77.4\n96.1\n95.5\n\n91.8\n91.8\n92.7\n99.8\n96.2\n81.3\n55.7\n71.1\n81.1\n79.3\n95.8\n98.2\n\n98.8\n97.3\n97.7\n99.5\n94.7\n97.3\n96.6\n91.1\n90.6\n90.5\n95.9\n97.5\n\n31.9\n40.3\n21.1\n81.5\n30.3\n9.8\n1.7\n5.5\n10.9\n18.0\n28.7\n33.2\n\nAverage\n\n83.6\n\n86.2\n\n95.6\n\n26.1\n\n01\n02\n03\n\n98.9\n80.6\n99.7\n\n99.6\n96.8\n97.6\n\n96.6\n95.8\n97.9\n\n53.3\n63.1\n34.8\n\nAverage\n\n93.1\n\n98.0\n\n96.8\n\n50.4\n\nBlotchy 099\nFibrous 183\nMarbled 078\nMatted 069\nMesh 114\nPerforated 037\nStratified 154\nWoven 001\nWoven 068\nWoven 104\nWoven 125\nWoven 127\n\n96.5\n99.3\n96.1\n95.3\n89.7\n84.5\n97.2\n99.1\n96.7\n98.1\n99.5\n94.5\n\n99.1\n99.7\n99.0\n98.8\n96.0\n99.2\n99.3\n99.7\n98.2\n99.3\n99.7\n94.8\n\n99.3\n99.4\n99.3\n99.1\n98.0\n96.9\n99.6\n99.8\n98.9\n98.5\n99.6\n96.9\n\n67.6\n69.5\n65.4\n58.3\n51.8\n54.5\n73.9\n69.4\n54.5\n64.1\n69.8\n53.6\n\nAverage\n\n95.5\n\n98.6\n\n98.8\n\n62.7\n\n21\n\n\fFigure 10. Inter-expert cosine similarity across layers on the MVTec-AD dataset. The top row represents the Original MoE lacking FOFS &amp;\nETF Loss, and the bottom row represents our full MoECLIP model. Each column corresponds to a different ViT layer. Values approaching\n+1 (red) indicate high redundancy, while values approaching 0 (white) or negative values (blue) signify successful differentiation.\n\nFigure 11. Visualizations from different scales (s ∈ {1, 3, 5}) and layers (6, 12, 18, 24) demonstrate complementary characteristics across\ndepth and spatial context. The final ensemble (bottom-right) presents a unified anomaly map combining all scales and layers.\n\n22\n\n\fFigure 12. Visualization of Grad-CAM and patch selection maps for each expert at layer 6 on the hazelnut class of the MVTec-AD\ndataset. The Ground Truth image is shown on the far left. The first row (Grad-CAM) highlights each expert’s focus region. The second\nand third rows (Patch Selection) illustrate the patches where the corresponding expert was selected as the router’s Top-1 and Top-2 choices,\nrespectively (shown in green). The value in each subplot title represents the expert’s average renormalized routing weight computed from\nits Top-1 and Top-2 assigned patches under their respective routing settings.\n\nFigure 13. Visualization of Grad-CAM and patch selection maps for each expert at layer 12 on the hazelnut class of the MVTec-AD\ndataset. The Ground Truth image is shown on the far left. The first row (Grad-CAM) highlights each expert’s focus region. The second\nand third rows (Patch Selection) illustrate the patches where the corresponding expert was selected as the router’s Top-1 and Top-2 choices,\nrespectively (shown in green). The value in each subplot title represents the expert’s average renormalized routing weight computed from\nits Top-1 and Top-2 assigned patches under their respective routing settings.\n\n23\n\n\fFigure 14. Visualization of Grad-CAM and patch selection maps for each expert at layer 18 on the hazelnut class of the MVTec-AD\ndataset. The Ground Truth image is shown on the far left. The first row (Grad-CAM) highlights each expert’s focus region. The second\nand third rows (Patch Selection) illustrate the patches where the corresponding expert was selected as the router’s Top-1 and Top-2 choices,\nrespectively (shown in green). The value in each subplot title represents the expert’s average renormalized routing weight computed from\nits Top-1 and Top-2 assigned patches under their respective routing settings.\n\nFigure 15. Visualization of Grad-CAM and patch selection maps for each expert at layer 24 on the hazelnut class of the MVTec-AD\ndataset. The Ground Truth image is shown on the far left. The first row (Grad-CAM) highlights each expert’s focus region. The second\nand third rows (Patch Selection) illustrate the patches where the corresponding expert was selected as the router’s Top-1 and Top-2 choices,\nrespectively (shown in green). The value in each subplot title represents the expert’s average renormalized routing weight computed from\nits Top-1 and Top-2 assigned patches under their respective routing settings.\n\n24\n\n\fGround Truth\nMOECLIP\nMOECLIP\n\nGround Truth\n\nFigure 16. Anomaly Map results for the bottle in the MVTec-AD. The first row contains the original images with red areas showing the\nground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nMOECLIP\n\nGround Truth\n\nFigure 17. Anomaly Map results for the capsule in the MVTec-AD. The first row contains the original images with red areas showing\nthe ground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nMOECLIP\n\nGround Truth\n\nFigure 18. Anomaly Map results for the hazelnut in the MVTec-AD. The first row contains the original images with red areas showing\nthe ground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nFigure 19. Anomaly Map results for the pill in the MVTec-AD. The first row contains the original images with red areas showing the\nground truth. The second row shows the anomaly map results generated by MoECLIP.\n\n25\n\n\fGround Truth\nMOECLIP\n\nMOECLIP\n\nGround Truth\n\nFigure 20. Anomaly Map results for the screw in the MVTec-AD. The first row contains the original images with red areas showing the\nground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nMOECLIP\n\nGround Truth\n\nFigure 21. Anomaly Map results for the zipper in the MVTec-AD. The first row contains the original images with red areas showing the\nground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nMOECLIP\n\nGround Truth\n\nFigure 22. Anomaly Map results for the capsules in the VisA. The first row contains the original images with red areas showing the\nground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nFigure 23. Anomaly Map results for the chewinggum in the VisA. The first row contains the original images with red areas showing the\nground truth. The second row shows the anomaly map results generated by MoECLIP.\n\n26\n\n\fGround Truth\nMOECLIP\n\nMOECLIP\n\nGround Truth\n\nFigure 24. Anomaly Map results for the 02 in the BTAD. The first row contains the original images with red areas showing the ground\ntruth. The second row shows the anomaly map results generated by MoECLIP.\n\nMOECLIP\n\nGround Truth\n\nFigure 25. Anomaly Map results for the Mesh 114 in the DTD-Synthetic. The first row contains the original images with red areas\nshowing the ground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nMOECLIP\n\nGround Truth\n\nFigure 26. Anomaly Map results for the Marbled 079 in the DTD-Synthetic. The first row contains the original images with red areas\nshowing the ground truth. The second row shows the anomaly map results generated by MoECLIP.\n\nFigure 27. Anomaly Map results on the RSDD. The first row contains the original images with red areas showing the ground truth. The\nsecond row shows the anomaly map results generated by MoECLIP.\n\n27\n\n\fFigure 28. Anomaly Map results on the Brain MRI. The first row contains the original images with red areas showing the ground truth.\nThe second row shows the anomaly map results generated by MoECLIP.\n\nFigure 29. Anomaly Map results on the Liver CT. The first row contains the original images with red areas showing the ground truth.\nThe second row shows the anomaly map results generated by MoECLIP.\n\nFigure 30. Anomaly Map results on the Head CT. The absence of pixel-level annotations restricts the use of this dataset to anomaly\nclassification. The first row contains the original images. The second row shows the anomaly map results generated by MoECLIP.\n\nFigure 31. Anomaly Map results on the CVC-ColonDB. The first row contains the original images with red areas showing the ground\ntruth. The second row shows the anomaly map results generated by MoECLIP.\n\n28\n\n\fFigure 32. Anomaly Map results on the CVC-ClinicDB. The first row contains the original images with red areas showing the ground\ntruth. The second row shows the anomaly map results generated by MoECLIP.\n\nFigure 33. Anomaly Map results on the CVC-300. The first row contains the original images with red areas showing the ground truth.\nThe second row shows the anomaly map results generated by MoECLIP.\n\nFigure 34. Anomaly Map results on the Endo. The first row contains the original images with red areas showing the ground truth. The\nsecond row shows the anomaly map results generated by MoECLIP.\n\nFigure 35. Anomaly Map results on the Kvasir. The first row contains the original images with red areas showing the ground truth. The\nsecond row shows the anomaly map results generated by MoECLIP.\n\n29\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"