"<!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>This CVPR paper is the Open Access version, provided by the Computer Vision Foundation.\nExcept for this watermark, it is identical to the accepted version;\nthe final published version of the proceedings is available on IEEE Xplore.\n\nOmni-AD: A Large-scale and Versatile Benchmark for Industrial Anomaly\nDetection\nDahu Shi1,2 Chengshen He3 Shaochen Zhang4 Bo Qian3\nXiaochen Quan2 Wencong Zhang2 * Xing Wei3\n1\n\nCCAI, Zhejiang University\n4\n\n2\n\nHikrobot Co., Ltd.\n\n3\n\nXi’an Jiaotong University\n\nThe Chinese University of HongKong, Shenzhen\n150\n\n160\nCategories\n\nNormal Images\n\n35000\n\nAnomaly Images\n\n140\n\n30000\n\n120\n\n17897\n\n25000\n\n15642\n\n100\n\n20000\n\n80\n15000\n\n60\n\n1200\n\n40\n\n20\n0\n\n(a) Visual overview of the proposed Omni-AD dataset.\n\n3 290\n2250\n\n1\n2504\n0\nSSGD\n\nBTAD\n\n15\n1258\n4096\n\n9621\n12\n\nGoodsAD MVTec\n\nVisA\n\n1660\n6\n4464\n\n6\n\n282\n1064\nMPDD\n\n30\n14568\n\n4902\n20\n\n16989\n\n10000\n5000\n\n5231\n0\n\nPAD\n\nReal-IAD Omni-AD\n\n(b) Quantitative comparison of popular IAD datasets.\nContamination\n\nYes\n\n[226, 266, 278, 566]\nContamination\n\nDiscrimination\n\nClassification\n\nLocalization\n\nIs there any defect\non the bottle?\n\nWhat type of defect\nis it?\n\nWhere is the defect\nlocated?\n\n(c) The defined subtasks for assessing anomaly detection abilities of MLLMs, i.e., discrimination, classification, and localization.\n\nFigure 1. Overview of the proposed Omni-AD benchmark. (a) presents a gallery of samples from the proposed Omni-AD dataset. (b)\nprovides a comparative analysis of popular IAD datasets in terms of category diversity and image scale. (c) depicts three well-designed\nsubtasks for evaluating the performance of MLLMs in industrial anomaly detection.\n\nAbstract\nIndustrial Anomaly Detection (IAD) has attracted significant attention and witnessed rapid development. However, the advancement in this field is hindered by two key\nissues: the performance saturation of existing benchmarks,\nlimiting discriminative evaluation of different IAD methods,\nand the absence of benchmarks tailored to assess recent\nmulti-modal large language models (MLLMs) in anomaly\ndetection. To this end, we present Omni-AD, a comprehensive IAD benchmark featuring: i) Large scale: The\ndataset consists of approximately 35K images (6× larger\nthan MVTec AD) with 150 product categories (10× larger\nthan MVTec AD) spanning 16 industrial sectors, delivering\nunprecedented category diversity and greater dataset scale\ncompared with existing datasets. ii) Versatility: The benchmark supports both conventional unsupervised and emerg-\n\ning MLLM-based IAD evaluation protocols. The latter is\nachieved by defining three subtasks of progressive difficulty,\nwith two structured as visual question answering (VQA)\nand one as visual grounding. iii) Challenge: Extensive\nexperimental results of state-of-the-art methods reveal that\nthe Omni-AD benchmark is more challenging than existing\nbenchmarks, which can drive the future development of the\nIAD field.\n\n1. Introduction\n\n* Corresponding author.\n† Project page: https://omni-ad.github.io\n\nIndustrial anomaly detection (IAD) is a critical computer vision task focused on identifying and localizing manufacturing defects, thereby enhancing both product quality and operational efficiency in production lines with stringent quality control. However, this task is inherently challenging due\nto its open-set nature, characterized by scarce defect data\nand unpredictable defect types.\n\n14157\n\n\fIn recent years, the mainstream anomaly detection algorithms [3, 10, 11, 16, 19, 23, 28, 35, 36, 38, 40, 41] have primarily adopted the unsupervised learning paradigm. These\nalgorithms require training only on defect-free images, enabling the model to detect unknown defects while significantly reducing the costs associated with defect data collection and manual annotation. Although the IAD field has\nmade significant progress under the unsupervised paradigm,\nit still faces two major obstacles. On the one hand, the\nperformance of current top-performing algorithms on existing datasets tends to be saturated, making it impossible to\ndistinguish the advantages of different algorithms. On the\nother hand, multimodal large language models (MLLMs)\nhave demonstrated impressive capabilities across multiple\ndomains, but their performance in the field of industrial\nanomaly detection has not been well studied. Therefore,\nthis paper presents Omni-AD, a larger-scale and more challenging anomaly detection dataset, and natively supports\nthe evaluation benchmark of MLLMs.\nFor the unsupervised IAD, the most widely used benchmark dataset, MVTec AD [5], has promoted the birth of a\nlarge number of algorithms [6–8, 12, 23, 25, 28]. However, the performance of state-of-the-art algorithms on this\nbenchmark has approached saturation with technological\nprogress. For instance, recent methods has achieved over\n99% in both image-level and pixel-level AUROC metrics\non the MVTec dataset, making it difficult to distinguish the\nadvantages of different algorithms. As a consequence, new\ndatasets like VisA [43] and Real-IAD [32] have been successively introduced. The existing datasets, however, are\nmanually constructed and suffer from limited diversity in\nproduct and defect categories, which notably impedes their\ntransfer from laboratory research to actual industrial scenarios. To bridge this gap, Omni-AD collects data from\nproduction lines with real-world defect inspection needs,\nencompassing 150 different product categories across 16\ndiverse application scenarios, totaling 34,886 images. As\nshown in Fig. 1a and Fig. 1b, our dataset offers notable advantages over previous datasets in terms of both scale and\nobject diversity, posing substantial challenges to state-ofthe-art unsupervised IAD methods. We conduct extensive\nexperiments on Omni-AD alongside existing datasets using\nthese approaches. The results demonstrate that Omni-AD is\nmore challenging and enables a more discriminative evaluation of advanced methods.\n\nDefect Classification, and Defect Localization. As shown in\nFig. 1c, this benchmark directly evaluates MLLMs on three\ncore questions relevant to real-world scenarios: “Is there a\ndefect?”, “What is the type of the defect?”, and “Where is\nthe defect located?”. Specially, we formulate defect discrimination and defect classification as VQA tasks, and defect localization as a visual grounding task. To generate\nsemantically rich QA pairs, we design a dedicated pipeline.\nFirstly, GPT-4o [15] is guided to enrich instance-level prior\nknowledge with defect-related information. Subsequently,\nknowledge from all instances of the same product is consolidated to produce product-level global information. By\nintegrating instance- and product-level priors, GPT-4o acquires a comprehensive understanding of the product and its\ndefects, which in turn allows it to generate high-quality QA\npairs. Using these QA pairs, we conduct extensive evaluations of leading open-sourced MLLMs, including LLaVANeXT [20], InternVL-3.5 [33], and Qwen3-VL [2]. Experimental results show that current MLLMs exhibit modest capabilities in defect discrimination and classification,\nindicating their potential for industrial anomaly detection.\nHowever, MLLMs generally perform poorly on defect localization, indicating that precise localization remains a\nconsiderably more challenging task in IAD scenarios.\nThe main contributions of this work are summarized as\nfollows:\n• We introduce Omni-AD, a large-scale dataset that outperforms existing ones in both scale and diversity. It comprises approximately 35K pixel-wise annotated images\nfrom 150 product categories spanning 16 industrial sectors and presents a wide range of defect sizes, types, and\naspect ratios.\n• Toward a comprehensive benchmark for emerging\nMLLM-based IAD, we define three subtasks with increasing difficulty (i.e., anomaly discrimination, classification, and localization) and construct a pipeline to create\ncorresponding question-answer pairs with rich semantics.\n• Extensive experimental results confirm that Omni-AD is\nmore challenging than existing datasets, enabling better\ndifferentiation of IAD algorithms and revealing that current general-purpose MLLMs still have substantial room\nto improve in anomaly detection.\n\n2. Related Work\n2.1. Anomaly Detection Datasets\n\nFor the evaluation of emerging MLLM-based IAD methods, MMAD [18] was the first to propose a multiple-choice\nVQA-style benchmark, providing a preliminary assessment\nof MLLMs’ defect understanding capabilities. However,\nsuch multiple-choice VQA–style evaluation approach is not\nfully aligned with the practical requirements of IAD. In\ncomparison, Omni-AD organizes defect detection into three\nprogressively challenging subtasks: Defect Discrimination,\n\n14158\n\nIn the field of industrial anomaly detection, the evolution of\nbenchmark datasets has fundamentally shaped methodological advancements. Early benchmarks like DAGM [26] and\nKolektorSDD [30] targeted specific industrial domains and\nare commonly used for supervised anomaly detection. The\nemergence of MVTec AD [5] marked a paradigm shift by\nestablishing an unsupervised learning setting, where mod-\n\n\fels are trained solely on normal samples. Comprising 5,354\nimages across 10 objects and 5 textures, this benchmark has\ndriven advances in unsupervised anomaly detection. Following this, datasets such as BTAD [27] (2,540 images\nacross 3 product classes) and MPDD [17] (1,346 images\nwith 6 metal parts) are introduced, yet they remain limited in both category coverage and image volume. While\nVisA [43] and PKU-GoodsAD [39] represent steps toward\nlarger-scale data, their category and industrial scenarios\ncoverage remains constrained. Meanwhile, PAD [42] proposes Multi-pose Anomaly Detection (MAD) dataset and\nPIAD [34] extends PAD by further incorporating illumination variations, proposing a new dataset with synthetic and\nreal samples to benchmark pose- and illumination-agnostic\nanomaly detection. More recently, Real-IAD [32] provides\n150K multi-view industrial images spanning 30 categories,\nwhile MANTA [9] offers a large-scale multi-view visualtext dataset of 137K images across 38 categories specifically tailored for tiny objects. Despite these progresses, neither dataset is sourced from actual production lines, limiting\ntheir ability to fully represent the complexity and variability\nof real-world industrial inspection scenarios.\nIn contrast, the proposed Omni-AD dataset is collected\nfrom actual industrial production lines and covers 150 product categories across 16 industrial sectors, which expands\nthe coverage of industrial scenarios. This dataset bridges\nthis gap and provides more challenging and realistic benchmarks for the development of advanced IAD algorithms.\n\nDataset\n\n#Image\n\n#Category\n\nNormal Abnorm\n\nAll\n\nSSGD [13]\nBTAD [27]\nMPDD [17]\nMVTec AD [5]\nVisA [43]\nGoodsAD [39]\nPAD [42]\nPIAD [34]\nReal-IAD† [32]\n\n1\n3\n6\n15\n12\n6\n20\n30\n30\n\n0\n2250\n1,064\n4,096\n9,621\n4,464\n5,231\n7,102\n14,568\n\n2,504\n290\n282\n1,258\n1,200\n1,660\n4,902\n4,166\n15,642\n\n2,504\n2,540\n1,346\n5,354\n10,821\n6,124\n10,133\n11,268\n30,210\n\nOmni-AD\n\n150\n\n16,989\n\n17,897\n\n34,886\n\nSeg.\nLabel\n✗\n✓\n✗\n✓\n✓\n✓\n✓\n✓\n✓\n✓\n†\n\nTable 1. Comparison with mainstream IAD datasets. : compared with the single-view Real-IAD dataset to ensure that each\nimage corresponds to a distinct object instance and unique defects.\n\ngressively challenging defect understanding subtasks: Defect Discrimination, Defect Classification, and Defect Localization, providing a more practical and direct evaluation\nof their capabilities in IAD.\n\n3. Omni-AD Dataset\nIn this section, we introduce details of the Omni-AD dataset\non data collection (Sec. 3.1), data annotation (Sec. 3.2) and\nstatistics (Sec. 3.3).\n\n3.1. Data Collection\n2.2. MLLMs in Industrial Anomaly Detection\n\nWe collected real-world data from various production lines,\ncontaining approximately 35K high-resolution normal and\nabnormal images. As shown in Fig. 2a, there are a total of\n150 product categories from a wide range of 16 industries,\ncovering various materials such as metal, plastic, ceramic,\npaper, fabric, wood, etc.\nObject Alignment. Since the original image may contain irrelevant background, we then use template matching\nalgorithm to align the foreground object as much as possible for rigid product categories. In addition, we use image\ncropping to make the RoI (region-of-interest) located near\nthe center of the image for deformable and texture product categories. This process weakens the negative impact of\nbackground interference and object misalignment on model\nperformance, especially for reconstruction-based anomaly\ndetection algorithms [8], thereby making the performance\ncomparison of various algorithms fairer.\nAnomaly Definition. Unlike manually generated defect data [5, 32, 42, 43], real-world data does not have predefined defect types. In other words, the types and locations\nof anomalies are unknown before annotation. Therefore, we\ndefine a unique set of defect categories Acat for each product category, based on the manufacturer’s description of the\nproduct’s usage and quality requirements. Subsequently, we\n\nMLLMs have recently gained significant traction, yet most\nexisting benchmarks are not tailored to industrial anomaly\ndetection. Current benchmarks predominantly focus on\nsingle-image processing scenarios (e.g., MMBench [22],\nMMVP [31]) while prioritizing general-purpose capabilities over domain-specific industrial needs. Specialized visual benchmarks exhibit similar limitations: TextVQA [29]\nemphasizes textual recognition in images, while MATHVision and MATHVISTA [24] target mathematical reasoning in visual contexts. Even cross-domain benchmarks\nlike MMMU [37] conspicuously exclude industrial applications, contrasting with the medical domain where dedicated\nMLLM benchmarks (VQAMed [4], PathVQA [14]) have\nemerged.\nMMAD [18] pioneered a comprehensive and quantitative evaluation of MLLMs for industrial anomaly detection. It defines seven subtasks for defect and object analysis, generating 39,672 semantically rich multiple-choice\nquestions from four public datasets. While MMAD provides a preliminary assessment of MLLMs’ understanding\nof defect detection, its task formulation does not fully align\nwith real-world industrial requirements. Therefore, the proposed Omni-AD benchmark assesses MLLMs on three pro-\n\n14159\n\n\f4 3\n\n7\n\n5\n\n6\n\n3\n\n4000\n\n1\n32\n\n30000\n\n3341\n\n3500\n\n27\n\n26250\n\n3000\n21\n\n9\n\n2037\n\n2000\n\n10\n19\n\n14\n\n1500\n\n16\n\n1000\n\n22500\n\n2522\n\n2500\n\n1923\n\n1906\n\n2164\n\n18750\n15000\n\n1351\n897\n\n776\n\n11250\n560\n\n420\n\n500\nElectronic Components\nSimple Workpiece\nPhotovoltaic\nWafer\n\nComplex Workpiece\nPackage\nLeaded Capacitor\nWelding\n\nPrinted Matter\nElectronic Device\nLithium Battery\nCeramic substrate\n\nMedicine\nTextile\nFood\nWooden Product\n\n(a) The number of categories per industry.\n\n25162\n\n7500\n3750\n\n0\n\n8383\n\n4369 4256\n\n3308\n\n2149 1393\n\n295 213\n\n0\n\n(b) Statistics of the proportion of defect regions.\n\n(c) Statistics of defect aspect ratios.\n\n(d) Visualization of representative defects.\n\nFigure 2. Statistics of the proposed Omni-AD Dataset. (a) demonstrate that the Omni-AD dataset covers a broad spectrum of 16\nindustries, including 150 product categories in total. (b) shows statistics of the proportion of defective regions occupying the entire image.\n(c) displays statistics of the aspect ratio of the minimum bounding box of the defect. (d) visualizes several pairs of normal and abnormal\nimages, with small defects highlighted in the close-up figure in the upper right corner.\n\nmanually assign the collected data into normal images and\nanomaly images according to the defined defect types.\n\n3.2. Data Annotation\n\namines discrepancies between the model’s predictions and\nthe manual labels. These inconsistent regions are manually reviewed and corrected. This process of model-assisted\nreview and manual correction is repeated until the discrepancy rate falls below a predefined threshold, resulting in a\nrefined and high-quality dataset.\n\nAnnotating fine-grained anomalies across a wide array of\nindustrial scenarios is not a trivial task. To ensure highquality and consistent annotations, we design a cyclic twostage annotation pipeline to perform pixel-wise defect annotation.\nHuman-Led Annotation. In the first stage, a team of\nprofessional annotators was tasked with identifying defect\ntypes and outlining their polygonal masks. To ensure quality, we established a control set of 500 meticulously annotated images. All annotators were required to pass a qualification test on this set, achieving a discrepancy rate below\na strict threshold before beginning formal annotation. The\nteam was divided into annotators and inspectors. Images\nfor each product category were evenly split into three jobs\nand annotated sequentially. Upon completion of a job, an\ninspector reviewed the annotations. Jobs containing any errors were rejected and returned to the original annotator for\ncorrection. This review process served to correct individual\nmistakes and enforce consistent application of the annotation rules across all images of the current product category.\nModel-Assisted Annotation. In the second stage, the\nmanually-labeled data for each product category are split\nevenly into two subsets, each containing equal numbers\nof normal and anomalous images. We then train a supervised semantic segmentation model (e.g., U-Net) to identify potential annotation errors. The assigned annotator ex-\n\n3.3. Statistics\n\n14160\n\nThrough the stringent annotation pipeline described above,\nwe constructed the Omni-AD dataset. It contains 34,886\nimages from 150 product categories, with each category exhibiting 1 to 7 distinct defect types, and includes 16,989\nnormal and 17,897 anomalous samples. Fig. 1 shows examples of each product category and visualizes the contour\nof defect regions with red lines.\nWe present a detailed comparison with the mainstream\ndatasets, as shown in Tab. 1. The number of product categories in our dataset surpasses those in the mainstream\nMVTec AD [5] and VisA [43] datasets by an order of magnitude and a factor of 12.5, respectively (i.e., 150 vs. 15 and\n12). Furthermore, the total number of images in our dataset\nis approximately 6 times that of MVTec AD and 3 times that\nof VisA. Compared with the recent Real-IAD [32] dataset,\nour dataset outperforms its single-view counterpart in both\nthe variety of product categories and the volume of images.\nAs shown in Fig. 2b, the proportion of defect regions is very\nwide, indicating that the dataset contains both very small\nand large defects. As shown in Fig. 2c, the defect aspect\nratios in our dataset exhibit a wide range, demonstrating the\ndiversity of defect morphology. The ratio of normal to ab-\n\n\fnormal images in our dataset is approximately 1:1 to ensure\nthat each product category has abundant defects, which is\nbetter than the MVTec AD and VisA datasets and comparable to the Real-IAD dataset. Several representative normalabnormal image pairs are shown in Fig. 2d. To summarize, the proposed Omni-AD dataset offers significant advantages over existing datasets, notably in its scale (number of images and product categories), broader industry distribution, and greater defect diversity. The comprehensive\nevaluation results (described in Sec. 5) show that our dataset\nposes great challenges to existing anomaly detection methods and can drive the development of the IAD field.\n\nthe Omni-AD dataset: Defect Discrimination, Defect Classification, and Defect Localization. These subtasks, in ascending order of difficulty, are closely aligned with practical\nindustrial inspection demands.\n4.2.1. Task Definitions\nIn particular, Defect Discrimination and Defect Classification are cast as VQA tasks, while Defect Localization is\nformulated as a visual grounding paradigm. These three\nsubtasks are described as follows:\nDefect Discrimination. Given an image or a specific bounding box, together with a question enriched with\nproduct- and defect-level semantic context, the model must\ndecide whether the corresponding content is anomalous.\nThe response is constrained to a binary output: Yes or No.\nDefect Classification. Given an input image or a specific bounding box, together with a question, the model is\npresented with several candidate options and is required to\nselect the corresponding defect type. The ground truth answer should be the specific anomaly type or Not any.\nDefect Localization.\nFor the Defect Localization task, given a question, the model is required to produce a JSON-formatted output containing the precise location and category of the detected anomaly.\nThe output must be structured as:\n{’box’ : [xmin , ymin , xmax , ymax ], ’label’:’defect type’}.\n\n4. Benchmark\nBuilding upon the proposed Omni-AD dataset, we establish\ntwo evaluation protocols, including the conventional Unsupervised IAD and the newly-designed MLLM-Based IAD,\nto encourage the community to evaluate and compare their\nmethods.\n\n4.1. Unsupervised IAD Protocol\nThe conventional unsupervised IAD protocol is a wellstudied anomaly detection setting, where models are trained\nexclusively on normal samples and subsequently evaluated\non both normal and abnormal samples. Following the common practices illustrated in MVTec AD [5], VisA [43], and\nReal-IAD [32] datasets, we assign normal images to both\nthe training and testing sets, while reserving all anomalous\nimages exclusively for the testing set.\nMetrics. We utilize commonly-used evaluation metrics, as summarized in the survey [21], to evaluate the\nperformance of unsupervised anomaly detection methods,\nFor anomaly classification, image-level Area Under the\nReceiver Operating Characteristic (i.e., I-AUROC) and\nArea Under the Precision-Recall curve (i.e., I-AUPR) are\nadopted. For anomaly segmentation, we employ pixellevel AUROC (i.e., P-AUROC) as well as Area Under PerRegion-Overlap curve (i.e., P-AUPRO) to better account for\nvarying defect sizes and the imbalance issue between normal pixels and abnormal pixels.\n\n4.2. MLLM-Based IAD Protocol\nWith the rapid advancement of MLLMs, these models have\nexhibited impressive general capabilities and the potential\nto assist or even replace humans in a variety of tasks, sparking paradigm shifts across multiple domains. A pivotal\nquestion arises for the IAD community: Can MLLMs excel\nin this field? The potential to provide a general-purpose solution stands in stark contrast to conventional approaches,\nwhich are inherently limited by their need to be tailored\nto specific scenes, products, or defect types, thus suffering\nfrom poor generalization. To thoroughly assess the anomaly\ndetection abilities of MLLMs, we propose three subtasks on\n\n4.2.2. Semantically Rich QA Construction\nIn Omni-AD, each sample is annotated with structured\nmetadata describing the product and its defects. However,\nthis information, though well-formatted, lacks the semantic richness required for direct MLLM evaluation. To address this, we design a hierarchical data enrichment process\n(Fig. 3) built upon the MMAD pipeline [18], but enhanced\nwith semantic guidance and hierarchical consolidation.\nPrior Enrichment. To enrich each instance’s prior\nknowledge, we construct the visual prompt comprising\ntwo components: the original image enhanced with edgehighlighted defect contours derived from its mask annotation, and a sampled normal image of the same product. This\nvisual prompt explicitly conveys defect characteristics and\nsupports contrastive analysis between defective and normal\nregions. Leveraging this prompt along with the instance’s\nstructured metadata, we then direct GPT-4o [15] to fill in\nmissing semantic attributes—preventing it from generating\nirrelevant generic content due to its general-purpose training. The enrichment incorporates high-level semantics such\nas usage scenarios, functional context, defect morphology,\nformation mechanisms, and impact, resulting in Enriched\nInstance Prior Knowledge.\nKnowledge Consolidation. For each product, the enriched priors from all its instances are aggregated. GPT4o is then employed to distill this collection into consistent\nProduct Prior Knowledge by filtering out instance-specific\n\n14161\n\n\fInstance Prior Knowledge\n\nAttribute\nInfilling\n\nEnriched Instance Prior Knowledge\n\nMedicine bottle\n\nz Usage scenarios\nz Function\n\nz Product category\nz Industry\n\nz Product category\nz Industry\n\nz Defect category\nz Defect localization\n\nz Defect morphology\nz Defect category\nz Defect localization z Formation mechanisms\nz Defect impact\nInformation\nConsolidation\n\nHospital, House\n\nScratch : …\nContamination : …\nBroken : …\nDeformation: …\n\n&lt;query image&gt; is a\npharmaceutical bottle holding\nmedications. &lt;normal\nNormal Image image&gt; is a reference sample\nof a normal item. Please use\nthe normal sample for\nreference and determine if\nQuery Image there is a defect in the query\nimage:\nA. Yes\n\nDefect Information\n\nContamination\n• Light gray\n• [226, 266, 278, 566]\n• Strip-shaped\n• Compromise drug\nstability\n\nClassification\n\nDiscrimination\n\nDefect.n\n\nProduct\nInformation\n\nDefect.2\n\nDefect.1\n\nHierarchical\nData Enrichment\n\nPharmaceutical\n\nScenarios:\n\nProduct Prior Knowledge\n\nManual\nFiltering\n\n•\nDefect:\n\nIndustry:\n\n&lt;query image&gt; is a …\nCommon types of defects\ninclude: ... Among these,\nQuery Image scratches ...; contamination ...;\nbroken ...; ... Please determine the type of\ndefect within the red bounding box.\n\nB. No\n\nA. Scratch\nB. Contamination\nC. Damaged D. Deformation\nE. Not Any\n\nNormal\nImage\n\nHighlighted\nQuery Image\n\nLocalization\n&lt;query image&gt; is a …\nContamination may\ncompromise … inside. It is\nQuery Image\ntypically caused by …\nDetect defects present in the image and\nreturn the results in this format: {'box':\n[x0, y0, x1, y1], 'label': type}.\nAnswer: {‘box’: [226, 266, 278, 566],\n‘label’: Contamination}\n\nFigure 3. Overview of the QA pair generation pipeline. We leverage GPT-4o [15] to semantically enrich the defect data and summarize\nglobal prior knowledge for each product category. By incorporating both product-level and instance-level prior knowledge, GPT-4o is able\nto generate Question-Answer (QA) pairs with richer defect-related semantic information after comprehensively understanding the product\nand defect details.\n\nvariations such as positional or background noise. This process yields global knowledge characterizing the product and\nits typical defects, which is subsequently refined manually\nto ensure reliability.\nQA Pairs Generation. The visual prompts, enriched instance priors, and consolidated product knowledge collectively form the contextual information that supports GPT4o in generating Question-Answer (QA) pairs, enabling it\nto better recognize and understand the product and its corresponding defects. Subsequently, based on this contextual\ninformation along with task-specific definitions and formatting requirements, GPT-4o produces semantically rich QA\npairs. Unlike simple templated questions, these questions\ngenerated through our proposed pipeline provide comprehensive descriptions of products and defects, serving as\nmeaningful references for the evaluated MLLMs in their responses.\n\nof 0.5, with the F1 score representing their harmonic mean.\n\n5. Experiments\nWe conduct extensive experiments under two evaluation\nprotocols, including the evaluation of conventional unsupervised IAD methods and the assessment of the anomaly\ninspection capabilities of up-to-date multi-modal large language models (MLLMs).\n\n5.1. Evaluation on Unsupervised IAD\n\n4.2.3. Evaluation Settings\n\nComprehensive experiments are conducted to compare the\nperformance of our Omni-AD and several popular IAD\ndatasets, such as MVTec AD [5], VisA [43], and Real-IAD\n[32]. MVTec AD [5] is the most widely used benchmark\ndataset for unsupervised industrial anomaly detection. It\ncontains ∼5K images over 10 objects and 5 texture categories with different types of defects, captured under highly\ncontrolled illumination conditions. VisA [43] is twice as\nlarge as MVTec AD in terms of the number of images,\nwhile comprising 12 object categories, slightly fewer than\nthose in MVTec AD. It features a complex structure, multiple objects, and large variations in object locations. RealIAD [32] consists of ∼30K images (single-view version)\nwith 30 object categories. The number of images and object categories has increased compared to previous datasets.\nIn comparison, the proposed Omni-AD in this paper comprises 150 product categories spanning a wide range of 16\nindustrial sectors, including ∼35K images. Our dataset exceeds all previous datasets in terms of both quantity and\nobject diversity, posing great challenges to the current stateof-the-art methods.\nExperimental Details. For performance comparison\non these datasets, we select representative IAD methods from three dominant paradigms: embedding-based\nmethods (e.g., Padim [7], PatchCore [28]), reconstructionbased methods (e.g., RD4AD [8], Dinomaly [12]) and\n\nEmploying the aforementioned pipeline, we generate a total of 12K QA data items and 3K grounding data items. For\neach subtask, we conduct evaluations under two settings:\nzero-shot and one-shot. In the zero-shot scenario, the model\nmakes predictions based only on the query image. In contrast, the one-shot setting allows the model to refer to the\nmost similar sample from the normal set as additional visual guidance.\nMetrics. For the Defect Discrimination and Defect\nClassification subtasks, we designed image-level and boxlevel questions: the former queries about the image as a\nwhole, while the latter directs the model’s attention to specific regions. For both types of tasks, we adopt VQA accuracy as the evaluation metric. For Defect Localization,\nwe employ Recall, Precision, and the F1 score instead,\nas MLLMs typically lack reliable confidence estimation.\nThese localization metrics are calculated by comparing predicted and ground-truth bounding boxes at an IoU threshold\n\n14162\n\n\fDatasets\n\nMemoryBank-based\nPatchCore [28]\nPaDim [7]\n\nReconstruction-based\nRD4AD [8]\nDinomaly [12]\n\nData-Aug-based\nSimpleNet [23]\nGLASS [6]\n\nImage-Level Metrics (I-AUROC / I-AUPR)\nMVTec AD [5]\nVisA [43]\nReal-IAD [32]\nOmni-AD\n\n99.1 / 99.5\n94.7 / 93.0\n90.4 / 93.6\n87.8 / 92.9\n\n94.9 / 95.9\n85.1 / 86.2\n86.6 / 89.8\n82.5 / 88.4\n\n98.5 / 99.3\n96.0 / 96.9\n87.6 / 93.2\n83.1 / 90.3\n\n99.6 / 99.8\n98.7 / 98.9\n89.3 / 86.8\n84.5 / 91.5\n\n99.6 / 99.7\n97.1 / 97.6\n91.7 / 93.8\n82.1 / 89.5\n\n99.9 / 99.8\n98.8 / 99.4\n92.3 / 94.1\n83.1 / 91.2\n\n98.1 / 91.0\n98.2 / 90.7\n92.3 / 88.9\n90.4 / 76.7\n\n99.3 / 96.8\n98.8 / 92.8\n93.5 / 86.4\n85.1 / 74.8\n\nPixel-Level Metrics (P-AUROC / P-AUPRO)\nMVTec AD [5]\nVisA [43]\nReal-IAD [32]\nOmni-AD\n\n98.1 / 93.5\n98.5 / 91.8\n96.9 / 92.5\n95.1 / 81.1\n\n97.3 / 92.7\n96.2 / 79.7\n95.6 / 90.0\n93.9 / 81.6\n\n97.8 / 93.9\n98.5 / 91.1\n96.2 / 94.4\n92.0 / 80.1\n\n98.4 / 94.8\n98.7 / 94.5\n98.8 / 93.9\n93.0 / 71.4\n\nTable 2. Unsupervised Anomaly Detection and Localization: performance comparison on Omni-AD and mainstream IAD datasets.\nAveraged results are reported over all categories on each dataset. A lower value indicates that the anomaly detection dataset is more\nchallenging. The worst result is marked with a dark gray background , while the second-worst is marked with a light gray background .\n\nversity in product categories and defect types. On the other\nhand, the performance differences among various methods are more pronounced on the Omni-AD Dataset. For\nexample, on MVTec AD, all methods achieve I-AUROC\nscores between 94.9%∼99.9%, and P-AUPRO scores between 91.0%∼96.8%. On Real-IAD, the ranges decrease\nto 86.6%∼92.3% and 86.4%∼94.4%, respectively. In\ncontrast, on Omni-AD, I-AUROC and P-AUPRO span\n82.1%∼87.8% and 71.4%∼81.6%, respectively, demonstrating a wider performance spread across methods.\n\ndata-augmentation-based methods (e.g., SimpleNet [23],\nGLASS[6]). PatchCore [28] and PaDiM [7] both utilize\npre-trained features but differ in modeling normality. PatchCore employs a memory bank of core-set patch embedding, whereas PaDiM uses a parametric Gaussian model.\nAt test time, they similarly detect anomalies by computing patch-level distances from the established normal distribution. RD4AD [8] and Dinomaly [12] introduce specific architectural designs, i.e., reverse distillation and novel\ntransformer-oriented components, to mitigate the known issue of shortcut learning. Otherwise, anomalous samples\nalso tend to be well reconstructed, resulting in the missed\ndetection of abnormal areas. SimpleNet [23] and GLASS\n[6] reformulate the unsupervised IAD task into a supervised\nlearning framework. This is achieved by training on real\nnormal images with synthetic anomalous samples or features, enabling discriminative model training and inference.\nWe run PatchCore [28], PaDim [7], RD4AD [8], and Dinomaly [12] with the open-sourced Anomalib [1]. As for\nSimpleNet [23] and GLASS [6], we adopt the official implementation. The input image are resized to 256 × 256.\nOther hyperparameters of each algorithm are all set to default values.\nResults. The experimental results of all methods on\nMVTec AD [5], ViaA [43], Real-IAD [32] and our OmniAD are shown in Tab. 2. On the one hand, it can be\nobserved that both the image-level and pixel-level performance on our dataset exhibit noticeable performance degradation compared to the other three datasets. In particular,\nmulti-class algorithms (i.e., Dinomaly [12]) that claim performance comparable to single-class methods on MVTec\nAD exhibit a notable drop in performance on our dataset.\nThis demonstrates that the Omni-AD dataset is more challenging than existing datasets due to its unprecedented di-\n\n5.2. Evaluation on MLLM-Based IAD\n\n14163\n\nWith the aim of providing a thorough and quantitative evaluation of MLLMs’ defect detection abilities, we then assess\nseveral models across three defined subtasks: Defect Discrimination, Defect Classification, and Defect Localization.\nExperimental Details. Specifically, we locally deploy\nseveral leading open-source models on Nvidia H20 GPUs,\nincluding LLaVA-NeXT [20], InternVL-3.5 [33], Qwen3VL-Instruct [2] and Qwen3-VL-Thinking [2]. During evaluation, responses that fail to provide a valid choice among\nthe given options in the VQA-based defect discrimination\nand classification tasks are directly judged as incorrect. For\nthe defect localization task in the form of visual grounding,\nif the model fails to produce an output in the required JSON\nformat containing defect category and bounding box information, it is considered as a missed detection.\nResults. The results are shown in Tab. 3. Firstly, the\nperformance of these models decrease successively on the\nthree subtasks with increasing difficulty. All models consistently demonstrate stronger discrimination and classification capabilities at the box level than at the image level. This\nenhancement in performance suggests that these MLLMs\ncan extract more meaningful features and make more reli-\n\n\fModel\n\n#Param\n\nSetting\n\nDiscrimination\n\nClassification\n\nLocalization\n\nImg-Acc\n\nBox-Acc\n\nImg-Acc\n\nBox-Acc\n\nRecall\n\nPrecision\n\nF1\n\nRandom Output\n\n-\n\n-\n\n50.00\n\n50.00\n\n20.00\n\n20.00\n\nN/A\n\nN/A\n\nN/A\n\nHuman Expert\n\n-\n\n-\n\n95.67\n\n99.33\n\n91.67\n\n96.00\n\n75.65\n\n83.37\n\n79.32\n\nLLaVA-NeXT [20]\n\n34B\n\n0-shot\n1-shot\n\n59.43\n59.17\n\n55.16\n55.29\n\n38.84\n34.80\n\n37.70\n34.31\n\nN/A\nN/A\n\nN/A\nN/A\n\nN/A\nN/A\n\n30B-A3B\n\n0-shot\n1-shot\n\n52.23\n58.61\n\n61.94\n68.49\n\n40.44\n44.05\n\n48.06\n49.30\n\n9.57\n8.82\n\n10.66\n8.68\n\n10.08\n8.75\n\n38B\n\n0-shot\n1-shot\n\n57.58\n57.54\n\n66.31\n67.61\n\n40.70\n43.96\n\n50.67\n51.97\n\n10.81\n8.68\n\n9.43\n7.14\n\n10.07\n7.84\n\n8B\n\n0-shot\n1-shot\n\n61.81\n64.40\n\n68.66\n71.81\n\n59.60\n62.37\n\n62.37\n65.95\n\n19.66\n14.60\n\n14.56\n13.99\n\n16.73\n14.29\n\n30B-A3B\n\n0-shot\n1-shot\n\n62.38\n64.65\n\n69.09\n72.19\n\n62.22\n65.94\n\n67.89\n70.97\n\n19.59\n17.31\n\n18.67\n13.03\n\n19.12\n14.84\n\n8B\n\n0-shot\n1-shot\n\n57.86\n63.05\n\n67.09\n69.85\n\n54.65\n57.14\n\n59.02\n58.80\n\n18.98\n17.96\n\n18.06\n18.54\n\n18.51\n18.25\n\n30B-A3B\n\n0-shot\n1-shot\n\n62.85\n69.38\n\n69.05\n73.32\n\n57.22\n64.29\n\n65.95\n69.31\n\n29.56\n28.54\n\n23.53\n23.29\n\n26.20\n25.64\n\nInternVL-3.5 [33]\n\nQwen3-VL-Instruct [2]\n\nQwen3-VL-Thinking [2]\n\nTable 3. MLLM-Based Anomaly Discrimination, Classification, and Localization: performance comparison of different MLLMs\non the Omni-AD benchmark. Each subtask is evaluated under 0-shot and 1-shot settings. Img-Acc denotes image-level accuracy, where\nthe entire query image is fed into the model. Box-Acc denotes box-level accuracy, where a specific region of the query image is highlighted\nbefore being fed into the model. For each metric, the best is in bold while the second-highest is underlined. N/A: Not Available.\n\nable judgments when focusing on a specific region of interest. On the most challenging localization subtask, the evaluated models struggle with visual grounding, achieving the\nlowest scores (e.g., the best-performing model, Qwen3-VL30B-A3B-Thinking, scores only 26.20 F1). LLaVA-NeXT\nfails to generate responses in the required JSON format, and\nthus its results are marked as N/A. Overall, all evaluated\nmodels surpass the random baseline, validating that current\ngeneral-purpose MLLMs possess a modest ability to detect\nanomalies. Secondly, Qwen3-VL-30B-A3B-Instruct and\nQwen3-VL-30B-A3B-Thinking demonstrate superior overall performance among all evaluated models, outperforming LLaVA-NeXT and InternVL-3.5 across all metrics. Notably, in the defect localization task, the Qwen3-VL-30BA3B-Thinking model outperforms its Instruct counterpart\n(F1 score: 26.20 vs. 19.12). This noticeable advantage\ndemonstrates that MLLMs incorporating a thinking mode\npossess stronger visual grounding capabilities, highlighting the promise of thinking-enabled MLLMs for future development. Thirdly, most models show clear gains in defect discrimination and classification when moving from 0shot to 1-shot setting, demonstrating their ability to perform\npairwise comparisons between the query image and normal\ntemplate image. In contrast, most methods exhibit a slight\nperformance drop on the more challenging localization subtask, highlighting its unique challenge.\nHuman Evaluation. We also conduct a human eval-\n\nuation using 100 examples randomly sampled from each\nsubtask. Three industrial anomaly detection researchers are\nemployed as human experts and the averaged performance\nare reported. As shown in Tab. 3, humans substantially\noutperform MLLMs across all seven metrics. This significant gap not only underscores the inherent challenges of\nthe Omni-AD benchmark but also highlights the considerable room for improvement in MLLM-based anomaly detection.\n\n6. Conclusion\n\n14164\n\nIn this work, we collect and meticulously annotate a largescale IAD dataset, termed Omni-AD. Based on this dataset,\nwe evaluate state-of-the-art IAD methods in real-world industrial quality inspection. The relatively low metrics indicate that these methods still fall short of practical requirements, consistent with the gap between strong performance\non existing datasets and inferior performance in real-world\napplications. Additionally, to reveal the potential of current MLLMs in industrial quality inspection, we generate\n12K VQA data and 3K visual grounding data to benchmark\ntheir capabilities in terms of defect discrimination, classification, and localization. Comprehensive results show that\nMLLM-based anomaly detection still has substantial room\nfor improvement. We believe Omni-AD can advance the\ndevelopment of IAD.\n\n\fAcknowledgments\nThis work was supported by the National Natural Science\nFoundation of China under Grant No. 62572385.\n\n[9] Lei Fan, Dongdong Fan, Zhiguang Hu, Yiwen Ding, Donglin\nDi, Kai Yi, Maurice Pagnucco, and Yang Song. Manta:\nA large-scale multi-view and visual-text anomaly detection\ndataset for tiny objects. In Proceedings of the Computer\nVision and Pattern Recognition Conference, pages 25518–\n25527, 2025. 3\n[10] Denis Gudovskiy, Shun Ishizaka, and Kazuki Kozuka.\nCflow-ad: Real-time unsupervised anomaly detection with\nlocalization via conditional normalizing flows. In Proceedings of the IEEE/CVF winter conference on applications of\ncomputer vision, pages 98–107, 2022. 2\n[11] Hewei Guo, Liping Ren, Jingjing Fu, Yuwang Wang,\nZhizheng Zhang, Cuiling Lan, Haoqian Wang, and Xinwen\nHou. Template-guided hierarchical feature restoration for\nanomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6447–6458,\n2023. 2\n[12] 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. 2, 6, 7\n[13] Haonan Han, Rui Yang, Shuyan Li, Runze Hu, and Xiu Li.\nSsgd: A smartphone screen glass dataset for defect detection. In ICASSP 2023-2023 IEEE International Conference\non Acoustics, Speech and Signal Processing (ICASSP), pages\n1–5. IEEE, 2023. 3\n[14] Xuehai He, Yichen Zhang, Luntian Mou, Eric Xing, and\nPengtao Xie. Pathvqa: 30000+ questions for medical visual\nquestion answering. arXiv preprint arXiv:2003.10286, 2020.\n3\n[15] Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, et al. Gpt-4o system card.\narXiv preprint arXiv:2410.21276, 2024. 2, 5, 6\n[16] 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. 2\n[17] Stepan Jezek, Martin Jonak, Radim Burget, Pavel Dvorak,\nand Milos Skotak. Deep learning-based defect detection of\nmetal parts: evaluating current methods in complex conditions. In 2021 13th International congress on ultra modern telecommunications and control systems and workshops\n(ICUMT), pages 66–71. IEEE, 2021. 3\n[18] Xi Jiang, Jian Li, Hanqiu Deng, Yong Liu, Bin-Bin Gao,\nYifeng Zhou, Jialin Li, Chengjie Wang, and Feng Zheng.\nMmad: The comprehensive benchmark for multimodal large\nlanguage models in industrial anomaly detection. In The\nThirteenth International Conference on Learning Representations, 2025. 2, 3, 5\n[19] Sungwook Lee, Seunghyun Lee, and Byung Cheol Song.\nCfa: Coupled-hypersphere-based feature adaptation for\ntarget-oriented anomaly localization. IEEE Access, 10:\n78446–78454, 2022. 2\n[20] Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan\nZhang, Sheng Shen, and Yong Jae Lee. Llava-next: Im-\n\nReferences\n[1] Samet Akcay, Dick Ameln, Ashwin Vaidya, Barath Lakshmanan, Nilesh Ahuja, and Utku Genc. Anomalib: A deep\nlearning library for anomaly detection. In 2022 IEEE International Conference on Image Processing (ICIP), pages\n1706–1710. IEEE, 2022. 7\n[2] Shuai Bai, Yuxuan Cai, Ruizhe Chen, Keqin Chen, Xionghui\nChen, Zesen Cheng, Lianghao Deng, Wei Ding, Chang Gao,\nChunjiang Ge, Wenbin Ge, Zhifang Guo, Qidong Huang,\nJie Huang, Fei Huang, Binyuan Hui, Shutong Jiang, Zhaohai Li, Mingsheng Li, Mei Li, Kaixin Li, Zicheng Lin, Junyang Lin, Xuejing Liu, Jiawei Liu, Chenglong Liu, Yang Liu,\nDayiheng Liu, Shixuan Liu, Dunjie Lu, Ruilin Luo, Chenxu\nLv, Rui Men, Lingchen Meng, Xuancheng Ren, Xingzhang\nRen, Sibo Song, Yuchong Sun, Jun Tang, Jianhong Tu, Jianqiang Wan, Peng Wang, Pengfei Wang, Qiuyue Wang, Yuxuan Wang, Tianbao Xie, Yiheng Xu, Haiyang Xu, Jin Xu,\nZhibo Yang, Mingkun Yang, Jianxin Yang, An Yang, Bowen\nYu, Fei Zhang, Hang Zhang, Xi Zhang, Bo Zheng, Humen\nZhong, Jingren Zhou, Fan Zhou, Jing Zhou, Yuanzhi Zhu,\nand Ke Zhu. Qwen3-vl technical report. arXiv preprint\narXiv:2511.21631, 2025. 2, 7, 8\n[3] Kilian Batzner, Lars Heckler, and Rebecca König. Efficientad: Accurate visual anomaly detection at millisecond-level\nlatencies. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 128–138,\n2024. 2\n[4] Asma Ben Abacha, Mourad Sarrouti, Dina DemnerFushman, Sadid A. Hasan, and Henning Müller. Overview of\nthe vqa-med task at imageclef 2021: Visual question answering and generation in the medical domain. In CLEF 2021\nWorking Notes, Bucharest, Romania, 2021. CEUR-WS.org.\n3\n[5] 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. 2, 3, 4, 5, 6, 7\n[6] Qiyu Chen, Huiyuan Luo, Chengkan Lv, and Zhengtao\nZhang. A unified anomaly synthesis strategy with gradient ascent for industrial anomaly detection and localization.\nIn European Conference on Computer Vision, pages 37–54.\nSpringer, 2024. 2, 7\n[7] 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. 6, 7\n[8] 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. 2, 3, 6, 7\n\n14165\n\n\fproved reasoning, ocr, and world knowledge, 2024. 2, 7,\n8\n[21] Jiaqi Liu, Guoyang Xie, Jinbao Wang, Shangnian Li,\nChengjie Wang, Feng Zheng, and Yaochu Jin. Deep industrial image anomaly detection: A survey. Machine Intelligence Research, 21(1):104–135, 2024. 5\n[22] Yuan Liu, Haodong Duan, Yuanhan Zhang, Bo Li, Songyang\nZhang, Wangbo Zhao, Yike Yuan, Jiaqi Wang, Conghui He,\nZiwei Liu, et al. Mmbench: Is your multi-modal model an\nall-around player? In European conference on computer vision, pages 216–233. Springer, 2024. 3\n[23] Zhikang Liu, Yiming Zhou, Yuansheng Xu, and Zilei Wang.\nSimplenet: A simple network for image anomaly detection\nand localization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages\n20402–20411, 2023. 2, 7\n[24] Pan Lu, Hritik Bansal, Tony Xia, Jiacheng Liu, Chunyuan Li,\nHannaneh Hajishirzi, Hao Cheng, Kai-Wei Chang, Michel\nGalley, and Jianfeng Gao. Mathvista: Evaluating mathematical reasoning of foundation models in visual contexts. arXiv\npreprint arXiv:2310.02255, 2023. 3\n[25] Wei Luo, Yunkang Cao, Haiming Yao, Xiaotian Zhang,\nJianan Lou, Yuqi Cheng, Weiming Shen, and Wenyong Yu.\nExploring intrinsic normal prototypes within a single image for universal anomaly detection. In Proceedings of the\nComputer Vision and Pattern Recognition Conference, pages\n9974–9983, 2025. 2\n[26] Fred. A. Hamprecht Matthias Wieler, Tobias Hahn.\nWeakly supervised learning for industrial optical inspection.\nhttps : / / hci . iwr . uni - heidelberg .\nde / content / weakly - supervised - learning industrial-optical-inspection, 2007. 2\n[27] 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. 3\n[28] 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. 2, 6, 7\n[29] Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang,\nXinlei Chen, Dhruv Batra, Devi Parikh, and Marcus\nRohrbach. Towards vqa models that can read. In Proceedings\nof the IEEE/CVF conference on computer vision and pattern\nrecognition, pages 8317–8326, 2019. 3\n[30] Domen Tabernik, Samo Šela, Jure Skvarč, and Danijel\nSkočaj. Segmentation-based deep-learning approach for\nsurface-defect detection. Journal of Intelligent Manufacturing, 31(3):759–776, 2020. 2\n[31] Shengbang Tong, Zhuang Liu, Yuexiang Zhai, Yi Ma, Yann\nLeCun, and Saining Xie. Eyes wide shut? exploring the\nvisual shortcomings of multimodal llms, 2024. 3\n[32] Chengjie Wang, Wenbing Zhu, Bin-Bin Gao, Zhenye Gan,\nJiangning Zhang, Zhihao Gu, Shuguang Qian, Mingang\nChen, and Lizhuang Ma. Real-iad: A real-world multi-view\n\n14166\n\ndataset for benchmarking versatile industrial anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 22883–22892,\n2024. 2, 3, 4, 5, 6, 7\n[33] Weiyun Wang, Zhangwei Gao, Lixin Gu, Hengjun Pu, Long\nCui, Xingguang Wei, Zhaoyang Liu, Linglin Jing, Shenglong Ye, Jie Shao, et al. Internvl3.5: Advancing open-source\nmultimodal models in versatility, reasoning, and efficiency.\narXiv preprint arXiv:2508.18265, 2025. 2, 7, 8\n[34] Kaichen Yang, Junjie Cao, Zeyu Bai, Zhixun Su, and Andrea\nTagliasacchi. Piad: Pose and illumination agnostic anomaly\ndetection. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 4734–4743, 2025. 3\n[35] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu,\nYu Zheng, and Xinyi Le. A unified model for multi-class\nanomaly detection. Advances in Neural Information Processing Systems, 35:4571–4584, 2022. 2\n[36] Jiawei Yu, Ye Zheng, Xiang Wang, Wei Li, Yushuang Wu,\nRui Zhao, and Liwei Wu. Fastflow: Unsupervised anomaly\ndetection and localization via 2d normalizing flows. arXiv\npreprint arXiv:2111.07677, 2021. 2\n[37] Xiang Yue, Yuansheng Ni, Kai Zhang, Tianyu Zheng, Ruoqi\nLiu, Ge Zhang, Samuel Stevens, Dongfu Jiang, Weiming\nRen, Yuxuan Sun, Cong Wei, Botao Yu, Ruibin Yuan, Renliang Sun, Ming Yin, Boyuan Zheng, Zhenzhu Yang, Yibo\nLiu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen.\nMmmu: A massive multi-discipline multimodal understanding and reasoning benchmark for expert agi. In Proceedings\nof CVPR, 2024. 3\n[38] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. Draema discriminatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF\ninternational conference on computer vision, pages 8330–\n8339, 2021. 2\n[39] Jian Zhang, Runwei Ding, Miaoju Ban, and Linhui Dai.\nPku-goodsad: A supermarket goods dataset for unsupervised\nanomaly detection and segmentation. IEEE Robotics and Automation Letters, 9(3):2008–2015, 2024. 3\n[40] Xuan Zhang, Shiyu Li, Xi Li, Ping Huang, Jiulong Shan,\nand Ting Chen. Destseg: Segmentation guided denoising\nstudent-teacher for anomaly detection. In Proceedings of\nthe IEEE/CVF Conference on Computer Vision and Pattern\nRecognition, pages 3914–3923, 2023. 2\n[41] Ximiao Zhang, Min Xu, and Xiuzhuang Zhou. Realnet: A\nfeature selection network with realistic synthetic anomaly for\nanomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages\n16699–16708, 2024. 2\n[42] Qiang Zhou, Weize Li, Lihan Jiang, Guoliang Wang, Guyue\nZhou, Shanghang Zhang, and Hao Zhao. Pad: A dataset and\nbenchmark for pose-agnostic anomaly detection. Advances\nin Neural Information Processing Systems, 36:44558–44571,\n2023. 3\n[43] 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. 2, 3, 4, 5, 6, 7\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"