"<!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>Toward Long-Tailed Online Anomaly Detection\nthrough Class-Agnostic Concepts\n\n1\n\nChiao-An Yang1 Kuan-Chuan Peng2 Raymond A. Yeh1\nDepartment of Computer Science, Purdue University 2 Mitsubishi Electric Research Laboratories\n\narXiv:2507.16946v1 [cs.CV] 22 Jul 2025\n\n1\n\n{yang2300,rayyeh}@purdue.edu\n\nAbstract\nAnomaly detection (AD) identifies the defect regions of a\ngiven image. Recent works have studied AD, focusing on\nlearning AD without abnormal images, with long-tailed distributed training data, and using a unified model for all\nclasses. In addition, online AD learning has also been explored. In this work, we expand in both directions to a realistic setting by considering the novel task of long-tailed\nonline AD (LTOAD). We first identified that the offline stateof-the-art LTAD methods cannot be directly applied to the\nonline setting. Specifically, LTAD is class-aware, requiring\nclass labels that are not available in the online setting. To\naddress this challenge, we propose a class-agnostic framework for LTAD and then adapt it to our online learning setting. Our method outperforms the SOTA baselines in most\noffline LTAD settings, including both the industrial manufacturing and the medical domain. In particular, we observe +4.63% image-AUROC on MVTec even compared to\nmethods that have access to class labels and the number of\nclasses. In the most challenging long-tailed online setting,\nwe achieve +0.53% image-AUROC compared to baselines.\nOur LTOAD benchmark is released here1 .\n\n1. Introduction\nAnomaly detection (AD) [8, 65, 96] is the task of identifying defect regions in a given image. This task is important due to its high valued applications in industrial\nmanufacturing [1, 5, 18, 47, 58, 74, 86, 103] and medical [28, 42, 43, 47] settings.\nRecently, LTAD [34] explored the long-tailed (LT) [92]\nsetting of unsupervised one-class AD, where abnormal images are not given during training and the training set is\nunevenly distributed. This long-tailed distribution assumes\nthat images of certain classes significantly outnumber others, which is a realistic assumption for real-world applications. Importantly, LTAD shows that prior work on evenly\n1 https://doi.org/10.5281/zenodo.16283852\n\n2\n\nkpeng@merl.com\n\ndistributed data performs suboptimally on LT data. Meanwhile, recent works [16, 22, 55, 61, 79, 84] approach AD\nwith online learning to leverage abnormal images during\ntest time. However, they do not study the case where the\nclasses follow a long-tail distribution, where the performance gap of head and tail classes in the online setting may\nbe significant during offline training. This motivates us to\nstudy the long-tailed online AD (LTOAD) task by proposing a benchmark and a novel model.\nAt first glance, it may seem that one can take a state-ofthe-art (SOTA) long-tailed offline model, e.g., LTAD [34],\nand combine it with online learning to solve LTOAD. However, several limitations within the LTAD’s framework prevent it from being effective in the online setting. First,\nLTAD is a class-aware method, where they assume that the\nclass information is given. However, class labels are not\navailable in the online setting. Instead, a class-agnostic\nmethod is required as illustrated in Fig. 1. Second, LTAD’s\nencoder-decoder architecture does not leverage the latest\nvector quantization VAE [20, 57, 59], which is more effective, as shown in recent work. Third, the prompt learning designs of LTAD and other AD works [7, 9, 10, 37,\n40, 51, 52, 67, 100–102] ignore some aspects of abnormal\nprompts, e.g., LTAD does not support class-specific abnormal prompts.\nTo address these challenges, we propose a novel model\nthat is class-agnostic, with a vector quantized VAE, and a\ncomprehensive prompt learning framework, for the task of\nlong-tailed online anomaly detection. Experiments show\nthat our method outperforms the SOTA baselines significantly by at least 4% on several detection benchmarks without access to the class labels and the number of classes.\nIn the following sections, we first discuss how to make\nexisting class-aware methods class-agnostic, specifically on\nLTAD (Sec. 2). Next, we define the task of long-tailed online AD and present our solution (Sec. 3). Finally, we provide details of each proposed module (Sec. 4), followed by\nthe experimental results (Sec. 5) and related works (Sec. 6).\nOur contributions are summarized as follows:\n\n\fFigure 1. Comparison of LTOAD to class-aware anomaly detection methods on offline and online learning. (a) Class-aware\nmethods have a class-specific module for each class c in the class\nset C. (b) These methods cannot work in online learning when\nthe class labels are unavailable. (c) LTOAD solves this problem by learning a concept set Cb to approximate C. We note that\nb = |C|\nb does not need to match K = |C|. (d) In online learning,\nK\nLTOAD can weight input images of seen and unseen classes with\nexisting concept-specific modules, i.e., {pcb}cb∈Cb.\n\n• We propose the task and benchmark for long-tailed online anomaly detection (LTOAD).\n• We propose a class-agnostic framework for both offline\nand online learning that removes the constraint of requiring additional class information in previous work.\nAlong with vector-quantization VAE and a comprehensive prompt learning scheme that benefits both offline and\nonline learning.\n• LTOAD outperforms SOTA offline long-tailed methods\nand online baselines on MVTec, VisA, DAGM, and UniMedical. It also shows promising generalizability to\ncross-dataset settings.\n\n2. Making LTAD class-agnostic\n2.1. Background\nAnomaly Detection (AD). Given an image X ∈ RH×W ×3\nof height H and width W , an AD model Fθ , parametrized\nby θ, aims to predict an abnormal map Yb ∈ {0, 1}H×W or\nan abnormal label y ∈ {0, 1}) indicating whether the image\nis abnormal or not, where Ybi = Fθ (Xi ).\nBeyond the standard setting, LTAD [34] proposes a more\nchallenging setup of unsupervised unified AD that focuses\non an unevenly distributed training set. Each class c in the\nclass set C belongs to either the set of “head classes” C head\nor “tail classes” C tail depending on the number of times\na class appears in the data set. That is, images from the\nclasses in C head significantly outnumber those from C tail .\nVision and language models (VLM) in AD. Recent works\n\n[7, 9, 10, 25, 34, 37, 40, 49, 51, 52, 67, 94, 100] have shown\nthe benefit of foundation VLM for AD. A foundation model\nconsists of a image encoder EI and an text encoder ET . The\nencoders encode images and text to a shared space such that\ncosine similarly between the embeddings captures the relationship between image and text. We use the notation ⟨·⟩ for\ncosine similarity that implicitly supports broadcasting, i.e.,\nwhen ⟨·⟩ is between a matrix with a vector, we broadcast on\nthe spatial dimension.\nIn more detail, recent works [30, 34, 57, 62] extract\nfine-grained image features from intermediate layers or\nblocks of EI . We denote these intermediate visual feature\nmaps as F i and the final visual feature vectors as f f , i.e.,\n(F i , f f ) = EI (X). The precise descriptions of F i and f f\nare provided in Appendix A1.5.\nClass-aware AD. Existing works [7, 9, 10, 22, 25, 34, 37,\n40, 49, 51, 52, 57, 61, 67, 84, 94] consist of class-aware\nmodules in their architecture. These works require an additional class label c ∈ C for each image as input. Specifically, they assume that the class c of the input image is also\nprovided to the model, i.e., Ybi = Fθ (Xi , ci ). As depicted in\nFig. 1, a hard switching mechanism is used in their framework to select the output of a specific class-aware module,\ni.e. Mci , to use for each instance. In this work, we do not\nassume that the class label is provided, as it would typically\nbe unavailable in the online setting. Instead, we develop a\nclass-agnostic approach, which we describe next.\n\n2.2. Concept set for removing class-awareness\nTo remove the requirement of having the class label c, we\nintroduce a concept set Cb where we assume that the class\ninformation c can be represented as a composition of mulb For example, the class ‘transistor’ is\ntiple concepts in C.\nrelated to and derived from concepts ‘semiconductors’ and\n‘circuits’. In other words, for each image of class c, instead of applying a hard one-hot label, we employ a soft\nb\nweighting mechanism and assign a soft label p ∈ RK where\nb = |C|.\nb There are a few advantages. First, we can reduce\nK\nb\nK for model efficiency, since Cb does not need to match C\nexactly and can be much smaller. Next, this soft weighting\nmechanism is applicable when an unseen class ∈\n/ C appears\nin a realistic testing scenario, while previous class-aware\nworks [34, 57] would fail to function.\nFor this approach to be effective, the concept set Cb should\nbe representative enough to cover the image classes C of\nb we leverage\ninterest. Instead of manually selecting the set C,\nthe zero-shot capability of foundation models where Cb is\nlearned with only the visual information of the training set\nand without seeing any class labels.\nGiven the training dataset DT = {Xi }N\ni=1 and a vocab|V|\nulary set V = {vj }j=1 , we first measure the pairwise similarity score Sij between fif and each vocabulary vj , i.e.,\nSij = ⟨fif , ET (vj )⟩. We then conduct a majority vote to\n\n\fodule\n\n§4.2 Reconstruction module\n\nEncoder\n\nLong-tailed\naining Images\n\nEI\n\nImage\n\nX\n\nElectronics\n\ncoder\n\nMedicines\n\nET\n\n{taĉ }\n\n§4.1 Prompts\n\nP\n\na\n\nNormal\nNormal\n\nFrozen module\n\nConcept-VQ\n§2.2\nˆ\nConcepts C\n\nBend\n\nP\n\nCrack\n\nLearnable module\n\nNormal feature\nConcept\nscore\n\np\n\nn\n\nMissing\nBroken\n\n!\n!\n\n§4.3 Semantics module\n\n, Normal\nprompt\nfeatures\n\n,\n\n\"\n\"\n\nAbnormal\nprompt\nfeatures\n\nAbnormal feature\nCosine similarity\nLTAD module\nOur module\nModified LTAD module\n(Class-agnostic)\n\nb and the correspondent normal prompts P n and abnormal prompts P a . The\nFigure 2. Proposed class-agnostic pipeline. We construct C,\nb It then controls the soft switching\nconcept score p is assigned to each image X by computing the similarity between X and each b\nc ∈ C.\nmechanism in our class-agnostic reconstruction module R and semantics module S. R reconstructs F i into F r through Concept VQ and\nb R by measuring the dissimilarity between F i and F r . S compares the similarity map S n of F i and normal prompt features and\noutput Y\nb S . The final prediction Y\nb is aggregated from Y\nb R and Y\nb S.\nthe similarity map S a of F i and abnormal prompt features to output Y\n\nb vocabularies with the overall highest simipick the top-K\nlarity scores across all images. This voting result is used to\nb Specifically, we create embeddings tbc = ET (b\ninitialize C.\nc)\nfor all b\nc ∈ Cb and make them learnable so that we can find\nmore representative concept features during training.\nb\nAt test time, a soft label, i.e., concept score p ∈ [0, 1]K ,\nis predicted for each image X. We compute p by measuring\nb i.e.,\nits similarity to all concepts b\nc ∈ C,\np = SoftMax({ f f , tbc }bc∈Cb).\n\n(1)\n\nAs shown in Fig. 1, we incorporate a soft switching mechanism and the final output is a composition of each Mbc\nPKb\nweighted by p, i.e., bc=1 pbc Mbc . We will now describe\nthe high-level idea of how to incorporate soft switching into\nthe AD pipeline.\n\n2.3. Proposed class-agnostic AD pipeline\nOur class-agnostic model is based on the general twobranch pipeline of LTAD [34] as it is the SOTA method,\nhowever, we note that the idea of soft switching can be applied to other class-aware models as well. Leveraging the\npreviously acquired p, our soft switching mechanism can\nlearn to composite outputs resulting from any multiple concepts or class-specific submodules.\nAs shown in Fig. 2, we deploy a similar overall pipeline\nas LTAD but with several key differences: (a) we introduce\nb as the cornerstone of our class-agnostic framework; (b)\nC\nwe replace the LTAD’s class-aware modules with our classagnostic LTOAD design; (c) for the model architecture in\nR, we use our concept-based vector quantization VAE (Concept VQ); (d) we implement a comprehensive prompt learning. We provide the details of each module in Sec. 4.\n\n3. Long-tailed online anomaly detection\n3.1. Task formulation\nGiven a model Fθ0 where θ0 is the parameters trained offline on an LTAD dataset, the goal of LTOAD is to update\nthe parameters θt in an online manner\nh to improve ithe perf1 , · · · , X\nft where\nf\nformance on a data stream X≤t = X\nf comes sequentially. Formally, we focus on\neach image X\nf≤t ) = Ybt , where Ybt is\nimproving the accuracy of Fθt (X\nf\nthe prediction at t. Note that X≤t is an ordered list, i.e.,\nLTOAD is evaluated sequentially.\nBenchmark. We evaluate LTOAD by considering the any∆ inference setting where the model is updated on small\nbatches of data samples of size ∆. We split the data into\nf≤N O where\ntwo sets: (a) an online training set DO = X\nO\nN denotes the number of online training samples and (b)\nan evaluation set DE . Given the training set DO and the\nmodel parameters θt+1 ← A(θt ; DtO ) is updated based on\nf(t−1)∆:t∆ using an online\nthe t-th batch of samples DtO = X\nlearning algorithm A. The model is then evaluated on DE at\nevery step t.\nFollowing standard metrics [34], we use AUROC to evaluate the performance of detection (Det.) and segmentation\n(Seg.). We report the average, over C head , C tail , and C, at\neach intermediate steps t′ ∈ [1, T − 1] in the data stream.\nDataset setup. As the data comes in a stream, a model’s\nonline learning performance is highly related to the ordering\ndata in DO . To study the effect, we sequentially split DO\ninto sessions which corresponds to a sublist of the dataset.\nIn each session, the distribution of the data is similar.\nWe consider two settings, disjoint and blurry, based on\nwhether the class subset in each session overlaps or not. In\na disjoint setting, the class subset in each session does not\n\n\fConfig. Definition\nB\na blurry stream where the whole stream is ordered randomly\nB-HF a blurry stream where C head are more likely to appear first\nB-TF a blurry stream where C tail are more likely to appear first\nD2-HF a disjoint stream with 2 sessions where all C head are in the first session\nD2-TF a disjoint stream with 2 sessions where all C tail are in the first session\nD5-HF a disjoint stream with 5 sessions where C head concentrate in the first few sessions\nD5-TF a disjoint stream with 5 sessions where C tail concentrate in the first few sessions\nD5-M a disjoint stream with 5 sessions where C head and C tail are mixed in each session\n\nTable 1. Configurations for DO . We define 8 configurations with\ncombinations of different session type ∈ {blurry, disjoint} and\nordering type ∈ {head-first, head-first, else}.\n\noverlap with that of any other sessions, but in a blurry setting, the class subset of each session can overlap.\nNext, data order is also important in the performance due\nto overfitting and forgetting, e.g., if DO has more C tail at the\nbeginning, the performance of C head might drop first due to\noverfitting while the performance of C tail plateaus at the\nend of the stream due to forgetting. Therefore, we also consider whether C head or C tail are more likely to appear first\nin DO to study the effect of forgetting and overfitting. Overall, we design 8 settings for DO with different session and\nordering types combinations, as defined in Tab. 1. Please\nrefer to our Appendix A2 for more details.\n\n3.2. Anomaly adaptive online learning\nWe propose an Anomalous Adaptive learning algorithm\nAAA to tackle the issues of overfitting and forgetting for\nLTOAD. As LTOAD is an unsupervised one-class classification task, a naive online algorithm AN is to directly use\nthe same loss function as offline learning. Note that AN is\nnot ideal as it does not leverage the unlabeled abnormal image in the online learning data.\nTo take advantage of this difference, our anomaly adaptive online learning algorithm AAA computes a pseudo abc = T (Yb ) acquired by thresholding Yb\nnormal map M\nwith a function T to adjust the behavior of the original\nlosses. The algorithm is summarized in Alg. 1 where we\ndenote these adjustments as a mask-dependent loss funcc ). As abnormal images in the online training set\neM\ntion L(\nare unavailable in offline training, we value these samples\nmore in the loss calculation and assign a larger weight β to\nimages with higher yb. Finally, we use the exponential moving average (EMA) for more stable updates. Please see the\nAppendix A1.5 for details.\n\n4. Model details\nWe now provide the description for each of the modules as\noverviewed in Fig. 2. Additional implementation details are\nprovided in the Appendix A1.\n\n4.1. Prompt learning\nb we construct normal and abnorBased on the acquired C,\nmal prompt sets P n and P a for LTOAD to learn the textual\n\nAlgorithm 1 Anomaly Adaptive (AAA ) Online learning\nInput: offline-trained model with its parameters Fθ0 , online training data stream DO , batch size ∆, threshold\ne reduction\nfunction T , mask-dependent loss function L,\noperation r, hyper-parameters τ, β, γ\nOutput: Θ = [θ1 , · · · , θT ], where T = |DO |/∆\ne0 = θ0\n1: Initialize Θ = [ ], θ\n2: for t = 1 to T do\nh i\nfi\n3:\nAcquire batch DtO = X\ni=(t−1)∆,··· ,t∆\n\n4:\n5:\n\nfor j = 1 to ∆ do\nForward pass Ybj = Fθet−1 (DtO [j])\n\ncj = T (Ybj )\nCompute pseudo abnormal label M\ncj )\neM\n7:\nCompute mask-dependent loss Lej = L(\n8:\nCompute gradient weight λj ← β if r(Ybj ) ≥ τ\nelse 1\n9:\nend for\nP\n1\ne\n10:\nθet ← θet−1 + ∆\nj λj ∇Lj\n11:\nUpdate with EMA θt ← γθt−1 + (1 − γ)θet\n12:\nΘ.append(θt )\n13: end for\n14: return Θ\n6:\n\nb prompts where each P n ∈ P n is\nsemantics. P n contains K\nb\nc\ninitialized with the template of “a normal b\nc.” In contrast, P a\nis initialized by asking a conversational AI [13, 64] “For b\nc,\nwhat are the 5 anomalies we are likely to observe?” for each\nb\nc. Each normal prompt feature is defined as nbc = ET (Pbcn )\nwhile each abnormal prompt feature is defined as abc, i =\nb nbc\nET (Pbca, i ) for i ∈ [1, 5]. In addition to the learnable C,\nand abc, i are also learnable so that LTOAD can find more\naccurate abnormal semantics for each concept. In general,\nwe learn tbc , abc , and multiple nbc for each concept.\n\n4.2. Reconstruction module\nThe goal of the reconstruction module R is to reconstruct\nthe features F i of normal images for extracting cues about\nwhether an image is anomalous. Since R is trained only on\nthe representation of normal features, it would be unable\nto accurately reconstruct abnormal features. Therefore, a\ndiscrepancy between the input and reconstructed features\nprovides a useful cue that the input is abnormal. In more\ndetail, given an input feature F i , R reconstructs it to F r\nand output an abnormal map prediction:\n1\nYb R =\n1 − F i, F r\n2\n\n\u0001\n\n(2)\n\nby measuring the discrepancy between F i and F r via\ncosine similarity. We now introduce the background of\nHVQ [57] before we describe the module’s architecture and\nconcept codebooks used to create F r .\nBackground. Lu et al. [57] proposes hierarchical vectorquantization (HVQ) to construct multiple expertise modules\n\n\ffor each class to solve unified AD. A hard switching mechanism is applied to choose the correspondent modules for\neach class. They also introduce a hierarchical architecture\nto connect high-level and low-level feature maps. Given\nmultiscale feature maps {Zl }l=1, ··· , L , where L is the number of layers, they build a hierarchical class-specific module\nQl,c for each c ∈ C. During training, each Ql,c only sees Zl\nthat comes from the images of class c. The output of each\nQl,c is denoted as Ql . Each Ql is conditioned on Zl , and\nthe output of the previous module, i.e. Ql−1 . Specifically,\n\n  \\mQ _{l} = \\begin {cases} {{\\tt Q}}_{l,c}(\\mZ _{l}) ,&amp; \\text {if \\ } l = 1 \\\\ {{\\tt Q}}_{l,c}(\\mZ _{l} \\oplus \\mQ _{l-1}) ,&amp; \\text {otherwise}. \\\\ \\end {cases}\n\n(3)\n\nHere, ⊕ denotes concatenation on the channel dimension.\nThe outputs {Ql }l=1,··· ,L are then fed into their proposed\nhierarchical decoder [57] for reconstruction.\nThe class-specific hierarchical modules Ql,c are quantization modules [20, 59, 82] that learn to quantify visual feature representations. For readability, we remove\nthe subscripts of Ql,c . Each Q stores a learnable codebook\nB. The codebook contains M codes of D dimension, i.e.\nB ∈ RM ×D . Given a 2D input feature Z, Q queries its\ncodebook and finds the nearest prototypes Q. For each\npixel location (h, w), they find Q[h, w] = bm∗ , where\nm∗ ≜ arg minm ∥Z[h, w] − B[m]∥22 .\nModule architecture and concept codebooks. Given\nan input F i , we first project it onto a visual-text shared\nspace through a layer-wise projection module Ep [34], i.e.,\nF p = Ep (F i ). For feature reconstruction, we use a VQautoencoder dubbed “Concept-VQ,” modified from classspecific HVQ [57] for our concept-specific objective. We\nalso use a prompt-conditioned generator G for data augmentation to generate pseudo-normal features F n and pseudoabnormal features F a . These pseudo features provide additional guidance in training R. Finally, we use the soft label p\nas a weighting mechanism for our concept-specific designs\nin Concept-VQ and G.\nOur Concept-VQ contains an encoder ER , a decoder\nDR , and hierarchical quantization modules between them.\nb we construct\nFor each l ∈ [1, · · · , L] and each b\nc ∈ C,\na concept-specific quantization module Ql, bc . To capture\nthe text-visual representation of DT , our concept codebook\nBl, bc in each Ql, bc is initialize Bl, bc by sampling M codes\naround its correspondent tbc .\nPrompt-conditioned data augmentation. During training, prior works [21, 34, 57, 89] create pseudo-abnormal\nfeatures for data augmentation by adding noise to the input\nfeatures, i.e., feature jittering. These prior works ignore the\nsemantics of the F p . Instead, we build a generator G that\nsynthesizes pseudo features conditioned on prompt features\na and n. We generate pseudo-normal features F n conditioned on F p and n while we generate pseudo-abnormal\n\nfeatures F a conditioned on F p and a.\n\n4.3. Semantics module\nThe semantics module S leverages the cross-modality\nknowledge of abnormality in EI and ET to extract cues on\nwhether an image is anomalous. It learns the semantic similarities or dissimilarities between visual features and normal texts, e.g., ”normal,” versus abnormal texts, e.g., “broken” by comparing the aggregated normal similarity scores\nS n and abnormal scores S a . The higher S a − S n is, the\nmore likely it is abnormal. Given the projected feature\nF p , we denote the similarity difference as a functionality\nof S, i.e., S(F P ) = S a − S n . Then, the final prediction\nYb S ≜ (S(F p )+2)/4, where we scale to the range of [0, 1].\nModule architecture. Given F p , we first compute the similarity map Sbcn between it and the concept-specific normal\nprompt features, i.e., Sbcn P\n= ⟨F p , nbc ⟩. The overall normal\nn\nsimilarity map S is then bc pbc Sbcn . Similarly, we also compute the overall abnormal similarity map S a for F p .\nFor segmentation, the final prediction Yb is the elementwise harmonic mean [40, 51] of the two intermediate predictions, i.e.,\n  \\hat \\mY = \\left ( \\alpha (\\hat \\mY ^{\\tt R})^{-1} + (1-\\alpha )(\\hat \\mY ^{\\tt S})^{-1} \\right )^{-1}, \\label {eq:final_y}\n\n(4)\n\nwhere α controls the weight between them. For detection,\nwe apply an AvgPool2d with a kernel size of 16 on Yb\nbefore we reduce the map to its maximum value as yb. We\ndenote this reduction operation as yb = r(Yb ).\n\n5. Experiments\nWe first study the offline LTAD setting as an offline model\nparameter θ0 is the starting point for an online method. Importantly, we show that class-agnostic models are effective\nin offline LTAD without degrading performance. Finally,\nwe conduct experiments on LTOAD with our AAA in the online setting and evaluate cross-dataset generalizability. Additional experiment details are in the Appendix A3.\n\n5.1. Offline long-tailed settings\nExperiment setup. Following the LTAD benchmark [34],\nwe report on MVTec [5] and VisA [103]. Each dataset\nhas multiple long-tailed settings dependent on the degree\nof imbalance between C head and C tail . The imbalance type\n∈ {exp, step} describes whether the numbers of classes decay exponentially or drop like a step function; while the imbalance factor ∈ {100, 200} measures the ratio between the\nnumber of the most populated class to the least one. A larger\nimbalance factor means a more challenging setting. We follow exactly the same LTAD training and testing settings unless otherwise specified. Additional results on DAGM [85]\nand Uni-Medical [4, 95] are provided in the Appendix A3.\n\n\fCA\n\nexp100\nDet. Seg.\n\nexp200\nDet. Seg.\n\nstep100\nDet. Seg.\n\nstep200\nDet. Seg.\n\nRegAD [36]\n✗\nAnomalyGPT [25] ✗\nLTAD [34]\n✗\nHVQ [57]\n✗\nLTOAD*\n✗\n\n82.43 95.20\n87.44 89.68\n88.86 94.46\n87.43 95.25\n93.12 95.01\n\nN/A N/A\n85.80 90.15\n86.05 94.18\n85.34 94.79\n91.88 94.36\n\n81.54 95.10\n85.95 89.28\n87.36 93.83\n85.39 94.17\n92.02 94.72\n\nN/A N/A\n82.47 89.45\n85.60 92.12\n83.00 92.61\n87.95 93.34\n\nY\n\nLTOAD\nLTOAD\n\nX\n\nFigure 3. Qualitative comparison among LTAD [34], HVQ [57],\nand LTOAD on MVTec offline LTAD [34] exp100 benchmark. Inputs from C head / C tail are outlined in blue / red. Smaller ground\ntruth anomaly masks are circled\nin pink.\n(a) MVTec\nMethod CA Online\n\nCA\n\nRegAD [36]\n✗\nAnomalyGPT [25] ✗\nLTAD [34]\n✗\nHVQ [57]\n✗\nLTOAD*\n✗\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nHVQ\n\n✓ 87.70 93.95 86.21 93.26 83.37 91.47 81.32 92.29\n✓ 84.73 94.34 83.23 93.96 84.40 93.76 83.13 92.76\n✓ 93.42 95.21 92.02 94.94 92.33 95.11 88.62 94.00\n\nTable 2. Comparison (↑) on offline MVTec in image-level AUROC for anomaly detection (Det.) and pixel-level AUROC for\nanomaly segmentation (Seg.). The column CA (class-agnostic)\nindicates whether a method requires class names or the number of\nclasses during training or not (require: ✗; not require: ✓). RegAD needs at least 2 images per class and thus is not applicable\non exp200 and step200. We mark the best and second best performances in bold and underline.\nMethod\n\nLTAD\n\nexp100\nDet. Seg.\n\nexp200\nDet. Seg.\n\nstep100\nDet. Seg.\n\nstep200\nDet. Seg.\n\n71.36 94.40\n70.34 80.32\n80.00 95.56\n78.63 96.18\n84.89 96.42\n\n71.36 94.40\n69.78 79.48\n80.21 95.36\n78.03 95.32\n84.84 96.44\n\n71.80 94.99\n71.98 82.30\n84.80 96.57\n76.68 95.63\n87.71 97.07\n\n71.65 94.52\n69.78 81.97\n84.03 96.27\n75.52 95.50\n86.52 96.89\n\n✓ 77.31 95.03 76.87 94.80 78.83 96.04 77.64 95.66\n✓ 73.89 94.34 73.58 93.98 74.12 94.37 76.77 94.82\n✓ 85.26 96.91 85.24 96.97 88.32 97.54 87.04 97.23\n\nTable 3. Comparison (↑) on offline VisA. Format follows Tab. 2.\n\nLTAD [34] ✗\nLTAD [34] ✗\nHVQ [57] ✗\nHVQ [57] ✗\n\n✗\nAN\n\n✗\n\nAN\n\n5.2. Online long-tailed benchmark\nExperiment setup. For the online setting, we report on the\n\nB-HF B-TF D2-HF D2-TF D5-HF D5-TF D5-M Avg.\n93.46\n93.70\n95.02\n95.22\n\n93.46\n94.08\n95.02\n95.29\n\n93.46\n93.49\n95.02\n95.03\n\n93.46\n93.84\n95.02\n95.21\n\n93.46 93.46\n93.65 93.84\n95.02 95.02\n95.05 95.23\n\n✓ ✗ 95.08 95.08 95.08 95.08 95.08 95.08 95.08 95.08 95.08\n✓ AN 95.41 95.22 95.32 95.23 95.04 94.91 94.72 94.79 95.08\n✓ AAA 95.36 95.30 95.32 95.23 95.28 95.26 95.25 95.21 95.28\n\nLTOAD\nLTOAD\nLTOAD\n\nTable 4. Comparison (↑) on online MVTec in pixel-level AUROC for anomaly segmentation across 8 configurations of DO . All\nmodels are pre-trained on MVTec exp100 [34].\nD5-HF\n\nhead\n\nAUROC (%)\n\n95.5\n\nBaselines &amp; implementation details. We compare with\nRegAD [36], UniAD [89], and LTAD [34]. We benchmark\nthe SOTA MoEAD [62] and HVQ [57] to highlight the\ngain of our concept-specific quantization modules to their\nclass-specific ones. Only UniAD, MoEAD, and LTOAD are\nclass-agnostic and do not need a class label at the test time.\nWe provide a class-aware version of our model, LTOAD*.\nQuantitative &amp; qualitative comparison. Tab. 2 and 3\nshow the comparisons of LTOAD with the baselines on\nMVTec and VisA. We observe that LTOAD outperforms\nthe SOTA on most settings while using no class information. LTOAD achieves a larger gain over Det. On average across all settings, LTOAD achieves +4.63% / +0.58%\ngain versus the second best baseline excluding LTOAD* on\nMVTec Det. / Seg. As for VisA, LTOAD achieves +4.30%\n/ +1.29% gain.\nNext, comparing LTAD and LTOAD*, we find that being\nclass-agnostic is beneficial. We hypothesize that this is because the classes can now share knowledge through the soft\nlabels. Finally, we show qualitative results in Fig. 3. We\nobserve that LTOAD predictions are closer to ground truth\nthan HVQ and LTAD.\n\nB\n\n93.46 93.46 93.46\n94.12 93.80 94.07\n95.02 95.02 95.02\n95.44 95.33 95.28\n\nD5-TF\n\n95.5 95.5\n\n95.5\n\n95.2\n\n95.1 95.2\n\n95.1\n\n94.9\n\n94.7 94.9\n\n94.7\n\n94.6\n\n94.3 94.6\n\nAA\n\n94.3\n\n0\n\n200\n\n94.3\n\nAA\n\nN\n\nAUROC (%)\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nX\n\ntail\n\nMethod\n\nN\n\n400\n\n93.9 94.3\n\n0\n\n200\n\n400\n\n93.9\n\nData Index\n\nFigure 4. Performance curve of AN and AAA in pixel-level AUROC on C head and C tail . They are offline-trained on exp100 [34]\nand online-trained on D5-HF or D5-TF.\n\nsame datasets as the offline benchmark [34], i.e., MVTec,\nVisA, and DAGM. We split the testing set into DO and DE\nwith a 3:7 ratio. For each dataset, we create the 8 settings\ndefined in Tab. 1.\nFor baseline comparisons, we extend HVQ and LTAD to\nhave online capability by applying our naive online learning algorithm AN since they are the best offline models on\nMVTec. Note that both methods are not class-agnostic and\nneeds class labels as extra information in online learning,\nwhich is not available/necessary for our approach.\nQuantitative comparison. We report the online Seg. performance at final time step t = T on MVTec exp100\nin Tab. 4. The results on other settings/datasets are in the\n\nY\n\n\fMVTec\nMethod Online\nLTOAD\nLTOAD\n\n✗\n✓\n\nVisA\n\nDAGM\n\n→ VisA → DAGM → MVTec → DAGM → MVTec → VisA\n84.38\n92.37\n\n91.27\n96.87\n\n82.73\n89.84\n\n79.16\n96.79\n\n79.51\n88.37\n\n81.13\n92.41\n\nTable 5. Cross-dataset anomaly segmentation in pixel-level AUROC. All models are pre-trained on their exp100 [34].\nSet ID\n\nDomain Size Elements\n\nC\n\nN/A\n\nzipper, pill, capsule, grid, transistor,\n15 carpet, metal nut, wood, leather, screw,\ntile, cable, toothbrush, hazelnut, bottle*\n\nRandom\n\nOut\n\n10\n\nrefinery, finger, vault, exam, salad,\nsailor, dove, dealer, well, humanoid\n\nSmall\n\nIn\n\n3\n\nsemiconductor, zipper, beech\n\nLTOAD Cb\n\nIn\n\nsemiconductor, zipper, beech,\n10 microscopy*, antibiotics, medicines,\ncircuit , mahogany, hardwood, walnut\n\nTable 6. Classes vs. concepts on MVTec. Words with similar semantics have the same color, e.g., wood-related words are colored\nin brown and electronics-related words are colored in purple.\n\nAppendix A4. Overall, AN performs well in the simplest\nsetting (B), but degrades on more difficult settings, e.g.,\nD2-TF, D5-HF, etc. On average, LTOAD with AAA performs the best even without class labels as extra information. We plot LTOAD’s performance curve of Fθt over t\nwith ∆=16 under the two most difficult settings (D5-HF and\nD5-TF) in Fig. 4, where AN falls off on C head /C head under\nD5-HF/D5-TF while AAA improves steadily. Empirically,\nb &lt; K.\nLTOAD is also more efficient than LTAD because K\nCross-dataset evaluation. Tab. 5 shows that LTOAD can\nadapt to unseen domains even if it is not designed for crossdataset evaluation. For each D1 → D2 experiment, we\npre-train LTOAD on exp100 of D1 then evaluated on B of\nD2 without and with online learning. LTOAD with online\nlearning outperforms the one without it.\n\n5.3. Additional analysis\nb We now analyze the effect\nAnalysis on initialization of C.\nof our concept learning component. All experiments are\ndone under MVTec exp100 and B. We highlight the importance of our concept learning compared to two baselines:\ninitializing with a random concept set or with a small one.\nTab. 6 shows the learned initialization of Cb versus the\nground truth C. We observe that our concept learning can\nfind the Cb initialization which represents similar semantics in C, e.g., the bottle∗ images (see the 1st image in\nFig. 3) in MVTec are bottom-only views, which look like\nan microscopy∗ .\nNext, we experiment with the two baselines to generate\nb In Random of Tab. 6, instead of learning\ninitialization for C.\nfrom DT , i.e., in-domain concepts, we randomly select 10\n\nDetection\nExp.\n\nb K\nb R S G\nC\n\nC tail C head\n\nSegmentation\nC tail C head\n\nC\n\nC\n\nRandom O-D 10 ✓ ✓ ✓\nSmall I-D 3 ✓ ✓ ✓\n\n84.73 99.31 91.54 94.46 95.39 94.89\n85.66 98.89 91.83 94.24 95.30 94.74\n\nNoR I-D 10 ✗ ✓ ✗\nNoS I-D 10 ✓ ✗ ✓\nNoG I-D 10 ✓ ✓ ✗\nLTOAD I-D 10 ✓ ✓ ✓\n\n53.84 56.25 54.97 60.73 63.46 62.00\n85.16 99.21 91.72 94.57 95.24 94.88\n85.63 99.56 92.13 94.08 95.62 94.80\n88.14 99.45 93.72 94.83 95.64 95.36\n\nTable 7. Analysis and ablation on LTOAD using the same metrics as Tab. 4 under MVTec exp100 [34] and B. We report the performances on C head and C tail . I-D/O-D: in/out-domain.\nExp.\n\nCb\n\nPa\n\nL L M CS\nFixC ✗ ✓ ✓ ✓\nFixP ✓ ✗ ✓ ✓\nSingleP ✓ ✓ ✗ ✓\nShareP ✓ ✓ ✓ ✗\nLTOAD ✓ ✓ ✓ ✓\n\nDetection\nC\n\ntail\n\nC\n\nhead\n\nSegmentation\nC\n\nC\n\ntail\n\nC head\n\nC\n\n84.65 98.13 90.94 94.57 95.16 94.85\n85.59 99.45 92.06 94.52 94.75 95.04\n85.41 99.37 91.92 94.64 95.44 95.02\n87.03 99.35 92.78 95.00 95.63 95.39\n88.14 99.45 93.72 94.83 95.64 95.36\n\nTable 8. Ablations on concept Cb &amp; abnormal prompt P a learning under MVTec exp100 [34] on the same metrics as Tab. 7.\nAcronyms: L: learned; M: multiple; CS: concept-specific.\n\nnouns in ALIGN’s V unrelated to the industrial settings of\nMVTec, i.e., out-domain concepts. In other words, the semantics of C and Random do not overlap. In Small of Tab. 6,\nb = 10, we select only the top-K\nb =3\ninstead of choosing K\nb The semantics of Small partially covers\nvocabularies as C.\nthe semantics of C. Tab. 7 shows the quantitative results.\nWe report the performance of Random and Small in\nTab. 7. Even with an out-domain initialization, compared\nto HVQ in Tab. 2, which uses C for their class-specific\nquantization modules, Random still performs competitively.\nSpecifically, we observe a +4.11% gain in Det. versus HVQ. On top of that, with in-domain Cb as a more\naligned representation, LTOAD in Tab. 7 achieves the best\nimage-level AUROC. In particular, we further improve it\nby +1.88%. We have a similar observation initializing with\nSmall, which outperforms HVQ on Det. Having sufficiently\nb LTOAD with K\nb = 10 gives more gain.\nlarge C,\nb\nFinally, although some c ∈ C are not presented in our C,\nLTOAD still adapts and outperforms the baselines in Tab. 7.\nThis suggests that LTOAD can work even with a foundation model whose V and C are disjoint. However, this is\nnot necessarily true for prior class-aware methods as they\nimplicitly assume that C ⊆ V.\nAblation studies on R, S, and G. In Tab. 7, we also ablate LTOAD components (see Sec. 4.2 and 4.3) to justify\ntheir design. All experiments are done under the MVTec\nexp100 and B setting. NoR ablates R. We also remove G,\nYb R from Eq. 4 and related losses (see Appendix A1.1). In\ncontrast, NoS ablates S. We also remove Yb S and related\n\n\fUnsupervised AD Method\nConditions\nunified model\nonline learning capability\nincorporate VLM/LLM(s)\ncan handle long-tailed data\nclass-agnostic\n\nUnsupervised AD Categories\nG0 G1 G2 G3 G4 G5 G6 G7\n\n✗ ✓ ✓ ✗ ✓\n✗ ✗ ✗ ✗ ✗\n✗ ✗ ✗ ✓ ✓\n✗ ✗ ✗ ✗ ✗\n✗ ✓ ✗ ✗ ✗\n\n✓\n✗\n✓\n✓\n✗\n\n✗\n✓\n✗\n✗\n✗\n\n✓\n✓\n✗\n✗\n✓\n\nLTOAD\n\n✓\n✓\n✓\n✓\n✓\n\nTable 9. Characteristic comparison between LTOAD and prior\nunsupervised AD works (e.g., G0 : [12, 14, 15, 19, 26, 27, 38, 48,\n54, 59, 63, 70, 72, 73, 75, 80, 87, 90, 91, 93, 97], G1 : [2, 11, 21,\n30, 31, 33, 39, 46, 50, 62, 66, 76, 77, 87–89, 95, 99, 102], G2 : [57],\nG3 : [37, 51, 52], G4 : [7, 9, 10, 25, 40, 49, 67, 94], G5 : [34], G6 :\n[22, 61, 84], G7 : [55, 79]).\n\nlosses. We find from NoR that S alone is not an effective\nbranch while NoS is far more competitive. However, when\ntrained jointly (LTOAD) and compared to NoS, S helps R\nimprove the Det. accuracy on C tail notably. Specifically, S\nimproves the image-level AUROC on C tail by 2.98%.\nNoG replaces our prompt-conditioned G with unconditional feature jittering [34, 57, 89] for data augmentation.\nWith the guidance of P n and P a , G creates high-quality\npseudo-features especially beneficial for C tail . We observe\na gain of +2.51% / +0.75% in Det. / Seg. on C tail .\nAblation studies on learnable concepts/prompts. Tab. 8\nanalyzes the effect of each attribute detailed in Tab. 10,\nwhere we demonstrate that our prompt learning design is\ncomprehensive. All experiments are performed in the setb FixP freezes\nting MVTec exp100 and B. FixC freezes C.\na\na\nP . In SingleP, P stores only one abnormal prompt for\neach concept. In ShareP, all concepts share the same abnormal prompts. Each attribute contributes significantly to\nthe Det. performance of C tail and C.\n\n6. Related work\nIn Tab. 9, we group the literature of unsupervised AD based\non their assumptions or target tasks. Notably, LTOAD (1)\nis a unified model, (2) has online learning capability, (3)\nuses VLM/LLM priors, (4) handles long-tailed training data\ndistributions, and (5) is class-agnostic.\nUnsupervised anomaly detection. G0 methods train an\nindependent predictor per class. In contrast, UniAD [89]\nchallenges to learn one unified predictor for all classes.\nMore follow-up research falls into this group (G1 ). Inspired\nby prior work [56, 60, 71], MoEAD [62] uses mixture-ofexperts. HVQ [57] uses class-specific quantization modules\nin their VQ-VAE [82] architecture, but HVQ also induces\nthe constraint of requiring class information as inputs, making it not class-agnostic, i.e., G2 .\nFoundation model based AD. With advancement in foundation models, recent works focused on zero-shot [7, 9, 24,\n40, 50, 67, 100, 102] or few-shot [2, 25, 51–53, 101] unsupervised AD where the normal training images are limited (or none), they [7, 9, 25, 40, 51, 52, 67, 100] often\n\nPrompt Design Conditions of\nUnsupervised AD Methods\nlearnable class/concept names\nsupport &gt;1 APs\nlearnable APs\nclass/concept specific APs\n\nPrompt Design Categories in AD\nG8 G9 G10 G11 G12\n\n✓\n✗\n✗\n✗\n\n✗ ✗\n✗ ✓\n✓ ✗\n✗ ✗\n\n✗\n✓\n✗\n✓\n\n✗\n✓\n✓\n✓\n\nLTOAD\n\n✓\n✓\n✓\n✓\n\nTable 10. Characteristic comparison w.r.t. prompt design\nbetween LTOAD and prior unsupervised AD works which use\nLLM(s) with prompts (e.g., G8 : [34, 67], G9 : [10], G10 : [9, 37,\n40, 52, 101], G11 : [7], G12 : [51, 102]). AP: abnormal prompts.\n\nturn themselves to the rich knowledge in foundation models [29, 41, 68, 81, 98] or conversational AI [64]. These\nmethods can be grouped into either G3 or G4 , depending\non whether they are unified model. To query the language\nmodels precisely, G3 and G4 need the class names or labels\nas extra inputs and are thus not class-agnostic.\nAlthough normal images are limited in zero/few-shot\nAD, the distribution is even since the number of images\nper class is the same. Consequently, LTAD [34], i.e., G5 ,\nexplores the long-tailed setting where the training set is\nhighly unevenly distributed. They rely on the pre-trained\nALIGN [41] and learn the pseudo-class names. We highlight the differences between LTOAD prompt learning to\nrelated works in Tab. 10. In summary, LTOAD supports (a)\nlearnable concept names, (b) learnable abnormal prompts\n(AP), (c) multiple APs, and (d) concept-specific APs.\nOnline learning AD. Online (or continual/incremental)\nlearning [23, 44, 69, 83] investigates how the model learns\ncontinuously on a data stream. Recent works [22, 55, 61,\n79, 84], i.e. G6 and G7 , explore unsupervised online learning\nAD. Differently, we propose the task of long-tailed online\nanomaly detection to study the effect of head/tail classes.\n\n7. Conclusion\nWe propose the benchmark of long-tailed online anomaly\ndetection, studying the online performance of head and tail\nclasses. We identify the shortcomings of class-aware methods and propose class-agnostic LTOAD. It learns to approximate the ground truth class set while using foundation\nmodels for our novel concept and abnormal prompt learning framework. We also propose AAA , a learning algorithm\nto adapt the online stream with potentially abnormal inputs.\nLTOAD outperforms the SOTA in most offline and online\nsettings without additional class information. Although not\nspecifically designed for domain generalization, LTOAD\ncan adapt to unseen domains. We believe that LTOAD will\nadvance the field toward a more realistic anomaly detection\nsetting that is closer to real-world applications.\nAcknowledgments. CAY and KCP were supported by Mitsubishi Electric Research Laboratories. CAY and RAY\nwere in part supported by an NSF Award #2420724.\n\n\fReferences\n[1] Akshatha Arodi, Margaux Luck, Jean-Luc Bedwani, Aldo\nZaimi, Ge Li, Nicolas Pouliot, Julien Beaudry, and\nGaétan Marceau Caron. CableInspect-AD: An expertannotated anomaly detection dataset. In Proc. NeurIPS,\n2024. 1\n[2] Yuhu Bai, Jiangning Zhang, Zhaofeng Chen, Yuhang Dong,\nYunkang Cao, and Guanzhong Tian. Dual-path frequency\ndiscriminators for few-shot anomaly detection. KnowledgeBased Systems, 2024. 8\n[3] Ujjwal Baid, Satyam Ghodasara, Suyash Mohan, Michel\nBilello, Evan Calabrese, Errol Colak, Keyvan Farahani,\nJayashree Kalpathy-Cramer, Felipe C Kitamura, Sarthak\nPati, et al. The rsna-asnr-miccai brats 2021 benchmark on\nbrain tumor segmentation and radiogenomic classification.\narXiv preprint arXiv:2107.02314, 2021. 5\n[4] Jinan Bao, Hanshi Sun, Hanqiu Deng, Yinsheng He, Zhaoxiang Zhang, and Xingyu Li. BMAD: Benchmarks for medical anomaly detection. In Proc. CVPR, 2024. 5, 1\n[5] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. MVTec AD–a comprehensive real-world\ndataset for unsupervised anomaly detection. In Proc.\nCVPR, 2019. 1, 5, 3, 4\n[6] Patrick Bilic, Patrick Christ, Hongwei Bran Li, Eugene\nVorontsov, Avi Ben-Cohen, Georgios Kaissis, Adi Szeskin,\nColin Jacobs, Gabriel Efrain Humpire Mamani, Gabriel\nChartrand, et al. The liver tumor segmentation benchmark\n(lits). Medical Image Analysis, 2023. 5\n[7] Yunkang Cao, Xiaohao Xu, Chen Sun, Yuqi Cheng, Zongwei Du, Liang Gao, and Weiming Shen. Segment any\nanomaly without training via hybrid prompt regularization.\narXiv preprint arXiv:2305.10724, 2023. 1, 2, 8\n[8] Yunkang Cao, Xiaohao Xu, Jiangning Zhang, Yuqi Cheng,\nXiaonan Huang, Guansong Pang, and Weiming Shen. A\nsurvey on visual anomaly detection: Challenge, approach,\nand prospect. arXiv preprint arXiv:2401.16402, 2024. 1\n[9] Yunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng,\nWeiming Shen, and Giacomo Boracchi. AdaCLIP: Adapting CLIP with hybrid learnable prompts for zero-shot\nanomaly detection. In Proc. ECCV, 2024. 1, 2, 8\n[10] Pi-Wei Chen, Jerry Chun-Wei Lin, Jia Ji, Feng-Hao Yeh,\nZih-Ching Chen, and Chao-Chun Chen. Human-free automated prompting for vision-language anomaly detection:\nPrompt optimization with meta-guiding prompt scheme.\narXiv preprint arXiv:2406.18197, 2024. 1, 2, 8\n[11] Qiyu Chen, Huiyuan Luo, Chengkan Lv, and Zhengtao\nZhang. A unified anomaly synthesis strategy with gradient\nascent for industrial anomaly detection and localization. In\nProc. ECCV, 2024. 8\n[12] Niv Cohen and Yedid Hoshen. Sub-image anomaly detection with deep pyramid correspondences. arXiv preprint\narXiv:2005.02357, 2020. 8\n[13] Microsoft Corporation. Microsoft Copilot, 2023. 4, 2\n[14] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and\nRomaric Audigier. PaDiM: a patch distribution modeling\nframework for anomaly detection and localization. In Proc.\nICPR, 2021. 8\n\n[15] Hanqiu Deng and Xingyu Li. Anomaly detection via\nreverse distillation from one-class embedding. In Proc.\nCVPR, 2022. 8\n[16] Keval Doshi and Yasin Yilmaz. Continual learning for\nanomaly detection in surveillance videos. In Proc. CVPR\nWorkshop, 2020. 1\n[17] Hugging Face.\nTransformers: Align model documentation. https : / / huggingface . co / docs /\ntransformers/model_doc/align. 2\n[18] Yehonatan Fridman, Matan Rusanovsky, and Gal Oren.\nChangeChip: A reference-based unsupervised change detection for PCB defect detection. In Proc. PAINE, 2021.\n1\n[19] Matic Fučka, Vitjan Zavrtanik, and Danijel Skočaj.\nTransFusion–a transparency-based diffusion model for\nanomaly detection. In Proc. ECCV, 2024. 8\n[20] Hugo Gangloff, Minh-Tan Pham, Luc Courtrai, and\nSébastien Lefèvre. Leveraging vector-quantized variational\nautoencoder inner metrics for anomaly detection. In Proc.\nICPR, 2022. 1, 5\n[21] Bin-Bin Gao. Learning to detect multi-class anomalies with\njust one normal image prompt. In Proc. ECCV, 2024. 5, 8\n[22] Han Gao, Huiyuan Luo, Fei Shen, and Zhengtao Zhang.\nTowards total online unsupervised anomaly detection\nand localization in industrial vision.\narXiv preprint\narXiv:2305.15652, 2023. 1, 2, 8\n[23] Yasir Ghunaim, Adel Bibi, Kumail Alhamoud, Motasem\nAlfarra, Hasan Abed Al Kader Hammoud, Ameya Prabhu,\nPhilip HS Torr, and Bernard Ghanem. Real-time evaluation\nin online continual learning: A new hope. In Proc. CVPR,\n2023. 8\n[24] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen,\nHao Li, Ming Tang, and Jinqiao Wang. Filo: Zero-shot\nanomaly detection by fine-grained description and highquality localization. In Proc. ACM MM, 2024. 8\n[25] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen,\nMing Tang, and Jinqiao Wang. AnomalyGPT: Detecting industrial anomalies using large vision-language models. In\nProc. AAAI, 2024. 2, 6, 8, 5, 7, 9, 10, 11, 12, 13, 14\n[26] Guan Gui, Bin-Bin Gao, Jun Liu, Chengjie Wang, and\nYunsheng Wu. Few-shot anomaly-driven generation for\nanomaly classification and segmentation. In Proc. ECCV,\n2024. 8\n[27] Jia Guo, Haonan Han, Shuai Lu, Weihang Zhang, and\nHuiqi Li. Absolute-unified multi-class anomaly detection\nvia class-agnostic distribution alignment. arXiv preprint\narXiv:2404.00724, 2024. 8\n[28] Ahmed Hamada. Br35H: Brain tumor detection 2020,\n2020. 1\n[29] Jiaming Han, Kaixiong Gong, Yiyuan Zhang, Jiaqi Wang,\nKaipeng Zhang, Dahua Lin, Yu Qiao, Peng Gao, and Xiangyu Yue. OneLLM: One framework to align all modalities with language. In Proc. CVPR, 2024. 8\n[30] 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. In Proc. NeurIPS, 2024. 2, 8\n\n\f[31] Haoyang He, Jiangning Zhang, Hongxu Chen, Xuhai Chen,\nZhishan Li, Xu Chen, Yabiao Wang, Chengjie Wang, and\nLei Xie. A diffusion-based framework for multi-class\nanomaly detection. In Proc. AAAI, 2024. 8\n[32] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.\nDeep residual learning for image recognition. In Proc.\nCVPR, 2016. 4\n[33] Liren He, Zhengkai Jiang, Jinlong Peng, Liang Liu, Qiangang Du, Xiaobin Hu, Wenbing Zhu, Mingmin Chi, Yabiao\nWang, and Chengjie Wang. Learning unified reference representation for unsupervised multi-class anomaly detection.\nIn Proc. ECCV, 2024. 8\n[34] Chih-Hui Ho, Kuan-Chuan Peng, and Nuno Vasconcelos.\nLong-tailed anomaly detection with learnable class names.\nIn Proc. CVPR, 2024. 1, 2, 3, 5, 6, 7, 8, 4, 9, 10, 11, 12, 13,\n14, 15, 16, 17, 18, 19, 20, 21\n[35] Junjie Hu, Yuanyuan Chen, and Zhang Yi. Automated segmentation of macular edema in oct using deep neural networks. Medical image analysis, 2019. 5\n[36] Chaoqin Huang, Haoyan Guan, Aofan Jiang, Ya Zhang,\nMichael Spratling, and Yan-Feng Wang. Registration based\nfew-shot anomaly detection. In Proc. ECCV, 2022. 6, 5, 7,\n8, 9, 10, 11, 12, 13, 14\n[37] Chaoqin Huang, Aofan Jiang, Jinghao Feng, Ya Zhang,\nXinchao Wang, and Yanfeng Wang. Adapting visuallanguage models for generalizable anomaly detection in\nmedical images. In Proc. CVPR, 2024. 1, 2, 8\n[38] Jeeho Hyun, Sangyun Kim, Giyoung Jeon, Seung Hwan\nKim, Kyunghoon Bae, and Byung Jun Kang. ReConPatch: Contrastive patch representation learning for industrial anomaly detection. In Proc. WACV, 2024. 8\n[39] Brian KS Isaac-Medina, Yona Falinie A Gaus, Neelanjan Bhowmik, and Toby P Breckon. Towards open-world\nobject-based anomaly detection via self-supervised outlier\nsynthesis. In Proc. ECCV, 2024. 8\n[40] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang,\nAvinash Ravichandran, and Onkar Dabeer. WinCLIP: Zero/few-shot anomaly classification and segmentation. In Proc.\nCVPR, 2023. 1, 2, 5, 8\n[41] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana\nParekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li,\nand Tom Duerig. Scaling up visual and vision-language\nrepresentation learning with noisy text supervision. In Proc.\nICML, 2021. 8, 2, 4\n[42] Pranita Balaji Kanade and PP Gumaste. Brain tumor detection using MRI images. Brain, 2015. 1\n[43] Felipe Campos Kitamura. Head CT - hemorrhage, 2018. 1\n[44] Hyunseo Koh, Dahyun Kim, Jung-Woo Ha, and Jonghyun\nChoi. Online continual learning on class incremental blurry\ntask configuration with anytime inference. In Proc. ICLR,\n2022. 8\n[45] Bennett Landman, Zhoubing Xu, J Igelsias, Martin Styner,\nThomas Langerak, and Arno Klein. Miccai multi-atlas labeling beyond the cranial vault–workshop and challenge.\nIn Proc. MICCAI Multi-Atlas Labeling Beyond Cranial\nVault—Workshop Challenge, 2015. 5\n\n[46] Joo Chan Lee, Taejune Kim, Eunbyung Park, Simon S Woo,\nand Jong Hwan Ko. Continuous memory representation for\nanomaly detection. In Proc. ECCV, 2024. 8\n[47] Jan Lehr, Jan Philipps, Alik Sargsyan, Martin Pape, and\nJörg Krüger. AD3: Introducing a score for anomaly detection dataset difficulty assessment using VIADUCT dataset.\nIn Proc. ECCV, 2024. 1\n[48] Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas\nPfister. CutPaste: Self-supervised learning for anomaly detection and localization. In Proc. CVPR, 2021. 8\n[49] Shengze Li, Jianjian Cao, Peng Ye, Yuhan Ding, Chongjun\nTu, and Tao Chen. ClipSAM: CLIP and SAM collaboration for zero-shot anomaly segmentation. arXiv preprint\narXiv:2401.12665, 2024. 2, 8\n[50] 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 Proc.\nICLR, 2024. 8\n[51] Xiaofan Li, Zhizhong Zhang, Xin Tan, Chengwei Chen,\nYanyun Qu, Yuan Xie, and Lizhuang Ma. PromptAD:\nLearning prompts with only normal samples for few-shot\nanomaly detection. In Proc. CVPR, 2024. 1, 2, 5, 8\n[52] Yuanwei Li, Elizaveta Ivanova, and Martins Bruveris.\nFADE: Few-shot/zero-shot anomaly detection engine using\nlarge vision-language model. In Proc. BMVC, 2024. 1, 2, 8\n[53] Jingyi Liao, Xun Xu, Manh Cuong Nguyen, Adam Goodge,\nand Chuan Sheng Foo. COFT-AD: Contrastive fine-tuning\nfor few-shot anomaly detection. IEEE TIP, 2024. 8\n[54] Chieh Liu, Yu-Min Chu, Ting-I Hsieh, Hwann-Tzong\nChen, and Tyng-Luh Liu. Learning diffusion models for\nmulti-view anomaly detection. In Proc. ECCV, 2024. 8\n[55] Jiaqi Liu, Kai Wu, Qiang Nie, Ying Chen, Bin-Bin\nGao, Yong Liu, Jinbao Wang, Chengjie Wang, and Feng\nZheng. Unsupervised continual anomaly detection with\ncontrastively-learned prompt. In Proc. AAAI, 2024. 1, 8\n[56] Ruiying Lu, Bo Chen, Jianqiao Sun, Wenchao Chen,\nPenghui Wang, Yuanwei Chen, Hongwei Liu, and\nPramod K Varshney. Heterogeneity-aware recurrent neural network for hyperspectral and multispectral image fusion. IEEE Journal of Selected Topics in Signal Processing,\n2022. 8\n[57] Ruiying Lu, YuJie Wu, Long Tian, Dongsheng Wang,\nBo Chen, Xiyang Liu, and Ruimin Hu. Hierarchical\nvector quantized transformer for multi-class unsupervised\nanomaly detection. In Proc. NeurIPS, 2023. 1, 2, 4, 5, 6, 8,\n7, 9, 10, 11, 12, 13, 14\n[58] Jianhong Ma, Tao Zhang, Cong Yang, Yangjie Cao, Lipeng\nXie, Hui Tian, and Xuexiang Li. Review of wafer surface\ndefect detection methods. Electronics, 2023. 1\n[59] Sergio Naval Marimont and Giacomo Tarroni. Anomaly detection through latent space restoration using vector quantized variational autoencoders. In Proc. ISBI, 2021. 1, 5,\n8\n[60] Saeed Masoudnia and Reza Ebrahimpour. Mixture of experts: a literature survey. Artificial Intelligence Review,\n2014. 8\n\n\f[61] Declan GD McIntosh and Alexandra Branzan Albu. Unsupervised, online and on-the-fly anomaly detection for nonstationary image distributions. In Proc. ECCV, 2024. 1, 2,\n8\n[62] Shiyuan Meng, Wenchao Meng, Qihang Zhou, Shizhong\nLi, Weiye Hou, and Shibo He. MoEAD: A parameterefficient model for multi-class anomaly detection. In Proc.\nECCV, 2024. 2, 6, 8, 5, 7, 9, 10, 11, 12, 13, 14\n[63] Shancong Mou, Xiaoyi Gu, Meng Cao, Haoping Bai, Ping\nHuang, Jiulong Shan, and Jianjun Shi. RGI: Robust GANinversion for mask-free image inpainting and unsupervised\npixel-wise anomaly detection. In Proc. ICLR, 2023. 8\n[64] OpenAI. ChatGPT, 2023. 4, 8, 2\n[65] Guansong Pang, Chunhua Shen, Longbing Cao, and Anton\nVan Den Hengel. Deep learning for anomaly detection: A\nreview. ACM computing surveys (CSUR), 2021. 1\n[66] Sukanya Patra and Souhaib Ben Taieb. Revisiting deep\nfeature reconstruction for logical and structural industrial\nanomaly detection. TMLR, 2024. 8\n[67] Zhen Qu, Xian Tao, Mukesh Prasad, Fei Shen, Zhengtao\nZhang, Xinyi Gong, and Guiguang Ding. VCP-CLIP: A\nvisual context prompting model for zero-shot anomaly segmentation. In Proc. ECCV, 2024. 1, 2, 8\n[68] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya\nRamesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,\nAmanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In Proc. ICML, 2021. 8\n[69] Siddeshwar Raghavan, Jiangpeng He, and Fengqing Zhu.\nDELTA: Decoupling long-tailed online continual learning.\nIn Proc. CVPR, 2024. 8\n[70] Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In Proc. ICML, 2015. 8\n[71] Carlos Riquelme, Joan Puigcerver, Basil Mustafa, Maxim\nNeumann, Rodolphe Jenatton, André Susano Pinto, Daniel\nKeysers, and Neil Houlsby. Scaling vision with sparse mixture of experts. In Proc. NeurIPS, 2021. 8\n[72] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard\nSchölkopf, Thomas Brox, and Peter Gehler. Towards total recall in industrial anomaly detection. In Proc. CVPR,\n2022. 8\n[73] Marco Rudolph, Bastian Wandt, and Bodo Rosenhahn.\nSame same but differnet: Semi-supervised defect detection\nwith normalizing flows. In Proc. WACV, 2021. 8\n[74] Radhwan AA Saleh, Mehmet Zeki Konyar, Kaplan Kaplan,\nand H Metin Ertunç. Tire defect detection model using machine learning. In Proc. eSmarTA, 2022. 1\n[75] Mohammadreza Salehi, Niousha Sadjadi, Soroosh\nBaselizadeh, Mohammad H Rohban, and Hamid R Rabiee. Multiresolution knowledge distillation for anomaly\ndetection. In Proc. CVPR, 2021. 8, 6, 7\n[76] Jian Shi, Pengyi Zhang, Ni Zhang, Hakim Ghazzai, and Peter Wonka. Dissolving is amplifying: Towards fine-grained\nanomaly detection. In Proc. ECCV, 2024. 8\n[77] Luc PJ Sträter, Mohammadreza Salehi, Efstratios Gavves,\nCees GM Snoek, and Yuki M Asano. GeneralAD: Anomaly\ndetection across domains by attending to distorted features.\nIn Proc. ECCV, 2024. 8\n\n[78] Mingxing Tan and Quoc Le. EfficientNet: Rethinking\nmodel scaling for convolutional neural networks. In Proc.\nICML, 2019. 2\n[79] Jiaqi Tang, Hao Lu, Xiaogang Xu, Ruizheng Wu, Sixing\nHu, Tong Zhang, Tsz Wa Cheng, Ming Ge, Ying-Cong\nChen, and Fugee Tsung. An incremental unified framework\nfor small defect inspection. In Proc. ECCV, 2024. 1, 8\n[80] Tran Dinh Tien, Anh Tuan Nguyen, Nguyen Hoang Tran,\nTa Duc Huy, Soan Duong, Chanh D Tr Nguyen, and\nSteven QH Truong. Revisiting reverse distillation for\nanomaly detection. In Proc. CVPR, 2023. 8\n[81] Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier\nMartinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar,\net al. LLaMA: Open and efficient foundation language\nmodels. arXiv preprint arXiv:2302.13971, 2023. 8\n[82] Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete\nrepresentation learning. In Proc. NeurIPS, 2017. 5, 8\n[83] Liyuan Wang, Xingxing Zhang, Hang Su, and Jun Zhu.\nA comprehensive survey of continual learning: theory,\nmethod and application. IEEE TPAMI, 2024. 8\n[84] Shenxing Wei, Xing Wei, Zhiheng Ma, Shaochen Zhang\nSonglin Dong, and Yihong Gong. Few-shot online anomaly\ndetection and segmentation. Knowledge-Based Systems,\n2024. 1, 2, 8\n[85] Matthias Wieler and Tobias Hahn. Weakly supervised\nlearning for industrial optical inspection. In DAGM symposium in, 2007. 5, 3, 4\n[86] Shuai Yang, Zhifei Chen, Pengguang Chen, Xi Fang, Yixun\nLiang, Shu Liu, and Yingcong Chen. Defect spectrum: A\ngranular look of large-scale defect datasets with rich semantics. In Proc. ECCV, 2024. 1\n[87] Hang Yao, Ming Liu, Haolin Wang, Zhicun Yin, Zifei Yan,\nXiaopeng Hong, and Wangmeng Zuo. GLAD: Towards\nbetter reconstruction with global and local adaptive diffusion models for unsupervised anomaly detection. In Proc.\nECCV, 2024. 8\n[88] Xincheng Yao, Ruoqi Li, Zefeng Qian, Lu Wang, and\nChongyang Zhang. Hierarchical gaussian mixture normalizing flow modeling for unified anomaly detection. In Proc.\nECCV, 2024.\n[89] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu,\nYu Zheng, and Xinyi Le. A unified model for multi-class\nanomaly detection. In Proc. NeurIPS, 2022. 5, 6, 8, 7, 9,\n10, 11, 12, 13, 14\n[90] 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. 8\n[91] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj.\nDRAEM-a discriminatively trained reconstruction embedding for surface anomaly detection. In Proc. ICCV, 2021.\n8, 6, 7\n[92] Chongsheng Zhang, George Almpanidis, Gaojuan Fan,\nBinquan Deng, Yanbo Zhang, Ji Liu, Aouaidjia Kamel,\nPaolo Soda, and João Gama. A systematic review on longtailed learning. arXiv preprint arXiv:2408.00483, 2024. 1\n\n\f[93] Gongjie Zhang, Kaiwen Cui, Tzu-Yi Hung, and Shijian Lu.\nDefect-GAN: High-fidelity defect synthesis for automated\ndefect inspection. In Proc. WACV, 2021. 8\n[94] Jiangning Zhang, Xuhai Chen, Zhucun Xue, Yabiao Wang,\nChengjie Wang, and Yong Liu. Exploring grounding potential of VQA-oriented GPT-4V for zero-shot anomaly detection. arXiv preprint arXiv:2311.02612, 2023. 2, 8\n[95] Jiangning Zhang, Xuhai Chen, Yabiao Wang, Chengjie\nWang, Yong Liu, Xiangtai Li, Ming-Hsuan Yang, and\nDacheng Tao. Exploring plain ViT reconstruction for multiclass unsupervised anomaly detection. In Proc. IJCAI\nWorkshop on Anomaly Detection with Foundation Models,\n2024. 5, 8, 1\n[96] Jiangning Zhang, Haoyang He, Zhenye Gan, Qingdong He,\nYuxuan Cai, Zhucun Xue, Yabiao Wang, Chengjie Wang,\nLei Xie, and Yong Liu. ADer: A comprehensive benchmark\nfor multi-class visual anomaly detection. arXiv preprint\narXiv:2406.03262, 2024. 1, 4\n[97] Xuan Zhang, Shiyu Li, Xi Li, Ping Huang, Jiulong Shan,\nand Ting Chen. DeSTSeg: Segmentation guided denoising student-teacher for anomaly detection. In Proc. CVPR,\n2023. 8\n[98] Yiyuan Zhang, Kaixiong Gong, Kaipeng Zhang, Hongsheng Li, Yu Qiao, Wanli Ouyang, and Xiangyu Yue. MetaTransformer: A unified framework for multimodal learning. arXiv preprint arXiv:2307.10802, 2023. 8\n[99] Ying Zhao. OmniAL: A unified cnn framework for unsupervised anomaly localization. In Proc. CVPR, 2023. 8\n[100] Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, and Jiming Chen. AnomalyCLIP: Object-agnostic prompt learning\nfor zero-shot anomaly detection. In Proc. ICLR, 2024. 1, 2,\n8\n[101] Jiawen Zhu and Guansong Pang.\nToward generalist\nanomaly detection via in-context residual learning with\nfew-shot sample prompts. In Proc. CVPR, 2024. 8\n[102] Jiawen Zhu, Yew-Soon Ong, Chunhua Shen, and Guansong\nPang. Fine-grained abnormality prompt learning for zeroshot anomaly detection. arXiv preprint arXiv:2410.10289,\n2024. 1, 8\n[103] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing\nZhang, and Onkar Dabeer.\nSpot-the-difference selfsupervised pre-training for anomaly detection and segmentation. In Proc. ECCV, 2022. 1, 5, 3, 4\n\n\fAppendix\nThe appendix is organized as follows:\n• In Sec. A1, we provide additional implementation and\ntraining details of our method.\n• In Sec. A2, we provide more details of our new benchmark: long-tailed online AD.\n• In Sec. A3, we provide additional results on Unimodule\nNormal feature\nNormal feature\n⟨⟩ Similarity\nMedical\n[4, 95] and LTAD [34]Learnable\nbenchmarks.\nLoss\nAbnormal feature\nAbnormal\nfeature\n• In Sec. A4, we provide additional results on LTOAD\nbenchmarks.\n\nle module\n\nmodule\n\n§5.1\nˆ\nConcepts C\n\nP\n\nElectronics\n\nBroken\n\n{nĉ }\n\n{a }\n\nĉ Loss\n\nFi\n\n§5.1 Prompt Sets\n\nR\nPn\n\normal\n\nBend Missing\n\normal\n\nCrack Broken\n\nPa\nŶ\n\nS\n\n⟨\n\n§5.3\nLayer-aware\nP\nvs.\nProjection\n,\n, E\n\n⟩ ⟨\n\nFp\n\nEncoder\n\nĉ }\n\n⟨\n\n{aĉ }\n\nLrec\nn\nConcept-VQ\n\nET\n\nL\n\n{aĉ }\n\n⟩\n\nNormal feature{tĉ }\n\np\n\nAbnormal feature\n\nR(F p )\nPrompt-conditioned\n\nG\n\nLgen\n\n{tĉ }\n\np\n\n⟨⟩\n\n{nĉ }\nR\n\nD\nFp\nR(F a )\n{aĉ }\n\nF a Lrec\na\n\nFn\n\nER\nQ Lvq\nshared\nDR\n\nER\nQ\n\nER\nQ\n\n{nĉ }\n\nSimilarity\n\nNormal feature/score\n\nLoss\n\nAbnormal feature/score\n\n⟨⟩\n\n{Sĉn }\n\nFp\n\nSn\np\n\nLsem\nn\n\n{Sĉa }\n\nSa\n\nfeature/score\n{nĉNormal\n}\n⟨⟩ {S n }\nĉ\n\nSn\n\n{aĉ }\n\n⟨⟩\n\n(a) S with normal features\n\nF Lrec\na\n\nF\n\nER\nQ Lvq\nR\n{nĉ } D p {aĉ }shared\nConcept-VQ\n\nLearnable module\n\n⟨⟩ Similarity\n\n{tĉ }\n\nd\n\np\n\nConcept-VQ\n\nLn\n\nConcept-VQ\n\nET\n\nfeature\n\nNormal\n\n{nĉ }\n\nLayer-aware\nProjection EP\n\n{nĉ }\n\nPrompt-conditioned\nReconstruction module R. WeFdetail\nthe training\npipeline\np\nG is\nand\ndetails\nof\nR\nintroduced\nin\nSec.\n4.2.\nThe\npipeline\nEncoder\nshared\nT A1.\nshown in E\nFig.\nrec\nn\na\ngen\n\nEncoder\n\n⟩\n\nBend Missing\n\nA1.1. Training\ndetails\nCrack\n\nMedicines\n\nature\n\nP\n\nNormal\n\n⟨⟩\n\nFi\n\n§5.1 Prompt Sets\n\nn\na LTOAD\nA1. Details\nof\n\npush the similarities between pseudo-normal features and\nthe input normal features using a generator loss Lgen =\nGAP (1 − ⟨F p , F n ⟩) .\nSemantics module S. We detail the training pipeline and\ndetails of S introduced in Sec. 4.3. The pipeline is shown in\nFig. A2.\n\nSimilarity\n\nAbnormal feature/score\n\nLoss\n\na\n\n⟨⟩\n\n{SFĉn }\n\n{aĉ }\n\np\n\nSn\np\n\n⟨⟩\n\n{S a }\n\nĉ\nLsem\nn\n\nLsem\na\nSa\n\n(b) S with abnormal features\n⟨⟩\n\n{Sĉa }\n\nSa\n\nFigure A2. Semantics module S. (a) Given normal features F p ,\nn\n(a)LSsem\nnormalSfeatures\nmaximizes\n− S a . Here S n is the overall per-pixel simin with\np\nlarity between F and {ncb} while S a is the one between F p and\na\nsem\n{acb}. (b) On\nthe other hand,\nn given abnormal features F , La\n⟨⟩ {S n }a\nS\nn\nĉ\nmaximizes S − S .\nsem\n\nLa\nWe maximizepthe difference\nbetween normal semantic\nn\nR\nscores\nS\nand\nabnormal\nsemantic\nscores S a for normal F p\nD\n§5.3 S\na\nand\nfor pseudo-abnormal\nF a . We modify the ex⟨⟩vice\n{aĉ }\n{Sversa\nSa\nĉ }\nplicit anomaly margin [51] loss for S. Specifically, the loss\n, ⟩vs.⟨ , ⟩\nR(F p )\nR(F a )\n(b) S\nabnormal\nfeatures\niswith\ndefined\nas Lsem\n= max(−δ, S(F p )), where max(·) is a\nn\nclipping function and δ ∈ R+ is a margin term we introduce\nFigure A1. Reconstruction module R. Our Concept-VQ autoento further encourage the gap. In contrast, pseudo-abnormal\ncoder consists of an encoder ER , a decoder DR , and quantization\nF a is trained by minimizing Lsem\n= max(−δ, −S(F a )) as\na\nmodules Q. It learns to reconstruct input features. As data augshown in Fig. A2(b). Together, our semantics loss Lsem is\nmentation, we use G to generate pseudo normal F n and pseudo abdefined as the sum of the aforesaid two terms, i.e., Lsem =\nnormal F a conditioned on prompts {ncb} and {acb}, respectively.\nsem\nLsem\nn + La . The final loss function L for our offline learning is\nWe maximize the similarly of F i and reconstructed feaFa\n\ntures F r = R(F p ). At the same time, the reconstruction\nof F a should also be as close to F i as possible, i.e., our\nreconstruction loss Lrec is defined as:\n  \\gL ^{\\tt rec} = \\underbrace { {\\tt GAP} \\left ( \\mathbf {1} - \\left &lt; \\mF ^{\\tt i},\\ {\\tt R}(\\mF ^{\\tt p}) \\right &gt; \\right ) }_{\\gL ^{\\tt rec}_{\\tt n}} \\ + \\ \\underbrace { {\\tt GAP} \\left ( \\mathbf {1} - \\left &lt; \\mF ^{\\tt i},\\ {\\tt R}(\\mF ^{\\tt a}) \\right &gt; \\right ) }_{\\gL ^{\\tt rec}_{\\tt a}}. \\label {eq:loss_rec}\n(A5)\n\nIn addition to Lrec\nin Eq. (A5) which trains G, we also\na\n\n  \\gL = \\lambda _{\\tt vq} \\gL ^{\\tt vq} + \\lambda _{\\tt rec} \\gL ^{\\tt rec} + \\lambda _{\\tt gen} \\gL ^{\\tt gen} + \\lambda _{\\tt sem} \\gL ^{\\tt sem}, \\label {eq:loss}\n\n(A6)\n\nwhere the λs control the weight of each individual loss.\n\nA1.2. Concept codebooks\nAs mentioned in Sec. 4.2, we initialized Bl, bc by sampling\nM codes around its correspondent tbc . Specifically, we initialize Bl, bc = Nl, bc + tbc where Nl, bc ∈ RM ×D is sampled from a Gaussian distribution N (0, σ). Throughout\n\n\fthe training, the center of Bl, bc is always set to tbc and we\nlearn the deviation Nl, bc to fit the data representation. We\nset α = 0.02.\nFor each pixel location (h, w), we find Ql, bc [h, w] =\nBl, bc [m∗ ] where m∗ = argm min ⟨Zl [h, w], Bl, bc [m]⟩. We\nP\nvq\naggregate Lvq\n= l, bc pbc Lvq\nc is the\nl, b\nc to have L\nl, b\nc , where pb\nelement of p associated with cb. The final outputs of our\nquantization\nmodules are the weighted sum from each conP\ncept, i.e., bc pbc Ql, bc for each l ∈ [1, L].\n\nA1.3. Prompt-conditioned data augmentation\nWe detail the architecture of G introduced in Sec. 4.2. Given\nf\nthe input visual feature map F p ∈ Rh×w×d , where df is the\nT\noutput dimension of text encoder E , and a set of prompt\nfeatures, G generate pseudo-normal F n or pseudo-abnormal\nf\nfeature map F a ∈ Rh×w×d depending on whether the\nprompt features are n or a.\nf\nThe normal prompt features n ∈ RK×d and abnormal\nf\nprompt features a ∈ RK×5×d contains multiple features\nfrom all concepts. We randomly select one feature as the\ninput feature for text-condition, denoted as g .\nWe first pixel-wise concatenate F p and g . We feed it\nto the 5-layer CNN with a hidden dimension of dh . We use\nReLU as activation layers. We also insert batch normalization layers in between.\n\nA1.4. Semantics similarity scores\nWe detail how we acquire the overall abnormal similarity\nmap S n in Sec. 4.3. During training, we pick the “hardest” abnormal prompts to enhance the gap between normal\nand abnormal semantics. Specifically, for F p , the hardest abnormal prompt is the one with the highest similarity\nscore since it will most likely confuse the model. In other\nwords, we pick Sbca = maximum({⟨F p , abc, i ⟩}i=1, ··· , 5 ).\nHere maximum(·) picks the largest value on the i-dimension.\nOn the other hand, for F a , the hardest abnormal samples\nare the ones with the lowest similarity score, i.e., Sbca =\nminimum({⟨F a , abc,i ⟩}i=1, ··· , 5 ). Here minimum(·) picks the\nsmallest value on the i-dimension.\nFinally, the overall abP\nnormal similarity map is S a = bc pbc Sbca .\nDuring inference, we pick the most probable Sbca , i.e.\na\nSbc = maximum({⟨F p , abc, i ⟩}i=1, ··· , 5 ).\n\nA1.5. Implementation details\nFor our foundation model EI and ET , we use the ALIGN [41]\nimplementation from Hugging Face Transformer [17],\nwhich is open source and publicly available (Apache 2.0).\nTheir EI is based on efficientnet b7 [78] containing multiple EfficientNet blocks. We use the same setting in [34]\nand define our F i as the concatenation of output feature\nmaps from the following blocks: the 3rd , 10th , 17th , and\n37th .\n\nWe sample M = 16 codes of dimension 640 for each\nb =\ncodebook Bl, bc while setting the number of codebooks K\n10. As a comparison, HVQ [57] samples 512 codes of dimension 256 for their K codebooks. Overall, we require far\nfewer codes than since 16 × 10 × 640 ≤ 512K × 256 for all\nK ≥ 1.\nFor Yb (see Eq. 4), we set α = 0.3. In AAA (see Alg. 1),\nwe set γ = 0.3, β = 5, τ = 0.2, and T (Yb ) = 0.95 · r(Yb ).\nFor online learning on the same dataset, we clip the gradient norm by 1e−3. For offline learning and online learning across different datasets, we clip the gradient norm by\n1e−1.\nFor all experiments, we use AdamW optimizer with a\nlearning rate of 1e−4. During training, we use the balance sampler for sampling long-tailed data distribution in\nLTAD [34]. All experiments are conducted on an NVIDIA\nRTX 6000 GPU.\n\nA1.6. Concepts and prompts initialization\nWe now provide the initialization of the Cb and P a we used\nfor all datasets.\nMVTec. Our Cb contains the following vocabularies: semiconductor, zipper, beech, walnut, circuit, microscopy, mahogany, hardwood, medicines, and antibiotics. For each\ncb ∈ Cb, we acquire the 5 abnormal prompts in Pbca by asking Copilot [13] the following query: “Out of 100 [b\nc] which\nlooks generally the same, one appears to have a broken region.\nList 5 examples.”\nVisA. Our Cb contains the following vocabularies:circuit,\nelectronics, candles, bananas, supplements, semiconductor,\nsensors, vitamin, usb, and wheel. For each cb ∈ Cb, we acquire the 5 abnormal prompts in Pbca by asking Copilot [13]\nthe following query: “Out of 100 [b\nc] which looks generally the\nsame, one appears to have a broken region. List 5 examples.”\nDAGM. Our Cb contains the following vocabularies: ultrasound, fetal, wavelengths, topography, microscopy, imaging,\nirregularities, electromagnetic, noise, and seismic. For each\ncb ∈ Cb, we acquire the 5 abnormal prompts in Pbca by asking\nCopilot [13] the following query: “Out of 100 [b\nc] which looks\ngenerally the same, one appears to have a broken region. List\n5 examples.”\nUni-Medical. Our Cb contains the following vocabularies:\nneuroscience, brain, vascular, microscopy, imaging, mri, mitochondrial, neurons, ultrasound, and cerebral. For each\ncb ∈ Cb, we acquire the 5 abnormal prompts in Pbca by asking\nChatGPT [64] the following query: “Out of 100 [b\nc] images\nwhich look generally the same, one appears to have a broken\nregion. List 5 examples.”\n\nA2. Long-tailed online AD benchmark\nWe re-address the design motivation of our long-tailed online AD (LTOAD) benchmark. Then we document the additional details for setting up the LTOAD for the following\n\n\fdatasets, i.e., MVTec [5], VisA [103], and DAGM [85].\nOur benchmark focuses on evaluating the performance\nof Fθt for each step t in online training stream DO where\nθ0 is pre-trained on an long-tailed DT , i.e., LTAD [34]. We\ndesign DO not to be long-tailed because, in the industrial\nenvironment, we need quick adaptation in the online learning process. If DO is also long-tailed, it is difficult for the\nmodel to learn anomaly detection effectively due to insufficient anomaly samples. We will provide all of the used meta\nfiles of DT , DO , and DE along with our code once accepted.\n\nDataset |C| Elements\nMVTec 15\n\nhazelnut, leather, bottle, wood, carpet, tile, metal nut,\ntoothbrush, zipper, transistor, grid, pill, capsule, cable, screw\n\nVisA\n\npcb3, pcb2, pcb1, pcb4, macaroni1, macaroni2,\ncandle, cashew, fryum, capsules, chewinggum, pipe fryum, screw\n\n12\n\nDAGM 10\n\nClass10, Class7, Class9, Class8, Class2,\nClass3, Class5, Class1, Class4, Class6\n\nTable A1. C head and C tail of MVTec, VisA, and DAGM.\n\nFigure A3.\nThe configurations for D O .\nWe define\nthe 8 configurations with combinations of different session type ∈\n{blurry, disjoint} and ordering type ∈\n{head-first, head-first, else}. We visualize them (see Tab. 1) with\na toy example on D O . C head and C tail each has 5 classes.\n\nIn Fig. A3, we visualize the proposed 8 configurations in\nTab. 1 with a toy example for better understanding.\n\nA2.1. MVTec\nMVTec is an industrial anomaly detection dataset, containing 15 classes. In the 1st row of Tab. A1, we list out all\nthe classes and whether each of them belongs to C head or\nC tail in LTAD [34] benchmark. We first detail the selected\nclasses of each D5 configuration in LTOAD. We then discuss the random function we used to sample B-HF and B-TF\nconfigurations.\nIn D5-HF, we divide the DO into 5 disjoint sessions and\nwe put the C head in the first few sessions. We organize the\n\nclasses in each session as the following list so that the number of images in each session of DO is roughly the same.\n1. carpet, hazelnut, metal nut\n2. tile, leather, wood\n3. bottle, screw, capsule\n4. zipper, cable, toothbrush\n5. pill, transistor, grid\nOn the other hand, in D5-TF, we divide the DO into 5 disjoint sessions and we put the C tail in the first few sessions.\nWe organize the classes in each session as the following list,\ni.e.D5-TF in reverse order.\n1. pill, transistor, grid\n2. zipper, cable, toothbrush\n3. screw, capsule, bottle\n4. tile, leather, wood\n5. carpet, hazelnut, metal nut\nIn D5-M, we divide the DO into 5 disjoint sessions and\nwe put both C head and C tail in each session. We organize\nthe classes in each session as the following list\n1. carpet, cable, grid\n2. hazelnut, transistor, capsule,\n3. metal nut, wood, screw\n4. leather, pill, toothbrush\n5. bottle, tile, zipper\nIn B-HF, for each i ∈ 1, · · · , N O where N O = |DO |, we\nfi should\nuse the following operation to determine where X\nhead\ntail\nbe sampled from C\nor C\n. Let the number of remaining C head images at step t, i.e. DO [t :] be Nthead and the one\nfor C tail be Nttail . We sample from U(0, 1) repeatedly for r\nNthead\n,\ntimes and keep the largest number as u. If u ≥ N head\n+Nttail\nt\nhead\nf\nthen we sample Xi from C\nand otherwise. We set r = 5.\nIn B-TF, we use a similar operation. However, we sample\nfrom U(0, 1) repeatedly for r times and keep the smallest\nNthead\nfi\n, then we sample X\nnumber as u instead. If u ≤ N head\n+Nttail\nt\ntail\nfrom C\nand otherwise.\n\nA2.2. VisA\nVisA is an industrial anomaly detection dataset, containing\n12 classes. We list out the C in the 2nd row of Tab. A1.\nHere we use the same design logic for the configurations\nin MVTec. In D5-HF, we organize the classes in each session as the following list.\n1. pcb3, pcb4\n2. pcb1, pcb2\n3. macaroni1, macaroni2\n4. chewinggum, fryum, pipe fryum\n5. candle, capsules, cashew\nIn D5-TF, we organize the classes in each session as the\nfollowing list.\n1. candle, capsules, cashew\n2. chewinggum, fryum, pipe fryum\n3. macaroni1, macaroni2\n\n\f4. pcb1, pcb2\n5. pcb3, pcb4\nIn D5-M, we organize the classes in each session as the following list.\n1. candle, macaroni1\n2. capsules, macaroni2, pcb1\n3. cashew, pcb2\n4. chewinggum, pcb3\n5. fryum, pipe fryum, pcb4\n\nimage-level AUROC of 85.26 for Det. , the ResNet-based\nK-means alternative only achieves 57.16.\nComputational cost. Our method does not introduce computational overhead. We pre-compute the Cb before training\nand it takes only 3 minutes to run on one single NVIDIA\nRTX 6000 GPU. Additionally, we use fewer parameters\nb &lt; |C| thus requires fewer\nthan LTAD [34] since our |C|\nlearned prompts. Lastly, the throughput of LTOAD is 61.74\nfps while LTAD’s is 32.78.\n\nA2.3. DAGM\n\nA3.2. MVTec, VisA, and DAGM\n\nDAGM is a synthetic anomaly detection dataset, containing\n10 classes. We list out the C in the 3rd row of Tab. A1. Each\nclass has a different synthetic pattern.\nHere we use the same design logic for the configurations\nin MVTec. In D5-HF, we organize the classes in each session as the following list.\n1. Class9, Class10\n2. Class7, Class8\n3. Class2 Class6,\n4. Class4, Class5\n5. Class1, Class3\nIn D5-TF, we organize the classes in each session as the\nfollowing list.\n1. Class1, Class3\n2. Class4, Class5\n3. Class6, Class2\n4. Class7, Class8\n5. Class9, Class10\nIn D5-M, we organize the classes in each session as the\nfollowing list.\n1. Class2, Class1\n2. Class7, Class3\n3. Class8, Class4\n4. Class9, Class5\n5. Class10, Class6\n\nWe follow the offline LTAD [34]\nbenchmarks and report on MVTec [5], VisA [103], and\nDAGM [85].\nAdditional quantitative comparison. The results are in the\ncorresponding tables:\n• MVTec\n1. exp100: Tab. A11 and Tab. A12.\n2. exp200: Tab. A13 and Tab. A14.\n3. step100: Tab. A15 and Tab. A16.\n4. step200: Tab. A17 and Tab. A18.\n• VisA\n1. exp100: Tab. A19 and Tab. A20.\n2. exp200: Tab. A21 and Tab. A22.\n3. exp500: Tab. A23 and Tab. A24.\n4. step100: Tab. A25 and Tab. A26.\n5. step200: Tab. A27 and Tab. A28.\n6. step500: Tab. A29 and Tab. A30.\n• DAGM\n1. Overall: Tab. A3.\n2. exp50: Tab. A31 and Tab. A32.\n3. exp100: Tab. A33 and Tab. A34.\n4. exp200: Tab. A35 and Tab. A36.\n5. exp500: Tab. A37 and Tab. A38.\n6. reverse exp200: Tab. A39 and Tab. A40.\n7. step50: Tab. A41 and Tab. A42.\n8. step100: Tab. A43 and Tab. A44.\n9. step200: Tab. A45 and Tab. A46..\n10. step500: Tab. A47 and Tab. A48..\n11. reverse step200: Tab. A49 and Tab. A50..\nWe note that in reverse exp200 and reverse step200, LTAD\nswitches the C head and C tail . We observe a consistent improvement of LTOAD in comparison to all baselines on\nmost configurations. Notably, LTOAD excels on the more\nchallenging C tail which is the focus of long-tailed settings.\nAdditional Qualitative Comparison. Finally, we show additional qualitative results in Fig. A4.\nMore evaluation metrics.. We report more evaluation metrics on MVTec following [96], i.e., pixel-level AUPRO\n(AUPROP ), mean average precision (mAP), and mean\nF1-score (mF1-max), for comprehensive comparisons in\nTab. A2. We observe consistent improvement under all metrics.\n\nA3. Offline experiments\nWe provide additional analysis of our approach. We then\nreport the performances on C head , on C tail , and on each c ∈\nC in the following tables under various datasets and longtailed imbalance [34] settings.\n\nA3.1. Additional analysis\nAlternative approach to our concept learning. A naive\nbaseline for our concept learning is to replace the VLM encoder, i.e. ALIGN [41], with simpler vision architectures\nlike ResNet [32] using clustering methods. However, this\nalternative approach loses all the language information for\neach class and removes the capability of the semantics module S. Additionally, long-tailed data distribution is challenging for simple clustering methods. We provide the empirical comparison on MVTec exp100. While LTOAD achieves\n\nExperiment setup.\n\n\fAD\nAD LTOAD X\n\nexp100\n\nMethod\nMoEAD [62]\nLTOAD\n\nexp200\n\nstep100\n\nstep200\n\nmAP\n\nmF1-max\n\nAUPROP\n\nmAP\n\nmF1-max\n\nAUPROP\n\nmAP\n\nmF1-max\n\nAUPROP\n\nmAP\n\nmF1-max\n\nAUPROP\n\n35.63\n38.21\n\n41.19\n43.86\n\n82.72\n85.98\n\n33.87\n37.57\n\n39.74\n42.65\n\n80.77\n85.30\n\n33.50\n38.22\n\n39.17\n43.32\n\n80.54\n85.71\n\n31.55\n35.29\n\n36.86\n40.45\n\n77.88\n82.86\n\nTable A2. Comparison (↑) on MVTec under more evaluation metrics, i.e. mAP, mF1-max, and AUPROP .\n\nLTAD LTAD\nHVQ\nY\n\nXY\n\nHVQ\nLTOAD\nLTOAD LTOAD\n\nConfig.\n\nC head\n\nImbalance type\n\nNc\nbrain liver retinal\n\nbrain exp100 brain exponential decay 1542 154\n15\nbrain step100 brain\nstep function\n1542 15\n15\nliver exp100\nliver exponential decay 15 1542 154\nliver step100 liver\nstep function\n15 1542 15\nretinal exp100 retinal exponential decay 154 15 1542\nretinal step100 retinal\nstep function\n15\n15 1542\nTable A4. Configurtions of D T for long-tailed Uni-Medical. We\ndenote the number of images per class c as Nc and highlight the\nNc of c ∈ C head or C tail . We set all imbalance factors to 100.\n\n(b) VisA\n(b)comparison\nVisA among LTAD [34],\nFigure A4.\nQualitative\nHVQ [57], and LTOAD on VisA offline LTAD [34] exp100 benchmark. Inputs from C head / C tail are outlined in blue / red. Smaller\nground truth anomaly masks are circled in pink.\nCA\n\nexp100\nDet. Seg.\n\nexp200\nDet. Seg.\n\nstep100\nDet. Seg.\n\nstep200\nDet. Seg.\n\nRegAD [36]\n✗\nAnomalyGPT [25] ✗\nLTAD [34]\n✗\nHVQ [57]\n✗\nLTOAD *\n✗\n\n84.86 90.29\n85.31 77.20\n94.40 97.30\n75.42 85.54\n94.92 96.81\n\n84.86 90.29\n83.29 77.16\n94.29 97.19\n76.19 85.32\n94.13 96.77\n\n84.86 90.29\n86.48 78.76\n93.97 97.07\n75.78 85.23\n94.18 96.90\n\n84.86 90.29\n84.73 78.29\n93.79 96.84\n75.92 84.63\n93.88 96.64\n\nMethod\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\n✓ 84.34 90.13 83.56 89.73 81.11 89.11 80.33 89.07\n✓ 73.26 84.99 72.61 84.18 70.83 83.34 70.01 82.27\n✓ 95.58 97.32 94.71 97.11 94.83 97.30 94.12 97.14\n\nTable A3. Comparison (↑) on offline DAGM in the same format\nas Tab. 2\n\nBaselines &amp; training details.. We compare with the SOTA\nb = 10.\nMoEAD [62] (G1 ) and HVQ [57] (G2 ). We set K\nWe train LTOAD for 25 epochs on liver exp100 and liver\nstep100. On other configurations, we train for 5 epochs.\nFor detection, we reduce Yb to yb by calculating its standard\n\ndeviation.\nQuantitative comparison. The results are in Tab. A5-A10\nin the corresponding tables:\n• brain exp100: Tab. A5.\n• brain step100: Tab. A6.\n• liver exp100: Tab. A7.\n• liver step100: Tab. A8.\n• retinal exp100: Tab. A9.\n• retinal step100: Tab. A10.\nOn most configurations, LTOAD outperforms classagnostic MoEAD while being competitive to class-aware\nHVQ which requires additional information.\n\nA4. Online experiments\nA3.3. Uni-Medical\nExperiment setup. We provided additional results on Uni-\n\nMedical [4, 95] under long-tailed training settings. UniMedical is a medical anomaly detection dataset extracted\nfrom BMAD [4]. It consists of the following benchmarks of\nmedical imaging: Brain MRI [3], Liver CT BTCV [6, 45],\nand Retinal OCT [35]. We use the same design logic of\nLTAD benchmark [34] and create the long-tailed training\nconfigurations for Uni-Medical. Since there are only 3\nclasses in Uni-Medical, we experiment with cases of each\nbeing the head class. We document the configurations of DO\nin Tab. A4.\n\nWe report additional results on our proposed benchmark\nLTOAD under more configurations. For each dataset, we\nreport the quantitative comparison at t = T on all DO configuration with or without our AAA in Tab. A51, Tab. A52,\nand Tab. A53, respectively. We also plot the performance\ncurves of Fθt on C head and C tail for each step t ∈ [0, · · · , T ].\nWe set T = 33 for all experiments. Specifically, we list\nthem as the following.\n• MVTec\n1. exp100: Fig. A5.\n2. exp200: Fig. A6.\n3. step100: Fig. A7.\n\n\fMethod\nHVQ [57]\nMoEAD [62]\nLTOAD\n\nCA\n\nDet.\n\nC\n\nSeg.\n\nC head\nDet. Seg.\n\nC tail\nDet. Seg.\n\nbrain\nDet. Seg.\n\nliver\nDet. Seg.\n\nretinal\nDet. Seg.\n\n✗ 65.21 93.84 83.15 97.03 56.23 92.25 83.15 97.03 45.72 95.42 66.74 89.07\n✓ 60.16 91.09 86.74 97.50 46.88 87.88 86.74 97.50 43.60 94.82 50.15 80.95\n✓ 72.81 94.93 80.77 96.32 68.83 94.24 80.77 96.32 58.05 95.07 79.60 93.42\n\nTable A5. Comparison (↑) on Uni-Medical brain exp100 using\nthe same evaluation metrics as Tab. A11 and Tab. A12.\nMethod\nHVQ [57]\nMoEAD [62]\nLTOAD\n\nCA\n\nDet.\n\nC\n\nSeg.\n\nC head\nDet. Seg.\n\nC tail\nDet. Seg.\n\nliver\nDet. Seg.\n\nretinal\nDet. Seg.\n\n✗ 72.50 94.49 75.10 94.45 71.20 94.51 59.10 96.92 83.30 92.11 75.10 94.45\n✓ 59.22 91.44 58.14 92.11 59.76 91.10 52.48 95.40 67.05 86.80 58.14 92.11\n✓ 69.19 94.53 63.91 94.52 71.82 94.54 58.91 95.69 84.74 93.38 63.91 94.52\n\nHVQ [57]\nMoEAD [62]\nLTOAD\n\nCA\n\nDet.\n\nC\n\nSeg.\n\nC head\nDet. Seg.\n\nC tail\nDet. Seg.\n\nretinal\nDet. Seg.\n\nbrain\nDet. Seg.\n\nTable A9. Comparison (↑) on Uni-Medical retinal exp100 using\nthe same evaluation metrics as Tab. A5.\nMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail hazelnut leather bottle wood carpet\n\n78.92 83.11 75.26\n79.57 95.22 65.87\n82.43 90.04 70.51\n87.44 96.40 79.60\n88.86 99.09 79.90\n87.43 99.34 77.00\n\n97.00\n98.32\n91.84\n96.21\n99.82\n99.93\n\n78.94 98.97 91.05\n98.91 99.68 99.91\n98.61 99.20 97.86\n100.00 96.75 88.07\n100.00 99.92 99.30\n100.00 100.00 97.54\n\n74.48\n92.17\n97.44\n98.19\n99.88\n99.88\n\nDet.\n\nC\n\nSeg.\n\nC head\nDet. Seg.\n\nC tail\nDet. Seg.\n\nbrain\nDet. Seg.\n\nliver\nDet. Seg.\n\nretinal\nDet. Seg.\n\n✗ 69.23 93.89 79.60 97.22 64.04 92.23 79.60 97.22 57.74 95.70 70.34 88.76\n✓ 61.11 90.99 78.21 96.88 52.56 88.05 50.88 92.83 54.24 83.26 78.21 96.88\n✓ 73.44 94.61 78.13 96.08 71.10 93.88 78.13 96.08 56.31 93.94 85.89 93.81\n\nTable A6. Comparison (↑) on Uni-Medical brain step100 using\nthe same evaluation metrics as Tab. A5.\nMethod\n\nCA\n\nDet.\n\nC\n\nSeg.\n\nC head\nDet. Seg.\n\nC tail\nDet. Seg.\n\nliver\nDet. Seg.\n\nretinal\nDet. Seg.\n\nbrain\nDet. Seg.\n\n✗ 66.88 93.34 73.63 94.31 63.50 92.86 58.94 96.80 68.06 88.92 73.63 94.31\n✓ 57.01 90.39 61.12 92.19 54.96 89.49 54.60 95.86 55.32 83.13 61.12 92.19\n✓ 70.27 94.53 67.26 94.42 71.77 94.58 59.19 95.76 84.35 93.40 67.26 94.42\n\nHVQ [57]\nMoEAD [62]\nLTOAD\n\nTable A8. Comparison (↑) on Uni-Medical liver step100 using\nthe same evaluation metrics as Tab. A5.\n\nliver\nDet. Seg.\n\n✗ 74.80 95.04 80.91 96.14 71.75 94.49 86.15 93.19 80.91 96.14 57.34 95.78\n✓ 69.87 93.57 78.12 95.27 65.75 92.72 79.55 92.20 78.12 95.27 51.95 93.24\n✓ 75.55 94.49 83.03 95.53 71.81 93.97 85.88 94.19 83.03 95.53 57.75 93.75\n\nCA\n\nHVQ [57]\nMoEAD [62]\nLTOAD\n\nbrain\nDet. Seg.\n\nTable A7. Comparison (↑) on Uni-Medical liver exp100 using\nthe same evaluation metrics as Tab. A5.\nMethod\n\nMethod\n\nMethod\n\nCA\n\nHVQ [57]\nMoEAD [62]\nLTOAD\n\nDet.\n\nC\n\nSeg.\n\nC head\nDet. Seg.\n\nC tail\nDet. Seg.\n\nretinal\nDet. Seg.\n\nbrain\nDet. Seg.\n\nliver\nDet. Seg.\n\n✗ 71.44 94.41 72.07 93.96 71.13 94.63 87.65 93.68 72.07 93.96 54.61 95.58\n✓ 64.96 92.87 62.23 92.79 66.32 92.91 81.71 92.28 62.23 92.79 50.94 93.55\n✓ 71.31 93.69 71.11 94.39 71.41 93.34 86.17 94.70 71.11 94.39 56.66 91.98\n\nTable A10. Comparison (↑) on Uni-Medical retinal step100 using the same evaluation metrics as Tab A5.\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n78.94\n97.94\n97.59\n97.66\n99.24\n98.99\n\n62.37\n79.66\n89.77\n97.95\n95.50\n99.02\n\n72.22\n83.61\n75.69\n95.00\n87.50\n85.00\n\n90.49\n93.01\n85.58\n87.16\n89.23\n93.67\n\n79.33\n62.54\n81.68\n79.77\n93.79\n89.71\n\n64.24 78.40\n43.02 68.14\n68.80 69.75\n91.98 84.44\n87.80 84.04\n78.61 90.51\n\n69.01\n41.76\n64.67\n67.03\n64.82\n70.12\n\n78.54 69.81\n53.31 81.57\n64.67 53.30\n69.33 62.10\n77.49 54.56\n60.04 48.35\n\n✓ 87.70 99.27 77.58 100.00 100.00 99.76 99.56 99.79 99.38\n✓ 84.73 98.94 72.29 99.21 100.00 99.52 97.54 100.00 97.84\n✓ 93.42 99.45 88.14 100.00 100.00 99.52 98.51 100.00 98.67\n\n96.43\n98.48\n99.46\n\n88.61\n90.28\n96.39\n\n86.65\n88.79\n91.81\n\n91.58\n89.75\n96.50\n\n92.64 81.58\n65.16 66.91\n97.33 94.27\n\n63.78\n66.69\n83.05\n\n63.64 52.22\n61.15 49.62\n87.82 57.98\n\nTable A11. Comparison (↑) on MVTec exp100 [34] in image-level AUROC for anomaly detection (Det.). The column CA (class-agnostic)\nindicates whether a method requires class names or the number of classes during training or not (require: ✗; not require: ✓). We report\nthe class-wise performance on C head and C tail . The classes are sorted from having the most images (left) to the least (right).\n\n4. step200: Fig. A8.\n• VisA\n1. exp100: Fig. A9.\n2. exp200: Fig. A10.\n3. step100: Fig. A11.\n4. step200: Fig. A12.\n• DAGM\n1. exp100: Fig. A13.\n2. exp200: Fig. A14.\n3. step100: Fig. A15.\n4. step200: Fig. A16.\nApart from the synthetic DAGM dataset where the offline\nperformance is saturated, we observe that LTOAD improves\nthe performances in most cases, especially under the more\nchallenging offline long-tailed settings, i.e. step200.\n\n\fMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail hazelnut leather bottle wood carpet\n\n85.95 87.39 84.69\n85.17 93.68 77.73\n95.20 96.92 93.69\n89.68 93.64 86.21\n94.46 95.96 93.15\n95.25 96.36 94.28\n\n95.00\n97.80\n98.07\n92.06\n98.12\n98.54\n\n✓ 93.95 95.46 92.64 97.83\n✓ 94.34 96.02 92.87 98.00\n✓ 95.21 95.64 94.83 98.16\n\n96.87\n97.56\n99.15\n99.58\n99.29\n98.80\n\n93.10 77.74\n95.18 97.33\n98.12 95.46\n93.42 89.47\n96.84 90.45\n98.26 92.26\n\n93.05\n94.33\n98.67\n98.97\n98.52\n98.69\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n76.84\n97.36\n94.18\n94.00\n92.52\n91.55\n\n79.13\n76.21\n94.81\n88.02\n95.96\n96.39\n\n93.86\n97.34\n96.88\n97.06\n97.91\n98.24\n\n90.14\n97.43\n97.12\n93.22\n93.93\n96.59\n\n73.69\n66.95\n92.44\n67.18\n96.89\n97.38\n\n72.36 88.75\n76.55 89.00\n79.05 97.29\n94.33 75.00\n93.76 90.09\n91.72 93.39\n\n93.16\n44.65\n96.42\n87.84\n95.02\n98.17\n\n71.67 93.95\n59.90 90.08\n96.42 93.96\n85.00 89.17\n91.67 85.92\n90.74 87.98\n\n98.79 95.64 90.66 98.52 91.65\n98.86 98.14 92.21 98.80 90.34\n98.57 96.69 91.01 98.72 93.57\n\n95.18\n95.78\n92.79\n\n97.96\n98.31\n98.14\n\n92.35\n95.24\n93.24\n\n96.38\n96.69\n96.82\n\n93.80 88.66\n87.33 89.91\n95.14 93.71\n\n94.68\n97.14\n95.86\n\n88.93 88.36\n90.59 87.71\n94.08 91.70\n\nTable A12. Comparison (↑) on MVTec exp100 [34] in pixel-level AUROC for anomaly segmentation (Seg.). The column CA (classagnostic) indicates whether a method requires class names or the number of classes during training or not (require: ✗; not require: ✓).\nWe report the class-wise performance on C head and C tail . The classes are sorted from having the most images (left) to the least (right).\n\nMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail hazelnut leather bottle wood carpet\n\n79.93 84.47 75.96\n78.82 96.39 63.44\n85.80 97.01 76.00\n86.05 98.99 74.73\n84.90 99.14 72.43\n\n96.93\n97.10\n98.57\n99.29\n99.89\n\n✓ 86.21 99.16 74.89 99.85\n✓ 83.23 98.43 69.93 99.18\n✓ 92.02 99.17 85.77 99.79\n\n78.19 98.97 91.23\n99.89 99.76 99.91\n100.00 96.59 89.04\n99.93 99.76 99.56\n100.00 100.00 98.16\n\n74.36\n95.78\n98.92\n99.96\n99.76\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n86.98\n98.05\n97.84\n99.39\n99.93\n\n64.66\n84.26\n98.09\n95.06\n96.24\n\n72.78\n80.00\n88.61\n86.94\n84.44\n\n89.97\n88.07\n86.52\n85.56\n95.01\n\n79.08\n60.00\n77.06\n79.67\n66.62\n\n67.84 76.70\n46.70 50.19\n90.14 88.54\n88.47 81.91\n81.45 77.69\n\n70.56\n33.58\n62.76\n64.42\n68.01\n\n78.84 71.90\n54.96 94.09\n57.01 57.38\n58.62 52.22\n61.08 45.15\n\n100.00 100.00 97.98 99.75 99.89\n100.00 99.52 96.93 99.92 96.79\n100.00 99.29 97.28 100.00 98.67\n\n96.67\n96.68\n99.17\n\n85.83\n88.33\n94.44\n\n96.11\n88.94\n92.70\n\n74.54\n70.13\n90.29\n\n87.55 70.07\n67.00 72.48\n97.66 94.16\n\n64.42\n67.09\n78.58\n\n57.74 62.88\n58.56 46.92\n87.28 51.01\n\nTable A13. Comparison (↑) on MVTec exp200 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail hazelnut leather bottle wood carpet\n\n86.01 87.15 85.02\n82.95 93.98 73.30\n90.15 94.01 86.76\n94.18 96.25 92.37\n94.79 96.32 93.44\n\n94.01\n96.96\n92.47\n97.87\n98.61\n\n✓ 93.26 95.91 90.95 98.03\n✓ 93.96 95.77 92.38 98.33\n✓ 94.94 95.51 94.43 97.90\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n77.04\n95.34\n94.62\n94.23\n91.53\n\n78.10\n81.24\n88.48\n95.00\n96.32\n\n93.53\n96.43\n96.87\n97.83\n98.25\n\n90.26\n96.15\n92.39\n92.86\n96.16\n\n75.28\n59.05\n67.64\n93.45\n93.08\n\n72.88 88.81\n77.78 83.77\n94.95 76.63\n93.85 93.11\n91.34 92.10\n\n93.16\n38.02\n89.01\n95.37\n97.86\n\n72.45 93.76\n44.28 90.94\n85.46 91.16\n85.92 86.55\n91.26 87.47\n\n98.67 97.91 93.67 98.48 91.97\n98.87 98.13 91.92 98.81 89.81\n98.55 96.47 91.17 98.81 94.10\n\n92.68\n94.51\n91.56\n\n98.23\n98.30\n98.05\n\n96.11\n94.93\n93.44\n\n89.44\n91.42\n96.08\n\n89.96 86.62\n88.89 90.02\n95.17 93.53\n\n96.39\n96.98\n95.88\n\n83.33 87.55\n89.84 88.62\n92.85 90.47\n\n96.81\n99.15\n99.54\n99.04\n98.78\n\n93.02 77.79\n94.34 95.62\n94.34 89.70\n96.79 92.16\n98.23 92.14\n\n93.25\n95.25\n98.96\n98.65\n98.66\n\nTable A14. Comparison (↑) on MVTec exp200 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail hazelnut leather bottle\n\n79.61 84.34 75.46\n69.82 84.00 57.41\n81.54 96.34 68.59\n85.95 98.69 74.79\n87.36 99.33 76.89\n82.14 99.30 67.12\n\n96.61\n99.96\n90.53\n98.93\n99.79\n99.79\n\n✓ 83.37 99.52 69.24 99.92\n✓ 84.40 98.79 71.82 99.89\n✓ 92.33 99.45 86.11 99.96\n\n78.43\n95.78\n100.00\n100.00\n99.93\n100.00\n\nwood carpet\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n98.81 91.32 75.96 85.14\n99.44 100.00 97.47 99.67\n99.76 98.50 95.94 95.90\n97.94 95.96 99.60 99.39\n99.76 99.12 99.96 99.17\n99.76 97.54 99.60 99.86\n\n64.13\n94.72\n93.76\n99.07\n97.61\n98.53\n\n76.39\n72.77\n70.27\n88.06\n78.89\n83.33\n\n90.36\n70.79\n74.69\n86.19\n86.50\n80.86\n\n79.33\n51.12\n83.70\n70.69\n87.17\n69.00\n\n62.91 78.18\n28.15 57.50\n66.41 68.97\n92.65 86.82\n90.48 74.96\n81.04 68.60\n\n69.57\n37.89\n64.33\n61.47\n66.61\n44.52\n\n78.86 68.15\n50.50 90.57\n63.05 57.31\n51.20 61.28\n76.31 54.21\n66.12 43.49\n\n100.00 100.00 98.07 99.67 99.81\n100.00 99.52 97.28 99.92 96.50\n100.00 99.60 98.16 100.00 98.88\n\n99.21\n98.39\n99.56\n\n80.55\n92.78\n94.17\n\n91.46\n84.48\n91.89\n\n57.75\n74.54\n91.83\n\n80.45 66.50\n71.85 80.69\n97.58 92.25\n\n61.38\n63.90\n80.97\n\n58.30 57.55\n57.25 49.07\n84.75 55.42\n\nTable A15. Comparison (↑) on MVTec step100 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\n\fMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n✗\n\nC head C tail hazelnut leather bottle wood carpet\n\nC\n\n85.90 86.92 85.01\n79.65 92.81 69.79\n95.10 97.25 93.21\n89.28 93.62 85.49\n93.83 95.90 92.01\n94.17 96.56 92.08\n\n94.61\n94.54\n98.24\n88.41\n98.24\n98.77\n\n96.24\n97.87\n99.22\n99.56\n99.01\n98.98\n\n✓ 91.47 96.15 87.38 97.92\n✓ 93.76 95.66 92.10 97.63\n✓ 95.11 95.68 94.62 97.97\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\n92.63 77.85\n89.75 95.11\n97.92 95.87\n94.05 89.61\n95.69 91.46\n98.63 93.35\n\n93.20\n98.08\n98.37\n99.08\n98.68\n98.89\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n76.96\n98.86\n94.37\n95.52\n91.82\n92.84\n\n77.01\n80.53\n96.78\n89.09\n96.43\n94.47\n\n93.87\n90.82\n95.69\n95.53\n96.71\n98.09\n\n90.92\n74.91\n95.71\n92.65\n90.17\n90.76\n\n73.73\n60.30\n93.16\n65.87\n93.68\n87.04\n\n72.96 89.09\n50.84 76.96\n79.73 96.53\n94.42 79.26\n91.90 91.10\n92.77 91.26\n\n93.41\n65.39\n95.91\n86.48\n95.73\n94.89\n\n72.46 93.60\n53.87 85.26\n94.54 94.48\n83.11 86.62\n91.80 85.02\n91.97 89.86\n\n98.54 97.83 93.48 98.38 92.37\n98.83 98.09 91.51 98.78 89.87\n98.63 96.65 91.11 98.77 93.97\n\n94.57\n94.88\n92.63\n\n95.59\n98.25\n97.87\n\n93.79\n92.46\n92.54\n\n75.76\n93.63\n96.32\n\n84.46 82.02\n87.05 90.62\n94.60 93.17\n\n94.43\n96.99\n96.08\n\n81.96 91.04\n90.77 87.00\n93.95 92.39\n\nTable A16. Comparison (↑) on MVTec step100 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\nMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC head C tail hazelnut leather bottle wood carpet\n\nC\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n85.21\n97.58\n98.45\n99.21\n99.24\n\n62.90\n65.68\n99.32\n96.58\n99.76\n\n72.78\n64.44\n73.89\n75.00\n93.33\n\n90.70\n46.90\n88.46\n85.90\n86.87\n\n77.67\n39.29\n64.00\n81.71\n72.21\n\n64.75 76.38\n57.81 63.39\n92.77 84.79\n90.48 76.68\n68.50 75.10\n\n69.45\n40.76\n48.64\n63.98\n52.61\n\n78.94 67.70\n51.55 74.21\n50.67 47.39\n65.54 50.65\n54.55 46.38\n\n✓ 81.32 99.61 65.31 100.00 100.00 100.00 98.15 99.39 99.92\n✓ 83.13 98.96 69.27 99.61 100.00 99.52 97.46 99.56 97.58\n✓ 88.62 99.53 79.07 100.00 100.00 99.76 98.60 100.00 98.81\n\n99.85\n99.02\n99.56\n\n81.11\n90.83\n92.50\n\n82.32\n87.79\n75.08\n\n54.58\n73.29\n83.21\n\n86.38 53.19\n69.76 76.68\n95.91 88.82\n\n64.22\n54.13\n65.34\n\n50.52 50.21\n53.82 47.90\n89.22 42.47\n\n79.31 84.48 74.79\n71.64 90.90 54.79\n82.47 98.07 68.82\n85.60 99.15 73.74\n83.00 99.34 68.70\n\n97.04\n96.96\n98.82\n99.43\n99.96\n\n80.03 99.05 91.58\n96.39 86.50 98.24\n100.00 97.30 92.81\n99.93 99.68 99.39\n100.00 100.00 97.02\n\n75.52\n94.98\n99.80\n99.80\n99.40\n\nTable A17. Comparison (↑) on MVTec step200 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\nMethod\n\nCA\n\nMKD [75]\nDRAEM [91]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC head C tail hazelnut leather bottle wood carpet\n\nC\n\n86.03 87.22 84.99\n76.79 84.23 70.29\n89.45 93.75 85.69\n92.12 95.45 89.20\n92.61 96.42 89.28\n\n94.80\n95.21\n88.29\n97.83\n98.66\n\n✓ 89.29 96.10 83.34 97.93\n✓ 92.76 95.85 90.05 98.28\n✓ 94.00 95.93 92.31 98.09\n\ntile\n\nmetal nut toothbrush zipper transistor grid\n\npill\n\ncapsule cable screw\n\n76.63\n89.27\n95.49\n90.59\n91.75\n\n77.16\n62.70\n88.82\n95.22\n96.62\n\n93.93\n89.65\n94.98\n96.45\n98.31\n\n90.73\n70.96\n91.61\n89.00\n91.54\n\n73.95\n56.29\n66.40\n84.38\n83.37\n\n74.24 88.43\n57.39 85.65\n93.55 78.70\n89.24 89.94\n84.53 88.15\n\n93.35\n54.66\n90.56\n92.37\n95.09\n\n71.44 93.86\n56.30 91.44\n82.42 87.33\n84.92 87.32\n88.13 85.11\n\n98.57 97.83 93.46 98.36 92.25\n98.87 98.17 91.66 98.75 89.87\n98.64 96.72 91.26 98.74 93.88\n\n94.32\n95.35\n94.15\n\n92.69\n98.32\n97.62\n\n90.73\n91.72\n90.66\n\n66.60\n83.36\n93.92\n\n76.28 78.25\n88.61 87.77\n92.76 91.37\n\n92.27\n95.39\n90.84\n\n79.87 90.05\n87.56 87.69\n91.13 90.17\n\n96.73\n88.39\n99.56\n99.06\n98.86\n\n93.34 78.61\n76.81 82.64\n95.12 89.94\n95.76 91.00\n98.24 92.21\n\n93.33\n94.62\n99.00\n98.72\n98.58\n\nTable A18. Comparison (↑) on MVTec step200 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n71.36 66.39 76.34 62.71\n70.34 70.13 70.56 62.69\n80.00 76.29 83.71 82.18\n78.63 81.75 75.51 83.03\n\n63.79\n78.55\n81.42\n92.40\n\n73.89\n79.57\n85.02\n85.08\n\n82.82\n69.66\n93.63\n98.36\n\n62.37\n78.76\n56.46\n75.28\n\n52.79\n51.54\n59.02\n56.36\n\n76.12\n49.96\n84.46\n93.38\n\n71.99\n77.15\n82.46\n61.10\n\n73.82\n80.77\n85.70\n79.50\n\n56.07\n63.88\n69.37\n63.77\n\n92.92\n71.76\n96.16\n86.64\n\n87.13\n79.84\n84.10\n68.70\n\n✓ 77.31 77.42 77.19 78.34 84.69 82.02 95.96\n✓ 73.89 72.37 75.42 71.75 76.87 84.26 86.87\n✓ 85.26 79.64 90.87 80.84 81.15 84.28 96.42\n\n70.68\n59.18\n70.71\n\n52.88\n55.27\n64.43\n\n87.10\n89.08\n91.17\n\n81.44 68.60\n71.06 76.40\n92.96 86.88\n\n52.75\n70.17\n79.07\n\n95.54\n81.72\n97.98\n\n77.74\n64.08\n97.18\n\nTable A19. Comparison (↑) on VisA exp100 [34] in image-level AUROC using the same evaluation metrics as Tab A11.\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n94.40 93.72 95.07 95.27\n80.32 77.43 83.20 79.41\n95.56 95.16 95.97 97.62\n96.18 95.99 96.37 97.52\n\n92.58\n84.80\n96.06\n97.21\n\n97.26\n77.09\n92.18\n91.59\n\n91.82\n82.17\n95.96\n96.65\n\n94.88\n70.68\n96.58\n98.01\n\n90.53\n70.44\n92.58\n94.96\n\n95.03\n77.41\n97.90\n98.54\n\n96.82\n86.70\n99.08\n98.16\n\n94.97\n90.21\n95.39\n96.14\n\n87.20\n62.72\n85.77\n90.66\n\n97.37\n92.10\n98.82\n95.68\n\n99.07\n90.07\n98.83\n99.05\n\n✓ 95.03 94.57 95.48 97.05 96.12 91.61 96.80\n✓ 94.34 93.36 95.31 95.73 96.25 91.52 94.98\n✓ 96.91 95.84 97.97 97.43 96.45 93.37 96.50\n\n97.04\n92.93\n96.16\n\n88.84\n88.72\n95.13\n\n98.19\n97.53\n98.40\n\n98.82 95.25\n98.98 95.10\n99.16 96.67\n\n83.21\n83.05\n95.40\n\n98.68\n97.86\n98.87\n\n98.78\n99.37\n99.33\n\nTable A20. Comparison (↑) on VisA exp100 [34] in pixel-level AUROC using the same evaluation metrics as Tab A12.\n\n\fMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n72.10 67.19 77.02 61.92\n69.78 69.22 70.35 61.64\n80.21 76.81 83.60 84.98\n78.03 79.35 76.71 78.50\n\n64.41\n75.82\n83.77\n88.97\n\n73.16\n79.42\n86.86\n82.56\n\n79.95\n68.41\n95.37\n98.07\n\n67.55\n79.60\n57.66\n64.13\n\n56.16\n50.40\n52.20\n63.84\n\n76.53\n45.90\n85.73\n92.95\n\n77.21\n76.59\n81.82\n63.76\n\n79.73\n79.80\n83.30\n83.30\n\n55.81\n63.34\n63.23\n63.85\n\n88.92\n72.83\n96.82\n87.04\n\n83.94\n83.63\n90.72\n69.36\n\n✓ 76.87 76.25 77.49 78.91 84.96 81.85 96.34\n✓ 73.58 73.36 73.80 74.45 77.77 84.22 91.63\n✓ 85.24 80.14 90.34 80.46 82.09 84.80 97.03\n\n62.01\n55.66\n74.46\n\n53.44\n56.44\n61.99\n\n86.91\n88.07\n91.85\n\n78.60 74.84\n73.94 79.30\n93.10 85.04\n\n54.08\n65.67\n75.52\n\n94.28\n71.76\n98.74\n\n76.28\n64.06\n97.82\n\nTable A21. Comparison (↑) on VisA exp200 [34] in image-level AUROC using the same evaluation metrics as Tab A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n94.69 94.07 95.30 95.78\n79.48 76.64 82.32 77.59\n95.36 94.98 95.69 97.66\n95.32 95.30 95.35 96.94\n\n94.22\n83.31\n95.03\n95.71\n\n97.87\n76.89\n91.56\n92.34\n\n90.41\n81.92\n96.42\n96.20\n\n96.18\n68.29\n96.20\n97.19\n\n90.01\n71.84\n89.58\n93.40\n\n95.64\n77.66\n98.31\n98.20\n\n96.80\n83.39\n99.02\n97.64\n\n95.89\n89.57\n95.16\n95.50\n\n87.54\n61.44\n83.74\n86.60\n\n96.73\n92.37\n98.87\n95.27\n\n99.23\n89.46\n99.02\n98.88\n\n✓ 94.80 94.34 95.26 97.07 96.06 91.64 96.53\n✓ 93.98 93.52 94.44 95.91 96.51 91.89 95.40\n✓ 96.97 96.08 97.86 97.57 96.64 93.88 96.93\n\n96.18\n92.45\n96.22\n\n88.56\n88.95\n95.26\n\n98.06\n97.78\n98.45\n\n98.61 95.24\n98.92 95.62\n99.30 96.52\n\n82.72\n79.04\n94.75\n\n98.32\n96.41\n98.89\n\n98.66\n98.89\n99.26\n\nTable A22. Comparison (↑) on VisA exp200 [34] in pixel-level AUROC using the same evaluation metrics as Tab A12.\n\nMethod\n\nCA\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗ 68.18 68.35 68.00 60.83 76.03 78.94 66.37\n✗ 78.53 76.56 80.50 84.22 83.85 87.05 94.55\n✗ 74.96 73.89 76.04 70.34 79.46 85.41 93.28\n\n77.50\n50.11\n58.97\n\n50.42\n59.56\n55.87\n\n51.00\n81.07\n89.86\n\n74.71 72.72\n77.84 77.36\n73.38 77.96\n\n61.73\n66.48\n59.58\n\n73.85\n94.24\n90.20\n\n74.00\n85.98\n65.24\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\n✓ 73.67 76.61 70.73 79.17 85.11 82.97 96.38\n✓ 70.93 72.68 69.18 73.67 75.50 83.28 85.91\n✓ 83.89 80.01 87.77 81.59 82.56 85.75 96.76\n\n62.94\n58.69\n71.49\n\n53.13\n59.04\n61.93\n\n85.70\n84.23\n89.14\n\n65.38 76.92\n66.08 77.70\n91.52 87.04\n\n53.11\n63.85\n70.70\n\n89.22\n70.22\n96.90\n\n54.06\n52.98\n91.34\n\nTable A23. Comparison (↑) on VisA exp500 [34] in image-level AUROC using the same evaluation metrics as Tab A11.\n\nMethod\n\nCA\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗ 78.83 76.04 81.62 78.63 84.05 75.66 83.38\n✗ 94.66 94.42 94.90 97.75 95.60 92.76 96.23\n✗ 95.77 95.26 96.28 96.46 96.31 94.94 95.69\n\n65.46\n94.80\n94.87\n\n69.04\n89.39\n93.30\n\n77.46\n97.54\n98.17\n\n81.01 89.62\n98.86 95.16\n98.53 96.10\n\n58.23\n80.98\n89.62\n\n93.03\n98.69\n97.44\n\n90.36\n98.18\n97.81\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\n✓ 94.35 94.35 94.35 97.01 96.21 91.49 96.56\n✓ 93.39 93.06 93.71 95.73 96.15 91.40 94.81\n✓ 96.60 95.78 97.41 97.42 96.39 93.17 96.81\n\n95.92\n91.14\n95.86\n\n88.95\n89.16\n95.05\n\n97.96\n97.40\n98.16\n\n98.35 94.94\n98.68 94.93\n99.09 96.06\n\n81.48\n79.83\n93.42\n\n97.76\n94.72\n98.82\n\n95.62\n96.71\n98.91\n\nTable A24. Comparison (↑) on VisA exp500 [34] in pixel-level AUROC using the same evaluation metrics as Tab A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n71.80 66.71 76.89 61.04\n71.89 71.41 72.37 65.90\n84.80 85.98 83.63 85.21\n76.68 87.24 66.12 85.43\n\n65.64\n75.90\n82.08\n91.02\n\n72.92\n74.12\n87.91\n92.17\n\n81.27\n75.06\n96.97\n99.02\n\n66.91\n82.88\n86.17\n83.15\n\n52.48\n54.61\n77.54\n72.63\n\n74.35\n50.73\n81.94\n64.42\n\n73.46\n80.22\n83.94\n53.44\n\n71.42\n94.65\n78.78\n76.22\n\n57.14\n57.10\n69.55\n58.80\n\n91.51\n76.24\n97.10\n73.76\n\n93.49\n75.26\n90.44\n70.06\n\n✓ 78.83 83.06 74.61 79.91 85.51 88.36 97.41\n✓ 74.12 86.58 61.67 81.54 88.64 92.59 99.03\n✓ 88.32 87.39 89.25 85.21 87.04 90.80 99.20\n\n82.31\n84.86\n83.46\n\n64.89\n72.80\n78.63\n\n77.53\n62.97\n84.99\n\n60.90 77.34\n55.96 65.96\n91.56 86.88\n\n56.80\n48.30\n75.92\n\n93.44\n74.72\n98.72\n\n81.66\n62.10\n97.44\n\nTable A25. Comparison (↑) on VisA step100 [34] in image-level AUROC using the same evaluation metrics as Tab A11.\n\n\fMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n94.99 94.81 95.16 95.09\n82.30 79.41 85.19 80.35\n96.57 97.43 95.72 97.67\n95.63 97.69 93.57 97.56\n\n94.76\n86.10\n96.10\n97.44\n\n97.76\n78.21\n98.80\n98.58\n\n93.17\n80.42\n97.02\n96.79\n\n95.63\n76.54\n98.10\n98.40\n\n92.49\n74.83\n96.87\n97.40\n\n95.72\n81.56\n96.57\n89.61\n\n97.49\n91.79\n98.97\n97.35\n\n95.23\n91.02\n95.78\n94.26\n\n84.83\n60.06\n84.87\n87.80\n\n98.61\n93.07\n98.93\n93.57\n\n99.10\n93.63\n99.20\n98.84\n\n✓ 96.04 97.37 94.71 97.25 96.91 99.18 97.42\n✓ 94.37 97.51 91.23 97.54 97.29 99.04 97.04\n✓ 97.54 97.78 97.30 97.74 96.89 99.11 97.76\n\n98.21\n98.40\n97.48\n\n95.30\n95.75\n97.67\n\n95.89\n89.52\n96.23\n\n96.89 94.24\n96.43 93.91\n99.11 96.10\n\n83.91\n75.33\n94.28\n\n98.51\n93.66\n98.82\n\n98.84\n98.55\n99.25\n\nTable A26. Comparison (↑) on VisA step100 [34] in pixel-level AUROC using the same evaluation metrics as Tab A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n71.65 67.02 76.28 57.60\n69.78 71.19 68.38 66.79\n84.03 87.34 80.72 85.00\n75.52 88.66 62.38 86.09\n\n65.20\n75.20\n82.47\n92.04\n\n72.95\n74.30\n90.49\n92.99\n\n81.89\n73.57\n96.12\n99.32\n\n67.74\n81.94\n88.64\n84.42\n\n56.76\n55.34\n81.33\n77.09\n\n72.69\n44.74\n81.65\n50.99\n\n72.51\n82.28\n84.50\n63.18\n\n73.50\n74.26\n71.84\n69.14\n\n56.74\n56.81\n61.10\n47.13\n\n89.39\n77.68\n95.40\n79.34\n\n92.86\n74.49\n89.82\n64.52\n\n✓ 77.64 84.51 70.78 81.51 86.73 89.78 97.83\n✓ 76.77 87.84 65.71 82.88 88.74 93.24 99.25\n✓ 87.04 87.77 86.31 85.80 86.74 91.24 99.03\n\n83.51\n84.96\n84.68\n\n67.72\n77.96\n79.11\n\n64.57\n69.15\n83.98\n\n55.58 73.70\n55.90 65.86\n88.78 83.18\n\n56.20\n58.28\n67.02\n\n91.30\n77.46\n97.38\n\n83.36\n67.58\n97.50\n\nTable A27. Comparison (↑) on VisA step200 [34] in image-level AUROC using the same evaluation metrics as Tab A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\n94.52 93.73 95.32 94.80\n81.97 78.69 85.25 80.22\n96.27 97.63 94.92 97.78\n95.50 97.89 93.10 97.73\n\n93.28\n85.88\n96.36\n97.50\n\n97.06\n77.08\n98.89\n99.34\n\n90.95\n81.05\n96.90\n97.00\n\n94.87\n74.01\n98.45\n98.19\n\n91.44\n73.90\n97.39\n97.57\n\n95.24\n80.96\n95.87\n90.31\n\n98.00\n91.60\n98.65\n96.45\n\n95.30\n90.77\n95.23\n95.05\n\n87.24\n61.16\n81.87\n82.89\n\n97.00\n93.04\n98.82\n95.17\n\n99.14\n93.99\n99.06\n98.76\n\n✓ 95.66 97.45 93.87 97.41 96.87 99.15 97.53\n✓ 94.82 97.80 91.84 97.77 97.60 99.22 96.94\n✓ 97.23 97.74 96.71 97.79 96.89 99.03 97.64\n\n98.38\n98.64\n97.73\n\n95.40\n96.65\n97.37\n\n95.37\n90.07\n96.25\n\n95.29 93.63\n96.37 95.28\n98.88 96.03\n\n82.25\n77.05\n91.12\n\n98.10\n93.76\n98.74\n\n98.61\n98.49\n99.20\n\nTable A28. Comparison (↑) on VisA step200 [34] in pixel-level AUROC using the same evaluation metrics as Tab A12.\n\nMethod\n\nCA\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗ 62.88 70.15 55.61 63.36 74.22 74.40 75.84\n✗ 83.33 88.40 78.26 85.68 85.19 89.95 96.68\n✗ 72.09 83.60 60.57 76.29 87.24 86.35 98.62\n\n79.34\n87.91\n82.87\n\n53.74\n85.00\n70.26\n\n41.40\n78.59\n68.64\n\n71.25 66.18\n76.56 69.86\n48.32 66.22\n\n49.11\n68.30\n53.28\n\n41.74\n94.34\n70.96\n\n63.95\n81.88\n55.98\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\n✓ 71.84 81.84 61.85 78.79 84.72 88.80 97.44\n✓ 72.75 89.41 56.09 83.37 90.37 93.80 99.03\n✓ 84.84 88.13 81.56 85.99 87.51 91.67 99.29\n\n79.46\n88.14\n85.84\n\n61.83\n81.77\n78.47\n\n61.82\n67.31\n87.26\n\n68.54 55.96\n38.26 57.20\n78.94 76.72\n\n51.30\n54.97\n61.03\n\n68.28\n64.60\n93.16\n\n65.22\n54.18\n92.26\n\nTable A29. Comparison (↑) on VisA step500 [34] in image-level AUROC using the same evaluation metrics as Tab A11.\n\nMethod\n\nCA\n\nC\n\nC head C tail PCB3 PCB2 PCB1 PCB4 macaroni1 macaroni2 capsule candle fryum capsules chewinggum pipe fryum\n\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗ 81.48 78.88 84.09 79.88 84.91 78.51 79.59\n✗ 96.41 97.69 95.12 97.91 96.48 98.95 96.63\n✗ 95.06 97.34 92.77 97.06 97.15 99.03 96.87\n\n75.69\n98.69\n97.90\n\n74.69\n97.50\n96.05\n\n78.52\n95.81\n91.24\n\n92.32 90.94\n97.90 95.10\n96.33 95.54\n\n59.75\n84.46\n82.58\n\n89.52\n98.52\n93.91\n\n93.49\n98.93\n97.03\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\n✓ 95.06 97.21 92.91 97.15 96.79 99.16 97.35\n✓ 94.30 98.10 90.51 97.95 97.78 99.16 97.57\n✓ 96.41 97.74 95.08 97.63 96.90 99.07 97.68\n\n97.98\n98.96\n97.71\n\n94.87\n97.16\n97.44\n\n93.25\n90.07\n96.94\n\n91.47 90.63\n94.81 94.26\n98.01 94.39\n\n90.63\n74.40\n84.83\n\n96.35\n93.55\n98.34\n\n95.16\n95.99\n97.96\n\nTable A30. Comparison (↑) on VisA step500 [34] in pixel-level AUROC using the same evaluation metrics as Tab A12.\n\n\fMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n84.86 84.68 85.04\n94.82 93.39 96.25\n76.65 76.78 76.52\n\n94.45\n82.55\n97.71\n95.41\n\n91.34\n100.00\n99.53\n74.27\n\n99.23\n87.28\n99.91\n66.92\n\n50.94 98.44 97.95\n70.07 83.52 93.61\n69.81 100.00 99.69\n50.13 97.17 61.06\n\n72.07\n96.88\n97.68\n73.82\n\n48.76 99.75 95.66\n83.91 53.00 97.79\n84.08 100.00 99.82\n99.42 94.66 53.64\n\n✓ 84.51 87.34 81.69 99.25\n✓ 77.03 75.23 78.84 91.06\n✓ 96.00 94.16 97.83 99.85\n\n95.29\n59.31\n99.90\n\n91.61\n78.14\n99.86\n\n52.97 97.61 79.73\n52.51 95.12 76.91\n71.21 100.00 99.32\n\n77.55\n81.30\n98.17\n\n51.19 100.00 99.99\n96.95 72.25 66.77\n92.47 100.00 99.21\n\nTable A31. Comparison (↑) on DAGM exp50 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n73.04\n99.09\n98.81\n\n88.41\n86.30\n97.49\n73.45\n\n99.95\n88.76\n99.93\n95.16\n\n73.28\n66.11\n89.18\n55.29\n\n99.17\n80.26\n99.87\n98.85\n\n93.69\n78.17\n98.94\n83.15\n\n85.23\n78.85\n98.79\n85.11\n\n72.23\n79.04\n93.90\n92.47\n\n99.73\n54.37\n99.49\n98.86\n\n92.44\n88.79\n97.27\n79.17\n\n✓ 90.70 89.75 91.64 99.76\n✓ 86.08 84.02 88.15 98.46\n✓ 97.41 97.34 97.48 99.48\n\n93.54\n68.93\n99.04\n\n99.29\n97.60\n99.80\n\n56.45\n56.45\n88.51\n\n99.74\n98.66\n99.86\n\n90.87\n87.27\n98.04\n\n89.53\n87.73\n98.76\n\n79.49\n89.69\n95.76\n\n98.91\n97.00\n99.45\n\n99.44\n79.03\n95.38\n\n90.29 91.91 88.66\n77.37 78.89 75.84\n97.40 97.11 97.68\n86.03 84.32 87.75\n\nTable A32. Comparison (↑) on DAGM exp50 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n85.31 86.05 84.58\n94.40 93.24 95.56\n75.42 75.88 74.96\n\n94.45\n86.56\n97.78\n94.17\n\n91.34\n100.00\n99.60\n70.69\n\n99.23\n89.76\n99.89\n67.04\n\n50.94 98.44 97.95\n71.90 82.03 94.29\n68.92 100.00 99.66\n51.00 96.49 62.20\n\n72.07\n95.42\n97.35\n74.47\n\n48.76 99.75 95.66\n84.22 52.27 96.69\n81.01 100.00 99.78\n99.59 86.08 52.44\n\n✓ 84.34 87.66 81.02 99.15\n✓ 73.26 72.53 73.99 88.93\n✓ 95.58 93.75 97.41 99.60\n\n96.01\n56.55\n99.92\n\n92.45\n73.94\n99.79\n\n53.31 97.40 79.79\n50.73 92.50 68.31\n69.45 100.00 99.60\n\n74.26\n77.81\n97.66\n\n51.15 99.91 99.99\n97.08 61.74 65.02\n90.94 100.00 98.84\n\nTable A33. Comparison (↑) on DAGM exp100 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n74.34\n99.09\n98.82\n\n88.40\n86.14\n97.42\n71.83\n\n99.95\n89.99\n99.93\n95.48\n\n73.28\n66.26\n88.74\n55.51\n\n99.17\n79.22\n99.87\n98.70\n\n93.69\n77.37\n98.95\n83.71\n\n85.23\n77.79\n98.62\n84.81\n\n72.23\n80.49\n93.76\n92.75\n\n99.73\n54.93\n99.59\n98.34\n\n92.44\n85.45\n96.98\n75.44\n\n✓ 90.13 89.66 90.60 99.75\n✓ 84.99 83.07 86.92 97.76\n✓ 97.32 97.26 97.39 99.41\n\n93.54\n67.49\n98.86\n\n99.33\n96.90\n99.79\n\n55.96\n55.18\n88.37\n\n99.76\n98.03\n99.86\n\n90.13\n85.14\n98.05\n\n87.54\n85.19\n98.67\n\n78.19\n89.18\n95.61\n\n97.74\n95.54\n99.41\n\n99.42\n79.53\n95.20\n\n90.28 91.91 88.66\n77.20 79.19 75.21\n97.30 97.01 97.58\n85.54 84.07 87.01\n\nTable A34. Comparison (↑) on DAGM exp100 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n83.29 83.45 83.13\n94.29 93.08 95.51\n76.19 76.36 76.03\n\n94.45\n84.31\n97.78\n95.78\n\n91.34\n100.00\n99.62\n73.96\n\n99.23\n87.16\n99.80\n64.36\n\n50.94 98.44 97.95\n66.80 79.00 89.90\n68.21 100.00 99.51\n50.82 96.90 62.25\n\n72.07\n95.65\n97.34\n75.00\n\n48.76 99.75 95.66\n80.03 52.49 97.56\n80.90 100.00 99.82\n99.57 88.06 55.25\n\n✓ 83.56 87.09 80.02 99.40\n✓ 72.61 72.11 73.10 89.16\n✓ 94.71 93.79 95.63 99.51\n\n95.42\n54.77\n99.88\n\n89.82\n73.66\n99.89\n\n53.32 97.53 79.13\n51.42 91.55 67.92\n69.66 100.00 99.57\n\n72.48\n77.01\n98.27\n\n50.52 97.98 99.99\n96.98 61.91 61.69\n81.53 100.00 98.80\n\nTable A35. Comparison (↑) on DAGM exp200 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\n\fMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n74.85\n99.02\n98.89\n\n88.40\n85.83\n97.38\n72.99\n\n99.95\n89.38\n99.92\n94.89\n\n73.28\n65.89\n88.72\n55.59\n\n99.17\n81.93\n99.86\n98.75\n\n93.69\n73.30\n98.88\n84.66\n\n85.23\n77.54\n98.50\n85.63\n\n72.23\n81.12\n93.26\n91.97\n\n99.73\n56.02\n99.52\n98.11\n\n92.44\n85.69\n96.80\n71.70\n\n✓ 89.73 89.57 89.88 99.77\n✓ 84.18 82.54 85.81 97.70\n✓ 97.11 97.29 96.94 99.41\n\n93.28\n64.61\n98.85\n\n99.22\n96.94\n99.81\n\n55.84\n55.46\n88.48\n\n99.76\n97.99\n99.88\n\n90.30\n84.78\n98.01\n\n86.78\n85.19\n98.64\n\n76.53\n88.57\n93.88\n\n96.44\n95.36\n99.41\n\n99.39\n75.15\n94.76\n\n90.29 91.91 88.66\n77.16 79.58 74.73\n97.19 96.98 97.39\n85.32 84.22 86.42\n\nTable A36. Comparison (↑) on DAGM exp200 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n83.47 84.38 82.55\n93.54 93.23 93.85\n76.27 77.51 75.04\n\n94.45\n86.38\n97.76\n96.24\n\n91.34\n99.99\n99.77\n75.46\n\n99.23\n91.88\n99.79\n67.12\n\n50.94 98.44 97.95\n64.78 78.88 90.31\n68.81 100.00 99.36\n51.39 97.32 61.73\n\n72.07\n95.06\n97.04\n76.55\n\n48.76 99.75 95.66\n79.88 52.72 94.78\n73.00 100.00 99.83\n99.06 76.79 61.07\n\n✓ 81.35 88.75 73.96 99.89\n✓ 72.28 72.81 71.74 89.39\n✓ 93.82 93.98 93.67 99.60\n\n98.39\n57.43\n99.85\n\n96.60\n72.99\n99.82\n\n51.31 97.56 85.24\n52.05 92.20 68.71\n70.62 100.00 99.51\n\n75.57\n75.06\n97.67\n\n53.49 55.64 99.84\n94.66 59.14 61.14\n72.66 100.00 98.50\n\nTable A37. Comparison (↑) on DAGM exp500 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n76.11\n99.02\n98.94\n\n88.40\n85.42\n97.33\n74.08\n\n99.95\n90.89\n99.92\n95.27\n\n73.28\n62.51\n88.57\n56.52\n\n99.17\n79.73\n99.87\n98.89\n\n93.69\n72.28\n98.74\n83.16\n\n85.23\n77.29\n98.43\n85.12\n\n72.23\n82.21\n92.23\n89.74\n\n99.73\n57.35\n99.31\n96.55\n\n92.44\n84.93\n96.63\n75.87\n\n✓ 88.63 89.44 87.82 99.77\n✓ 83.34 83.11 83.57 97.82\n✓ 96.98 97.23 96.72 99.39\n\n93.10\n68.03\n98.84\n\n99.22\n96.68\n99.83\n\n55.37\n55.14\n88.25\n\n99.73\n97.89\n99.86\n\n89.05\n84.76\n98.10\n\n84.62\n84.24\n98.55\n\n75.15\n85.67\n93.45\n\n90.93\n93.03\n99.13\n\n99.33\n70.12\n94.30\n\n90.29 91.91 88.66\n76.87 78.93 74.81\n97.01 96.94 97.07\n85.41 84.74 86.08\n\nTable A38. Comparison (↑) on DAGM exp500 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class6 Class4 Class1 Class5 Class3 Class2 Class8 Class9 Class7 Class10\n\n84.85 82.83 86.88\n84.65 86.58 82.72\n94.09 96.85 91.34\n75.49 72.14 78.84\n\n95.66 99.75 48.76\n99.11 67.43 74.65\n99.76 100.00 88.00\n61.39 96.04 99.65\n\n72.07\n97.48\n97.19\n74.83\n\n97.95 98.44 50.94\n94.21 88.79 63.56\n99.29 100.00 67.80\n62.26 96.37 49.37\n\n99.23\n92.07\n99.75\n66.89\n\n91.34\n99.96\n95.03\n62.88\n\n94.45\n69.20\n94.12\n85.20\n\n✓ 82.48 85.78 79.17 99.93 100.00 63.41 79.04 86.52 97.00 51.42 98.31 71.48\n✓ 71.11 66.07 76.15 66.77 69.09 96.90 78.52 69.49 91.20 47.45 62.87 49.29\n✓ 95.24 93.21 97.27 99.19 100.00 90.26 97.36 99.54 100.00 68.78 99.89 99.61\n\n77.67\n79.56\n97.78\n\nTable A39. Comparison (↑) on DAGM reverse exp200 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head\n\nC tail\n\nClass6 Class4 Class1 Class5 Class3 Class2 Class8 Class9 Class7 Class10\n\n90.28 88.66 91.91\n78.41 76.49 8043.00\n96.68 97.63 95.72\n85.58 82.49 88.66\n\n92.44\n94.92\n97.16\n83.07\n\n99.73\n57.21\n99.43\n98.97\n\n72.23\n69.48\n94.76\n92.35\n\n85.23\n81.27\n98.30\n85.48\n\n93.69\n79.10\n98.52\n83.45\n\n99.17\n89.15\n99.87\n98.71\n\n73.28\n65.79\n85.23\n56.00\n\n99.95\n95.83\n99.92\n94.12\n\n88.40\n83.85\n95.11\n66.84\n\n98.74\n67.53\n98.49\n96.78\n\n✓ 89.98 92.69 87.27\n✓ 83.55 79.28 87.83\n✓ 97.20 96.97 97.43\n\n99.49\n82.51\n95.92\n\n99.86\n96.61\n99.33\n\n84.59\n89.01\n95.50\n\n90.23\n86.02\n98.43\n\n89.30\n84.99\n97.96\n\n99.65\n97.32\n99.87\n\n53.89\n54.46\n87.62\n\n99.55\n92.42\n99.83\n\n85.42\n58.52\n98.47\n\n97.87\n93.66\n99.08\n\nTable A40. Comparison (↑) on DAGM reverse exp200 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\n\fMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.85 86.88 82.83\n87.27 88.29 86.24\n94.03 93.20 94.85\n76.87 76.49 77.25\n\n94.45\n89.51\n97.67\n95.39\n\n91.34\n100.00\n99.57\n72.25\n\n99.23\n88.81\n99.85\n64.81\n\n50.94\n70.88\n68.92\n52.44\n\n98.44\n92.25\n99.99\n97.56\n\n97.95\n95.97\n99.38\n62.58\n\n72.07\n96.69\n97.17\n75.96\n\n48.76 99.75 95.66\n83.77 57.59 97.20\n77.95 100.00 99.77\n99.67 94.61 53.42\n\n✓ 82.37 87.11 77.63 99.06\n✓ 72.86 72.62 73.11 89.19\n✓ 95.59 94.43 96.75 99.86\n\n95.02\n55.60\n99.93\n\n92.84\n74.16\n99.93\n\n51.38\n51.87\n72.45\n\n97.26\n92.25\n99.99\n\n67.98\n65.43\n99.36\n\n70.70\n77.09\n98.15\n\n50.01 99.48 99.99\n95.51 65.63 61.89\n86.84 100.00 99.42\n\nTable A41. Comparison (↑) on DAGM step50 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n75.75\n99.06\n98.87\n\n88.40\n86.67\n97.30\n71.92\n\n99.95\n89.54\n99.92\n94.41\n\n73.28\n66.73\n88.85\n55.80\n\n99.17\n80.23\n99.86\n98.88\n\n93.69\n79.02\n98.92\n82.24\n\n85.23\n79.42\n98.59\n85.39\n\n72.23\n81.74\n93.21\n92.53\n\n99.73\n55.34\n99.48\n98.78\n\n92.44\n88.31\n96.76\n76.78\n\n✓ 89.52 89.87 89.16 99.71\n✓ 84.04 82.54 85.53 97.81\n✓ 97.41 97.50 97.32 99.53\n\n93.11\n64.80\n99.13\n\n99.36\n96.77\n99.81\n\n57.49\n55.31\n89.19\n\n99.71\n98.03\n99.85\n\n86.33\n83.22\n98.02\n\n84.15\n85.51\n98.67\n\n78.58\n86.14\n95.09\n\n97.41\n96.05\n99.45\n\n99.37\n76.76\n95.39\n\n90.28 91.90 88.66\n78.28 79.78 76.77\n97.20 97.00 97.39\n85.56 83.98 87.14\n\nTable A42. Comparison (↑) on DAGM step50 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n86.48 88.35 84.60\n93.97 93.13 94.81\n75.78 77.71 73.85\n\n94.45\n90.24\n97.85\n96.14\n\n91.34\n100.00\n99.31\n77.21\n\n99.23\n87.79\n99.87\n66.00\n\n50.94\n70.42\n68.62\n51.44\n\n98.44\n93.31\n99.98\n97.76\n\n97.95\n95.21\n99.28\n59.91\n\n72.07\n96.41\n96.95\n70.10\n\n48.76 99.75 95.66\n81.82 51.01 98.56\n78.01 100.00 99.82\n99.36 84.07 55.83\n\n✓ 81.11 87.19 75.03 99.12\n✓ 70.83 72.39 69.27 88.91\n✓ 94.83 94.29 95.38 99.79\n\n95.23\n55.98\n99.96\n\n91.99\n73.19\n99.86\n\n52.38 97.23 67.80\n51.79 92.10 60.98\n71.82 100.00 99.10\n\n69.05\n69.78\n98.20\n\n50.48 87.83 99.99\n95.38 58.74 61.46\n80.93 100.00 98.65\n\nTable A43. Comparison (↑) on DAGM step100 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n77.01\n99.11\n99.00\n\n88.40\n86.46\n97.16\n74.70\n\n99.95\n89.08\n99.92\n94.23\n\n73.28\n67.51\n88.63\n55.83\n\n99.17\n81.07\n99.86\n98.91\n\n93.69\n79.40\n98.51\n81.82\n\n85.23\n80.00\n98.52\n83.28\n\n72.23\n83.19\n92.69\n91.50\n\n99.73\n55.72\n99.44\n97.72\n\n92.45\n88.14\n96.83\n75.26\n\n✓ 89.11 90.08 88.15 99.71\n✓ 83.34 82.59 84.08 97.65\n✓ 97.30 97.60 97.00 99.51\n\n93.50\n65.49\n99.18\n\n99.25\n96.70\n99.82\n\n58.29\n55.22\n89.62\n\n99.68\n97.89\n99.86\n\n84.99\n81.26\n97.96\n\n83.20\n81.89\n98.60\n\n78.56\n86.73\n94.18\n\n94.66\n94.86\n99.49\n\n99.34\n75.67\n94.79\n\n90.28 91.91 88.66\n78.76 80.23 77.29\n97.07 96.94 97.20\n85.23 84.53 85.92\n\nTable A44. Comparison (↑) on DAGM step100 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n84.73 87.34 82.12\n93.79 93.69 93.90\n75.92 77.47 74.36\n\n94.45\n89.58\n98.74\n96.59\n\n91.34\n100.00\n99.52\n79.49\n\n99.23\n86.36\n99.91\n61.29\n\n50.94 98.44 97.95\n70.28 90.49 95.43\n70.26 100.00 99.02\n52.59 97.40 60.29\n\n72.07\n96.29\n95.46\n71.22\n\n48.76 99.75 95.66\n79.86 41.35 97.66\n75.41 100.00 99.59\n99.40 78.90 61.98\n\n✓ 80.33 88.85 71.81 99.80\n✓ 70.01 72.78 67.24 88.96\n✓ 94.12 94.33 93.92 99.86\n\n98.48\n56.44\n99.98\n\n97.68\n73.45\n99.91\n\n50.38 97.92 81.13\n52.30 92.74 59.27\n71.89 100.00 99.27\n\n72.95\n67.31\n97.13\n\n51.43 53.55 99.97\n95.24 58.30 56.09\n74.53 100.00 98.66\n\nTable A45. Comparison (↑) on DAGM step200 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\n\fMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n75.97\n99.24\n99.05\n\n88.40\n86.68\n97.63\n74.48\n\n99.95\n89.22\n99.93\n92.43\n\n73.28\n65.88\n89.98\n55.92\n\n99.17\n79.26\n99.89\n98.87\n\n93.69\n80.28\n98.12\n80.50\n\n85.23\n79.87\n97.40\n81.55\n\n72.23\n82.95\n91.74\n90.88\n\n99.73\n55.26\n99.17\n97.08\n\n92.44\n87.57\n95.33\n75.56\n\n✓ 89.07 90.61 87.40 99.72\n✓ 82.27 82.71 81.83 97.79\n✓ 97.14 97.54 96.74 99.53\n\n94.02\n65.50\n99.07\n\n99.43\n96.79\n99.81\n\n60.11\n55.38\n89.40\n\n99.77\n98.08\n99.86\n\n85.71\n80.50\n97.77\n\n83.04\n78.83\n98.34\n\n78.28\n86.22\n93.16\n\n90.59\n93.85\n99.38\n\n99.40\n69.77\n95.03\n\n90.29 91.91 88.66\n78.29 79.40 77.19\n96.84 97.33 96.35\n84.63 84.15 85.11\n\nTable A46. Comparison (↑) on DAGM step200 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n\n84.86 86.88 82.84\n85.08 88.73 81.43\n92.78 93.96 91.59\n73.86 76.98 70.73\n\n94.45\n91.35\n99.36\n96.83\n\n91.34\n100.00\n99.84\n76.83\n\n99.23\n89.07\n99.88\n62.44\n\n50.94\n71.74\n70.77\n51.30\n\n98.44\n91.48\n99.97\n97.50\n\n97.95\n93.30\n96.85\n61.45\n\n72.07\n96.99\n95.99\n67.09\n\n48.76 99.75 95.66\n77.94 41.77 97.14\n65.57 100.00 99.52\n99.18 63.12 62.83\n\n✓ 80.04 88.88 71.18 99.77\n✓ 69.73 70.64 68.82 91.85\n✓ 92.57 94.42 90.72 99.88\n\n98.62\n53.45\n99.94\n\n97.19\n65.20\n99.91\n\n50.88 97.98 76.32\n52.22 90.48 55.91\n72.37 100.00 98.83\n\n74.09\n63.78\n95.85\n\n51.57 53.98 99.98\n93.48 68.73 62.19\n61.96 100.00 96.94\n\nTable A47. Comparison (↑) on DAGM step500 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class10 Class7 Class9 Class8 Class2 Class3 Class5 Class1 Class4 Class6\n98.74\n77.90\n99.45\n99.01\n\n88.40\n86.27\n98.44\n74.41\n\n99.95\n89.89\n99.92\n92.91\n\n73.28\n65.79\n90.66\n56.10\n\n99.17\n79.78\n99.87\n98.97\n\n93.69\n78.81\n97.07\n79.25\n\n85.23\n80.68\n97.88\n80.49\n\n72.23\n84.82\n88.97\n89.51\n\n99.73\n56.79\n98.89\n94.71\n\n92.44\n86.73\n95.39\n75.76\n\n✓ 88.53 90.43 86.62 99.73\n✓ 82.19 82.77 81.61 97.88\n✓ 96.52 97.50 95.54 99.52\n\n94.39\n65.21\n99.07\n\n99.42\n97.09\n99.81\n\n58.89\n55.62\n89.23\n\n99.75\n98.06\n99.86\n\n85.70\n77.94\n97.01\n\n83.61\n80.24\n97.87\n\n79.19\n86.41\n90.61\n\n85.25\n92.33\n99.05\n\n99.39\n71.16\n93.18\n\n90.29 91.91 88.66\n78.75 79.93 77.57\n96.65 97.67 95.64\n84.11 84.28 83.95\n\nTable A48. Comparison (↑) on DAGM step500 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class6 Class4 Class1 Class5 Class3 Class2 Class8 Class9 Class7 Class10\n\n84.86 82.84 86.88\n83.64 88.06 79.21\n93.89 97.40 90.39\n74.51 69.85 79.17\n\n95.66 99.75 48.76\n98.71 66.42 80.31\n99.79 100.00 90.40\n61.73 92.70 99.58\n\n72.07\n98.41\n97.14\n76.33\n\n97.95\n96.47\n99.67\n65.52\n\n98.44\n70.21\n99.86\n87.01\n\n50.94\n64.49\n64.86\n52.87\n\n99.23 91.34\n91.11 100.00\n99.00 93.73\n63.89 58.16\n\n94.45\n70.22\n94.48\n87.31\n\n✓ 83.57 88.89 78.25 99.98 99.99 72.96 81.28 90.28 95.34 50.64 98.05 65.58\n✓ 71.28 65.10 77.47 68.85 72.52 96.37 78.83 70.77 80.39 51.92 63.09 51.51\n✓ 95.10 92.50 97.69 99.33 100.00 91.43 97.92 99.79 100.00 66.69 99.33 99.50\n\n81.67\n78.59\n97.00\n\nTable A49. Comparison (↑) on DAGM reverse step200 [34] in image-level AUROC using the same evaluation metrics as Tab. A11.\n\nMethod\n\nCA\n\nRegAD [36]\nAnomalyGPT [25]\nLTAD [34]\nHVQ [57]\n\n✗\n✗\n✗\n✗\n\nUniAD [89]\nMoEAD [62]\nLTOAD\n\nC\n\nC head C tail Class6 Class4 Class1 Class5 Class3 Class2 Class8 Class9 Class7 Class10\n88.41\n85.78\n94.52\n67.04\n\n98.74\n61.97\n98.45\n97.10\n\n✓ 90.79 94.62 86.96 99.47 99.82 87.93 93.47 92.41 99.28 54.11 99.48 83.94\n✓ 83.48 79.00 87.96 83.47 96.74 87.69 86.56 85.33 94.50 55.44 91.26 60.05\n✓ 96.96 96.33 97.58 95.81 99.44 95.90 98.66 98.11 99.83 85.41 99.74 97.96\n\n98.00\n93.76\n98.73\n\n90.28 88.67 91.91\n77.11 75.54 78.68\n96.66 97.93 95.40\n85.35 82.10 88.61\n\n92.44\n91.83\n97.22\n81.26\n\n99.73\n54.33\n99.49\n98.77\n\n72.23\n67.86\n95.31\n91.96\n\n85.24\n81.32\n98.57\n86.72\n\n93.69\n82.37\n99.04\n84.30\n\n99.17\n79.32\n99.79\n97.25\n\n73.28\n69.19\n84.36\n55.22\n\n99.95\n97.15\n99.89\n93.87\n\nTable A50. Comparison (↑) on DAGM reverse step200 [34] in pixel-level AUROC using the same evaluation metrics as Tab. A12.\n\n\fConfig. Online\nexp100\nexp200\nstep100\nstep200\n\n✗\n✓\n✗\n✓\n✗\n✓\n✗\n✓\n\nB\n\nB-HF B-TF D2-HF D2-TF D5-HF D5-TF D5-M Avg.\n\n95.08 95.08 95.08\n95.36 95.30 95.32\n94.82 94.82 94.82\n95.05 95.01 95.10\n95.03 95.03 95.03\n95.26 95.26 95.28\n94.03 94.03 94.03\n94.83 94.72 94.85\n\n95.08\n95.23\n94.82\n95.01\n95.03\n95.17\n94.03\n94.60\n\n95.08\n95.28\n94.82\n95.01\n95.03\n95.12\n94.03\n94.82\n\n95.08\n95.26\n94.82\n94.89\n95.03\n95.04\n94.03\n94.55\n\n95.08\n95.25\n94.82\n94.94\n95.03\n95.14\n94.03\n94.67\n\n95.08 95.08\n95.21 95.28\n94.82 94.82\n94.91 94.99\n95.03 95.03\n95.09 95.17\n94.03 94.03\n94.53 94.70\n\nTable A51. Comparison (↑) on online MVTec in pixel-level AUROC for anomaly segmentation across 4 configurations [34] of D T\nand 8 configurations of D O , i.e. B, B-HF, B-TF, D2-HF, D2-TF,\nD5-HF, D5-TF, and D5-M.\n\nConfig. Online\nexp100\nexp200\nstep100\nstep200\n\n✗\n✓\n✗\n✓\n✗\n✓\n✗\n✓\n\nB\n\nB-HF B-TF D2-HF D2-TF D5-HF D5-TF D5-M Avg.\n\n97.05 97.05 97.05\n97.29 97.20 97.30\n96.91 96.91 96.91\n97.09 96.98 97.14\n97.40 97.40 97.40\n97.61 97.54 97.65\n97.09 97.09 97.09\n97.49 97.43 97.49\n\n97.05\n97.06\n96.91\n97.02\n97.40\n97.52\n97.09\n97.17\n\n97.05\n97.26\n96.91\n97.05\n97.40\n97.55\n97.09\n97.39\n\n97.05\n97.16\n96.91\n97.03\n97.40\n97.45\n97.09\n97.19\n\n97.05\n97.25\n96.91\n96.97\n97.40\n97.50\n97.09\n97.30\n\n97.05 97.05\n97.14 97.21\n96.91 96.91\n97.09 97.05\n97.40 97.40\n97.53 97.54\n97.09 97.09\n97.29 97.34\n\nTable A52. Comparison (↑) on online VisA in the same format\nas Tab. A51.\n\nConfig. Online\nexp100\nexp200\nstep100\nstep200\n\n✗\n✓\n✗\n✓\n✗\n✓\n✗\n✓\n\nB\n\nB-HF B-TF D2-HF D2-TF D5-HF D5-TF D5-M Avg.\n\n97.48 97.48 97.48\n97.47 97.49 97.50\n97.29 97.29 97.29\n97.44 97.44 97.44\n97.43 97.43 97.43\n97.57 97.48 97.56\n97.31 97.31 97.31\n97.47 97.39 97.43\n\n97.48\n97.42\n97.29\n97.40\n97.43\n97.36\n97.31\n97.33\n\n97.48\n97.47\n97.29\n97.43\n97.43\n97.47\n97.31\n97.42\n\n97.48\n97.42\n97.29\n97.40\n97.43\n97.36\n97.31\n97.21\n\n97.48\n97.38\n97.29\n97.38\n97.43\n97.50\n97.31\n97.36\n\n97.48 97.48\n97.30 97.43\n97.29 97.29\n97.03 97.37\n97.43 97.43\n97.17 97.43\n97.31 97.31\n97.19 97.35\n\nTable A53. Comparison (↑) on online DAGM in the same format\nas Tab. A51.\n\n\fB-TF\n\n95.4 95.5\n\nD2-HF\n\n95.4 95.5\n\n95.4\n\n95.4\n\n95.2 95.4\n\n95.2 95.4\n\n95.2 95.4\n\n95.2\n\n95.3\n\n95.0 95.3\n\n95.0 95.3\n\n95.0 95.3\n\n95.0\n\n95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8\n\n95.1\n\n0\n\n200\n\n400\n\nD2-TF\n\n95.5\n\n94.6 95.1\n\n0\n\n200\n\n400\n\nD5-HF\n\n95.4 95.5\n\n94.6 95.1\n\n0\n\n200\n\n400\n\nD5-TF\n\n95.4 95.5\n\n94.6 95.1\n\n0\n\n200\n\n400\n\nD5-M\n\n95.4 95.5\n\n94.6\n95.4\n\n95.4\n\n95.2 95.4\n\n95.2 95.4\n\n95.2 95.4\n\n95.2\n\n95.3\n\n95.0 95.3\n\n95.0 95.3\n\n95.0 95.3\n\n95.0\n\n95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8\n\n95.1\n\n0\n\n200\n\n400\n\n94.6 95.1\n\n0\n\n200\n\n400\n\n94.6 95.1\n\n0\n\n200\n\n400\n\n94.6 95.1\n\n0\n\n200\n\n400\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n95.4 95.5\n\ntail\n\nB\n\n95.5\n\n94.6\n\nData Index\n\nFigure A5. Performance curves of LTOAD in pixel-level AUROC on C head and C tail . They are offline-trained on MVTec exp100 [34]\nand online-trained on our online benchmarks.\n\nB-TF\n\n95.0 95.4\n\nD2-HF\n\n95.0 95.4\n\n95.0\n\n95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8\n\n95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6\n\n94.8\n\n94.4 94.8\n\n94.4 94.8\n\n94.4 94.8\n\n94.4\n\n94.6\n\n0\n\n200\n\n400\n\nD2-TF\n\n95.4\n\n94.2 94.6\n\n0\n\n200\n\n400\n\nD5-HF\n\n95.0 95.4\n\n94.2 94.6\n\n0\n\n200\n\n400\n\nD5-TF\n\n95.0 95.4\n\n94.2 94.6\n\n0\n\n200\n\n400\n\nD5-M\n\n95.0 95.4\n\n94.2\n95.0\n\n95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8\n\n95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6\n\n94.8\n\n94.4 94.8\n\n94.4 94.8\n\n94.4 94.8\n\n94.4\n\n94.6\n\n0\n\n200\n\n400\n\n94.2 94.6\n\n0\n\n200\n\n400\n\n94.2 94.6\n\n0\n\n200\n\n400\n\n94.2 94.6\n\n0\n\n200\n\n400\n\nData Index\n\nFigure A6. Performance curves in the same format as Tab. A51. They are offline-trained on MVTec exp200 [34].\n\n94.2\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n95.0 95.4\n\ntail\n\nB\n\n95.4\n\n\fB-TF\n\n95.2 95.6\n\nD2-HF\n\n95.2 95.6\n\n95.2\n\n95.4\n\n95.0 95.4\n\n95.0 95.4\n\n95.0 95.4\n\n95.0\n\n95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8\n\n95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6\n\n94.8\n\n0\n\n200\n\n400\n\nD2-TF\n\n95.6\n\n94.4 94.8\n\n0\n\n200\n\n400\n\nD5-HF\n\n95.2 95.6\n\n94.4 94.8\n\n0\n\n200\n\n400\n\nD5-TF\n\n95.2 95.6\n\n94.4 94.8\n\n0\n\n200\n\n400\n\nD5-M\n\n95.2 95.6\n\n94.4\n95.2\n\n95.4\n\n95.0 95.4\n\n95.0 95.4\n\n95.0 95.4\n\n95.0\n\n95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8 95.2\n\n94.8\n\n95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6 95.0\n\n94.6\n\n94.8\n\n0\n\n200\n\n400\n\n94.4 94.8\n\n0\n\n200\n\n400\n\n94.4 94.8\n\n0\n\n200\n\n400\n\n94.4 94.8\n\n0\n\n200\n\n400\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n95.2 95.6\n\ntail\n\nB\n\n95.6\n\n94.4\n\nData Index\n\nFigure A7. Performance curves in the same format as Tab. A51. They are offline-trained on MVTec step100 [34].\n\nB-TF\n\n94.2 95.8\n\nD2-HF\n\n94.2 95.8\n\n94.2\n\n95.6\n\n93.7 95.6\n\n93.7 95.6\n\n93.7 95.6\n\n93.7\n\n95.4\n\n93.2 95.4\n\n93.2 95.4\n\n93.2 95.4\n\n93.2\n\n95.2\n\n92.7 95.2\n\n92.7 95.2\n\n92.7 95.2\n\n92.7\n\n95.0\n\n0\n\n200\n\n400\n\nD2-TF\n\n95.8\n\n92.2 95.0\n\n0\n\n200\n\n400\n\nD5-HF\n\n94.2 95.8\n\n92.2 95.0\n\n0\n\n200\n\n400\n\nD5-TF\n\n94.2 95.8\n\n92.2 95.0\n\n0\n\n200\n\n400\n\nD5-M\n\n94.2 95.8\n\n92.2\n94.2\n\n95.6\n\n93.7 95.6\n\n93.7 95.6\n\n93.7 95.6\n\n93.7\n\n95.4\n\n93.2 95.4\n\n93.2 95.4\n\n93.2 95.4\n\n93.2\n\n95.2\n\n92.7 95.2\n\n92.7 95.2\n\n92.7 95.2\n\n92.7\n\n95.0\n\n0\n\n200\n\n400\n\n92.2 95.0\n\n0\n\n200\n\n400\n\n92.2 95.0\n\n0\n\n200\n\n400\n\n92.2 95.0\n\n0\n\n200\n\n400\n\nData Index\n\nFigure A8. Performance curves in the same format as Tab. A51. They are offline-trained on MVTec step200 [34].\n\n92.2\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n94.2 95.8\n\ntail\n\nB\n\n95.8\n\n\fB-TF\n\n98.2 96.6\n\nD2-HF\n\n98.2 96.6\n\n98.2\n\n96.4\n\n98.1 96.4\n\n98.1 96.4\n\n98.1 96.4\n\n98.1\n\n96.2\n\n98.0 96.2\n\n98.0 96.2\n\n98.0 96.2\n\n98.0\n\n96.0\n\n97.9 96.0\n\n97.9 96.0\n\n97.9 96.0\n\n97.9\n\n95.8\n\n0\n\n200\n\n400\n\n600\n\nD2-TF\n\n96.6\n\n97.8 95.8\n\n0\n\n200\n\n400\n\n600\n\nD5-HF\n\n98.2 96.6\n\n97.8 95.8\n\n0\n\n200\n\n400\n\n600\n\nD5-TF\n\n98.2 96.6\n\n97.8 95.8\n\n0\n\n200\n\n400\n\n600\n\nD5-M\n\n98.2 96.6\n\n97.8\n98.2\n\n96.4\n\n98.1 96.4\n\n98.1 96.4\n\n98.1 96.4\n\n98.1\n\n96.2\n\n98.0 96.2\n\n98.0 96.2\n\n98.0 96.2\n\n98.0\n\n96.0\n\n97.9 96.0\n\n97.9 96.0\n\n97.9 96.0\n\n97.9\n\n95.8\n\n0\n\n200\n\n400\n\n600\n\n97.8 95.8\n\n0\n\n200\n\n400\n\n600\n\n97.8 95.8\n\n0\n\n200\n\n400\n\n600\n\n97.8 95.8\n\n0\n\n200\n\n400\n\n600\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n98.2 96.6\n\ntail\n\nB\n\n96.6\n\n97.8\n\nData Index\n\nFigure A9. Performance curves in the same format as Tab. A51. They are offline-trained on VisA exp100 [34].\n\nB-TF\n\n97.9 96.6\n\nD2-HF\n\n97.9 96.6\n\n97.9\n\n96.4\n\n97.7 96.4\n\n97.7 96.4\n\n97.7 96.4\n\n97.7\n\n96.2\n\n97.5 96.2\n\n97.5 96.2\n\n97.5 96.2\n\n97.5\n\n96.0\n\n97.3 96.0\n\n97.3 96.0\n\n97.3 96.0\n\n97.3\n\n95.8\n\n0\n\n200\n\n400\n\n600\n\nD2-TF\n\n96.6\n\n97.1 95.8\n\n0\n\n200\n\n400\n\n600\n\nD5-HF\n\n97.9 96.6\n\n97.1 95.8\n\n0\n\n200\n\n400\n\n600\n\nD5-TF\n\n97.9 96.6\n\n97.1 95.8\n\n0\n\n200\n\n400\n\n600\n\nD5-M\n\n97.9 96.6\n\n97.1\n97.9\n\n96.4\n\n97.7 96.4\n\n97.7 96.4\n\n97.7 96.4\n\n97.7\n\n96.2\n\n97.5 96.2\n\n97.5 96.2\n\n97.5 96.2\n\n97.5\n\n96.0\n\n97.3 96.0\n\n97.3 96.0\n\n97.3 96.0\n\n97.3\n\n95.8\n\n0\n\n200\n\n400\n\n600\n\n97.1 95.8\n\n0\n\n200\n\n400\n\n600\n\n97.1 95.8\n\n0\n\n200\n\n400\n\n600\n\n97.1 95.8\n\n0\n\n200\n\n400\n\n600\n\nData Index\n\nFigure A10. Performance curves in the same format as Tab. A51. They are offline-trained on VisA exp200 [34].\n\n97.1\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.9 96.6\n\ntail\n\nB\n\n96.6\n\n\fB-TF\n\n97.6 97.8\n\nD2-HF\n\n97.6 97.8\n\n97.6\n\n97.6\n\n97.4 97.6\n\n97.4 97.6\n\n97.4 97.6\n\n97.4\n\n97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2\n\n97.2\n\n97.0 97.2\n\n97.0 97.2\n\n97.0 97.2\n\n97.0\n\n97.0\n\n0\n\n200\n\n400\n\n600\n\nD2-TF\n\n97.8\n\n96.8 97.0\n\n0\n\n200\n\n400\n\n600\n\nD5-HF\n\n97.6 97.8\n\n96.8 97.0\n\n0\n\n200\n\n400\n\n600\n\nD5-TF\n\n97.6 97.8\n\n96.8 97.0\n\n0\n\n200\n\n400\n\n600\n\nD5-M\n\n97.6 97.8\n\n96.8\n97.6\n\n97.6\n\n97.4 97.6\n\n97.4 97.6\n\n97.4 97.6\n\n97.4\n\n97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2\n\n97.2\n\n97.0 97.2\n\n97.0 97.2\n\n97.0 97.2\n\n97.0\n\n97.0\n\n0\n\n200\n\n400\n\n600\n\n96.8 97.0\n\n0\n\n200\n\n400\n\n600\n\n96.8 97.0\n\n0\n\n200\n\n400\n\n600\n\n96.8 97.0\n\n0\n\n200\n\n400\n\n600\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.6 97.8\n\ntail\n\nB\n\n97.8\n\n96.8\n\nData Index\n\nFigure A11. Performance curves in the same format as Tab. A51. They are offline-trained on VisA step100 [34].\n\nB-TF\n\n97.5 97.7\n\nD2-HF\n\n97.5 97.7\n\n97.5\n\n97.5\n\n97.2 97.5\n\n97.2 97.5\n\n97.2 97.5\n\n97.2\n\n97.3\n\n96.9 97.3\n\n96.9 97.3\n\n96.9 97.3\n\n96.9\n\n97.1\n\n96.6 97.1\n\n96.6 97.1\n\n96.6 97.1\n\n96.6\n\n96.9\n\n0\n\n200\n\n400\n\n600\n\nD2-TF\n\n97.7\n\n96.3 96.9\n\n0\n\n200\n\n400\n\n600\n\nD5-HF\n\n97.5 97.7\n\n96.3 96.9\n\n0\n\n200\n\n400\n\n600\n\nD5-TF\n\n97.5 97.7\n\n96.3 96.9\n\n0\n\n200\n\n400\n\n600\n\nD5-M\n\n97.5 97.7\n\n96.3\n97.5\n\n97.5\n\n97.2 97.5\n\n97.2 97.5\n\n97.2 97.5\n\n97.2\n\n97.3\n\n96.9 97.3\n\n96.9 97.3\n\n96.9 97.3\n\n96.9\n\n97.1\n\n96.6 97.1\n\n96.6 97.1\n\n96.6 97.1\n\n96.6\n\n96.9\n\n0\n\n200\n\n400\n\n600\n\n96.3 96.9\n\n0\n\n200\n\n400\n\n600\n\n96.3 96.9\n\n0\n\n200\n\n400\n\n600\n\n96.3 96.9\n\n0\n\n200\n\n400\n\n600\n\nData Index\n\nFigure A12. Performance curves in the same format as Tab. A51. They are offline-trained on VisA step200 [34].\n\n96.3\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.5 97.7\n\ntail\n\nB\n\n97.7\n\n\fB-TF\n\n97.6 97.6\n\nD2-HF\n\n97.6 97.6\n\n97.6\n\n97.5\n\n97.4 97.5\n\n97.4 97.5\n\n97.4 97.5\n\n97.4\n\n97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2\n\n97.3\n\n97.0 97.3\n\n97.0 97.3\n\n97.0 97.3\n\n97.0\n\n97.2\n\n0\n\n1000\n\n2000\n\nD2-TF\n\n97.6\n\n96.8 97.2\n\n0\n\n1000\n\n2000\n\nD5-HF\n\n97.6 97.6\n\n96.8 97.2\n\n0\n\n1000\n\n2000\n\nD5-TF\n\n97.6 97.6\n\n96.8 97.2\n\n0\n\n1000\n\n2000\n\nD5-M\n\n97.6 97.6\n\n96.8\n97.6\n\n97.5\n\n97.4 97.5\n\n97.4 97.5\n\n97.4 97.5\n\n97.4\n\n97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2 97.4\n\n97.2\n\n97.3\n\n97.0 97.3\n\n97.0 97.3\n\n97.0 97.3\n\n97.0\n\n97.2\n\n0\n\n1000\n\n2000\n\n96.8 97.2\n\n0\n\n1000\n\n2000\n\n96.8 97.2\n\n0\n\n1000\n\n2000\n\n96.8 97.2\n\n0\n\n1000\n\n2000\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.6 97.6\n\ntail\n\nB\n\n97.6\n\n96.8\n\nData Index\n\nFigure A13. Performance curves in the same format as Tab. A51. They are offline-trained on DAGM exp100 [34].\n\nB-TF\n\n97.4 97.7\n\nD2-HF\n\n97.4 97.7\n\n97.4\n\n97.5\n\n97.1 97.5\n\n97.1 97.5\n\n97.1 97.5\n\n97.1\n\n97.3\n\n96.8 97.3\n\n96.8 97.3\n\n96.8 97.3\n\n96.8\n\n97.1\n\n96.5 97.1\n\n96.5 97.1\n\n96.5 97.1\n\n96.5\n\n96.9\n\n0\n\n1000\n\n2000\n\nD2-TF\n\n97.7\n\n96.2 96.9\n\n0\n\n1000\n\n2000\n\nD5-HF\n\n97.4 97.7\n\n96.2 96.9\n\n0\n\n1000\n\n2000\n\nD5-TF\n\n97.4 97.7\n\n96.2 96.9\n\n0\n\n1000\n\n2000\n\nD5-M\n\n97.4 97.7\n\n96.2\n97.4\n\n97.5\n\n97.1 97.5\n\n97.1 97.5\n\n97.1 97.5\n\n97.1\n\n97.3\n\n96.8 97.3\n\n96.8 97.3\n\n96.8 97.3\n\n96.8\n\n97.1\n\n96.5 97.1\n\n96.5 97.1\n\n96.5 97.1\n\n96.5\n\n96.9\n\n0\n\n1000\n\n2000\n\n96.2 96.9\n\n0\n\n1000\n\n2000\n\n96.2 96.9\n\n0\n\n1000\n\n2000\n\n96.2 96.9\n\n0\n\n1000\n\n2000\n\nData Index\n\nFigure A14. Performance curves in the same format as Tab. A51. They are offline-trained on DAGM exp200 [34].\n\n96.2\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.4 97.7\n\ntail\n\nB\n\n97.7\n\n\fB-TF\n\n97.6 97.9\n\nD2-HF\n\n97.6 97.9\n\n97.6\n\n97.7\n\n97.2 97.7\n\n97.2 97.7\n\n97.2 97.7\n\n97.2\n\n97.5\n\n96.8 97.5\n\n96.8 97.5\n\n96.8 97.5\n\n96.8\n\n97.3\n\n96.4 97.3\n\n96.4 97.3\n\n96.4 97.3\n\n96.4\n\n97.1\n\n0\n\n1000\n\n2000\n\nD2-TF\n\n97.9\n\n96.0 97.1\n\n0\n\n1000\n\n2000\n\nD5-HF\n\n97.6 97.9\n\n96.0 97.1\n\n0\n\n1000\n\n2000\n\nD5-TF\n\n97.6 97.9\n\n96.0 97.1\n\n0\n\n1000\n\n2000\n\nD5-M\n\n97.6 97.9\n\n96.0\n97.6\n\n97.7\n\n97.2 97.7\n\n97.2 97.7\n\n97.2 97.7\n\n97.2\n\n97.5\n\n96.8 97.5\n\n96.8 97.5\n\n96.8 97.5\n\n96.8\n\n97.3\n\n96.4 97.3\n\n96.4 97.3\n\n96.4 97.3\n\n96.4\n\n97.1\n\n0\n\n1000\n\n2000\n\n96.0 97.1\n\n0\n\n1000\n\n2000\n\n96.0 97.1\n\n0\n\n1000\n\n2000\n\n96.0 97.1\n\n0\n\n1000\n\n2000\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.6 97.9\n\ntail\n\nB\n\n97.9\n\n96.0\n\nData Index\n\nFigure A15. Performance curves in the same format as Tab. A51. They are offline-trained on DAGM step100 [34].\n\nB-TF\n\n97.4 97.8\n\nD2-HF\n\n97.4 97.8\n\n97.4\n\n97.6\n\n97.1 97.6\n\n97.1 97.6\n\n97.1 97.6\n\n97.1\n\n97.4\n\n96.8 97.4\n\n96.8 97.4\n\n96.8 97.4\n\n96.8\n\n97.2\n\n96.5 97.2\n\n96.5 97.2\n\n96.5 97.2\n\n96.5\n\n97.0\n\n0\n\n1000\n\n2000\n\nD2-TF\n\n97.8\n\n96.2 97.0\n\n0\n\n1000\n\n2000\n\nD5-HF\n\n97.4 97.8\n\n96.2 97.0\n\n0\n\n1000\n\n2000\n\nD5-TF\n\n97.4 97.8\n\n96.2 97.0\n\n0\n\n1000\n\n2000\n\nD5-M\n\n97.4 97.8\n\n96.2\n97.4\n\n97.6\n\n97.1 97.6\n\n97.1 97.6\n\n97.1 97.6\n\n97.1\n\n97.4\n\n96.8 97.4\n\n96.8 97.4\n\n96.8 97.4\n\n96.8\n\n97.2\n\n96.5 97.2\n\n96.5 97.2\n\n96.5 97.2\n\n96.5\n\n97.0\n\n0\n\n1000\n\n2000\n\n96.2 97.0\n\n0\n\n1000\n\n2000\n\n96.2 97.0\n\n0\n\n1000\n\n2000\n\n96.2 97.0\n\n0\n\n1000\n\n2000\n\nData Index\n\nFigure A16. Performance curves in the same format as Tab. A51. They are offline-trained on DAGM step200 [34].\n\n96.2\n\nAUROC (%)\n\nAUROC (%)\nhead\n\nB-HF\n\n97.4 97.8\n\ntail\n\nB\n\n97.8\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"