"<!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>TailedCore: Few-Shot Sampling for Unsupervised Long-Tail Noisy Anomaly Detection\nYoon Gyo Jung∗1 Jaewoo Park∗‡2 Jaeho Yoon∗3 Kuan-Chuan Peng4\nWonchul Kim2 Andrew Beng Jin Teoh3 Octavia Camps†1\n1\n\nNortheastern University\n\narXiv:2504.02775v2 [cs.CV] 26 May 2026\n\n4\n\n2\n\nAiV Co.\n\n3\n\nYonsei University\n\nMitsubishi Electric Research Laboratories\n\nAbstract\nWe aim to solve unsupervised anomaly detection in a practical challenging environment where the normal dataset is both\ncontaminated with defective regions and its product class distribution is tailed but unknown. We observe that existing models\nsuffer from tail-versus-noise trade-off where if a model is robust against pixel noise, then its performance deteriorates on\ntail class samples, and vice versa. To mitigate the issue, we\nhandle the tail class and noise samples independently. To this\nend, we propose TailSampler, a novel class size predictor that\nestimates the class cardinality of samples based on a symmetric\nassumption on the class-wise distribution of embedding similarities. TailSampler can be utilized to sample the tail class\nsamples exclusively, allowing to handle them separately. Based\non these facets, we build a memory-based anomaly detection\nmodel TailedCore, whose memory both well captures tail class\ninformation and is noise-robust. We extensively validate the\neffectiveness of TailedCore on the unsupervised long-tail noisy\nanomaly detection setting, and show that TailedCore outperforms the state-of-the-art in most settings. Code is available in\nTailedCore.\n\n1. Introduction\nIn the complex landscape of anomaly detection, the challenge often lies in navigating practical scenarios that feature a diverse and\nimbalanced data distribution [6, 8, 11, 21]. We delve into a challenging yet highly realistic scenario in anomaly detection, where\nthe training dataset, comprising multiple product classes [39],\nis beset by two significant complications: contamination with\nnoise [20] and presence of tailed class distributions [25]. In this\ncontext, ‘tail’ (few-shot) classes have limited few-shot samples,\nunlike ‘head’ (many-shot) classes which are data-rich but might\ncontain samples with defects. Crucially, in this unsupervised set∗ Equal contribution. ‡ Project lead. † Corresponding author.\n\nFigure 1. Tail class (x-axis) and noisy head class (y-axis) performance\ncomparison. The tail-versus-noise trade-off is shown across memorybased anomaly detection models (circles), and is more indicative in\nanomaly classification task evaluated by image-level AUROC (left).\n\nting, the class information of these products remains unknown\nto the model trainer. This setting mirrors a common predicament in large-scale industrial applications, where companies are\nrequired to manage vast production lines encompassing a wide\narray of product types, each with varying production rates.\nA critical issue arises in this scenario, which we term the\n“tail-versus-noise dilemma.” The dilemma underscores a fundamental trade-off where models robust to class imbalance overfit\nto defect noises, likely misclassifying many defects as normal.\nIn contrast, existing models that are robust against defect noise\ntend to underfit, missing vital details in tail classes. Fig. 1 shows\nthis tail-versus-noise trade-off which is prevalent through existing anomaly detection algorithms. This intrinsic characteristic\ncomes from the fact that few-shot class features are equivalent\nto the noisy abnormal features in terms of their statistical\noccurrence. Consequently, existing models find it difficult\nto strike a balance between avoiding overfitting to noise and\neffectively capturing the nuances of less represented classes.\nTo resolve this challenge, we propose to handle tail classes\nindependently from head classes by exclusively sampling them.\nTo this end, we devise a novel class size predictor TailSampler\nthat estimates the cardinality of the class of any training\nsample. For accurate estimation, TailSampler estimates the\nclass sizes based on a reflective symmetry between inter-class\n\n\fand intra-class similarity distributions in the embedding space.\nThe estimated class sizes of the training samples then enable\nto sample tail class features exclusively from the training set.\nBy utilizing the aggregated few-shot class instances, we\ndevise a memory-based anomaly detector TailedCore, which is\nbuilt upon the noise-discriminated model by augmenting the tail\nclass patch features sampled with TailSampler. As the memory\nof TailedCore is both clean from noisy defect patches and\npreserves the few-shot class information, it exhibits robustness\nagainst both noise contamination and class imbalance of the\ntraining set.\nOur contributions are summarized as follows:\n• We explore a practical and challenging anomaly detection\nscenario, where a single detection model is trained on\nmulti-class product training samples that involve noise\ncontamination and whose class distribution is long-tailed.\n• We propose a memory-based anomaly detector TailedCore\nwhose patch memory bank is both noise-free and augmented\nwith the representative patches of few-shot class instances.\nTo build TailedCore, we introduce TailSampler that can\naggregate few-shot class instances exclusively. TailSampler is\nbased on a novel class size predictor that estimates the class\nsize of training samples based on the reflective symmetry\nbetween inter-class and intra-class class-wise embedding\nsimilarity distributions.\n• We conduct extensive analyses and comparative studies\non both TailedCore and few-shot sampler along with the\nproposed class size predictor on the proposed unsupervised\nlong-tail noisy anomaly detection benchmark.\nThe codes for TailedCore along with the data generation will\nbe open sourced. We use the term ‘few-shot’ and ‘tail’ interchangeably to denote the class with a small number of samples.\n\n2. Related works\n2.1. Anomaly detection in extreme scenarios\nOne vitally important aspect of anomaly detection [9, 34] is the\nenvironment where these models are tested. This exploration\nhas led to the identification of several challenging scenarios, including multi-class settings with training data spanning multiple\nproduct types [26, 39], zero-shot and few-shot settings with minimal training images [15, 19, 23, 38, 43], and noisy settings featuring uncleaned training data with defective images [7, 20, 28].\nMulti-class anomaly detection In contrast to single-product\nsettings, anomaly detection models trained on multi-class\ndatasets often encounter “shortcut learning” [39], leading to low\nanomaly scores for normal images. This issue is particularly pronounced in reconstruction-based models, which tend to reconstruct all samples, regardless of their normality or abnormality.\nTo resolve it, UniAD [39] employs neighbor masked attention\nwithin a transformer model, focusing attention on local parts to\nprevent shortcut learning. HVQ [26] utilizes vector quantization\nto discretize the latent space, restricting the network’s recon-\n\nstruction fidelity on normal data distributions. UniFormaly [22]\nincreases sensitivity to irrelevant patterns by masking less relevant patches and employing top-k matchings with a pretrained\nfoundation model. These multi-class anomaly detection methods do not consider either long-tail classes or contaminated training data setups, and do not work well in the combined “noisy\nlong-tail” setup, which is shown in our experimental results.\nZero/few-shot anomaly detection The inception of few-shot\nlearning benchmarks in anomaly detection marked a significant\nadvancement, with methods leveraging template matching\n[18] and graph representations [38] for minimal training\ndata scenarios. AnomalyCLIP [43], WinCLIP [19], and\nAnomalyGPT [17], on the other hand, detect anomalies in the\nfew-shot classes based on the acquired knowledge of pretrained\nfoundation models such as CLIP [33] and GPT [32]. However,\nthese methods often require sophisticated prompt engineering\nor delicate prompt-tuning, and have yet to achieve optimal\nprecision and recall in the single-class training setting with a\nsufficient amount of training samples. In contrast, our proposed\nTailedCore needs none of these process.\nNoise anomaly detection Dealing with training datasets contaminated with defective samples presents another extreme learning scenario. SoftPatch [20] and InReaCh [28] focus on purifying memory coresets through outlier detection algorithms and\ndistance association filtering, respectively. IGD [7] adopts a\nrobust Gaussian modeling approach, addressing both contaminated training data and small dataset challenges. Yet, these\nmethods do not fully consider scenarios involving both data contamination and class imbalance, unlike our proposed TailedCore.\n\n2.2. Long-tail noisy learning\nIn the realm of image classification, several studies have\nfocused on learning scenarios involving training sets with label\ncontamination and class imbalance. To address these challenges,\nthe existing literature relies on the robustness and unsupervised\naspects of self-supervised learning [14, 27, 37, 41]. The learned\nembeddings of self-supervised frameworks are less impacted\nby label contamination and class imbalances. However, these\nworks differ from ours in that they deal with label-level\ncontamination rather than pixel-level defects. Furthermore,\nthese methods require explicit supervised labels to remediate\nthe contamination. In contrast, our work targets noise in pixels\nwithout any class label information.\n\n2.3. Few-shot/outlier sampling\nBoth classical clustering methods and outlier detection\nalgorithms can be applied to our task, as they facilitate the\nidentification of few-shot tail class samples, either indirectly\nor directly. Unsupervised clustering algorithms [2, 13, 16] can\nestimate the cluster sizes but struggle to identify small sample\nclusters in the imbalanced data. DBSCAN [13], on the other\nhand, captures both clusters and outliers. This however can be\nproblematic when attempting to identify clusters with only one\n\n\fsample (1-shot) as it may be confused between few-shot samples and outliers. Unlike clustering methods, outlier detection\nalgorithms [1, 5, 24, 35] are adept at identifying 1-shot samples\nwhich inherently resemble outliers. However, their effectiveness\ndiminishes when a few-shot class contains more than one sample, as these no longer fit the typical outlier profile, potentially\nleading to incorrect identification of few-shot class samples.\nBoth algorithm types, due to their inherent design, struggle to\naccurately predict class/cluster sizes in datasets that are both\nimbalanced and contaminated. Our proposed class size predictor\nspecifically addresses this issue, aiming to reliably and accurately identify few-shot class samples and enable their exclusive\nsampling. Ultimately, the identified few-shot class samples are\naugmented to the noise-discriminated patch set, constituting\nthe memory-based anomaly detection model TailedCore, which\nis robust against both class imbalance and training set noise.\n\n3. Background\n3.1. Memory-based anomaly detection\nTo train a memory-based anomaly detector, a feature extractor\nf (e.g., WideResNet) extracts a feature map ϕi ∈ RC×H×W\nfrom each training input image xi. Then, a coreset selection\n(h,w)\nalgorithm Score is applied to the set P = {ϕi\n} of patch\n(h,w)\nfeatures ϕi\n, resulting in a memory bank\n  \\label {eq:greedy_core} M_{PatchCore} := \\mathcal {S}_{core}(P) \\subset P \n\n(1)\n\nthat contains representative patch features of P . For instance,\nPatchCore opts for greedy sampling strategy to obtain the\ncoreset. In the inference stage, the anomaly score s(h,w) of the\ntesting image x is computed for each patch feature ϕ(h,w) by\nmeasuring its distance to the memory\n  \\label {eq:mem_inf} score^{(h, \\: w)} = dist(\\phi ^{(h, \\: w)}, \\ M), \n\n(2)\n\nwhere dist is the nearest neighbor distance in [34]. The\npixel-level anomaly score is computed by up-scaling the score\nmap score=[score(h,w)]∈RH,W , and its image-level anomaly\nscore is defined as its pixel maximum maxh,w score(h,w).\n\n3.2. Noise discrimination of memory\nThe training set X = {xi} may be contaminated with defect\nsamples. The naively attained memory bank then contains\nabnormal patch features, and assigns a low anomaly score on\ndefect images, resulting in poor performance. To resolve this,\n[20] applies a noise discrimination algorithm Sclean on the\npatch feature set P prior to coreset sampling:\n  \\label {eq:noise_disc} \\cS _{clean}(P) = \\{ \\phi _i^{(h, \\: w)} : outlier(\\phi _i^{(h, \\: w)}) &lt; \\tau _{0.15} \\}, \n\n(3)\n\naggregating only the clean normal patches with low outlier\nscores. SoftPatch [20] exploits local outlier factor (LOF) for\noutlier scoring, and selects the threshold τ0.15 to remove only\n15% of whole patches. In inference, SoftPatch utilizes the\nmemory set MSoftP atch =Score(Sclean(P ))\n\nFigure 2. (left) The ratio of removed patches based on highest outlier\nscores by Eq. (3), which shows that most of few-shot class patches are\nlost. (right) The ratio of sampled patches by greedy coreset sampling\nfrom PatchCore which favors both few-shot and anomaly samples.\n\n4. Problem and motivation\n4.1. Problem\nWe consider a practical anomaly detection setting where the\nnormal training data X = {xi} is both multi-class with tail\ndistribution and noise-contaminated. Particularly, each xi is\npaired with the product class label yi ∈ Y = {1, 2, ... , |Y|}\n(e.g., hazelnut, screw, pill, etc.) and an anomaly label\nyia ∈ Y a := {0, 1} with 1 indicating anomaly. However, this\nlabeling information is unknown to the model trainer. The class\ndistribution is long-tailed such that there are tail (i.e., few-shot)\nclasses whose number of training samples is very low; i.e.,\n  |C_k| = |\\{ x_i : y^c_i = k \\}| \\le K \n\n(4)\n\nwith a very small K (e.g., 1, 4, or 20), where |·| indicates the\nnumber of elements in the set. Moreover, some of the training\nsamples in X are anomalies, containing defect blobs in their\nimages. We assume the tail class samples are all normal since\nin the unsupervised setting its normality is determined by its\nmajority. Overall, the training set X with the above descriptions\nconstitutes unsupervised tailed noisy anomaly detection setting.\n\n4.2. Motivation: Tail-versus-noise trade-off\nAn ideal model to handle a long-tail noisy dataset should\nselectively sample the few-shot samples while removing\nnoisy samples. However, we observe that the existing models\nsuffer from a trade-off between class-imbalance and noise\nrobustness. For memory-based noise-discriminative models in\nparticular (e.g., SoftPatch), the methods focus on sampling the\nmajority patch features, which often ignores less dominating\nbut important patches.\nAs shown in Fig. 2 left, the noise discrimination process\nremoves both defect and few-shot class patches, losing most\nof the information in the tail distribution. On the other hand,\nPatchCore samples few-shot samples well due to greedy coreset\nsampling which captures maximally different features. This\nsampling principle, however, favors the noise patch features\nas well as shown in Fig. 2 (right) and the low performance on\nnoisy head classes in Fig. 1. Previous methods, hence, face the\ntail-versus-noise dilemma described above.\n\n\fTo resolve this, we propose to handle the tail classes\nindependently from the head classes that potentially contain\ndefective local regions. This, however, needs exclusive\nsampling of tail classes. To achieve this, we use the globally\naverage pooled embedding vector, which is invariant against\nlocal pixel variation and rather exclusively corresponds to the\nobject-centric nature of image, i.e., class.\n\n5. Method\nWe aim to build a coreset-based anomaly detection model using\npatch features. We require its memory to aptly capture tail class\ninformation and also to be absent of noise patches as much\nas possible. Particularly, we augment the noise discriminated\nmemory Mclean with the tail class memory Mtail , which\ncontains the patches of few-shot class samples exclusively:\n  M_{TailedCore} = M_{clean} \\cup M_{tail}. \n\n(5)\n\nThe main challenge lies on sampling the tail class patches exclusively. To this end, we devise a few-shot sampler by estimating\nthe class size of samples based on its embedding (e.g., global\naverage pooling layer of the encoder). Using the estimated class\nsizes of training samples, the few-shot sampler enables us to\nexclusively sample tail class samples and the patches thereof.\n\n5.1. Few-shot sampler: TailSampler\nTailSampler first estimates the class size of every training\nsample. Then, by automatically determining the maximum\nnumber of tail classes, denoted by ymax, TailSampler collects\nthe tail class samples’ patch features exclusively.\n5.1.1. Class size predictor\nTo sample patches exclusively from few-shot class, we identify\nsamples from few-shot classes by estimating their ”class sizes”,\nnamely the size of class each sample belongs to. To accurately\nmeasure the class size, we hypothesize as follows: In the embedding space, samples within an appropriate angle are majorly of\nthe same class, and this angle is likely to be the half of maximum\nangle to another embedding. In addition, the neighborhoods\nof neighborhoods within the half angle give accurate class size\nestimate. Based on these hypotheses, we proceed as follows:\nFirst, we adaptively set angle αi for each embedding\nei from training samples xi. The coverage of angle αi\ndecides the neighbors where a large value would assign\nmany neighbors. We set the angle to be half of its maximum\nwithin the train set, and hypothesize that most of neighbors\nwithin the region is likely of the same class. Particularly, let\nHi = {e ∈ Z : ∡(ei,e) ≤ mi/2} denote the half-angle region\nwhere the maximum angle is mi := maxe∈Z ∡(ei,e) and the\nset Z contains all train embeddings. Then, the adaptive angle\nαi is defined to contain p-th percentile of the half-angle region:\n  \\label {eq:radius} \\alpha _i = \\measuredangle (e_i, e_{(p \\cdot |H_i|)}), \n\n(6)\n\nwhere the index (j) of e(j) is sorted in the increasing order of\nthe angle ∡(ei,e(j)). We set p=0.85 in all experiments unless\nspecified otherwise.\nAfter setting the adaptive angle αi for each train embedding\nei, we estimate its class size based on neighborhoods of\nneighborhoods. Let Nα(ei)={e∈Z :∡(ei,e)≤α} denote the\nneighborhood of ei, which is the set of all train embedding e\nwithin the angle α of ei. Then, the class size is estimated by\nthe mode of the sizes of neighborhoods of the neighborhood:\n  \\label {eq:cize} \\kappa _i = \\underset {e \\in N_{\\alpha _i}(e_i)}{\\mathrm {mode}} (|N_{\\alpha (e)}(e)|), \n\n(7)\n\nwhere α(e) is the adaptive angle with respect to the embedding\ne belonging to the neighborhood Nαi (ei) of embedding ei.\nUsing the neighborhoods of neighborhood and mode on it gives\nmore robust estimation of the class size than mere count of the\ndirect neighborhood of ei.\nThe proposition in Supp. 9 shows that the angle of neighborhood given by Eq. (6) corresponds to the decision boundary\nthat maximizes the inter-class separation under regularities.\n5.1.2. Estimation of maximum size of tail class\nAfter estimating the class size of each training sample by κi, we\ndetermine the maximum size for the tail classes based on the\nelbow technique [36]. In particular, by utilizing the sample-wise\nclass sizes κi, we first obtain rough estimation of the size of\neach class set ηy ≈|Cy |. Then, we estimate the maximum size\nof tail classes Kmax by finding a point where the class size\nmost abruptly changes. This optimal shift point is found by the\nelbow technique. Concretely, we first estimate the size of each\nclass y, ηy ≈|Cy |, inductively by\n  \\begin {split} \\eta _1 &amp;= round \\left ( \\frac {1}{ \\kappa _{(1)} } \\sum _{i=1}^{ \\kappa _{(1)} } \\kappa _{(i)} \\right ), \\quad \\\\ \\eta _{y+1} &amp;= round \\left ( \\frac {1}{ \\kappa _{(\\eta _{y} + 1)} } \\sum _{i = \\eta _{y} + 1}^{\\min ( \\kappa _{(\\eta _{y} + 1)}, |X|)} \\kappa _{(i)} \\right ), \\end {split} \n(8)\n\nwhere the index (i) of κ(i) is sorted in the increasing order\nκ(1) ≤···≤κ(|X|).\nAfter we acquire the set {(y,ηy ) : y ∈ (1, ... ,|Y|)} through\nthe inductive process above, we define the maximum size of tail\nclasses as the elbow point of the estimated sizes of classes ηy\nsince at this point the class size increases abruptly. The elbow\nis computed by linearly connecting (1,η1) and (|Y|,η|Y|), and\nfinding the maximum orthogonal distance onto the line from\nthe set of points {(y,ηy ):y ∈(1, ...|Y|)} as shown below:\n  K_{\\max } := \\eta _{y_{\\max }} =: elbow(\\eta _{1}, \\dots , \\eta _{|\\mathcal {Y}|}) \n\n(9)\n\n  \\label {eq:elbow} y_{\\max } = \\argmax _{y \\in \\{1, \\dots , |\\mathcal {Y}| \\}} \\frac {|ay - \\eta _y + b|}{\\sqrt {a^2+1}} \n\n(10)\n\nwhere\n\n\f(a)\n\n(b)\n\nFigure 3. (a) Sampling process description of TailedCore (ours) and (b) the illustration of how we use the elbow method [36].\n\nand where the line ηy =ay+b intersects (1,η1) and (|Y|,η|Y|)\nwith a = (η|Y| − η1)/(|Y| − 1) and b = η1 − m. Fig. 3 (b)\nillustrates Eq. (10). We choose the elbow point (ymax,ηymax )\nas the maximum size of tail classes Kmax.\nThe maximum size of tail classes Kmax allows us to sample\nthe patch features of tail classes exclusively:\n  \\label {eq:tail_sample} \\cS _{tail}(P) = \\{ \\phi _{i}^{(h,w)} : \\kappa _i \\leq K_{max} \\}. \n\n(11)\n\nwith κi given by Eq. (7).\n\n5.2. Proposed method: TailedCore\nOur anomaly detection model is built upon the memory bank\nconstructed as below. First, we sample the base memory\nbank as in [20] with noise-discrimination described in Eq. (3).\nThen, the base memory is augmented with TailSampler Stail\n(Eq. (11)). Overall, TailedCore’s memory bank is defined by\nMT ailedCore = Score(Sclean(P )) ∪ Score(Stail (P )), where\nScore is the greedy coreset sampling in Eq. (1), Sclean is the\nnoise discrimination process that filters out defect patches\nbased on their outlier scores (Eq. (3)), and the few-shot\nsampler Stail augments the tail class patches exclusively on the\nnoise-discriminated base memory bank. The whole process is\nshown in Fig 3. As TailedCore’s patch memory bank is both\nnoise-clean and contains the representative features of few-shot\nclasses, it is robust against both class imbalance and normal sample contamination. In inference, the anomaly score is obtained\nby Eq. (2) as in the conventional memory-based detector.\n\ntail type\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nPaDiM [9] ICPR’21 82.45 80.95 82.06\nHVQ [26] NeurIPS’23 83.46 80.23 82.99\nWinCLIP [19] CVPR’23 89.35 90.11 90.37\nAnomalyCLIP [43] ICLR’24 90.93 90.98 91.48\nPatchCore [34] CVPR’22 93.33 87.59 89.18\nSoftPatch [20] NeurIPS’22 84.68 86.95 87.71\nTailedCore (ours) 96.55 95.24 96.12\n\nCt\n\nCh\n\nall\n\n77.47 81.28 79.19\n82.01 85.50 83.56\n91.60 88.21 90.37\n91.82 90.83 91.48\n92.19 71.18 83.83\n67.65 97.54 79.64\n95.82 95.34 95.71\n\nstep (K =1)\nCt\n\nCh\n\nall\n\n71.54 81.75 75.63\n74.15 90.15 80.55\n91.80 88.23 90.37\n91.21 91.90 91.48\n86.36 70.48 80.01\n60.66 97.49 75.40\n93.54 95.77 94.43\n\nTable 1. Anomaly classification on MVTecAD with image-level AUROC (%). We report the mean over 5 random seeds for each measurement. Notations: Ch / Ct : head / tail classes.\ntail type\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nPaDiM [9] ICPR’21 70.70 83.35 78.64\nHVQ [26] NeurIPS’23 73.47 84.03 68.25\nWinCLIP [19] CVPR’23 73.25 76.92 75.47\nAnomalyCLIP [43] ICLR’24 81.96 82.48 82.05\nPatchCore [34] CVPR’22 86.11 85.73 85.59\nSoftPatch [20] NeurIPS’22 78.04 92.16 86.56\nTailedCore (ours) 87.55 93.06 90.85\n\nCt\n\nCh\n\nall\n\n60.65 88.93 72.43\n68.25 89.30 77.02\n75.98 74.76 75.47\n82.28 81.74 82.05\n83.53 67.51 76.85\n59.70 95.97 74.81\n85.16 95.91 89.64\n\nstep (K =1)\nCt\n\nCh\n\nall\n\n55.98 86.75 68.80\n61.57 80.40 69.42\n78.80 70.80 75.47\n83.26 80.34 82.05\n79.33 68.56 74.84\n52.61 94.17 69.92\n82.97 94.11 87.61\n\nTable 2. Anomaly classification on VisA with image-level AUROC\n(%). The format and evaluation protocol are the same as Tab. 1.\ntail type\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nPaDiM [9] ICPR’21 90.11 92.66 91.43\nHVQ [26] NeurIPS’23 93.63 86.85 90.55\nWinCLIP [19] CVPR’23 82.03 84.06 82.29\nAnomalyCLIP [43] ICLR’24 91.24 91.69 91.08\nPatchCore [34] CVPR’22 93.56 87.98 89.93\nSoftPatch [20] NeurIPS’22 92.19 93.83 93.41\nTailedCore (ours) 96.08 95.01 95.29\n\nCt\n\nCh\n\nall\n\n82.53 95.29 87.67\n90.73 92.58 91.53\n80.60 84.63 82.29\n89.96 92.66 91.08\n93.54 72.09 85.19\n80.98 96.49 87.24\n95.56 93.20 94.74\n\nstep (K =1)\nCt\n\nCh\n\nall\n\n78.80 95.54 85.50\n86.36 95.20 89.90\n80.16 85.48 82.29\n89.34 93.68 91.08\n92.02 71.35 83.75\n70.34 96.89 80.99\n94.19 93.70 93.99\n\nTable 3. Anomaly segmentation on MVTecAD with pixel-level AUROC (%). We report the mean over 5 random seeds for each measurement. Notations: Ch / Ct : head / tail classes.\n\n6. Experiments\nSection 6 consists of dataset description, comparison to the\nSOTA models, and the detailed ablation study and analysis of\nTailedCore’s components.\n\n6.1. Datasets for unsupervised long-tail noisy\nanomaly detection\nWe devise the long-tail noisy anomaly detection datasets by\nmodifying the class-wise sample distributions of the widely\nused anomaly detection datasets MVTecAD [3] and VisA [44].\nWe consider three different types of long-tail distributions. Particularly, datasets with step-shaped tail distribution are devised\n\nby making the particular classes to have only a small number\nof samples; namely K =1, and K =4, imposing extreme class\nimblance on the datasets. We name these two datasets by ‘step\n(K =1)’ and ‘step (K =4)’. On the other hand, another realistic\ntype of tail-distribution is considered by making the class distribution to follow the Pareto distribution with the shape parameter\n0.6. For the step-tailed distribution datasets, we impose 40%\nof classes to be head classes, containing the original number\nof training samples. Thus, in MVTecAD, 6 of 15 classes are\nhead classes. For the Pareto tailed distribution, we regard as\nfew-shot (i.e., tail classes) the classes whose number of samples\n\n\ftail type\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nPaDiM [9] ICPR’21 89.02 95.10 82.81\nHVQ [26] NeurIPS’23 95.27 97.60 96.71\nWinCLIP [19] CVPR’23 71.94 73.97 73.19\nAnomalyCLIP [43] ICLR’24 95.60 95.46 95.51\nPatchCore [34] CVPR’22 96.84 87.99 91.13\nSoftPatch [20] NeurIPS’22 93.20 96.74 95.27\nTailedCore (ours) 97.98 97.25 97.48\n\nCt\n\nCh\n\nall\n\n83.90 97.36 89.51\n93.88 98.34 95.74\n74.60 71.21 73.19\n95.54 95.48 95.51\n95.39 62.96 81.88\n83.95 97.10 89.43\n96.80 97.02 96.89\n\nstep (K =1)\nCt\n\nCh\n\nall\n\n82.57 96.57 88.40\n90.58 95.51 92.63\n73.81 72.32 73.19\n96.16 94.60 95.51\n94.11 65.30 82.10\n80.73 96.82 87.43\n96.12 97.39 96.65\n\nTable 4. Anomaly segmentation on VisA with pixel-level AUROC (%).\nThe format and evaluation protocol are the same as Tab. 3.\n\nis less than 20 [25]. To impose noisy condition on the datasets,\nthe anomaly samples (i.e., the samples with defective regions)\nare added to the training samples such that the noisy samples\nconstitute 10% of the training set following the overlap protocol\nin SoftPatch [20] for fair comparison. In all cases, the testing\nsets of datasets remain the same as the original MVTecAD and\nVisA. A more detailed configuration is given in Supp. 11.\n\n6.2. Comparison to the state-of-the-art (SOTA)\nWe compare TailedCore to the SOTA anomaly detection methods in the unsupervised long-tail noisy settings. We carefully\nselect our baselines. HVQ excels in multi-class learning.\nPaDiM and SoftPatch are robust against noises as PaDiM\nis based on Gaussian modeling of the data, while SoftPatch\nexplicitly removes the defect patches by outlier scoring. Using\nfoundation models, WinClip and AnoamlyClip are strong for\nzero-shot learning. PatchCore are near-perfect in the single-class\nanomaly detection settings. We show the full experimental\nresults in Supp. 12. All models are trained in the multi-class\nsetting; namely, one model for one dataset with all classes rather\nthan one model per class. The detection performance, however,\nis measured for each product class under image-level and\npixel-level AUROC, and averaged for reporting and comparison.\nFor comparison, we consider models that are specifically robust\nagainst noise, strong on multi-class training, and foundation\nmodels that can exhibit zero/few-shot learning capability.\nTabs. 1, 2, 3, and 4 show the superiority of TailedCore across\nall types of long-tail distributions. As anticipated, all baseline\nmodels encounter the tail-versus-noise trade-off, resulting in\nsuboptimal performance either on tail classes with limited\nsamples or on head classes with noisy training samples. These\ntrends become more pronounced in highly unbalanced datasets,\nwhere the few-shot classes contain only 1 or 4 samples.\n\n6.3. Ablation study and analysis\n6.3.1. Tail (few-shot) sampling\nWe evaluate how accurately our proposed algorithm Stail\ncan sample tail (few-shot) class samples exclusively without\nincluding noise samples. First of all, we measure the ratio of\nmis-included tail class samples TailSampler which is the ratio\nof not sampled tail class samples to total tail class samples. A\nsingle mis-inclusion can vitally damage anomaly detection performance especially in case of the one-shot setting K =1 as the\nmodel wouldn’t be able to utilize the only sample of the class.\n\nAdditionally, the exclusive aspect of few-shot sampling is\ncrucial; the few-shot sampled set shouldn’t include anomaly\nand head class samples as possible. Included anomaly samples\nwould harm the head class performance and head class sampled\nby few-shot sampler might cause class imbalance issue as\nwell as the possibility of sampling anomaly from head classes.\nHence, we measure the ratios of included anomalies and\nhead-class samples along with AUROC which is measured\non the outlier scores derived by a given algorithm and ground\ntruth binary labels that indicate whether a given sample is tail\nclass or head class. For TailSampler, the outlier score of each\ntrain sample is given as the negative of predicted class size. The\nincluded anomaly ratio is defined as the ratio of number of\nanomaly samples to the number of whole anomaly samples. The\nratio of included head-class sample is defined as the number of\nincluded head class to the number of included tail class samples.\nFor extensive comparison, we compare TailSampler with\nwidely used clustering algorithms [2, 13, 16], outlier detectors\n[1, 5, 24, 35], and density estimators [10, 30]. These methods\nprovide clustering size and/or outlier score/prediction. In cases\nwhen only outlier scores are available, we apply the elbow\nmethod to induce deterministic prediction of whether a given\nsample is few-shot or not. We use default settings provided by\nSklearn [31] and PyOD [42]. For all methods, we utilize the\nembedding vectors of WideResNet-50 [40]. Experiments with\ndifferent architectures and details are provided in Supp. 10.\nThe combined ratio, which is the sum of missing tail samples\nand included anomaly samples, indicates that TailSampler is\nmost effective for exclusively sampling few-shot class samples.\nThe most critical factor is to not miss few-shot class samples.\nOn this ratio, TailSampler achieves the lowest rate except for\nthe algorithms that trivially sample all few-shot class samples.\nWe find that most of the classical algorithms for clustering and\noutlier detection are not usable as they either miss too many fewshot samples or includes a large number of anomaly samples.\nWe note that the class size predictor in our few-shot samples\nresembles DBSCAN and Affinity Propagation, respectively, in\nterms of using neighborhoods and voting mechanism. None\nof these methods however have instance-specific parameters\nthat are adaptively adjusted across different samples.\n6.3.2. Class size prediction\nWe measure how accurately our class size predictor estimates\nthe class size of each sample by measuring the class size\nprediction error. It is measured for each train sample and\nweight-averaged through the whole train samples:\n\n  error = \\frac {1}{| \\mathcal {X} |} w_i \\sum _{i=1}^{|\\mathcal {X}|} \\left |\\kappa _i - |C_{k(i)}| \\right | \n\n(12)\n\nwhere k(i) indicates the index such that xi ∈ Ck(i) (namely,\nCk(i) is the class of xi). The weight is chosen by wi =1/|Ck(i)|,\nwhich is to give more penalty on the few-shot class samples\nmore than the head class samples.\n\n\fPareto\n\n90\n80\n70\n\nTailedCore\nPatchCore\nSoftPatch\n\n60\n50\n40\n30\n20\n0\n\n5\n\n10\n\n15\n\n20\n\n25\n\nPareto\n\n100\n\nPixel AUROC (%)\n\nImage AUROC (%)\n\n100\n\n30\n\nNoise Ratio (%)\n\n35\n\n80\n70\n60\n50\n40\n30\n\n40\n\n0\n\n5\n\n10\n\n80\n70\n60\n50\n40\n30\n5\n\n10\n\n15\n\n20\n\n25\n\n30\n\nNoise Ratio (%)\n\n35\n\n60\n50\n40\n0\n\n5\n\n10\n\nPixel AUROC (%)\n\nImage AUROC (%)\n\n70\n60\n50\n40\n30\n15\n\n20\n\n25\n\n30\n\nNoise Ratio (%)\n(e)\n\n15\n\n20\n\n25\n\n30\n\nNoise Ratio (%)\n\n35\n\n40\n\nLOF\nIF\nOCSVM\nDBSCAN\nKMeans\nGMM\nKDE\nAP\nKNN\nTailSampler (ours)\n\n89.58 ± 44.42\n18.15 ± 15.91\n49.95 ± 9.76\n35.36 ± 49.55\n94.67 ± 44.95\n100.00 ± 0.00\n29.81 ± 24.15\n27.81 ± 32.59\n43.49 ± 31.25\n5.10 ± 5.07\n\nAblation on the class size predictor:\nTailSampler (p=100) 8.48 ± 10.88\nTailSampler (p=50) 7.37 ± 10.35\nTailSampler (top-1) 14.47 ± 7.99\nTailSampler (average) 6.48 ± 10.11\n\n70\n\n35\n\n40\n\nstep (K = 4)\n\n100\n\n80\n\n10\n\n40\n\n(d)\n\n90\n\n5\n\n35\n\n80\n\n(c)\n\n0\n\n30\n\n90\n\n30\n\n40\n\nstep (K = 4)\n\n100\n\n25\n\nstep (K = 1)\n\n100\n\n90\n\n0\n\n20\n\n(b)\n\nPixel AUROC (%)\n\nImage AUROC (%)\n\n100\n\n15\n\nNoise Ratio (%)\n\n(a)\n\nstep (K = 1)\n\ncombined ratio of\nratio of missing\nratio of\nratio of included\nclass size\nmissing Ct &amp;\nAUROC (%) (↑)\nCt samples (↓) included AS (↓) Ch samples (↓) prediction error (↓)\nincluded AS (↓)\n\nmethod\n\n90\n\n31.22 ± 34.88 58.36 ± 9.54\n7.25 ± 10.05 10.90 ± 5.86\n0.78 ± 2.19 49.17 ± 7.57\n30.64 ± 44.38 4.72 ± 5.17\n47.22 ± 35.49 47.45 ± 9.46\n0.00 ± 0.00 100.00 ± 0.00\n2.14 ± 6.26 27.67 ± 17.89\n12.98 ± 24.01 14.83 ± 8.58\n14.46 ± 24.07 29.03 ± 7.18\n0.12 ± 0.65\n4.98 ± 4.42\n\n92.50 ± 7.87\n69.02 ± 25.96\n95.06 ± 6.08\n25.57 ± 27.24\n97.40 ± 3.99\n97.58 ± 2.86\n87.47 ± 10.35\n77.45 ± 28.21\n83.12 ± 18.28\n31.96 ± 26.05\n\n1.00 ± 0.00\n1.00 ± 0.00\n1.00 ± 0.00\n0.35 ± 0.44\n4.27 ± 1.40\n12.50 ± 1.53\n1.00 ± 0.00\n0.70 ± 0.22\n1.00 ± 0.00\n0.19 ± 0.05\n\n77.08 ± 25.86\n98.96 ± 1.27\n96.72 ± 3.59\n84.46 ± 22.18\n52.58 ± 20.46\n50.00 ± 0.00\n97.98 ± 2.19\n93.03 ± 12.8\n94.51 ± 10.34\n99.78 ± 0.30\n\n1.07 ± 5.23\n3.46 ± 6.80\n0.20 ± 0.78\n3.65 ± 6.99\n\n42.64 ± 31.86\n27.90 ± 27.36\n73.97 ± 27.95\n22.16 ± 24.33\n\n0.51 ± 0.04\n0.12 ± 0.12\n0.85 ± 0.04\n0.21 ± 0.07\n\n99.76 ± 0.29\n97.36 ± 5.65\n99.73 ± 0.34\n99.35 ± 2.59\n\n7.41 ± 5.65\n3.91 ± 3.55\n14.27 ± 7.21\n2.83 ± 3.12\n\nTable 5. The analysis on the proposed TailSampler and its class size\npredictor. The results are obtained from both MVTecAD and VisA\nand averaged across all different types of tail distributions and random\nseeds (overall 60 different seeds) with the standard deviations indicated\non the right. The best and second best performances are marked in\nbold and underline, respectively. Acronyms/notations: IF: Isolation\nForest; AP: Affinity Propagation; AS: anomaly samples; Ch / Ct : head\n/ tail classes.\n\n90\n80\n\ntail type\n\n70\n\ntask\n\n60\n50\n40\n30\n0\n\n5\n\n10\n\n15\n\n20\n\n25\n\n30\n\nNoise Ratio (%)\n\n35\n\n40\n\n(f)\n\nFigure 4. The plot of noise ratio of train data versus anomaly classification (image-level AUROC) and segmentation (pixel-level AUROC)\nperformance. In all cases, TailedCore outperforms both PatchCore and\nSoftPatch. Dataset is MVTecAD with different tail distributions. The\nlines show the mean and shades show standard deviation of multiple\nruns of experiments with different seeds.\n\nTab. 5 shows that most of the clustering based methods vastly\nfail on this task, and the estimation by our class size predictor\noutperforms them significantly. We believe this is partly due\nto suboptimal hyperparameters used for these algorithms. Due\nto their classical nature, however, it is unclear how to tune them\nwithout the availability of the validation set in our scenario.\n\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nCt\n\nCh\n\nall\n\nstep (K =1)\nCt\n\nCh\n\nall\n\nanomaly\nw/o FSA 82.22 91.22 88.13\nclassification w/ FSA 96.55 95.24 96.13\n\n60.01 97.60 75.05\n93.54 95.78 94.44\n\n66.28 97.85 78.94\n95.82 95.34 95.72\n\nanomaly\nw/o FSA 91.60 94.94 93.54\nsegmentation w/ FSA 96.09 95.01 95.30\n\n68.99 96.85 80.14\n94.19 93.71 94.00\n\n79.39 96.35 86.23\n95.56 93.20 94.75\n\nTable 6. Abaltion on the few-shot augmentation (FSA) of TailedCore.\nThe image-level and pixel-lavel AUROC metrics (%) are reported on\nthe MVTecAD dataset with different types of tail distributions for\nanomaly classification and segmentation tasks, respectively. Notations:\nCh / Ct : head / tail classes.\n\nsimply use the nearest embedding’s neighborhood size instead,\nor the class size of xi can be estimated by averaging instead\nof majority vote. As indicated in Tab. 5, both the nearest\nembedding (i.e., top-1) and averaging are inferior to majority\nvoting. The former is inevitably less robust, while averaging\ncan still be sensitive to the outlier values of neighborhood size.\n\n6.3.3. Abalation study on class size predictor\n\n6.3.4. Ablation on TailedCore\n\nWe conduct detailed ablation study on the proposed class size\nprediction in Eq. (7). One hyperparameter used in TailSampler\nStail of TailedCore is the percentiling proportion p to consider\nonly the majority of nearby samples within the neighborhood.\nWe analyze how this parameter can affect the anomaly detection\nperformance of TailedCore. Tab. 5 indicates that using the\nnearest 85% embeddings (i.e., p = 85%) is the best choice.\nUsing all of the available neighborhoods (i.e., p = 100%)\nwould include different class samples in the neighborhood,\ndeterioriating class estimation. On the other hand, counting only\nwith the half of samples (i.e., p = 50%) in the neighborhood\nmay lose too much information.\nAnother component in the class size predictor that requires\nanalysis is its voting mechanism used in Eq. (7). One may\n\nWe analyze the impact of augmentation of few-shot class\npatches by TailSampler in TailedCore. The TailedCore model\nwithout these augmented patches has the same memory bank as\nSoftPatch, but its inference scoring is simpler. Tab. 6 indicates\nthat without the augmented patches from TailSampler, the\nmemory-based model cannot detect anomalies in few-shot class\nsamples. This shows the necessity of tail class augmentation\nby TailSampler. We note some performance decrease in the\nhead class detection performance since few-shot augmentation\nmay involve few anomaly samples from the head classes that\nbehave like few-shot class instances. This issue intrinsically\nis due to the weakness of encoder embedding, and the proposed\nTailSampler based on such embeddings can induce incorrectly\nsampled few-shot class instances, which we discuss in Sec. 7.\n\n\fRatio of included anomalies (%) {↓}\n\n14\n\n10\n\n4\n\n20\n\nMVTecAD step (K=4)\nVisA step (K=4)\n20\n\n40\n\n60\n\n80\n\n20\n\n2\n\n0\n\n0\n\n40\n\n6\n\n0\n\n100\n\n20\n\nAccuracy on few-shot and noisy samples (%)\n\n40\n\n60\n\n80\n\n100\n\n20\n\nAccuracy on few-shot and noisy samples (%)\n\n(b)\n\nClass size prediction error (%) {↓}\n\n(a)\n\n40\n\n60\n\n80\n\nImage-level AUROC (%) {↑}\n\nAUROC (%) {↑}\n\n92.5\n\n90\n\n85.0\n82.5\n\n1\n\n88\n\n80.0\n\n60\n\n100\n\n92\n\n87.5\n\n70\n\n2\n\n80\n\n94\n\n90.0\n\n80\n\n60\n\n96\n\n95.0\n\n90\n\n3\n\n40\n\n(d)\n\n97.5\n\n6\n\n4\n\n20\n\nAccuracy on few-shot and noisy samples (%)\n\n(c)\n\n100\n\n5\n\n0\n\n100\n\nAccuracy on few-shot and noisy samples (%)\n\nPixel-level AUROC (%) {↑}\n\n20\n\n60\n\n8\n\n40\n\n40\n\n80\n\n12\n\n60\n\n60\n\n100\n\n16\n\n80\n\n80\n\nRatio of included head class samples (%) {↓}\n\nRatio of missing tail class samples (%) {↓}\n\nCombined ratio of mis-sampling (%) {↓}\n\n100\n\n86\n\n77.5\n\n0\n\n20\n\n40\n\n60\n\n80\n\nAccuracy on few-shot and noisy samples (%)\n\n(e)\n\n100\n\n20\n\n40\n\n60\n\n80\n\n100\n\nAccuracy on few-shot and noisy samples (%)\n\n(f)\n\n20\n\n40\n\n60\n\n80\n\nAccuracy on few-shot and noisy samples (%)\n\n(g)\n\n100\n\n20\n\n40\n\n60\n\n80\n\n100\n\nAccuracy on few-shot and noisy samples (%)\n\n(h)\n\nFigure 5. Classification accuracy between tail classes and noisy samples versus metrics relevant to class size prediction and few-shot sampling on\nMVTecAD and VisA datasets with step-like tailed distribution and K =4. The correlation is strong for (a) mis-sampling ratio, (b) ratio of missing\nfew-shot samples, (e) class size prediction error, and (f) AUROC for predicting whether a sample is few-shot or not. We show that improving the\ndiscriminative aspect of network’s embeddings improves few-shot sampling and prediction error of class size predictor, which in turn improves (g)\nanomaly classification (image-level AUROC) and (h) anomaly segmentation (pixel-level AUROC) performance of TailedCore.\n\n6.4. Noise ratio\nWe analyze the impact of noise ratio. Training data with a greater\nnumber of defect samples increase the chance of sampling noise\ninstances for the few-shot sampler. We analyze this trend in\nFig. 4, but the impact is not severe. In all cases, TailedCore either\noutperforms or is on par with both PatchCore and SoftPatch.\n\n6.5. Relation between the discriminative aspect of\nembedding and TailedCore\nTailedCore utilizes the embedding features ei of training\nsamples xi for few-shot sampling and augmentation thereof.\nTherefore, TailedCore’s detection performance highly relies\non the discriminative aspect of the embedding feature. Poorly\ndesigned embedding features will not discriminate different\nclass samples in the embedding space. In this case, TailSampler\ncannot sample tail class samples and it may overly many head\nclass samples. TailedCore’s memory bank obtained so will\nneither be class-balanced nor noise-free, making the inference\nof TailedCore poor.\nIn contrast, a highly discriminative embedding features\nwill make TailedCore’s class size prediction accurate, thereby\nenabling it to sample the few-shot class samples exclusively\nwithout aggregating any anomaly and head class samples. In\nwhich case, TailedCore is both noise-free and class-balanced.\nWe test this behavior by Oracle labeling and training\nthe embedding features with class labels. Fig. 5 shows that\nimproving discriminative quality of embedding (measured\nby its classification accuracy on noise and tail class samples)\naccordingly improves the relevant metrics. Particularly, more\ndiscriminative embeddings make more accurate class size\n\nprediction, improving TailSampler along with its anomaly\nclassification and segmentation performances.\n\n7. Limitations\nThe class size prediction in TailSampler can fail if the reflectivesymmetric assumption on the inter-class and intra-class similarities breaks down. Particularly, this case can occur if the utilized\nencoder embedding is either poor or not aligned with the label\nspace of classes. In some cases, the geometric aspect of defect\nsamples highly resembles that of few-shot class instances in the\nembedding space. We believe that this is due to imperfect nature\nof encoder embedding, which is often more sensitive to spurious\nfeatures than the notion of class and object-centric aspect [29].\nThis issue can be improved by enhancing the encoder network.\n\n8. Conclusion\nIn this study, we introduced TailedCore, a novel memory-based\nanomaly detection model designed to effectively address the\nchallenges of unsupervised anomaly detection in noisy and\nlong-tail class distributions. By developing a unique class\nsize predictor and a tailored memory bank, we successfully\nnavigated the tail-versus-noise dilemma, enhancing the model’s\nperformance in identifying anomalies within a contaminated\nand imbalanced dataset. Our comprehensive evaluations\ndemonstrated TailedCore’s superior ability to mitigate noise\ncontamination and class imbalance, underscoring its significance in advancing anomaly detection technologies. This work\nnot only showcases a significant stride in handling real-world\nanomaly detection scenarios but also lays a robust foundation\nfor future research in this critical field.\n\n\fAcknowledgments Yoon Gyo Jung and Octavia Camps were\nsupported by NSF grant 2038493, ONR grant N00014-21-12431, NIH grant R01CA240771 from NCI, and U.S. Department of Homeland Security grant 22STESE00001-03-02. Jaewoo Park and Wonchul Kim were supported by the Technology Innovation Program (20023364) funded by the Ministry\nof Trade, Industry &amp; Energy (MOTIE, Korea). Kuan-Chuan\nPeng was exclusively supported by Mitsubishi Electric Research\nLaboratories. The views and conclusions contained in this document are those of the authors and should not be interpreted as\nnecessarily representing the official policies, either expressed or\nimplied, of the U.S. Department of Homeland Security.\n\nReferences\n[1] Fabrizio Angiulli and Clara Pizzuti. Fast outlier detection in high\ndimensional spaces. In European conference on principles of\ndata mining and knowledge discovery, pages 15–27. Springer,\n2002. 3, 6\n[2] David Arthur, Sergei Vassilvitskii, et al. k-means++: The advantages of careful seeding. In Soda, pages 1027–1035, 2007. 2, 6\n[3] Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten\nSteger. Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition, pages\n9592–9600, 2019. 5\n[4] Paul Bergmann, Kilian Batzner, Michael Fauser, David Sattlegger,\nand Carsten Steger. Beyond dents and scratches: Logical constraints in unsupervised anomaly detection and localization. International Journal of Computer Vision, 130(4):947–969, 2022. 3\n[5] Markus M Breunig, Hans-Peter Kriegel, Raymond T Ng, and\nJörg Sander. Lof: identifying density-based local outliers. In\nProceedings of the 2000 ACM SIGMOD international conference\non Management of data, pages 93–104, 2000. 3, 6\n[6] Yunkang Cao, Xiaohao Xu, Jiangning Zhang, Yuqi Cheng,\nXiaonan Huang, Guansong Pang, and Weiming Shen. A survey\non visual anomaly detection: Challenge, approach, and prospect.\narXiv preprint arXiv:2401.16402, 2024. 1\n[7] Yuanhong Chen, Yu Tian, Guansong Pang, and Gustavo Carneiro.\nDeep one-class classification via interpolated gaussian descriptor.\nIn Proceedings of the AAAI Conference on Artificial Intelligence,\npages 383–392, 2022. 2\n[8] Zhuohang Chen, Jinglong Chen, Yong Feng, Shen Liu, Tianci\nZhang, Kaiyu Zhang, and Wenrong Xiao. Imbalance fault\ndiagnosis under long-tailed distribution: Challenges, solutions\nand prospects. Knowledge-Based Systems, 258:110008, 2022. 1\n[9] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and\nRomaric Audigier. Padim: a patch distribution modeling framework for anomaly detection and localization. In International\nConference on Pattern Recognition, pages 475–489. Springer,\n2021. 2, 5, 6\n[10] Arthur P Dempster, Nan M Laird, and Donald B Rubin.\nMaximum likelihood from incomplete data via the em algorithm.\nJournal of the royal statistical society: series B (methodological),\n39(1):1–22, 1977. 6\n[11] Jan Diers and Christian Pigorsch. A survey of methods for\n\nautomated quality control based on images. International\nJournal of Computer Vision, pages 1–29, 2023. 1\n[12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk\nWeissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa\nDehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly,\net al. An image is worth 16x16 words: Transformers for image\nrecognition at scale. arXiv preprint arXiv:2010.11929, 2020. 2\n[13] Martin Ester, Hans-Peter Kriegel, Jörg Sander, Xiaowei Xu, et al.\nA density-based algorithm for discovering clusters in large spatial\ndatabases with noise. In kdd, pages 226–231, 1996. 2, 6\n[14] Chaowei Fang, Lechao Cheng, Huiyan Qi, and Dingwen Zhang.\nCombating noisy labels in long-tailed image classification. arXiv\npreprint arXiv:2209.00273, 2022. 2\n[15] Zheng Fang, Xiaoyang Wang, Haocheng Li, Jiejie Liu, Qiugui\nHu, and Jimin Xiao. Fastrecon: Few-shot industrial anomaly\ndetection via fast feature reconstruction. In Proceedings of the\nIEEE/CVF International Conference on Computer Vision, pages\n17481–17490, 2023. 2\n[16] Brendan J Frey and Delbert Dueck. Clustering by passing\nmessages between data points. science, 315(5814):972–976,\n2007. 2, 6\n[17] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Ming\nTang, and Jinqiao Wang. Anomalygpt: Detecting industrial\nanomalies using large vision-language models. arXiv preprint\narXiv:2308.15366, 2023. 2\n[18] Chaoqin Huang, Haoyan Guan, Aofan Jiang, Ya Zhang, Michael\nSpratling, and Yan-Feng Wang. Registration based few-shot\nanomaly detection. In European Conference on Computer Vision,\npages 303–319. Springer, 2022. 2\n[19] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang,\nAvinash Ravichandran, and Onkar Dabeer. Winclip: Zero-/fewshot anomaly classification and segmentation. In Proceedings\nof the IEEE/CVF Conference on Computer Vision and Pattern\nRecognition, pages 19606–19616, 2023. 2, 5, 6\n[20] Xi Jiang, Jianlin Liu, Jinbao Wang, Qiang Nie, Kai Wu, Yong\nLiu, Chengjie Wang, and Feng Zheng. Softpatch: Unsupervised\nanomaly detection with noisy data. Advances in Neural Information Processing Systems, 35:15433–15445, 2022. 1, 2, 3, 5, 6\n[21] Justin M Johnson and Taghi M Khoshgoftaar. Survey on deep\nlearning with class imbalance. Journal of Big Data, 6(1):1–54,\n2019. 1\n[22] Yujin Lee, Harin Lim, Seoyoon Jang, and Hyunsoo Yoon.\nUniformaly: Towards task-agnostic unified framework for visual\nanomaly detection. Available at SSRN 4586132. 2\n[23] Xurui Li, Ziming Huang, Feng Xue, and Yu Zhou. Musc:\nZero-shot industrial anomaly classification and segmentation\nwith mutual scoring of the unlabeled images. arXiv preprint\narXiv:2401.16753, 2024. 2\n[24] Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation\nforest. In 2008 eighth ieee international conference on data\nmining, pages 413–422. IEEE, 2008. 3, 6\n[25] Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing\nGong, and Stella X Yu. Large-scale long-tailed recognition in an\nopen world. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 2537–2546, 2019. 1, 6\n[26] Ruiying Lu, YuJie Wu, Long Tian, Dongsheng Wang, Bo Chen,\nXiyang Liu, and Ruimin Hu. Hierarchical vector quantized trans-\n\n\fformer for multi-class unsupervised anomaly detection. Advances\nin Neural Information Processing Systems, 36, 2023. 2, 5, 6\n[27] Yang Lu, Yiliang Zhang, Bo Han, Yiu-ming Cheung, and Hanzi\nWang. Label-noise learning with intrinsically long-tailed data.\nIn Proceedings of the IEEE/CVF International Conference on\nComputer Vision, pages 1369–1378, 2023. 2\n[28] Declan McIntosh and Alexandra Branzan Albu. Inter-realization\nchannels: Unsupervised anomaly detection beyond one-class\nclassification. In Proceedings of the IEEE/CVF International\nConference on Computer Vision, pages 6285–6295, 2023. 2\n[29] Yifei Ming, Hang Yin, and Yixuan Li. On the impact of spurious\ncorrelation for out-of-distribution detection. In Proceedings of the\nAAAI Conference on Artificial Intelligence, pages 10051–10059,\n2022. 8\n[30] Emanuel Parzen. On estimation of a probability density\nfunction and mode. The annals of mathematical statistics, 33\n(3):1065–1076, 1962. 6\n[31] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion,\nO. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J.\nVanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot,\nand E. Duchesnay. Scikit-learn: Machine learning in Python.\nJournal of Machine Learning Research, 12:2825–2830, 2011. 6\n[32] Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario\nAmodei, and Ilya Sutskever. Language models are unsupervised\nmultitask learners. 2019. 2\n[33] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh,\nGabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell,\nPamela Mishkin, Jack Clark, et al. Learning transferable visual\nmodels from natural language supervision. In International conference on machine learning, pages 8748–8763. PMLR, 2021. 2\n[34] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard\nSchölkopf, Thomas Brox, and Peter Gehler. Towards total recall\nin industrial anomaly detection. In Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition, pages\n14318–14328, 2022. 2, 3, 5, 6\n[35] Bernhard Schölkopf, Robert C Williamson, Alex Smola, John\nShawe-Taylor, and John Platt. Support vector method for novelty\ndetection. Advances in neural information processing systems,\n12, 1999. 3, 6\n[36] Robert L Thorndike. Who belongs in the family? Psychometrika,\n18(4):267–276, 1953. 4, 5\n[37] Tong Wei, Jiang-Xin Shi, Wei-Wei Tu, and Yu-Feng Li.\nRobust long-tailed learning under label noise. arXiv preprint\narXiv:2108.11569, 2021. 2\n[38] Guoyang Xie, Jinbao Wang, Jiaqi Liu, Feng Zheng, and Yaochu\nJin. Pushing the limits of fewshot anomaly detection in industry\nvision: Graphcore. arXiv preprint arXiv:2301.12082, 2023. 2\n[39] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu, Yu\nZheng, and Xinyi Le. A unified model for multi-class anomaly\ndetection. Advances in Neural Information Processing Systems,\n35:4571–4584, 2022. 1, 2\n[40] Sergey Zagoruyko and Nikos Komodakis. Wide residual\nnetworks. arXiv preprint arXiv:1605.07146, 2016. 6\n[41] Manyi Zhang, Xuyang Zhao, Jun Yao, Chun Yuan, and\nWeiran Huang. When noisy labels meet long tail dilemmas:\nA representation calibration method. In Proceedings of the\nIEEE/CVF International Conference on Computer Vision, pages\n15890–15900, 2023. 2\n\n[42] Yue Zhao, Zain Nasrullah, and Zheng Li. Pyod: A python\ntoolbox for scalable outlier detection. Journal of Machine\nLearning Research, 20(96):1–7, 2019. 6\n[43] Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, and Jiming\nChen. AnomalyCLIP: Object-agnostic prompt learning for\nzero-shot anomaly detection. In International Conference on\nLearning Representations, 2024. 2, 5, 6\n[44] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and\nOnkar Dabeer. Spot-the-difference self-supervised pre-training\nfor anomaly detection and segmentation. arXiv preprint\narXiv:2207.14315, 2022. 5\n\n\fTailedCore: Few-Shot Sampling for Unsupervised Long-Tail Noisy Anomaly Detection\nSupplementary Material\n9. Supplementary to Method\nWe state the assumption and proposition from Sec. 5 here in a more rigorous, detailed manner:\nAssumption. Let psame(s|ei) denote the distribution of cosine similarity between ei and (random vector) embedding e of a\nsame class sample. On the other hand, let pdiff (s|ei) denote the distribution of cosine similarity between ei and (random vector)\nembedding e of a different class sample. Then, a reflective symmetry holds between psame and pdiff in terms of their angles:\n  p_{same}( \\cos (a) | e_i) = p_{diff}( \\cos (a_{\\max } - a) | e_i). \n\n(13)\n\nwhere a=arccos(s) and amax =arccos(mi). Recall that mi is the minimum of the support of the inter-class similarity distribution\npdiff (·|ei).\nFig. 6 in Supp. 9 shows the feasibility of the above symmetric assumption. We prove Prop. 1 under a reasonable regularity\ncondition, whose trend is evidenced by Fig. 6. Below, we denote by supp the support of a distribution, and for notational brevity,\nwe let supp(psame):=supp(p(·|ei)) and similarly for pdiff .\nProposition 1. For distributions psame(s|ei) and pdiff (s|ei) that are weakly increasing and decreasing, respectively, let supp(psame)\nbe disjoint with supp(pdiff ) and maxsupp(psame)=1 Then the threshold given by τi =cos(arccos(mi)/2) separates the supports by\n  \\max supp (p_{diff}) &lt; \\tau _i &lt; \\min supp (p_{same}), \n\n(14)\n\nand maximizes the distance between τi and supp(pdiff )∪supp(psame) under arccosine transformation.\nNote that the radius satisfies ri =1−τi\nProof. Let f(a)=psame(cosa) and g(a)=pdiff (cosa) for 0≤a≤π. Then, by the assumptions from the above, f(a) is decreasing\nand g(a) is increasing. Since maxsupp(psame)=1, we have minsuppf =0. Due to the reflective symmetry, we have\n  f(a) = g(a_{\\max } - a), \n\n(15)\n\n  f(a_{\\max }/2 - a) = g(a_{\\max }/2 + a). \n\n(16)\n\nor\nSince cos is 1-to-1 for the given range of a, disjointness of supports for psame and pdiff is preserved for the supports of f and g.\nSince f is decreasing and g is increasing,\n  a_{\\max } /2 \\notin supp(f) \\cup supp(g), \n(17)\nshowing that amax/2 separates the supports of f and g. Moreover,\n  a_{\\max } / 2 = \\underset {a}{\\arg \\max } \\, d(a, supp(f) \\cup supp(g))) \n\n(18)\n\n  a_{\\max } /2 = \\arccos (m_i) / 2 = \\arccos (r_i) \n\n(19)\n\nwhere d is set distance. Observing that\ncompletes the proof.\n\n10. Supplementary to Analysis\n10.1. Qualitative analysis\nQualitative results of segmentation heatmap are given in Fig. 7, which shores the anomaly scores on the image pixel level. The\nresult shows a trend that TailedCore resolves a performance trade-off between SoftPatch and PatchCore.\n\n\fProbability mass\n\n5\n4\n3\n2\n\nProbability mass\n\n6\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nNormalized arccos of similarity\n\n3\n2\n\n0\n\n1.0\n\n0.0\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nNormalized arccos of similarity\n(b) MVTecAD K =4\n\nWasserstein Distance: 0.15\nSame class\nDifferent classes\n\nWasserstein Distance: 0.13\nSame class\nDifferent classes\n\n8\n7\n\n5\n4\n3\n2\n1\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nNormalized arccos of similarity\n\n1.0\n\n3\n2\n\n0.0\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nNormalized arccos of similarity\n\n1.0\n\n(c) MVTecAD Pareto\n\nWasserstein Distance: 0.13\nSame class\nDifferent classes\n\n8\n7\n\n6\n5\n4\n3\n2\n\n0\n\n4\n\n0\n\n1.0\n\n1\n0.0\n\n5\n\n1\n\n(a) MVTecAD K =1\n\nProbability mass\n\n0.0\n\n7\n\n0\n\n4\n\n1\n\n1\n0\n\n5\n\nWasserstein Distance: 0.19\nSame class\nDifferent classes\n\n6\n\nProbability mass\n\nProbability mass\n\n6\n\nWasserstein Distance: 0.18\nSame class\nDifferent classes\n\n6\n\nProbability mass\n\nWasserstein Distance: 0.27\nSame class\nDifferent classes\n\n7\n\n6\n5\n4\n3\n2\n1\n\n0.0\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nNormalized arccos of similarity\n\n(d) VisA K =1\n\n1.0\n\n0\n\n0.0\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nNormalized arccos of similarity\n\n(e) VisA K =4\n\n1.0\n\n(f) VisA Pareto\n\nFigure 6. Empirical validation of the assumption in Sec. 5, showing that the inter-class and intra-class similarity distributions approximately exhibit\nreflective symmetry discussed in the assumption in Sec. 5 and 9\nTable 7. Experiments on TailedCore with mix perturbed data in the tail class denoted as TailPert where p is the perturbed ratio, SoftPatch +\nDBSCAN/K-Means, using transformer’s classification token for TailSampler, and noise in tail classes denoted as NoisyTail.\ntail type\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nCt\n\nCh\n\nstep (K =1)\nall\n\nCt\n\nCh\n\nall\n\nTailPert p=0.1 96.4 / 96.2 95.2 / 94.1 95.9 / 95.2\nTailPert p=0.3 96.2 / 96 95.1 / 94.1 95.8 / 95.1\nTailPert p=0.5 96 / 96 94.5 / 94.9 95.8 / 95.1\n\n96.1 / 96.1 95.9 / 93.5 96 / 95.1\n96.1 / 96.1 95.9 / 93.5 96 / 95.1\n95.9 / 96.1 95.6 / 93 95.8 / 94.9\n\n93.7 / 93.8 95.4 / 92 94.4 / 93.1\n93.5 / 93.7 95.7 / 91.9 94.4 / 93\n92.5 / 93.3 95.5 / 92 93.7 / 92.8\n\nDBSCAN [13]-SoftPatch [20] 87 / 93.5 93.3 / 95.3 90.6 / 94.4\nKmeans [2]-SoftPatch [20] 86.7 / 92.8 92.5 / 95.1 90.5 / 94.1\n\n71.8 / 84.2 97.6 / 96.3 82.2 / 89.1\n71.8 / 83.4 97.6 / 96.4 82.2 / 88.7\n\n63.5 / 71.3 97.8 / 96.5 77.2 / 81.4\n63.5 / 71 97.8 / 96.8 77.2 / 81.3\n\n96 / 95.5 95.9 / 94.4 96 / 95.2\n\n93.4 / 94.2 96.1 / 95.1 94.5 / 94.6\n\nViT-L [12] ClsToken 96.6 / 96.5 95.3 / 95.3 96.1 / 95.7\nNoisy Tail\n\n-\n\n-\n\n-\n\nSoftPatch [20] 84.7 / 92.2 87.0 / 93.8 87.7 / 93.41\nOurs 96.6 / 96.1 95.2 / 95\n\n96.1 / 95.3\n\n92.3 / 94 95.6 / 92.4 93.7 / 93.5\n\n-\n\n-\n\n-\n\n67.7 / 81 97.5 / 96.5 79.6 / 87.2\n\n60.7 / 70.3 97.5 / 96.9 75.4 / 81\n\n95.8 / 95.6 95.3 / 93.2 95.7 / 94.7\n\n93.5 / 94.2 95.8 / 93.7 94.4 / 94\n\n10.2. Additional experiments and analysis\nWe conduct additional experiments in order to verify the strengthness of TailedCore with results in Tab. 7. First of all, we perturb the\ntail class samples with brightness=0.5,constrast=0.5,saturation=0.5,hue=0.1 perturbation with the ratio p∈{0.1,0.3,0.5}.\nBesides the extreme case where k =1, the effect of perturbation is not remarkable showing the robustness of TailedCore.\nSecondly, we verify the robustness of TailSampler by substituting it with other unsupervised clustering methods which are\nDBSCAN [13] and K-Means [2] clustering. For this experiment, we have set the threshold of tail classes to less than 20 samples\nand normalized with L2 normalization. For hyperparameters, we used eps=0.5, min samples=2 for DBSCAN and k =20 for\nKMeans. DBSCAN-SoftPatch sometimes successfully generated 15 clusters+noise class resulting in 16 clusters in total, but often\nfails and generates more or less clusters. For Kmeans-SoftPatch, we have tried k =15, which is the number of classes of MVTec-AD,\nbut this failed detecting any long-tailed clusters. Therefore, we attempted k =20 and acquired results as shown in Tab. 7.\nAdditionally, we substitute CNN with ViT-L [12], specifically the global average pooling feature of CNN with classification\ntoken for TailSampler which increased the results slightly as shown in Tab. 7 denoted as ”ViT-L ClsToken”.\nWe also test our method when tail classes are contaminated with noise denoted as Noisy Tail. Without the information of classes\nin an anomalous few-shot scenario, anomalies can’t be statistically classified as abnormal from a statistical perspective. Our method\ntends to specifically address only those instances that are statistically confirmed to be anomalous. Such scenario is tested by including\n\n\fFigure 7. Qualitative analysis of PatchCore, SoftPatch, and TailedCore (ours).\nTable 8. MVTec-LOCO image AUROC (%) with (all / structural / logical) format.\n\ntail type\nclass type\n\nstep (K =4)\n\nPareto\nCt\n\nCh\n\nall\n\nPatchcore 60.7 / 62.8 / 59.1 59.4 / 76.5 / 45.4 60.2 / 68.3 / 53.6\nSoftPatch 52.3 / 57.8 / 52.9 66.5 / 67.8 / 74.5 58 / 61.8 / 61.6\nOurs 63 / 68 / 59.4\n66 / 74.8 / 59.3 64.2 / 70.7 / 59.4\n\nCt\n\nCh\n\nall\n\n61.7 / 71.1 / 55.2 63.8 / 70.9 / 59.4 62.5 / 71 / 56.9\n62.7 / 60.3 / 68 61.7 / 68.4 / 64.3 62.3 / 63.5 / 66.5\n65.9 / 71.7 / 61.7 67.1 / 68.8 / 66.6 66.4 / 70.6 / 63.6\n\none noisy samples in each of the tail classes with K =4 setup (1 noisy sample and 3 normal samples for each tail classes) and the\nresults are shown in Tab. 7. The results show a minor decrease in performance in tail classes, however, the mechanism of our method\nis fundamentally unable to address such scenarios well.\nFinally, we have done experiments on MVTec-Loco [4] dataset to test logical anomaly on PatchCore and our method where\nresults are in Tab. 8. Due to the noisy head class and few-shot tail classes both of the methods do not work well, however, our method\nstill shows better performance comparing with PatchCore.\n\n11. Supplementary to Dataset\nNumber of total and anomaly samples We provide the detailed number of total and anomaly samples used for our experiments in\nTabs. 9, 10, 11, 12, 13, and 14. The names of unuspervised long-tail noisy anomaly detection datasets are summarized as follows:\n• MVTecAD-Pareto: MVTecAD dataset where its class distribution follows Pareto distribution and 10% of train samples are noises\nin the head classes\n• MVTecAD-step-K4: MVTecAD dataset where its class distribution is imbalanced such that 9 out of 15 classes have only 4 samples\nfor each class and 10% of train samples are noises in the head classes\n• MVTecAD-step-K1: MVTecAD dataset where its class distribution is imbalanced such that 9 out of 15 classes have only 1 samples\n\n\fTable 9. The metadata of MVTecAD-Pareto dataset, indicating the number of total samples in each class and the number of defect samples in each\nclass in the train set.\nseed\n\nbottle\n\ncable\n\ncapsule\n\ncarpet\n\ngrid\n\nhazelnut\n\nleather\n\nmetal nut\n\npill\n\nscrew\n\ntile\n\ntoothbrush\n\ntransistor\n\nwood\n\nzipper\n\n101\n\ntotal\nanomaly\n\n5\n0\n\n5\n0\n\n5\n0\n\n180\n20\n\n297\n33\n\n5\n0\n\n31\n2\n\n22\n2\n\n46\n3\n\n10\n0\n\n69\n4\n\n14\n0\n\n110\n10\n\n5\n0\n\n7\n0\n\n102\n\ntotal\nanomaly\n\n6\n0\n\n5\n0\n\n5\n0\n\n145\n16\n\n11\n0\n\n5\n0\n\n8\n0\n\n24\n1\n\n59\n7\n\n16\n0\n\n5\n0\n\n40\n5\n\n239\n26\n\n5\n0\n\n86\n5\n\n103\n\ntotal\nanomaly\n\n231\n22\n\n11\n0\n\n8\n0\n\n5\n0\n\n145\n18\n\n5\n0\n\n24\n1\n\n40\n6\n\n84\n5\n\n6\n0\n\n16\n0\n\n5\n0\n\n5\n0\n\n5\n0\n\n58\n7\n\n104\n\ntotal\nanomaly\n\n12\n0\n\n38\n3\n\n5\n0\n\n7\n0\n\n5\n0\n\n58\n6\n\n9\n0\n\n5\n0\n\n139\n17\n\n355\n35\n\n86\n8\n\n17\n0\n\n26\n2\n\n5\n0\n\n212\n18\n\n105\n\ntotal\nanomaly\n\n15\n0\n\n47\n2\n\n5\n0\n\n308\n28\n\n8\n0\n\n22\n1\n\n5\n0\n\n11\n0\n\n5\n0\n\n190\n20\n\n5\n0\n\n6\n0\n\n32\n1\n\n79\n10\n\n122\n16\n\nTable 10. The metadata of MVTecAD-step-K4 dataset, indicating the number of total samples in each class and the number of defect samples in\neach class in the train set.\nseed\n\nbottle\n\ncable\n\ncapsule\n\ncarpet\n\ngrid\n\nhazelnut\n\nleather\n\nmetal nut\n\npill\n\nscrew\n\ntile\n\ntoothbrush\n\ntransistor\n\nwood\n\nzipper\n\n101\n\ntotal\nanomaly\n\n4\n0\n\n246\n22\n\n241\n22\n\n4\n0\n\n4\n0\n\n430\n39\n\n4\n0\n\n4\n0\n\n4\n0\n\n352\n32\n\n253\n23\n\n66\n6\n\n4\n0\n\n4\n0\n\n4\n0\n\n102\n\ntotal\nanomaly\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n242\n22\n\n294\n27\n\n352\n32\n\n4\n0\n\n66\n6\n\n4\n0\n\n272\n25\n\n264\n24\n\n103\n\ntotal\nanomaly\n\n4\n0\n\n4\n0\n\n241\n22\n\n4\n0\n\n290\n26\n\n4\n0\n\n269\n24\n\n4\n0\n\n294\n27\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n272\n25\n\n264\n24\n\n104\n\ntotal\nanomaly\n\n4\n0\n\n4\n0\n\n4\n0\n\n308\n28\n\n4\n0\n\n430\n39\n\n269\n24\n\n4\n0\n\n4\n0\n\n352\n32\n\n253\n23\n\n4\n0\n\n4\n0\n\n4\n0\n\n264\n24\n\n105\n\ntotal\nanomaly\n\n230\n21\n\n246\n22\n\n4\n0\n\n4\n0\n\n4\n0\n\n430\n39\n\n269\n24\n\n4\n0\n\n4\n0\n\n352\n32\n\n4\n0\n\n4\n0\n\n234\n21\n\n4\n0\n\n4\n0\n\nfor each class and 10% of train samples are noises in the head classes\n• VisA-Pareto: VisA dataset where its class distribution follows Pareto distribution and 10% of train samples are noises in the head\nclasses\n• VisA-step-K4: VisA dataset where its class distribution is imbalanced such that 7 out of 12 classes have only 4 samples for each\nclass and 10% of train samples are noises in the head classes\n• VisA-step-K1: VisA dataset where its class distribution is imbalanced such that 7 out of 12 classes have only 1 samples for each\nclass and 10% of train samples are noises in the head classes\n\n12. Full Experiment Results\nThe full experiment results for the baseline comparison are given in Tabs. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, and\n26. We note that both WinCLIP and AnomalyCLIP are zero-shot models, hence they do not have performance variance dependant\non the train sets (indicated without standard deviation in the tables).\n\n\fTable 11. The metadata of MVTecAD-step-K1 dataset, indicating the number of total samples in each class and the number of defect samples in\neach class in the train set.\nseed\n\nbottle\n\ncable\n\ncapsule\n\ncarpet\n\ngrid\n\nhazelnut\n\nleather\n\nmetal nut\n\npill\n\nscrew\n\ntile\n\ntoothbrush\n\ntransistor\n\nwood\n\nzipper\n\n101\n\ntotal\nanomaly\n\n1\n0\n\n1\n0\n\n1\n0\n\n308\n28\n\n1\n0\n\n430\n39\n\n269\n24\n\n1\n0\n\n1\n0\n\n352\n32\n\n253\n23\n\n1\n0\n\n1\n0\n\n1\n0\n\n264\n24\n\n102\n\ntotal\nanomaly\n\n1\n0\n\n1\n0\n\n241\n22\n\n1\n0\n\n290\n26\n\n1\n0\n\n269\n24\n\n1\n0\n\n294\n27\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n272\n25\n\n264\n24\n\n103\n\ntotal\nanomaly\n\n1\n0\n\n1\n0\n\n241\n22\n\n1\n0\n\n1\n0\n\n1\n0\n\n269\n24\n\n1\n0\n\n1\n0\n\n352\n32\n\n1\n0\n\n66\n6\n\n234\n21\n\n272\n25\n\n1\n0\n\n104\n\ntotal\nanomaly\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n290\n26\n\n1\n0\n\n269\n24\n\n242\n22\n\n1\n0\n\n352\n32\n\n1\n0\n\n66\n6\n\n1\n0\n\n1\n0\n\n264\n24\n\n105\n\ntotal\nanomaly\n\n1\n0\n\n246\n22\n\n241\n22\n\n1\n0\n\n290\n26\n\n430\n39\n\n1\n0\n\n1\n0\n\n294\n27\n\n352\n32\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\nTable 12. The metadata of VisA-Pareto dataset, indicating the number of total samples in each class and the number of defect samples in each class\nin the train set.\nseed\n\ncandle\n\ncapsules\n\ncashew\n\nchewinggum\n\nfryum\n\nmacaroni1\n\nmacaroni2\n\npcb1\n\npcb2\n\npcb3\n\npcb4\n\npipe fryum\n\n101\n\ntotal\nanomaly\n\n290\n14\n\n13\n0\n\n476\n26\n\n9\n0\n\n19\n0\n\n943\n43\n\n29\n1\n\n105\n5\n\n173\n10\n\n68\n4\n\n43\n1\n\n7\n0\n\n102\n\ntotal\nanomaly\n\n92\n10\n\n5\n0\n\n10\n0\n\n475\n22\n\n53\n2\n\n33\n1\n\n7\n0\n\n256\n11\n\n14\n0\n\n146\n7\n\n21\n0\n\n5\n0\n\n103\n\ntotal\nanomaly\n\n5\n0\n\n9\n0\n\n86\n4\n\n21\n0\n\n479\n29\n\n253\n10\n\n5\n0\n\n145\n7\n\n7\n0\n\n33\n1\n\n14\n0\n\n52\n2\n\n104\n\ntotal\nanomaly\n\n170\n6\n\n9\n0\n\n108\n7\n\n65\n1\n\n476\n26\n\n19\n0\n\n30\n2\n\n13\n0\n\n43\n1\n\n954\n49\n\n289\n12\n\n7\n0\n\n105\n\ntotal\nanomaly\n\n29\n1\n\n101\n1\n\n43\n1\n\n19\n0\n\n177\n14\n\n297\n21\n\n942\n42\n\n13\n0\n\n9\n0\n\n7\n0\n\n67\n3\n\n471\n21\n\nTable 13. The metadata of VisA-step-K4 dataset, indicating the number of total samples in each class and the number of defect samples in each class\nin the train set.\nseed\n\ncandle\n\ncapsules\n\ncashew\n\nchewinggum\n\nfryum\n\nmacaroni1\n\nmacaroni2\n\npcb1\n\npcb2\n\npcb3\n\npcb4\n\npipe fryum\n\n101\n\ntotal\nanomaly\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n945\n45\n\n4\n0\n\n4\n0\n\n946\n45\n\n950\n45\n\n949\n45\n\n472\n22\n\n102\n\ntotal\nanomaly\n\n4\n0\n\n4\n0\n\n472\n22\n\n4\n0\n\n4\n0\n\n945\n45\n\n945\n45\n\n4\n0\n\n946\n45\n\n4\n0\n\n4\n0\n\n472\n22\n\n103\n\ntotal\nanomaly\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n949\n45\n\n946\n45\n\n950\n45\n\n949\n45\n\n472\n22\n\n104\n\ntotal\nanomaly\n\n945\n45\n\n4\n0\n\n472\n22\n\n476\n23\n\n472\n22\n\n4\n0\n\n4\n0\n\n949\n45\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n105\n\ntotal\nanomaly\n\n945\n45\n\n4\n0\n\n472\n22\n\n476\n23\n\n4\n0\n\n945\n45\n\n4\n0\n\n949\n45\n\n4\n0\n\n4\n0\n\n4\n0\n\n4\n0\n\n\fTable 14. The metadata of VisA-step-K1 dataset, indicating the number of total samples in each class and the number of defect samples in each class\nin the train set.\nseed\n\ncandle\n\ncapsules\n\ncashew\n\nchewinggum\n\nfryum\n\nmacaroni1\n\nmacaroni2\n\npcb1\n\npcb2\n\npcb3\n\npcb4\n\npipe fryum\n\n101\n\ntotal\nanomaly\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n945\n45\n\n1\n0\n\n1\n0\n\n946\n45\n\n950\n45\n\n949\n45\n\n472\n22\n\n102\n\ntotal\nanomaly\n\n945\n45\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n945\n45\n\n1\n0\n\n1\n0\n\n946\n45\n\n1\n0\n\n949\n45\n\n472\n22\n\n103\n\ntotal\nanomaly\n\n1\n0\n\n569\n27\n\n472\n22\n\n1\n0\n\n472\n22\n\n945\n45\n\n1\n0\n\n1\n0\n\n946\n45\n\n1\n0\n\n1\n0\n\n1\n0\n\n104\n\ntotal\nanomaly\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n1\n0\n\n949\n45\n\n946\n45\n\n950\n45\n\n949\n45\n\n472\n22\n\n105\n\ntotal\nanomaly\n\n1\n0\n\n569\n27\n\n472\n22\n\n1\n0\n\n472\n22\n\n1\n0\n\n1\n0\n\n949\n45\n\n1\n0\n\n950\n45\n\n1\n0\n\n1\n0\n\nTable 15. Anomaly detection on MVTecAD-Pareto with image-level AUROC. We report the mean over 5 random seeds for each measurement. The\nbest performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nbottle\n96.95 ± 2.89 79.89 ± 15.76 97.35 ± 3.28 92.65 ± 9.56 99.30 ± 1.04\ncable\n66.76 ± 4.43 65.19 ± 9.65 70.05 ± 17.25 70.28 ± 10.73 73.73 ± 12.36\ncapsule\n67.33 ± 7.69 70.59 ± 7.45 69.23 ± 6.25 59.89 ± 2.36 64.25 ± 5.15\ncarpet\n97.51 ± 4.93 78.74 ± 12.14 89.24 ± 10.07 98.48 ± 0.80 98.48 ± 2.41\ngrid\n64.31 ± 11.57 52.45 ± 2.66 77.61 ± 10.34 78.91 ± 7.71 87.54 ± 9.00\nhazelnut 77.87 ± 21.57 72.94 ± 10.23 95.14 ± 2.48 94.83 ± 3.12 93.66 ± 4.30\nleather\n99.91 ± 0.14 65.63 ± 15.84 90.34 ± 10.90 99.99 ± 0.02 100.00 ± 0.00\nmetal nut 71.23 ± 13.34 66.30 ± 13.35 84.15 ± 11.45 87.74 ± 7.61 89.77 ± 15.40\npill\n68.33 ± 9.03 72.58 ± 8.61 88.88 ± 7.98 85.07 ± 10.02 81.09 ± 7.31\nscrew\n61.20 ± 2.95 54.47 ± 8.87 71.08 ± 10.29 64.68 ± 14.12 71.07 ± 16.01\ntile\n94.51 ± 1.22 83.64 ± 15.49 88.59 ± 5.11 94.94 ± 2.07 97.78 ± 1.22\ntoothbrush 96.22 ± 1.57 74.11 ± 16.33 94.28 ± 5.92 92.89 ± 4.03 92.44 ± 2.13\ntransistor 83.27 ± 4.02 64.91 ± 9.85 87.78 ± 8.90 72.44 ± 40.83 90.43 ± 6.33\nwood\n97.75 ± 1.57 82.05 ± 11.65 98.61 ± 1.57 78.75 ± 43.50 97.25 ± 0.97\nzipper\n87.99 ± 1.03 78.71 ± 8.46 89.71 ± 5.25 73.44 ± 40.58 90.84 ± 0.24\n\nWinCLIP\n\nAnomalyCLIP\n\n98.60\n85.00\n68.70\n99.30\n99.20\n92.30\n100.00\n96.20\n81.50\n71.70\n99.90\n85.30\n89.10\n97.60\n91.20\n\n89.30\n69.80\n89.90\n100.00\n97.00\n97.20\n99.80\n93.60\n81.80\n81.10\n100.00\n84.70\n92.80\n96.80\n98.50\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n92.19 ± 13.68 97.95 ± 4.14 99.76 ± 0.53\n94.81 ± 1.14 78.89 ± 19.04 94.54 ± 2.12\n89.84 ± 3.78 58.78 ± 23.22 92.19 ± 1.67\n86.43 ± 12.97 99.11 ± 0.61 99.26 ± 0.29\n64.04 ± 17.93 87.10 ± 9.44 91.33 ± 4.74\n84.54 ± 25.95 94.26 ± 7.47 99.28 ± 0.83\n99.35 ± 0.97 99.93 ± 0.15 100.00 ± 0.00\n96.30 ± 2.50 73.00 ± 20.42 97.90 ± 1.27\n90.25 ± 3.89 90.90 ± 6.37 93.70 ± 0.93\n73.33 ± 8.14 72.04 ± 20.13 87.24 ± 5.34\n95.69 ± 3.79 99.02 ± 0.79 97.55 ± 3.25\n99.83 ± 0.37 97.39 ± 3.02 99.50 ± 0.69\n91.62 ± 9.84 86.50 ± 19.44 96.24 ± 2.23\n94.47 ± 7.58 98.60 ± 0.76 96.47 ± 4.51\n94.58 ± 2.50 82.26 ± 33.79 96.96 ± 0.62\n\ntail class 82.46 ± 16.66 69.25 ± 12.72 84.30 ± 13.61 83.46 ± 16.17 85.74 ± 14.96 89.36 ± 10.99 90.93 ± 8.42 93.34 ± 9.12 84.69 ± 18.52 96.55 ± 3.94\nhead class 80.95 ± 16.24 72.11 ± 13.95 88.73 ± 8.71 80.24 ± 16.46 89.33 ± 7.74 90.11 ± 8.65 90.99 ± 8.61 87.59 ± 15.33 86.96 ± 12.48 95.24 ± 4.17\nall\n\n82.08 ± 16.09 70.81 ± 13.19 86.14 ± 12.01 83.00 ± 18.76 88.51 ± 12.80 90.37 ± 10.19 91.49 ± 8.81 89.82 ± 13.05 87.72 ± 18.08 96.13 ± 4.28\n\n\fTable 16. Anomaly detection on MVTecAD-step-K4 with image-level AUROC. We report the mean over 5 random seeds for each measurement.\nThe best performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nbottle\n94.30 ± 5.03 74.36 ± 18.09 90.45 ± 10.43 76.78 ± 7.92 96.98 ± 3.02\ncable\n63.05 ± 5.20 57.45 ± 7.96 75.18 ± 12.58 67.10 ± 21.09 71.47 ± 19.40\ncapsule 67.41 ± 16.32 62.25 ± 14.52 67.40 ± 27.08 82.37 ± 17.80 69.63 ± 16.31\ncarpet\n99.62 ± 0.39 74.38 ± 8.92 89.07 ± 7.38 98.17 ± 0.83 99.63 ± 0.47\ngrid\n71.70 ± 3.08 53.85 ± 14.11 66.57 ± 20.92 84.85 ± 3.63 89.49 ± 4.82\nhazelnut 78.01 ± 19.31 71.68 ± 5.07 92.24 ± 7.56 84.18 ± 8.84 92.84 ± 7.23\nleather\n99.71 ± 0.65 55.22 ± 16.24 93.43 ± 10.23 98.30 ± 3.75 100.00 ± 0.00\nmetal nut 64.24 ± 16.45 61.80 ± 14.05 66.98 ± 19.20 74.29 ± 22.95 69.74 ± 17.50\npill\n62.20 ± 12.87 62.09 ± 4.64 80.20 ± 14.38 75.99 ± 18.01 73.40 ± 14.43\nscrew\n60.02 ± 1.28 56.22 ± 8.90 80.62 ± 9.46 80.51 ± 11.82 77.02 ± 15.31\ntile\n86.30 ± 8.87 86.88 ± 5.82 88.89 ± 16.63 89.88 ± 4.80 97.16 ± 0.97\ntoothbrush 86.00 ± 7.04 65.39 ± 5.43 81.94 ± 15.66 90.41 ± 8.34 92.94 ± 1.40\ntransistor 71.84 ± 7.14 60.33 ± 4.80 63.79 ± 17.06 76.06 ± 17.36 76.35 ± 16.41\nwood\n98.33 ± 0.53 87.98 ± 6.30 98.21 ± 1.18 96.81 ± 2.85 97.37 ± 0.42\nzipper\n85.25 ± 6.65 73.11 ± 22.83 87.27 ± 11.88 77.78 ± 16.38 91.31 ± 3.99\n\nWinCLIP\n\nAnomalyCLIP\n\n98.60\n85.00\n68.70\n99.30\n99.20\n92.30\n100.00\n96.20\n81.50\n71.70\n99.90\n85.30\n89.10\n97.60\n91.20\n\n89.30\n69.80\n89.90\n100.00\n97.00\n97.20\n99.80\n93.60\n81.80\n81.10\n100.00\n84.70\n92.80\n96.80\n98.50\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n95.49 ± 9.50 65.92 ± 27.24 99.75 ± 0.26\n85.35 ± 9.56 72.85 ± 24.09 96.18 ± 2.87\n89.18 ± 3.35 64.54 ± 28.56 93.59 ± 2.67\n92.32 ± 13.43 96.90 ± 1.84 99.24 ± 0.48\n68.60 ± 8.93 74.34 ± 14.00 93.38 ± 3.63\n63.86 ± 27.00 92.86 ± 9.85 96.67 ± 4.03\n85.99 ± 13.06 97.00 ± 6.70 100.00 ± 0.00\n88.86 ± 7.32 61.57 ± 22.16 98.68 ± 0.76\n84.16 ± 6.27 72.57 ± 21.56 93.01 ± 3.00\n69.62 ± 8.56 85.28 ± 14.02 90.14 ± 3.81\n88.65 ± 14.75 98.69 ± 0.47 94.67 ± 6.50\n85.28 ± 4.96 85.50 ± 13.65 92.44 ± 6.95\n87.47 ± 22.09 59.44 ± 23.09 95.90 ± 1.56\n82.23 ± 22.74 98.61 ± 0.46 94.53 ± 5.48\n91.16 ± 5.59 68.62 ± 39.98 97.62 ± 0.75\n\ntail class 77.47 ± 16.37 65.35 ± 16.11 72.70 ± 14.46 82.01 ± 15.62 81.86 ± 14.30 91.61 ± 9.98 91.82 ± 7.55 92.20 ± 9.62 67.65 ± 19.45 95.82 ± 3.64\nhead class 81.29 ± 14.08 69.78 ± 15.08 94.46 ± 4.81 85.51 ± 12.24 92.95 ± 6.18 88.22 ± 11.08 90.84 ± 8.88 71.19 ± 13.95 97.54 ± 2.98 95.34 ± 4.31\nall\n\n79.20 ± 16.79 66.87 ± 14.97 81.48 ± 17.24 83.57 ± 14.74 86.36 ± 14.92 90.37 ± 10.19 91.49 ± 8.81 83.88 ± 15.49 79.65 ± 23.19 95.72 ± 4.30\n\nTable 17. Anomaly detection on MVTecAD-step-K1 with image-level AUROC. We report the mean over 5 random seeds for each measurement.\nThe best performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nbottle\n72.68 ± 15.75 60.40 ± 18.58 57.32 ± 17.54 73.71 ± 13.23 90.74 ± 3.63\ncable\n57.79 ± 9.61 55.09 ± 10.91 55.21 ± 19.54 58.63 ± 12.98 71.25 ± 18.42\ncapsule 78.92 ± 17.70 66.29 ± 13.88 65.17 ± 24.08 72.48 ± 19.26 76.86 ± 13.02\ncarpet\n98.53 ± 0.78 57.46 ± 16.18 55.02 ± 17.19 97.88 ± 1.02 99.84 ± 0.10\ngrid\n67.84 ± 5.25 53.55 ± 12.45 73.28 ± 24.70 83.01 ± 5.46 94.02 ± 4.83\nhazelnut 77.88 ± 18.88 63.34 ± 6.59 69.95 ± 20.92 87.35 ± 7.10 90.43 ± 6.63\nleather\n99.14 ± 1.78 54.68 ± 9.26 73.16 ± 23.74 99.99 ± 0.03 99.99 ± 0.02\nmetal nut 56.36 ± 22.39 59.84 ± 14.35 63.00 ± 19.53 62.08 ± 21.15 63.41 ± 19.72\npill\n62.14 ± 12.23 63.15 ± 12.93 73.60 ± 10.82 80.43 ± 17.80 67.64 ± 20.93\nscrew\n61.24 ± 4.09 53.67 ± 10.12 76.44 ± 10.90 79.28 ± 12.84 78.53 ± 15.21\ntile\n84.31 ± 7.12 76.59 ± 19.53 74.61 ± 21.92 90.08 ± 4.88 97.24 ± 0.77\ntoothbrush 84.28 ± 11.86 64.39 ± 8.57 71.78 ± 25.84 87.89 ± 10.45 88.89 ± 4.26\ntransistor 66.19 ± 9.92 52.65 ± 5.94 57.84 ± 20.07 65.20 ± 15.85 65.44 ± 18.95\nwood\n98.07 ± 1.04 87.79 ± 3.87 83.37 ± 14.98 95.95 ± 2.94 97.04 ± 1.36\nzipper\n69.09 ± 20.52 61.23 ± 24.34 60.53 ± 17.06 74.36 ± 18.45 84.42 ± 7.22\n\nWinCLIP\n\nAnomalyCLIP\n\n98.60\n85.00\n68.70\n99.30\n99.20\n92.30\n100.00\n96.20\n81.50\n71.70\n99.90\n85.30\n89.10\n97.60\n91.20\n\n89.30\n69.80\n89.90\n100.00\n97.00\n97.20\n99.80\n93.60\n81.80\n81.10\n100.00\n84.70\n92.80\n96.80\n98.50\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n99.65 ± 0.12 36.13 ± 3.18 99.25 ± 0.52\n76.14 ± 7.38 61.97 ± 20.97 89.89 ± 4.87\n82.24 ± 4.85 72.55 ± 32.06 90.39 ± 7.63\n92.01 ± 13.37 92.58 ± 6.85 99.13 ± 0.29\n59.62 ± 7.35 88.69 ± 11.25 91.66 ± 4.84\n61.91 ± 16.15 84.68 ± 15.04 94.81 ± 4.08\n79.23 ± 11.61 89.29 ± 23.94 100.00 ± 0.00\n69.07 ± 5.61 55.25 ± 25.76 96.71 ± 1.97\n79.84 ± 2.43 71.72 ± 22.03 90.51 ± 4.51\n67.51 ± 10.18 85.03 ± 15.49 89.72 ± 7.13\n93.88 ± 12.51 80.19 ± 11.16 97.66 ± 3.40\n83.44 ± 4.81 78.11 ± 20.35 91.72 ± 7.74\n85.52 ± 22.13 69.04 ± 19.32 94.08 ± 1.26\n81.79 ± 22.33 98.16 ± 0.73 94.21 ± 6.11\n88.32 ± 4.83 67.62 ± 41.47 96.81 ± 1.48\n\ntail class 71.55 ± 19.68 62.35 ± 14.91 59.60 ± 14.40 74.15 ± 18.62 79.06 ± 19.34 91.80 ± 8.38 91.21 ± 8.80 86.36 ± 13.56 60.67 ± 21.77 93.54 ± 6.19\nhead class 81.76 ± 14.47 61.49 ± 15.61 78.99 ± 7.19 90.16 ± 8.08 92.37 ± 7.35 88.23 ± 11.75 91.90 ± 7.96 70.48 ± 13.65 97.50 ± 2.81 95.78 ± 3.57\nall\n\n75.63 ± 18.71 62.01 ± 14.95 67.35 ± 16.00 80.55 ± 17.21 84.38 ± 16.80 90.37 ± 10.19 91.49 ± 8.81 80.01 ± 15.56 75.40 ± 24.98 94.44 ± 5.44\n\n\fTable 18. Anomaly segmentation on MVTecAD-Pareto with pixel-level AUROC. We report the mean over 5 random seeds for each measurement.\nThe best performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nbottle\n95.65 ± 1.24 75.95 ± 11.28 95.66 ± 2.28 96.24 ± 2.71 97.71 ± 0.40\ncable\n82.43 ± 6.33 66.77 ± 7.52 87.41 ± 11.64 89.50 ± 3.77 92.45 ± 2.08\ncapsule\n97.14 ± 0.58 82.35 ± 7.93 94.96 ± 2.95 97.02 ± 0.22 96.82 ± 0.74\ncarpet\n96.40 ± 3.98 71.85 ± 16.78 88.95 ± 9.43 98.51 ± 0.39 98.43 ± 0.23\ngrid\n67.11 ± 21.48 35.73 ± 17.39 74.45 ± 11.12 92.70 ± 4.10 92.33 ± 3.01\nhazelnut 94.78 ± 0.88 86.32 ± 5.06 97.15 ± 0.98 96.36 ± 0.98 95.63 ± 1.26\nleather\n99.08 ± 0.15 68.17 ± 34.40 96.07 ± 3.19 98.89 ± 0.13 99.10 ± 0.08\nmetal nut 83.10 ± 3.29 76.23 ± 10.81 96.20 ± 2.87 88.02 ± 2.80 87.81 ± 7.22\npill\n91.88 ± 4.09 85.69 ± 13.19 95.09 ± 3.37 93.86 ± 2.08 91.79 ± 2.11\nscrew\n94.53 ± 2.41 82.01 ± 9.86 91.90 ± 3.44 94.26 ± 3.35 93.87 ± 4.09\ntile\n87.98 ± 3.36 73.42 ± 19.01 83.39 ± 7.08 89.54 ± 1.30 90.52 ± 1.10\ntoothbrush 97.76 ± 0.94 88.60 ± 8.44 98.35 ± 0.56 98.06 ± 0.60 98.35 ± 0.10\ntransistor 93.53 ± 3.46 75.27 ± 8.59 87.79 ± 6.41 75.25 ± 41.63 95.29 ± 3.76\nwood\n93.02 ± 0.93 78.71 ± 6.40 90.31 ± 0.93 73.47 ± 40.56 93.25 ± 0.37\nzipper\n97.06 ± 0.74 82.46 ± 9.96 84.90 ± 4.73 76.69 ± 42.35 95.46 ± 0.88\n\nWinCLIP\n\nAnomalyCLIP\n\n85.70\n61.30\n87.00\n90.90\n79.40\n95.70\n95.50\n49.30\n72.70\n91.10\n79.10\n86.20\n83.70\n85.10\n91.70\n\n90.40\n78.90\n95.80\n98.80\n97.30\n97.10\n98.60\n74.40\n92.00\n97.50\n94.60\n91.90\n71.00\n96.50\n91.40\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n91.32 ± 12.81 97.66 ± 1.52 97.31 ± 2.64\n90.68 ± 2.55 87.09 ± 9.27 91.43 ± 2.33\n98.51 ± 0.10 94.72 ± 3.52 98.37 ± 0.09\n85.87 ± 13.89 98.89 ± 0.18 98.48 ± 0.85\n64.41 ± 15.35 74.97 ± 27.60 91.09 ± 4.28\n83.29 ± 24.37 95.44 ± 1.56 96.37 ± 4.75\n99.19 ± 0.15 99.27 ± 0.04 99.29 ± 00.03\n91.37 ± 7.93 91.34 ± 6.31 91.78 ± 6.62\n94.83 ± 4.41 96.27 ± 2.30 96.25 ± 1.68\n85.45 ± 10.93 93.27 ± 2.40 96.88 ± 2.42\n90.79 ± 5.63 95.14 ± 0.29 92.31 ± 5.53\n98.60 ± 0.06 98.33 ± 0.46 98.63 ± 0.09\n93.10 ± 1.02 90.55 ± 7.66 91.45 ± 4.26\n90.52 ± 8.61 93.62 ± 1.59 91.24 ± 7.74\n91.04 ± 7.48 94.67 ± 8.52 98.57 ± 0.10\n\ntail class 90.11 ± 10.96 75.12 ± 16.98 90.93 ± 9.36 93.63 ± 4.55 94.16 ± 4.41 82.04 ± 12.69 91.25 ± 8.33 93.57 ± 8.41 92.20 ± 10.33 96.09 ± 4.12\nhead class 92.66 ± 5.94 76.25 ± 15.15 91.48 ± 5.75 86.85 ± 12.87 94.86 ± 3.19 84.07 ± 12.24 91.70 ± 8.88 87.99 ± 13.77 93.84 ± 3.83 95.01 ± 4.55\nall\n\n91.43 ± 9.43 75.30 ± 16.45 90.84 ± 7.93 90.56 ± 10.96 94.59 ± 3.88 82.29 ± 12.80 91.08 ± 8.98 89.93 ± 12.06 93.42 ± 8.36 95.30 ± 4.72\n\nTable 19. Anomaly segmentation on MVTecAD-step-K4 with pixel-level AUROC. We report the mean over 5 random seeds for each measurement.\nThe best performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nbottle\n91.44 ± 5.59 70.98 ± 6.76 91.71 ± 4.77 91.42 ± 4.94 96.66 ± 1.00\ncable\n76.19 ± 11.95 69.18 ± 8.88 90.60 ± 8.38 83.80 ± 9.04 90.16 ± 5.65\ncapsule\n96.29 ± 1.79 78.90 ± 13.70 90.40 ± 9.88 97.65 ± 2.17 96.55 ± 2.04\ncarpet\n97.26 ± 1.57 63.79 ± 34.82 93.59 ± 1.19 96.59 ± 1.85 98.49 ± 0.16\ngrid\n53.43 ± 26.71 24.65 ± 5.41 68.62 ± 18.87 94.05 ± 7.42 91.61 ± 3.53\nhazelnut 95.35 ± 1.51 81.11 ± 10.20 96.28 ± 0.83 93.45 ± 3.30 95.86 ± 2.80\nleather\n99.03 ± 0.26 62.90 ± 31.26 95.48 ± 4.09 98.06 ± 2.32 99.04 ± 0.17\nmetal nut 78.49 ± 9.04 62.68 ± 17.13 88.03 ± 8.67 82.39 ± 12.96 79.48 ± 7.81\npill\n87.44 ± 8.55 73.37 ± 11.91 96.26 ± 2.17 89.10 ± 6.17 89.02 ± 4.93\nscrew\n95.67 ± 2.53 78.80 ± 22.19 94.50 ± 3.76 96.44 ± 3.14 96.23 ± 3.61\ntile\n80.17 ± 8.11 76.29 ± 13.48 83.37 ± 9.64 88.75 ± 5.92 90.37 ± 1.03\ntoothbrush 93.88 ± 2.92 85.92 ± 8.55 94.73 ± 5.03 95.79 ± 3.04 97.97 ± 0.20\ntransistor 82.59 ± 10.43 61.63 ± 11.46 83.68 ± 4.75 85.40 ± 9.07 86.19 ± 8.95\nwood\n92.22 ± 3.52 76.12 ± 7.46 90.53 ± 5.62 92.51 ± 3.66 93.35 ± 0.57\nzipper\n95.71 ± 4.08 76.50 ± 5.22 92.30 ± 3.88 87.63 ± 13.74 94.74 ± 2.32\n\nWinCLIP\n\nAnomalyCLIP\n\n85.70\n61.30\n87.00\n90.90\n79.40\n95.70\n95.50\n49.30\n72.70\n91.10\n79.10\n86.20\n83.70\n85.10\n91.70\n\n90.40\n78.90\n95.80\n98.80\n97.30\n97.10\n98.60\n74.40\n92.00\n97.50\n94.60\n91.90\n71.00\n96.50\n91.40\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n93.79 ± 10.21 80.67 ± 16.93 98.44 ± 0.06\n83.20 ± 10.16 78.37 ± 17.42 92.70 ± 3.49\n92.31 ± 8.51 93.48 ± 4.96 98.66 ± 0.15\n93.03 ± 13.35 98.70 ± 0.35 99.09 ± 0.11\n68.15 ± 2.89 52.00 ± 28.50 90.66 ± 5.13\n66.24 ± 29.23 92.85 ± 2.00 85.22 ± 15.52\n82.26 ± 17.30 98.41 ± 2.01 99.30 ± 0.01\n90.06 ± 11.31 84.47 ± 8.36 96.43 ± 0.62\n90.57 ± 7.83 86.67 ± 10.27 95.06 ± 1.74\n79.08 ± 7.81 93.66 ± 3.04 95.27 ± 2.21\n87.22 ± 11.46 94.98 ± 0.28 92.69 ± 3.70\n93.48 ± 5.36 93.59 ± 4.59 97.87 ± 0.88\n83.49 ± 20.63 73.59 ± 9.03 88.52 ± 4.14\n87.54 ± 9.74 94.34 ± 1.09 92.70 ± 2.93\n87.58 ± 9.68 92.86 ± 8.14 98.65 ± 0.22\n\ntail class 82.53 ± 14.03 66.28 ± 23.04 86.62 ± 9.31 90.73 ± 8.46 90.90 ± 6.21 80.60 ± 11.80 89.96 ± 8.10 93.55 ± 9.15 80.99 ± 15.18 95.56 ± 3.85\nhead class 95.29 ± 3.30 74.68 ± 13.83 94.99 ± 3.94 92.58 ± 6.73 96.17 ± 2.72 84.64 ± 11.11 92.66 ± 6.52 72.09 ± 11.76 96.49 ± 2.45 93.20 ± 7.56\nall\n\n87.68 ± 13.78 69.52 ± 19.61 90.01 ± 9.50 91.54 ± 7.91 93.05 ± 6.45 82.29 ± 12.80 91.08 ± 8.98 85.20 ± 14.48 87.24 ± 15.15 94.75 ± 5.67\n\n\fTable 20. Anomaly segmentation on MVTecAD-step-K1 with pixel-level AUROC. We report the mean over 5 random seeds for each measurement.\nThe best performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nbottle\n76.52 ± 11.38 65.85 ± 16.14 60.97 ± 16.90 85.23 ± 14.39 94.31 ± 0.57\ncable\n71.28 ± 16.25 65.36 ± 12.90 75.16 ± 13.19 78.51 ± 7.99 85.37 ± 7.80\ncapsule\n97.17 ± 2.50 83.48 ± 10.86 84.41 ± 15.09 97.14 ± 2.20 97.10 ± 1.86\ncarpet\n95.21 ± 3.11 41.13 ± 37.80 68.31 ± 19.53 97.68 ± 0.59 98.43 ± 0.06\ngrid\n71.65 ± 27.37 31.36 ± 16.26 75.59 ± 18.92 94.20 ± 5.63 92.20 ± 4.56\nhazelnut 94.05 ± 1.74 76.90 ± 4.35 88.40 ± 9.31 94.66 ± 1.97 94.69 ± 2.81\nleather\n98.66 ± 1.03 60.45 ± 27.40 80.45 ± 20.05 99.12 ± 0.09 99.06 ± 0.18\nmetal nut 73.03 ± 12.51 62.16 ± 6.20 89.41 ± 7.27 76.98 ± 10.03 70.76 ± 13.14\npill\n85.75 ± 9.04 77.50 ± 9.98 88.57 ± 8.64 91.63 ± 5.53 86.62 ± 6.40\nscrew\n95.53 ± 2.70 73.06 ± 21.56 83.27 ± 22.25 96.86 ± 3.24 96.75 ± 3.36\ntile\n74.32 ± 7.08 65.06 ± 32.44 67.70 ± 19.74 86.89 ± 2.37 89.83 ± 1.23\ntoothbrush 92.99 ± 5.39 81.29 ± 11.74 88.81 ± 10.87 97.22 ± 2.03 96.77 ± 2.17\ntransistor 73.86 ± 16.73 64.74 ± 9.95 67.85 ± 11.88 79.97 ± 6.07 78.91 ± 7.96\nwood\n91.40 ± 4.42 73.93 ± 6.83 78.86 ± 12.15 90.74 ± 1.27 92.84 ± 0.64\nzipper\n91.08 ± 7.68 56.81 ± 22.34 69.50 ± 13.27 81.71 ± 18.47 93.01 ± 3.31\n\nWinCLIP\n\nAnomalyCLIP\n\n85.70\n61.30\n87.00\n90.90\n79.40\n95.70\n95.50\n49.30\n72.70\n91.10\n79.10\n86.20\n83.70\n85.10\n91.70\n\n90.40\n78.90\n95.80\n98.80\n97.30\n97.10\n98.60\n74.40\n92.00\n97.50\n94.60\n91.90\n71.00\n96.50\n91.40\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n98.13 ± 0.08 50.48 ± 7.86 98.36 ± 0.04\n76.87 ± 9.24 61.93 ± 19.83 83.29 ± 1.47\n87.59 ± 9.90 94.80 ± 5.59 98.28 ± 0.77\n93.04 ± 13.33 91.00 ± 11.06 99.04 ± 0.18\n62.25 ± 6.55 68.87 ± 37.97 88.13 ± 9.06\n69.53 ± 32.77 90.52 ± 2.27 86.49 ± 15.74\n78.87 ± 13.04 94.94 ± 9.75 99.31 ± 0.01\n87.28 ± 5.31 75.83 ± 12.94 96.01 ± 1.51\n91.95 ± 6.94 86.06 ± 11.24 95.91 ± 1.57\n77.17 ± 7.14 93.88 ± 3.08 95.49 ± 1.58\n91.10 ± 9.87 69.74 ± 16.33 94.36 ± 1.84\n89.01 ± 9.30 89.17 ± 8.67 96.59 ± 2.00\n83.26 ± 19.73 67.81 ± 15.07 89.85 ± 0.76\n82.93 ± 16.39 89.53 ± 4.79 90.38 ± 5.99\n87.41 ± 9.32 90.42 ± 11.43 98.48 ± 0.42\n\ntail class 78.80 ± 14.63 65.61 ± 16.44 75.37 ± 12.57 86.37 ± 10.24 87.85 ± 10.30 80.17 ± 13.51 89.34 ± 9.75 92.03 ± 8.45 70.34 ± 17.55 94.19 ± 5.45\nhead class 95.55 ± 3.46 64.76 ± 19.08 81.48 ± 6.25 95.20 ± 5.33 96.00 ± 3.03 85.48 ± 9.71 93.69 ± 6.52 71.36 ± 13.13 96.99 ± 2.13 93.71 ± 7.03\nall\n\n85.50 ± 14.20 65.27 ± 19.11 77.82 ± 12.77 89.90 ± 9.86 91.11 ± 9.05 82.29 ± 12.80 91.08 ± 8.98 83.76 ± 14.98 81.00 ± 19.03 94.00 ± 6.50\n\nTable 21. Anomaly detection on VisA-Pareto with image-level AUROC. We report the mean over 5 random seeds for each measurement. The best\nperformance is indicated with bold and the second-best with underline.\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nWinCLIP\n\nAnomalyCLIP\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\ncandle\n86.88 ± 7.30\ncapsules\n57.52 ± 2.04\ncashew\n85.60 ± 3.49\nchewinggum 88.61 ± 5.90\nfryum\n80.02 ± 6.04\n\n80.80 ± 7.81\n68.07 ± 5.44\n84.66 ± 5.94\n91.05 ± 8.40\n77.24 ± 6.10\n\n90.25 ± 6.25\n66.71 ± 6.85\n91.66 ± 5.64\n96.94 ± 3.87\n89.89 ± 3.25\n\n91.63 ± 3.55\n63.95 ± 3.76\n87.09 ± 7.38\n95.58 ± 2.28\n84.05 ± 2.88\n\n80.41 ± 12.16\n55.32 ± 1.55\n84.99 ± 9.83\n96.06 ± 1.04\n76.49 ± 3.20\n\n94.90\n79.40\n91.20\n95.50\n73.60\n\n79.30\n81.50\n76.30\n97.40\n93.00\n\n92.12 ± 3.46\n66.08 ± 6.72\n89.59 ± 9.87\n94.27 ± 8.69\n83.30 ± 8.74\n\n84.04 ± 22.34\n62.24 ± 5.23\n95.95 ± 0.41\n98.61 ± 0.52\n93.31 ± 1.45\n\n95.95 ± 1.18\n69.91 ± 5.36\n96.18 ± 0.63\n97.84 ± 1.04\n93.96 ± 0.70\n\nmacaroni1 78.52 ± 7.18\nmacaroni2 61.87 ± 6.68\npcb1\n81.62 ± 6.95\npcb2\n72.98 ± 9.37\npcb3\n76.99 ± 11.80\npcb4\n86.61 ± 7.03\npipe fryum 86.52 ± 6.52\n\n77.59 ± 4.87\n52.30 ± 3.42\n84.91 ± 3.28\n78.32 ± 3.26\n80.35 ± 5.04\n92.90 ± 2.65\n79.18 ± 5.31\n\n80.72 ± 9.84 65.83 ± 10.11\n60.27 ± 6.57 62.94 ± 8.93\n93.68 ± 6.21 83.09 ± 2.29\n87.44 ± 8.82 76.72 ± 8.26\n91.12 ± 7.12 72.12 ± 8.79\n97.54 ± 1.85 94.83 ± 2.85\n84.22 ± 13.52 83.08 ± 9.68\n\n70.47 ± 7.12\n58.14 ± 6.88\n82.91 ± 1.75\n71.95 ± 6.15\n67.34 ± 8.99\n88.61 ± 8.15\n81.92 ± 5.73\n\n79.00\n67.10\n72.10\n47.00\n63.90\n74.20\n67.80\n\n87.20\n73.40\n85.40\n62.20\n62.70\n93.90\n92.40\n\n81.91 ± 10.80 89.99 ± 7.90\n64.89 ± 11.32 56.65 ± 10.27\n90.63 ± 1.82 88.40 ± 8.58\n88.41 ± 4.06 86.56 ± 4.46\n83.19 ± 16.29 91.76 ± 3.70\n97.24 ± 3.05 98.69 ± 1.09\n95.50 ± 5.33 92.55 ± 13.18\n\n92.11 ± 4.16\n71.48 ± 2.94\n94.35 ± 1.42\n88.87 ± 4.39\n91.95 ± 3.29\n99.39 ± 0.35\n98.32 ± 0.72\n\nPaDiM\n\ntail class\n\n70.71 ± 11.15 76.68 ± 11.91 78.50 ± 11.41 73.48 ± 12.57 69.51 ± 13.24 73.26 ± 14.34 81.97 ± 10.27 86.11 ± 13.42 78.05 ± 16.72 87.55 ± 11.67\n\nhead class\n\n83.35 ± 9.34 80.62 ± 10.10 90.60 ± 10.34 84.03 ± 11.84 80.41 ± 11.63 76.92 ± 13.25 82.48 ± 11.38 85.74 ± 11.63 92.17 ± 8.64 93.06 ± 7.18\n\nall\n\n78.65 ± 11.83 78.95 ± 11.73 85.87 ± 13.12 68.25 ± 12.95 76.22 ± 13.36 75.48 ± 13.96 82.06 ± 11.77 85.59 ± 13.12 86.56 ± 15.29 90.86 ± 10.18\n\n\fTable 22. Anomaly detection on VisA-step-K4 with image-level AUROC. We report the mean over 5 random seeds for each measurement. The best\nperformance is indicated with bold and the second-best with underline.\nPaDiM\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\nWinCLIP\n\nAnomalyCLIP\n\n70.21 ± 21.15 72.35 ± 10.28 67.81 ± 26.77 86.47 ± 9.89 66.55 ± 18.77\n56.49 ± 1.12 68.11 ± 6.70 62.70 ± 6.64 59.55 ± 2.97 56.11 ± 2.86\n79.82 ± 15.68 77.46 ± 3.32 91.98 ± 6.17 82.54 ± 11.97 77.47 ± 20.14\n\n94.90\n79.40\n91.20\n\n79.30\n81.50\n76.30\n\n86.94 ± 8.04 66.09 ± 30.70 94.30 ± 2.66\n59.88 ± 2.99 58.50 ± 4.02 70.06 ± 2.45\n83.38 ± 9.76 86.08 ± 15.53 95.42 ± 1.66\n\nchewinggum 75.35 ± 21.02 79.44 ± 3.80 85.94 ± 18.73 93.06 ± 4.91 89.45 ± 6.66\nfryum\n65.18 ± 12.47 75.26 ± 5.35 75.78 ± 12.23 72.47 ± 7.91 64.78 ± 9.52\nmacaroni1 76.63 ± 10.17 69.72 ± 10.58 74.02 ± 24.22 70.72 ± 10.86 68.49 ± 10.40\nmacaroni2 59.73 ± 4.53 50.93 ± 5.62 63.14 ± 8.68 60.06 ± 7.47 55.81 ± 4.23\npcb1\n81.77 ± 14.82 66.43 ± 11.59 84.89 ± 20.74 80.88 ± 12.72 78.39 ± 12.74\npcb2\n74.79 ± 16.86 69.33 ± 5.46 89.89 ± 10.52 79.90 ± 16.16 78.16 ± 5.67\npcb3\n69.52 ± 16.09 64.65 ± 3.53 73.58 ± 20.21 72.29 ± 13.30 61.79 ± 14.12\npcb4\n72.62 ± 21.77 81.42 ± 8.07 88.28 ± 11.79 80.94 ± 15.02 72.40 ± 21.78\n\n95.50\n73.60\n79.00\n67.10\n72.10\n47.00\n63.90\n74.20\n\n97.40\n93.00\n87.20\n73.40\n85.40\n62.20\n62.70\n93.90\n\n89.20 ± 11.90 93.92 ± 5.16\n86.46 ± 6.80 50.93 ± 24.47\n70.15 ± 8.37 78.08 ± 24.37\n60.19 ± 10.80 53.01 ± 10.33\n67.71 ± 13.11 83.60 ± 18.70\n67.39 ± 18.48 80.39 ± 19.73\n74.98 ± 17.86 77.18 ± 18.43\n88.00 ± 13.16 81.46 ± 16.86\n\npipe fryum 87.17 ± 10.82 74.24 ± 2.02 86.93 ± 14.47 85.41 ± 13.55 83.03 ± 11.05\n\n67.80\n\n92.40\n\n88.01 ± 8.48 88.53 ± 14.75 98.38 ± 1.05\n\ncandle\ncapsules\ncashew\n\nSimpleNet\n\n98.62 ± 0.64\n92.35 ± 1.82\n88.46 ± 9.69\n69.59 ± 3.02\n90.46 ± 9.04\n91.29 ± 4.94\n89.82 ± 6.03\n97.01 ± 2.39\n\ntail class\nhead class\n\n60.65 ± 8.82 70.04 ± 11.19 66.91 ± 13.55 68.25 ± 9.89 61.02 ± 10.69 75.99 ± 12.06 82.29 ± 11.69 83.53 ± 15.54 59.70 ± 15.73 85.17 ± 11.28\n88.94 ± 7.80 71.80 ± 8.51 95.31 ± 5.86 89.30 ± 7.59 85.06 ± 9.54 74.76 ± 12.32 81.74 ± 13.29 67.51 ± 13.09 95.97 ± 6.17 95.92 ± 6.14\n\nall\n\n72.44 ± 16.62 70.78 ± 10.14 78.75 ± 18.28 77.02 ± 14.51 71.04 ± 15.99 75.48 ± 13.96 82.06 ± 11.77 76.86 ± 15.60 74.81 ± 22.27 89.65 ± 10.76\n\nTable 23. Anomaly detection on VisA-step-K1 with image-level AUROC. We report the mean over 5 random seeds for each measurement. The best\nperformance is indicated with bold and the second-best with underline.\nPaDiM\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\nWinCLIP\n\nAnomalyCLIP\n\n51.53 ± 24.34 66.92 ± 19.26 54.68 ± 28.57 71.00 ± 15.55 74.89 ± 6.83\n55.24 ± 2.23 58.46 ± 4.42 64.51 ± 14.93 60.77 ± 6.42 53.56 ± 0.83\n\n94.90\n79.40\n\n79.30\n81.50\n\n87.41 ± 7.11 47.01 ± 28.30 92.33 ± 3.58\n54.37 ± 4.14 58.59 ± 5.55 64.33 ± 4.21\n\ncashew\n71.51 ± 17.61 69.40 ± 12.10 83.28 ± 13.51 71.55 ± 18.13 71.12 ± 18.80\nchewinggum 56.00 ± 10.76 65.94 ± 9.60 55.56 ± 3.73 67.93 ± 7.83 62.56 ± 9.82\nfryum\n67.91 ± 16.31 72.33 ± 8.71 73.71 ± 20.03 71.31 ± 13.56 64.88 ± 12.91\nmacaroni1 74.01 ± 12.30 63.53 ± 15.04 78.65 ± 17.86 66.28 ± 15.48 67.13 ± 12.11\nmacaroni2 58.82 ± 5.20 57.12 ± 4.10 45.77 ± 10.89 54.65 ± 3.86 59.91 ± 7.73\npcb1\n69.87 ± 20.89 58.32 ± 19.89 75.86 ± 28.20 75.11 ± 14.25 75.65 ± 12.98\npcb2\n79.57 ± 16.79 66.91 ± 7.51 89.59 ± 16.40 76.68 ± 19.53 79.39 ± 5.20\npcb3\n72.57 ± 19.16 60.24 ± 8.39 77.67 ± 25.26 66.13 ± 18.37 66.71 ± 12.91\n\n91.20\n95.50\n73.60\n79.00\n67.10\n72.10\n47.00\n63.90\n\n76.30\n97.40\n93.00\n87.20\n73.40\n85.40\n62.20\n62.70\n\n88.78 ± 4.47 75.20 ± 19.42 93.89 ± 3.03\n97.30 ± 0.91 75.18 ± 15.66 97.97 ± 0.34\n82.99 ± 1.80 64.21 ± 28.02 91.84 ± 2.50\n64.53 ± 6.42 76.81 ± 25.38 84.55 ± 14.14\n58.12 ± 3.22 40.87 ± 5.62 66.36 ± 3.16\n67.99 ± 21.50 71.23 ± 28.26 84.17 ± 12.48\n60.50 ± 8.81 85.54 ± 21.53 90.78 ± 9.14\n68.29 ± 13.90 81.03 ± 21.23 90.09 ± 8.63\n\npcb4\n80.92 ± 21.97 78.70 ± 7.67 85.96 ± 21.77 77.61 ± 20.38 80.13 ± 22.19\npipe fryum 87.71 ± 9.87 69.71 ± 6.77 79.58 ± 26.83 74.09 ± 17.64 76.19 ± 19.91\n\n74.20\n67.80\n\n93.90\n92.40\n\n81.99 ± 13.97 86.86 ± 17.42 97.84 ± 2.35\n85.86 ± 7.74 76.60 ± 31.00 97.22 ± 2.68\n\ncandle\ncapsules\n\nSimpleNet\n\ntail class\nhead class\n\n55.98 ± 10.38 62.18 ± 13.25 56.09 ± 14.72 61.58 ± 7.34 60.31 ± 8.56 78.81 ± 12.99 83.27 ± 10.94 79.33 ± 17.74 52.61 ± 15.29 82.97 ± 13.40\n86.76 ± 8.85 70.46 ± 6.12 94.43 ± 5.11 80.41 ± 6.04 81.99 ± 10.66 70.81 ± 13.42 80.36 ± 13.54 68.56 ± 11.77 94.17 ± 6.81 94.11 ± 6.71\n\nall\n\n68.81 ± 18.82 65.63 ± 12.24 72.07 ± 22.90 69.43 ± 12.94 69.34 ± 14.59 75.48 ± 13.96 82.06 ± 11.77 74.84 ± 16.17 69.93 ± 24.89 87.61 ± 12.99\n\n\fTable 24. Anomaly segmentation on VisA-Pareto with pixel-level AUROC. We report the mean over 5 random seeds for each measurement. The\nbest performance is indicated with bold and the second-best with underline.\nPaDiM\n\nSimpleNet\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nWinCLIP\n\nAnomalyCLIP\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\n97.49 ± 1.24 92.06 ± 3.38 95.98 ± 0.88 98.63 ± 0.47 97.77 ± 1.38\n\n87.00\n\n98.80\n\n92.98 ± 6.06 93.92 ± 10.70 98.75 ± 0.63\n\ncapsules\n78.32 ± 5.30 91.73 ± 2.28 95.63 ± 2.66 91.77 ± 2.96 83.58 ± 1.76\ncashew\n95.78 ± 1.37 95.69 ± 1.05 97.48 ± 1.38 98.74 ± 0.38 98.50 ± 0.53\nchewinggum 96.86 ± 1.00 94.28 ± 2.57 98.64 ± 0.50 98.54 ± 0.33 98.75 ± 0.10\nfryum\n92.73 ± 1.60 85.64 ± 1.58 92.84 ± 2.57 97.16 ± 0.30 96.45 ± 1.01\nmacaroni1 97.32 ± 1.49 94.19 ± 3.76 96.89 ± 1.66 97.19 ± 1.25 96.80 ± 0.91\nmacaroni2 90.94 ± 1.98 80.47 ± 6.45 89.86 ± 1.44 94.19 ± 2.04 90.25 ± 2.21\npcb1\n92.39 ± 7.08 96.22 ± 1.72 99.13 ± 0.97 97.97 ± 0.85 97.75 ± 1.52\npcb2\n91.86 ± 3.13 90.36 ± 3.12 97.96 ± 1.19 95.07 ± 1.97 94.24 ± 2.26\n\n80.00\n84.80\n95.40\n87.70\n50.30\n44.70\n38.70\n58.70\n\n95.00\n93.80\n99.30\n94.60\n98.30\n97.60\n94.10\n92.40\n\n95.92 ± 1.03 88.76 ± 10.75 97.68 ± 0.49\n90.20 ± 11.64 98.02 ± 0.25 98.39 ± 0.22\n94.27 ± 7.88 98.05 ± 0.21 99.06 ± 0.52\n82.65 ± 8.10 91.37 ± 0.56 91.61 ± 0.54\n83.38 ± 17.64 98.27 ± 0.50 99.23 ± 0.56\n86.05 ± 16.68 87.28 ± 5.32 92.95 ± 5.85\n96.14 ± 4.32 98.08 ± 1.58 99.75 ± 0.04\n95.36 ± 3.61 96.87 ± 0.50 97.24 ± 1.61\n\npcb3\n95.76 ± 3.15 95.15 ± 1.92 98.57 ± 0.99 96.41 ± 1.32 95.60 ± 1.86\npcb4\n85.95 ± 3.26 90.16 ± 3.11 98.27 ± 0.51 95.83 ± 1.10 94.66 ± 1.87\npipe fryum 98.36 ± 0.74 97.12 ± 0.60 97.38 ± 1.54 99.10 ± 0.31 98.92 ± 0.17\n\n76.00\n91.40\n83.60\n\n88.40\n95.70\n98.20\n\n89.19 ± 16.29 98.11 ± 0.25 99.00 ± 0.26\n92.91 ± 6.69 96.35 ± 0.81 97.44 ± 0.71\n94.62 ± 9.11 98.19 ± 1.12 98.73 ± 0.08\n\ncandle\n\ntail class\nhead class\n\n89.02 ± 8.14 91.02 ± 5.59 96.42 ± 2.51 95.28 ± 3.24 93.01 ± 5.95 71.95 ± 18.13 95.61 ± 2.79 96.84 ± 1.97 93.20 ± 5.59 97.98 ± 1.35\n95.10 ± 3.88 92.58 ± 5.18 96.74 ± 2.94 97.60 ± 1.41 96.69 ± 2.67 73.97 ± 19.94 95.46 ± 3.32 88.00 ± 12.00 96.74 ± 3.24 97.26 ± 3.31\n\nall\n\n92.82 ± 6.45 91.92 ± 5.49 96.55 ± 3.02 96.72 ± 2.49 95.27 ± 4.61 73.19 ± 19.68 95.52 ± 3.17 91.14 ± 10.44 95.27 ± 5.20 97.49 ± 2.92\n\nTable 25. Anomaly segmentation on VisA-step-K4 with pixel-level AUROC. We report the mean over 5 random seeds for each measurement. The\nbest performance is indicated with bold and the second-best with underline.\nPaDiM\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\nWinCLIP\n\nAnomalyCLIP\n\n85.13 ± 9.19 87.24 ± 7.67 97.78 ± 1.33 95.69 ± 2.65\n83.64 ± 4.54 88.48 ± 2.57 88.94 ± 1.14 82.04 ± 0.41\n92.02 ± 2.19 96.45 ± 0.76 98.07 ± 0.52 96.51 ± 3.14\n81.63 ± 5.60 95.61 ± 3.98 98.06 ± 0.36 97.88 ± 0.81\n79.59 ± 5.77 92.88 ± 3.67 95.65 ± 0.93 92.90 ± 2.43\n88.33 ± 8.63 96.72 ± 2.59 97.34 ± 1.56 95.86 ± 2.37\n\n87.00\n80.00\n84.80\n95.40\n87.70\n50.30\n\n98.80\n95.00\n93.80\n99.30\n94.60\n98.30\n\n82.17 ± 22.34 86.22 ± 15.30 98.56 ± 0.69\n94.47 ± 0.55 67.11 ± 3.69 96.88 ± 0.39\n78.26 ± 20.71 94.34 ± 4.59 97.74 ± 0.41\n90.31 ± 10.28 97.50 ± 0.69 99.24 ± 0.20\n86.15 ± 8.46 82.57 ± 3.28 89.69 ± 1.19\n73.56 ± 21.73 96.40 ± 3.07 99.26 ± 0.53\n\nmacaroni2 90.05 ± 2.20 74.04 ± 9.95 91.71 ± 3.82 93.46 ± 2.06 89.73 ± 2.26\npcb1\n90.34 ± 11.11 90.72 ± 1.49 98.26 ± 2.17 96.59 ± 3.74 94.50 ± 6.37\npcb2\n91.53 ± 7.91 90.22 ± 2.08 97.49 ± 2.39 95.36 ± 2.89 94.11 ± 3.61\npcb3\n91.80 ± 5.56 90.10 ± 2.80 95.73 ± 3.21 95.62 ± 2.34 92.02 ± 4.66\npcb4\n78.97 ± 12.27 83.57 ± 1.49 92.44 ± 5.82 93.28 ± 4.15 90.17 ± 6.77\npipe fryum 97.88 ± 1.89 96.29 ± 1.06 97.33 ± 0.84 98.79 ± 0.61 98.44 ± 0.88\n\n44.70\n38.70\n58.70\n76.00\n91.40\n83.60\n\n97.60\n94.10\n92.40\n88.40\n95.70\n98.20\n\n84.67 ± 15.24 85.76 ± 1.78 94.27 ± 4.41\n72.82 ± 22.46 90.77 ± 11.79 97.88 ± 1.35\n74.16 ± 20.63 93.25 ± 4.02 96.36 ± 1.39\n78.54 ± 26.58 92.23 ± 6.09 99.04 ± 0.21\n78.97 ± 21.25 89.96 ± 5.68 96.71 ± 0.68\n88.48 ± 11.11 97.14 ± 1.57 97.15 ± 2.68\n\ncandle\n92.17 ± 6.03\ncapsules\n73.37 ± 0.66\ncashew\n93.70 ± 4.97\nchewinggum 93.51 ± 4.69\nfryum\n85.41 ± 4.52\nmacaroni1 95.43 ± 4.08\n\nSimpleNet\n\ntail class\nhead class\n\n83.90 ± 8.10 82.55 ± 6.66 91.46 ± 4.73 93.89 ± 3.30 90.02 ± 5.05 74.61 ± 19.30 95.54 ± 3.00 95.39 ± 5.00 83.96 ± 9.92 96.80 ± 2.69\n97.36 ± 3.71 91.49 ± 4.60 98.02 ± 1.80 98.35 ± 1.32 97.94 ± 1.97 71.21 ± 19.32 95.48 ± 3.34 62.96 ± 10.16 97.11 ± 4.18 97.03 ± 3.38\n\nall\n\n89.51 ± 9.18 86.27 ± 7.28 94.20 ± 4.94 95.74 ± 3.39 93.32 ± 5.57 73.19 ± 19.68 95.52 ± 3.17 81.88 ± 18.31 89.44 ± 10.08 96.90 ± 3.01\n\n\fTable 26. Anomaly segmentation on VisA-step-K1 with pixel-level AUROC. We report the mean over 5 random seeds for each measurement. The\nbest performance is indicated with bold and the second-best with underline.\nPaDiM\n\nEfficientAD\n\nHVQ\n\nUniAD\n\nAnomalyCLIP\n\n87.00\n80.00\n84.80\n\n98.80\n95.00\n93.80\n\n88.20 ± 21.36 76.50 ± 12.90 98.18 ± 0.71\n84.81 ± 10.74 75.43 ± 15.75 95.28 ± 0.36\n96.75 ± 1.03 91.05 ± 6.64 97.43 ± 1.13\n\n95.56 ± 1.64 94.26 ± 1.22\n93.47 ± 3.85 92.28 ± 4.44\n94.64 ± 3.66 95.82 ± 2.37\n90.06 ± 0.96 88.14 ± 2.33\n92.32 ± 6.40 90.93 ± 7.47\n92.26 ± 7.46 95.27 ± 3.13\n91.28 ± 6.56 92.90 ± 5.57\n88.04 ± 9.46 91.47 ± 8.21\n\n95.40\n87.70\n50.30\n44.70\n38.70\n58.70\n76.00\n91.40\n\n99.30\n94.60\n98.30\n97.60\n94.10\n92.40\n88.40\n95.70\n\n97.73 ± 0.12 94.14 ± 2.73 99.31 ± 0.14\n83.20 ± 6.50 84.26 ± 6.65 89.64 ± 2.28\n71.40 ± 21.31 90.90 ± 10.48 98.64 ± 1.33\n87.97 ± 0.86 82.66 ± 1.09 93.94 ± 1.64\n82.00 ± 17.26 84.35 ± 13.83 99.06 ± 0.60\n63.48 ± 18.14 92.89 ± 8.14 96.32 ± 1.81\n69.94 ± 25.21 92.09 ± 8.55 98.93 ± 0.48\n70.39 ± 19.28 88.89 ± 9.01 95.24 ± 2.23\n\npipe fryum\n\n97.96 ± 1.82 93.84 ± 2.79 96.21 ± 2.95 96.87 ± 3.28 97.37 ± 2.42\n\n83.60\n\n98.20\n\n89.44 ± 11.46 96.06 ± 3.28 97.86 ± 1.82\n\ntail class\nhead class\n\n82.58 ± 7.84 74.21 ± 11.63 85.44 ± 7.41 90.59 ± 4.34 88.47 ± 4.44 73.81 ± 21.67 96.17 ± 2.84 94.11 ± 4.19 80.73 ± 9.48 96.13 ± 3.48\n96.57 ± 2.80 89.31 ± 5.31 98.25 ± 1.46 95.51 ± 1.93 96.81 ± 2.83 72.32 ± 18.68 94.61 ± 3.09 65.30 ± 14.32 96.82 ± 2.44 97.39 ± 2.24\n\nall\n\n88.41 ± 9.54 80.50 ± 12.16 90.78 ± 8.66 92.64 ± 4.89 91.95 ± 5.89 73.19 ± 19.68 95.52 ± 3.17 82.11 ± 17.67 87.44 ± 10.97 96.65 ± 3.10\n\n84.28 ± 8.15 80.29 ± 8.82 76.45 ± 11.25 94.56 ± 3.44 88.46 ± 6.15\n79.63 ± 10.69 75.87 ± 16.78 87.88 ± 10.46 88.76 ± 9.25 83.30 ± 2.13\n90.16 ± 6.83 85.16 ± 18.54 92.51 ± 5.09 93.86 ± 5.48 93.14 ± 5.38\n\nchewinggum 88.79 ± 2.65 68.19 ± 19.17\nfryum\n85.49 ± 7.54 75.45 ± 17.82\nmacaroni1 94.04 ± 5.81 78.33 ± 18.65\nmacaroni2 88.45 ± 0.73 67.73 ± 5.73\npcb1\n84.27 ± 12.99 89.11 ± 3.28\npcb2\n93.85 ± 7.95 88.49 ± 3.79\npcb3\n92.12 ± 7.98 85.06 ± 6.99\npcb4\n81.85 ± 14.74 78.50 ± 2.33\n\n83.31 ± 7.37\n92.83 ± 0.69\n94.70 ± 5.55\n86.12 ± 4.12\n95.83 ± 3.46\n97.46 ± 3.91\n93.42 ± 7.84\n92.59 ± 8.64\n\nPatchCore\n\nSoftPatch\n\nTailedCore\n(ours)\n\nWinCLIP\n\ncandle\ncapsules\ncashew\n\nSimpleNet\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"