"<!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>Normal-Abnormal Guided Generalist\nAnomaly Detection\n\narXiv:2510.00495v3 [cs.CV] 17 Oct 2025\n\nYuexin Wang1,2∗ , Xiaolei Wang1,2∗ , Yizheng Gong1,2 , Jimin Xiao1†\n1\nXi’an Jiaotong-Liverpool University\n2\nUniversity of Liverpool\n\nAbstract\nGeneralist Anomaly Detection (GAD) aims to train a unified model on an original\ndomain that can detect anomalies in new target domains. Previous GAD methods\nprimarily use only normal samples as references, overlooking the valuable information contained in anomalous samples that are often available in real-world scenarios.\nTo address this limitation, we propose a more practical approach: normal-abnormalguided generalist anomaly detection, which leverages both normal and anomalous\nsamples as references to guide anomaly detection across diverse domains. We introduce the Normal-Abnormal Generalist Learning (NAGL) framework, consisting of\ntwo key components: Residual Mining (RM) and Anomaly Feature Learning (AFL).\nRM extracts abnormal patterns from normal-abnormal reference residuals to establish transferable anomaly representations, while AFL adaptively learns anomaly\nfeatures in query images through residual mapping to identify instance-aware\nanomalies. Our approach effectively utilizes both normal and anomalous references for more accurate and efficient cross-domain anomaly detection. Extensive\nexperiments across multiple benchmarks demonstrate that our method significantly\noutperforms existing GAD approaches. This work represents the first to adopt a mixture of normal and abnormal samples as references in generalist anomaly detection.\nThe code and datasets are available at https://github.com/JasonKyng/NAGL.\n\n1\n\nIntroduction\n\nVisual Anomaly Detection (AD) [13, 30, 63, 5, 14, 67, 56, 59, 18, 17, 41, 6] plays a crucial role in\nindustrial quality inspection [2, 48, 69, 25] and medical diagnosis [14, 20]. Its primary objectives are\nto classify images as normal or anomalous and to localize anomalies within those images. Traditional\nAD methods [31, 8, 15, 53, 9] focus on training and testing a model on a single domain, without\nconsidering how detection capabilities might transfer to a different target domain. However, many\nreal-world AD scenarios prohibit training on the target domain due to data scarcity and privacy issues,\nmaking it difficult to achieve the desired outcome in that target domain. To address the challenge,\nInCTRL [68] and ResAD [60] propose Generalist Anomaly Detection (GAD) that aims to train a\nunified model on the original domain while enabling AD on the target domain. As shown in Fig. 1a,\nthe GAD framework adopts a meta-learning strategy. This strategy trains the model in the original\ndomain to localize the anomalous regions of a query image by referring to a limited number of normal\nreferences. Subsequently, the learned ability is transferred to the new target domain.\nAlthough previous GAD methods [68, 60] have made substantial progress, they are not yet practical for\nreal-world applications. Models trained exclusively on normal samples often lack the discriminative\npower to reliably distinguish anomalies [14, 61]. However, real-world scenarios often provide a small\nnumber of anomalous samples (e.g., defective parts or diagnosed disease cases). These anomalous\n∗\n†\n\nEqual Contribution.\nCorresponding Author.\n\n39th Conference on Neural Information Processing Systems (NeurIPS 2025).\n\n\fNormal Reference\n\nModel\n\n⋯\n\nQuery\n\nQuery\n\n⋯\n\nModel\n\n⋯\n\n⋯\n\nNormal &amp; Abnormal\nModel\nReference\n\n⋯\n\nNormal &amp; Abnormal\nReference\n\nResult\n\nResult\n(c) False Activation of Anomalous Features\n91\n\nInference on Target Domains\n\nQuery\n\n⋯\n\nQuery\n\nNormal Reference\n\nNormal Reference\nNormal Reference\n(a) Vanilla Generalist Anomaly Detection Setting\n\nTraining on Original Domain\n\nQuery\n\n⋯\n\nQuery\n\n⋯\n\nNormal &amp; Abnormal\nReference\n\n⋯\n\nNormal &amp; Abnormal\nReference\n\n(b) Normal-Abnormal Guided Generalist Anomaly Detection Setting\n\n90\n\nModel\n\nResult\n\nAUROC (%)\n\nQuery\n\n⋯\n\n⋯\n\n⋯\n\nQuery\n\nQuery Image Anomalous Features Our Approach\nw/ GT\nActivation Map Activation Map\n\nInference on Target Domains\n\nTraining on Original Domain\n\nOurs\n\n89\n88\n\nResAD\n\n87\n86\n\nResult\n\n85\n\nInCTRL\n0\n\n2\n\n4\n\n6\n\n8\n\n//\n10 16 18\n\nInference Speed (FPS)\n(d) Efficiency Analysis\n\nFigure 1: Overview of existing and proposed GAD paradigms. (a) Vanilla GAD only adopts a\nfew normal samples as references. (b) Our approach combines normal and abnormal references to\nenhance detection. (c) Direct application of the KNN-based method to our normal-abnormal guided\ndetection task causes to false activations (middle), while our approach eliminates them (right). (d)\nComparisons of different methods in terms of AUROC sample (y-axis), inference speed (x-axis), and\nmodel size (circle radius). Our approach achieves the highest AUROC sample metric for anomaly\ndetection while being 2× faster than ResAD and 14× faster than InCTRL.\n\nsamples contain valuable information on anomaly characteristics that could be leveraged to improve\ndetection. Given this context, we propose a more practical and effective approach: normal-abnormalguided generalist anomaly detection (illustrated in Fig. 1b). This approach leverages both normal\nand anomalous samples as references, guiding the model to detect anomalies across diverse domains.\nThe core of this approach is learning the relationships between a query and these references in the\noriginal domain, and then applying this learned understanding to the target domain.\nPrevious methods [68, 60] leverage residuals between queries and normal references to ensure\ntransferability, but these approaches are specifically tailored for scenarios where few-shot normal\nsamples are provided, which cannot be adapted to the normal-abnormal guided paradigm. When\nprovided with a reference set with both normal and abnormal samples, KNN-based approaches\n[48, 12] can serve as a solution, where sample regions far away from normal references and close to\nabnormal references are considered as abnormal. However, these KNN-based approaches are typically\ntraining-free, lacking the adaptability offered by data-driven learning. Additionally, we experimentally\nfind that the KNN-based method suffers from false activation problems (see Fig. 1c). To address\nthese limitations, we propose a Normal-Abnormal Generalist Learning (NAGL) framework, which\nutilizes the residual features to model the differences between normal and anomalous references. The\nproposed method achieves superior detection performance at faster speeds (see Fig. 1d), demonstrating\nits significant potential for practical applications.\nThe core of our NAGL framework consists of two parts: Residual Mining (RM) from normal-abnormal\nreferences and Anomaly Feature Learning (AFL) for query images through residual mapping. To fully\nexplore abnormal reference patterns and maintain transferability, RM leverages normal-abnormal\nresiduals to learn abnormal reference patterns through a designed attention operation, obtaining\nresidual proxies. AFL adaptively learns abnormal features of a query image by comparing residual\nproxies with residuals between the query feature and normal references, obtaining anomaly proxies.\nFinally, anomaly localization results are acquired by similarity computation between the query feature\nand anomaly proxies. Our NAGL only relies on residual training to adaptively capture the similarities\nand differences between query and normal-abnormal reference samples, so it can be transferred\nbetween different domains.\n2\n\n\fLeveraging RM and AFL, our proposed NAGL framework effectively achieves normal-abnormal\nguided generalist anomaly detection. The main contributions of this work are summarized as follows:\n• We propose a different generalist anomaly detection task and a corresponding dataset split.\nThis task is the first to adopt a mixture of normal and abnormal samples as references.\n• We propose a novel Normal-Abnormal Generalist Learning framework to effectively leverage abnormal reference in GAD that adapts normal-abnormal reference residuals to mine\npotential anomalies in the query.\n• Extensive experiments across multiple anomaly detection benchmarks demonstrate that our\nmethod significantly outperforms existing GAD approaches.\n\n2\n\nRelated Work\n\n2.1\n\nAnomaly Detection\n\nArtificial intelligence techniques based on deep learning have been widely applied [27, 38, 57],\nwith anomaly detection (AD) being a significant application. AD can be divided into various tasks\naccording to real-world requirements, e.g., unsupervised AD [55, 54, 69, 37, 64, 49], few-shot\nAD (FSAD) [21, 15, 28, 42, 50, 33], zero-shot AD (ZSAD) [23, 65, 7], noisy AD [8, 26], 3D AD\n[16, 11, 36, 66], and open-set AD [14, 67]. Among these tasks, unsupervised AD generally adopts a\none-class classification paradigm to train the detection model, i.e., the model is only trained on normal\nsamples and can detect unseen abnormal patterns during the inference phase. Existing unsupervised\nmethods can be divided into three main categories: reconstruction-based [51, 40, 19], featureembedding-based [44, 48, 29, 58], and augmentation-based [62, 64, 34] methods. PatchCore [48], a\nsimple feature-embedding-based method, firstly constructs a memory bank of normal embedding\nfeatures, then introduces a nearest neighbour search to find several nearest neighbours for each test\nembedding feature, and computes the distance between the test embedding feature and its neighbours\nas an anomaly score. PatchCore can also be extended to a few-shot AD task well, where the used\nmemory bank only requires a few normal reference samples to construct. Based on this work [48],\nFastRecon [15] leverages ridge regression on normal features to quickly reconstruct test features.\nHowever, these methods only have a testing phase and detect anomalies on a single domain of data,\nlacking transferability. Therefore, some ZSAD [65] and GAD [60, 68] methods have begun to study\ncross-domain detection. And [43] also proposes a general few-shot defect classification framework\nthat addresses real-world applications of defect type identification. Building upon the GAD task,\nour proposed normal-abnormal guided generalist AD framework addresses cross-domain anomaly\ndetection by effectively utilizing abnormal samples from the original domain to improve performance.\n2.2\n\nGeneralist Anomaly Detection\n\nFSAD is designed to identify anomalies using only a limited number of normal samples from target\ndatasets. Existing FSAD methods can be divided into training-free-based [48, 15] and meta-learningbased methods [21, 68, 60]. Meta-learning-based methods focus on generalizing the detection of the\nmodel to the new target domain. RegAD [21] trains a registration network using samples from seen\ncategories, which can register samples from unseen categories and achieve cross-category anomaly\ndetection. However, RegAD remains dependent on domain relevance between training and testing\ndata. To achieve domain-agnostic anomaly detection, InCTRL [68] firstly proposes a generalist\nanomaly detection (GAD) task and utilizes residual distance to discriminate anomalies. Subsequently,\nResAD [60] applies residual features to eliminate domain dependencies to implement the GAD task.\nThe reference set used by the vanilla GAD task only contains normal samples. However, in practical\nscenarios, a small number of abnormal samples can also be obtained. Therefore, we propose the\nnormal-abnormal guided GAD task, where the reference set combines normal and abnormal samples.\n\n3\n\nMethodology\n\n3.1\n\nNormal-Abnormal Guided GAD Task\n\nIn the normal-abnormal guided GAD task, we focus on training a unified model on the original\ndomain and detecting anomalies in a new target domain using both normal and abnormal samples\n3\n\n\fFeature Extraction\n\nNormal References\n\nn\n\nFrozen\nTrainable\n\n \u001f cls \u001e seg\n\nNormal-Guided Detection\n\nn\n\nn\n\n...\n\n...\n\n\n\nInput Query\n\nx\n\nq\n\nSim.\n\nq\n\nVision\nEncoder\n\n\n\na\n\na\nMask Downsample\n\nMerge\n\nAnomaly\nProxies\n\n\n\n\nAFL\nResidual Maping\n\nAbnormal-Guided Detection\n\nφ (⋅)\n\nAbnormal Reference\n\nNN\nSearch\n\n\n\nResidual\nProxies\n\n\n\nRM\n\na\n\nResidual Mining\n\nRM-AFL\nModule\n\nLearnable\nProxies\n\n\n...\n\nRM-AFL\nModule\n\na\n\nVision\nSpace\n\nq\nRes \u001f  q ,  n \u001e\nRes \u001f  ,  \u001e\na\n\nResidual\nSpace\n\nn\n\nVision\nSpace\n\na\n\nAttention Layer\nQuery\n\nKey\n\nValue\n\nFigure 2: Overview of our proposed NAGL framework. Given a test image and its corresponding\nreference images (normal and abnormal), features are extracted through a pre-trained backbone network. The extracted normal features guide the generation of a normal-guided score map. Meanwhile,\nabnormal features are processed through the RM-AFL module to produce an abnormal-guided score\nmap. This module implements a transformation process: from learnable proxies in vision space to\nresidual proxies capturing normal-abnormal differences in residual space, and finally to anomaly\nproxies in vision space that highlight specific anomalous regions in the query image. The final\nanomaly score is computed by merging both normal and abnormal guided score maps.\nas references. Formally, let Dorigin = {X , Y} be the training dataset from original domain, where\nN\nX = {xi }N\ni=1 consists of N normal and abnormal samples, Y = {yi }i=1 is corresponding ground\ntruth masks, and each normal sample is equipped a zero mask. During training phase, we organize\nthe data into many episodes, where each episode consists of a reference set R = {Rn , Ra } and a\n1\nquery input xq from Dorigin . The reference set R contains normal samples Rn = {rkn }K\nk=1 and\na\na K2\nabnormal samples R = {rk }k=1 , K1 and K2 denote the number of normal and abnormal reference\nsamples, respectively. We train a unified detection model on Dorigin . During inference, the model is\nevaluated on the target domain dataset Dtarget containing unseen categories compared to Dorigin .\nThe testing process is consistent with the training phase, where each test sample is equipped with a\nnormal-abnormal reference set. In our proposed normal-abnormal guided GAD task, considering the\nscarcity of abnormal samples, we set K1 ≥ K2 , making it highly applicable to real-world situations.\n3.2\n\nOverview of Proposed Method\n\nOur proposed Normal-Abnormal Generalist Learning (NAGL) framework is designed to detect\nanomalies in the target domain through original domain training. As shown in Fig. 2, given a query\ninput and normal-abnormal references, we extract these features by applying a pre-trained backbone\nnetwork for further processing. After feature extraction, we directly leverage the Nearest Neighbor\n(NN) search between the query and normal references, obtaining an initial anomaly score map.\nNext, to apply an abnormal reference to improve the initial anomaly map, we propose an RM-AFL\nmodule. This module consists of two attention parts: Residual Mining (RM) from normal-abnormal\nreferences and Anomaly Feature Learning (AFL) for query images with residual mapping. RM relies\non normal-abnormal residuals to learn the representation for abnormal reference patterns, generating\nseveral residual proxies. AFL applies these proxies to learn abnormal areas in the query image and\nobtain anomaly proxies. Finally, we compute the cosine similarity between the query feature and\nanomaly proxies for anomaly localization results.\n3.3\n\nFeature Extraction\n\nIn this section, we describe the feature extraction process for an episode. For each episode, we have a\nnormal-abnormal reference set R = {Rn , Ra } and a input query image xq ∈ RH×W ×3 . For input\nquery and references, we follow the common practice of using a pre-trained backbone network ϕ(·) to\nextract their features. Subsequently, we obtain query patch features F q = {fiq }L\ni=1 , normal reference\nn\nn K1 L\na\n2L\npatch features F = {fi }i=1 , and abnormal reference patch features F = {fia }K\ni=1 , where\n4\n\n\ffiq , fin , fia ∈ RC , L = h ∗ w is the number of patches in one feature map, h and w are length and\nwidth of feature map, and C is the channel dimension of each patch feature. For abnormal reference\nfeatures, we downsample the anomaly mask to match the length of F a , yielding Ma ∈ RK2 L .\n3.4\n\nNormal-Guided Anomaly Score\n\nIn this section, we apply query and normal reference features to obtain an initial anomaly localization\nresult. Following the previous work [48], we directly apply the nearest neighbor search between\nquery features F q and normal reference features F n to generate an anomaly score map Sn ∈ RL .\nSpecifically, we apply the NN method to find the closest reference patch feature f∗n for each query\npatch feature fiq in normal reference patches F n ,\nf∗n := argmin (d(fiq , f n )) ,\n\n(1)\n\nf n ∈F n\n\nwhere d(·, ·) is the cosine distance function and i ∈ {1, 2, · · · , L}. Therefore, each patch anomaly\nscore is defined as\nSni = d(fiq , f∗n ),\n(2)\nwhere Sni = 0 indicates the most normal region and Sni = 1 indicates the most abnormal region.\n3.5\n\nAbnormal-Guided Anomaly Score\n\nIn this section, we focus on applying abnormal reference to improve the initial anomaly map. This\nsection mainly consists of Residual Mining (RM) from normal-abnormal reference and Anomaly\nFeature Learning (AFL) for query images by residual mapping. The whole RM-AFL mainly relies on\nresidual training to adaptively capture the similarities and differences between query and reference\nsamples, so it can be transferred between different domains.\n3.5.1\n\nResidual Mining from References\n\nThe RM module introduces a learnable query proxy to adaptively capture abnormal patterns in\nanomalous references and utilizes normal-abnormal residuals to learn anomalous variations through a\ncross-attention mechanism. Specifically, for given abnormal reference features F a , we employ the\nNN method to identify the closest normal reference patch feature for each fia in F a and compute the\nresidual between the two. For simplicity, we denote this process as\nRes(F a , F n ) = F a − F∗n ,\n\n(3)\n\nwhere F∗n ∈ RK2 L×C consists of f∗n corresponding to each fia . We then design an attention layer\n(ARM ) that utilizes normal-abnormal residuals to learn representations of abnormal variations,\nthereby generating residual proxies. We state Query, Key, and Value in the attention computation:\nQ1 = W1Q P, K1 = W1K F a , V1 = W1V Res(F a , F n ),\n\n(4)\n\nwhere P ∈ RM ×C is learnable proxies and randomly initialized, parameters W1Q , W1K , and W1V\ntransform input features into query, key, and value vectors, M is a hyperparameter representing the\nnumber of P. Therefore, the attention-based RM mechanism can be described as\n\u0012\n\u0012\n\u0013 \u0013\nT\n1 K1\ne = SA1 Softmax Q√\nP\n+ M ′ V1 ,\n(5)\nd\ne ∈ RM ×C is called residual proxies, SA1 (·) denotes self-attention operation, and d is a\nwhere P\n′\nscaling factor [52]. The attention mask M = α(1 − Ma ) contains either zero or negative infinity\nvalues, where α is a large negative value (e.g., −109 ). This mask ensures cross-attention focuses\ne learn abnormal reference patterns and apply\nexclusively on abnormal regions. Residual proxies P\nresiduals as Value to represent variations for anomalies.\n3.5.2\n\nAnomaly Feature Learning for Query Images\n\ne to learn potential abnormal\nIn this section, AFL focuses on applying obtained residual proxies P\nq\npatterns in F , obtaining anomaly proxies. The anomaly localization results are acquired by similarity\n5\n\n\fcomputation between query patch features and anomaly proxies. This process can also be described\nby another attention layer (AAF L ). The Query, Key, Value of the attention module is designed as:\ne K2 = W2K Res(F q , F n ), V2 = W2V F q ,\nQ2 = W2Q P,\n\n(6)\n\nwhere W2Q , W2K , W2V are learnable parameters. Our proposed AFL can be written as:\n\u0012\n\u0012\n\u0013 \u0013\nQ2 K T\n2\nb\n√\nP = SA2 Softmax\nV2 ,\nd\n\n(7)\n\nb ∈ RM ×C is called\nwhere SA2 (·) denotes another self-attention module different from SA1 (·), P\nq\nb\nanomaly proxies. P captures abnormal patterns in F by comparing reference residuals Res(F a , F n )\nb has the most distinguishable patch feature informawith the query-normal residuals Res(F q , F n ). P\nq\nbm and the\ntion in F . Therefore, we calculate the mean of similarity between each anomaly proxy P\nquery patch features F q as an anomaly-guided anomaly score map Sa . Each patch anomaly score is\nM\n\nSai =\n\n1 X\nbm ),\n1 − d(fiq , P\nM m=1\n\n(8)\n\nwhere Sa ∈ RL . Finally, we merge the initial normal-guided score map and abnormal-guided score\nmap to acquire final anomaly localization results:\nS = S n + Sa .\n\n(9)\n\nFollowing [12], we calculate the image-level anomaly score by averaging the top 1% highest values\nin the score map S ∈ RL . Specifically, we denote this operation as s = T0.01 (S), where T0.01 (S)\nrepresents the average of the 1% highest scores in S.\n3.6\n\nTraining on Original Domain\n\nThe whole NAGL framework is trained on original domain data. Our optimization objective is that\nthe predicted map S should be consistent with the query ground truth mask Mq . Therefore, we apply\nFocal loss [35] and Dice loss [32] to achieve anomaly segmentation training, i.e.,\nLseg = Focal(S, Mq ) + Dice(S, Mq ),\n\n(10)\n\nwhere Mq denotes the downsampled and reshaped ground truth mask of the query image, Focal(·)\nand Dice(·) represent the Focal loss and Dice loss, respectively. Moreover, we also guarantee that\nthe image-level predicted label is consistent with the classification label of the query image. Binary\nCross-Entropy (BCE) loss is leveraged to optimize anomaly classification,\nLcls = BCE(s, y q ),\n\n(11)\n\nwhere s denotes predicted image-level anomaly score, y q is ground truth classification label, and\nBCE(·) denotes BCE loss function. Finally, a hyper-parameter λ is used to balance the classification\nand segmentation losses,\nL = Lcls + λLseg .\n(12)\n3.7\n\nInference on Target Domain\n\nDuring inference, for given target domain data Dtarget , similar to the training phase, we first use\nthe NN method to obtain a normal-guided score map Sn . Next, we apply RM and AFL modules to\ngenerate an abnormal-guided score map Sa . According to Eq. (9), we merge the two score maps as\nthe final score map S ∈ RL . Next, the size of S is reshaped to Rh×w , and up-sampled to RH×W .\n\n4\n\nExperiment\n\n4.1\n\nExperimental Setup\n\nDatasets. To validate the efficiency of our NAGL framework, we construct three benchmarks using\nthe MVTecAD [2], VisA [69], and BraTS [45] datasets. The benchmarks include (1) training on\n6\n\n\fTable 1: Comparison of the proposed method with the previous methods on MVTecAD and VisA\ndatasets. N i and Ai represent the number of normal and abnormal reference samples in i-shot\nlearning, respectively. Results marked with † are quoted from [23], while those marked with ∗ are\nbased on our re-implementation. The best/runner-up results are highlighted in bold/underline.\nMVTecAD\nVisA\nImage-level\nPixel-level\nImage-level\nPixel-level\nAUROC AP F1-max AUROC PRO F1-max AUROC AP F1-max AUROC PRO F1-max\n\nSetting\n\nMethod\n\nN1\n\nSPADE† [10]\nPaDiM† [13]\nPatchCore† [48]\nWinCLIP† [23]\nPromptAD [31]\nResAD∗ [60]\n\n81.0\n76.6\n83.4\n93.1\n94.6\n84.8\n\n90.6\n88.1\n92.2\n96.5\n97.1\n92.7\n\n90.3\n88.2\n90.5\n93.7\n91.2\n\n91.2\n89.3\n92.0\n95.2\n95.9\n93.4\n\n83.9\n73.3\n79.7\n87.1\n87.9\n83.3\n\n42.4\n40.2\n50.4\n55.9\n48.2\n\n79.5\n88.2\n79.9\n83.8\n86.9\n80.9\n\n82.0\n62.8\n82.8\n85.1\n88.4\n83.7\n\n80.7\n75.3\n81.7\n83.1\n81.3\n\n95.6\n89.9\n95.4\n96.4\n96.7\n95.9\n\n84.1\n64.3\n80.5\n85.1\n85.1\n79.6\n\n35.5\n17.4\n38.0\n41.3\n37.8\n\nN 1 + A1\n\nOurs\n\n95.8\n\n97.5\n\n95.7\n\n96.6\n\n92.9\n\n58.9\n\n88.5\n\n89.4\n\n85.4\n\n97.5\n\n91.1\n\n41.8\n\n†\n\nN2\n\nSPADE [10]\nPaDiM† [13]\nPatchCore† [48]\nWinCLIP† [23]\nPromptAD [31]\nInCTRL [68]\nResAD∗ [60]\n\n82.9\n78.9\n86.3\n94.4\n95.7\n94.0\n87.2\n\n91.7\n89.3\n93.8\n97.0\n97.9\n96.9\n93.9\n\n91.1\n89.2\n92.0\n94.4\n92.2\n\n92.0\n91.3\n93.3\n96.0\n96.2\n94.8\n\n85.7\n78.2\n82.3\n88.4\n88.5\n85.5\n\n44.5\n43.7\n53.0\n58.4\n50.2\n\n80.7\n67.4\n81.6\n84.6\n88.3\n85.8\n86.6\n\n82.3\n71.6\n84.8\n85.8\n90.0\n87.7\n88.3\n\n81.7\n75.7\n82.5\n83.0\n84.1\n\n96.2\n92.0\n96.1\n96.8\n97.1\n96.5\n\n85.7\n70.1\n82.6\n86.2\n85.8\n82.3\n\n40.5\n21.1\n41.0\n43.5\n40.0\n\nN 2 + A1\n\nOurs\n\n96.8\n\n97.9\n\n96.3\n\n96.8\n\n93.2\n\n59.8\n\n89.8\n\n90.6\n\n86.8\n\n97.6\n\n91.4\n\n43.3\n\n†\n\nN4\n\nSPADE [10]\nPaDiM† [13]\nPatchCore† [48]\nWinCLIP† [23]\nPromptAD [31]\nInCTRL [68]\nResAD∗ [60]\n\n84.8\n80.4\n88.8\n95.2\n96.6\n94.5\n90.7\n\n92.5\n90.5\n94.5\n97.3\n98.5\n97.2\n95.7\n\n91.5\n90.2\n92.6\n94.7\n93.9\n\n92.7\n92.6\n94.3\n96.2\n96.5\n95.8\n\n87.0\n81.3\n84.3\n89.0\n90.5\n88.7\n\n46.2\n46.1\n55.0\n59.5\n53.0\n\n81.7\n72.8\n85.3\n87.3\n89.1\n87.7\n89.3\n\n83.4\n75.6\n87.5\n88.8\n90.8\n90.2\n90.7\n\n82.1\n78.0\n84.3\n84.2\n86.5\n\n96.6\n93.2\n96.8\n97.2\n97.4\n96.8\n\n87.3\n72.6\n84.9\n87.6\n86.2\n84.1\n\n43.6\n24.6\n43.9\n47.0\n41.6\n\nN 4 + A1\n\nOurs\n\n97.1\n\n98.0\n\n96.4\n\n97.0\n\n93.5\n\n60.1\n\n91.2\n\n91.7\n\n87.8\n\n97.8\n\n91.5\n\n44.0\n\nVisA and testing on MVTecAD, (2) training on MVTecAD and testing on VisA, and (3) training\non MVTecAD and testing on BraTS. The first two benchmarks assess generalization capabilities\nacross different industrial domains, while the third evaluates cross-domain transfer capabilities from\nindustrial to medical applications. During inference, the normal references are sampled from the\ntraining set of target datasets, while abnormal references are sampled from each anomaly type.\nFurther details are provided in Appendix A.\nEvaluation Metrics. We evaluate both image-level anomaly classification and pixel-level segmentation performance using three metrics for each task, following previous works [23, 12, 60]. For\ndetection performance, we employ the Area Under the Receiver-Operator Curve (AUROC, [13]), the\nmaximum F1-score at the optimal threshold (F1-max), and the Average Precision (AP), calculated\nusing image-level anomaly scores. Similarly, for segmentation performance, we utilize the AUROC,\nF1-max, and per-region overlap (PRO) [3, 2] metrics, computed using pixel-wise anomaly scores.\nImplementation Details. Our approach employs the ViT-based [47] model as the vision encoder,\nspecifically utilizing its most lightweight version (ViT-S, 21M parameters) to ensure low latency in\npractical applications. We freeze the parameters of the vision encoder throughout the experiments and\nonly update the parameters of the proposed attention modules. The model is optimized using AdamW\n[39] with an initial learning rate of 1 × 10−5 , which is reduced by a factor of 0.1 at epoch 10 and 15.\nThe training process converges within 20 epochs, with each epoch comprising 500 sampled episodes.\nInput images are resized to 448 × 448 resolution without data augmentation. We set the number of\nlearnable proxies (P) to M = 25 by default and use a loss balance weight (λ) of 1.0. Following\nprevious works [23, 31], we set the number of normal references as K1 ∈ [1, 2, 4]. Considering the\nscarcity of abnormal samples, we only use one abnormal reference (K2 = 1), making our approach\nhighly applicable in real-world scenarios. The implementation is based on PyTorch@2.1.1, and\nthe experiments are conducted on a single NVIDIA RTX 4090 24GB GPU. To ensure statistical\nreliability, we report results averaged across 3 independent runs with different random seeds.\n7\n\n\fTable 2: The image/pixel-level AUROC scores\nof the proposed method and previous methods\non the BraTS dataset. Results marked with\n∗ are based on our re-implementation. Other\nresults are reported from [60].\nSetting\n\nMethod\n\nImage\n\nPixel\n\n1\n\n∗\n\nResAD [60]\n\n73.5\n\n91.0\n\n82.3\n\nN 1 + A1\n\nOurs\n\n78.1\n\n96.5\n\n87.3\n\nN2\n\nSPADE [10]\nPaDiM [13]\nPatchCore [48]\nRegAD [21]\nWinCLIP [23]\nInCTRL [68]\nResAD∗ [60]\n\n58.0\n59.4\n58.2\n54.6\n55.9\n74.6\n66.2\n\n92.8\n90.2\n93.5\n81.4\n91.5\n91.5\n\n75.4\n74.8\n75.9\n68.0\n73.7\n78.9\n\nN 2 + A1\n\nOurs\n\n82.1\n\n96.8\n\n89.5\n\nN4\n\nSPADE [10]\nPaDiM [13]\nPatchCore [48]\nRegAD [21]\nWinCLIP [23]\nMVFA∗ [22]\nInCTRL [68]\nResAD∗ [60]\n\n66.3\n60.6\n71.2\n60.0\n67.3\n75.2\n76.9\n74.9\n\n94.8\n94.5\n95.9\n87.3\n93.2\n92.7\n94.3\n\n80.6\n77.6\n83.6\n73.7\n80.3\n84.0\n84.6\n\nOurs\n\n84.9\n\n97.1\n\n91.0\n\nN\n\nN 4 + A1\n\nMean\n\nTable 3: Ablation study on the MVTecAD and VisA\ndatasets. Image/pixel-level AUROC are reported.\nN 1 /A1 represents the one normal/abnormal reference sample, \"NAGL\" indicates the use of our proposed framework. There are four different settings.\ni/ii uses only normal/abnormal samples through NN\nsearch, iii merges the results of i and ii without additional processing, and iv includes our proposed\nprocess.\nN1\ni\nii\niii\niv\n\n✓\n✓\n✓\n\nA1\n✓\n✓\n✓\n\nNAGL\n\n✓\n\nMVTecAD\nImage Pixel\n\nVisA\nImage Pixel\n\nMean\n\n93.2\n70.1\n90.7\n95.8\n\n81.5\n58.8\n77.2\n88.5\n\n91.1\n74.2\n88.4\n94.6\n\n94.5\n83.3\n92.1\n96.6\n\n95.3\n84.5\n93.5\n97.5\n\nTable 4: Comparison of the total parameters, training\ntime, and inference speed of the proposed method\nwith InCTRL and ResAD. The training time of InCTRL and ResAD is measured under the N 1 setting,\nwhile our method is based on the N 1 + A1 setting.\nMethod\n\nTotal\nParameters (M)\n\nTraining\nTime (H)\n\nInference\nSpeed (FPS)\n\nInCTRL\nResAD\nOurs\n\n117.5\n59.2\n24.4\n\n0.7\n20.6\n0.3\n\n1.2\n7.8\n17.1\n\nComparison Methods. We select some representative few-normal-shot AD methods to comparison,\nincluding SPADE [10], PaDiM [13], PatchCore [48], RegAD [21], WinCLIP [23], MVFA [22], and\nPromptAD [31]. For generalist AD, we primarily compared our approach with InCTRL [68] and\nResAD [60]. Tab. 1 and Tab. 2 present the comparative results of our method against these baselines.\nThe results marked with † are reported by [23]. Due to incomplete ResAD results (only reporting\n2/4-shot settings with AUROC metrics, we reproduce the results using their official code (marked\nwith ∗). For further details, please refer to Appendix D.\n4.2\n\nMain Results\n\nTab. 1 and Tab. 2 present comparative results between our proposed method and existing approaches\nacross MVTecAD, VisA, and BraTS datasets. The experimental results demonstrate three key\nadvantages of our method. Additionally, to demonstrate the generalization capabilities, we also\npresent the performance on MVTec3D [4], MVTecLOCO [1], BTAD [46], and MPDD [24] datasets\nin Appendix G.\nBenefits of Single Abnormal Sample. Incorporating just one abnormal reference sample (A1 )\nyields substantial performance gains across all scenarios. On industrial datasets (Tab. 1), our\nN 1 + A1 setting achieves 95.8% and 96.6% for image and pixel AUROC, respectively on MVTecAD,\nsurpassing the best N 4 baseline method (WinCLIP: 95.2%, 96.2%) by 0.6 and 0.4 percentage points\nwhile using fewer reference samples. A similar trend is observed on VisA, where our N 2 + A1 setting\nachieves 89.8% and 97.6% for image and pixel AUROC, outperforming the best baseline method\n(ResAD with N 4 : 89.3%, 96.8%) by 0.5 and 0.8 percentage points, respectively. These results show\nsignificant benefits from abnormal reference data.\nGeneralization. Our method exhibits superior generalization capabilities compared to ResAD\nacross multiple datasets. On MVTecAD, under the N 1 + A1 setting, our approach achieves 95.7%\nimage F1-max and 58.9% pixel F1-max, outperforming ResAD by 4.5 and 10.7 percentage points,\nrespectively. Similarly, on VisA, we attain 85.4% image F1-max and 41.8% pixel F1-max, exceeding\nResAD by 4.1 and 4.0 percentage points. Furthermore, as shown in Tab. 2, our method demonstrates\nsuperior cross-domain generalization, achieving 89.5% average AUROC on the BraTS medical dataset\nwith just two normal and one abnormal sample, a 10.6 percentage point improvement over ResAD\n8\n\n\fIndustrial Domain 1\n\nIndustrial Domain 2\n\nMedical Domain\n\nImage\n\nGT\n\nN1\nN 1 + A1\n\nFigure 3: Qualitative results. The first row displays the input images, and the second row shows the\nground truth. The third row illustrates anomaly score maps using 1 normal sample, while the bottom\nrow shows anomaly score maps produced by our method using 1 normal and 1 abnormal samples.\n(78.9% with N 2 setting). Notably, across all other experimental settings, our method consistently\noutperforms existing approaches in both anomaly detection and segmentation. These results clearly\ndemonstrate the effectiveness of our method in generalist AD.\nScalability. Through comparative analysis, our method demonstrates excellent scalability as the\nnumber of normal samples increases across all three datasets. For example, on VisA, we observe\nconsistent performance improvements when progressing from N 1 + A1 to N 2 + A1 and N 4 + A1\nsettings. Specifically, the image F1-max score increases from 85.4% to 86.8% and 87.8%, while\nthe pixel F1-max score improves from 41.8% to 43.3% and reaches 44.0%. On BraTS, the average\nAUROC improves from 87.3% to 89.5% and reaches 91.0%. These results indicate that our method\neffectively utilizes additional normal samples to enhance the detection ability.\n4.3\n\nAblation Study\n\nTo further investigate the effectiveness of our method, we conduct an ablation study on the MVTecAD\nand VisA datasets. Tab. 3 presents the results from different experimental settings. The results clearly\ndemonstrate several important findings.\nFirst, comparing the results of i, ii, and iii, we observe that naively incorporating abnormal references\nleads to significant performance degradation both at the image and pixel levels. This aligns with\nour argument in Sec. 1 that the abnormal features cause severe false activation, where the unrefined\nabnormal features introduce misleading guidance that incorrectly highlights normal patterns as\nanomalies, thereby compromising detection accuracy.\nSecond, when comparing settings iii and iv, the benefits of our proposed method become evident. By\nimplementing the NAGL framework in setting iv, our method manages to effectively mitigate the\nfalse activation problem observed when naively using an abnormal reference. Properly mining the\nabnormal variations in residual space to guide detection can effectively suppress the over-activation,\nresulting in 6.2 average AUROC improvements from 88.4% to 94.6%.\nFinally, the comparison between i and iv reveals that our method fully unleashes the potential of\nabnormal references, with gains of +2.6 Image AUROC on MVTecAD and +7.0 on VisA, proving\nthat properly processed abnormal samples provide complementary discriminative signals.\n4.4\n\nAnalysis of two attentions in RM-AFL module\n\nIn the first attention (RM), we set the value as Res(F a , F n ), which provides the normal-abnormal\ndifferences in the residual space. We define the key as F a , which are the original abnormal patterns.\nSince the query is learnable, the output is the optimally aggregated residual features (termed as\nresidual proxies P̃).\nThe second attention (AFL) aims to learn query-related abnormal patterns by comparing normalabnormal differences and normal-query differences. We set the query as P̃ and the key as\nRes(F q , F n ). This comparison is achieved by computing the attention map between P̃ and\n9\n\n\fRes(F q , F n ). Then the query features F q are aggregated by the attention map to obtain the queryrelated abnormal patterns (termed as anomaly proxies P̂).\nThe residual proxies P̃ represent abnormal patterns of reference abnormal samples in residual space,\nand anomaly proxies P̂ represent abnormal patterns of the query sample in vision space. As validated\nin Appendix B, residual features exhibit a common distribution, even among residual features of\ndifferent anomalies. Residual features of known anomalies can provide references; if the residual\nfeature of a query is similar to them, the corresponding visual feature is likely to be an anomaly.\n4.5\n\nEfficiency Analysis\n\nWe compare the efficiency of our method with InCTRL and ResAD in terms of total parameters,\ntraining time, and inference speed. Tab. 4 shows that our method is more efficient than InCTRL and\nResAD regarding total parameters and training time. Our method has 24.4 million parameters, which\nis around 5× smaller than InCTRL. Our method only requires 0.3 hours for training, which is 69×\nfaster than ResAD. In terms of inference speed, our method achieves 17.1 FPS, which is 14× faster\nthan InCTRL and 2× faster than ResAD. These results demonstrate the efficiency of our method for\nreal-world deployment.\n4.6\n\nQualitative Results\n\nFig. 3 presents qualitative results from both industrial and medical datasets. Comparing the score\nmaps, we observe that our method effectively generates more accurate results, which demonstrate that\nincorporating abnormal reference samples provides valuable guidance boundaries for the detection\nprocess, and our method effectively leverages this information to improve detection accuracy.\n\n5\n\nConclusion\n\nIn this paper, we introduce a novel task for anomaly detection using both normal and abnormal references. Our approach addresses the limitations of traditional methods by leveraging limited known\nanomalies to guide the detection of unseen anomalies. We propose a NAGL framework that extracts\ndiscriminative features in the residual space, effectively capturing the essence of anomalies. Experimental results across multiple benchmarks demonstrate that our method significantly outperforms\nexisting approaches, particularly in detecting challenging unseen anomalies. The performance gains\nare consistent across various datasets and settings, highlighting the robustness of our approach. This\nwork opens new research directions for anomaly detection with limited supervision, with potential\napplications in industrial inspection and medical diagnosis. Future research could delve into more\neffective methods for leveraging scarce anomaly samples or expanding prompts. For instance, it\ncould involve enabling language-based descriptions for normal or abnormal references.\n\n6\n\nAcknowledgements\n\nThis work is supported by the National Natural Science Foundation of China (No. 62471405,\n62331003, 62301451), Jiangsu Basic Research Program Natural Science Foundation (BK20241814),\nSuzhou Basic Research Program (SYG202316) and XJTLU REF-22-01-010, XJTLU AI University\nResearch Center, Jiangsu Province Engineering Research Center of Data Science and Cognitive\nComputation at XJTLU and SIP AI innovation platform (YZCXPT2022103).\n\nReferences\n[1] Paul Bergmann, Kilian Batzner, Michael Fauser, David Sattlegger, and Carsten Steger. Beyond dents and\nscratches: Logical constraints in unsupervised anomaly detection and localization. International Journal\nof Computer Vision, 130(4):947–969, 2022.\n[2] Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. MVTec AD – a comprehensive\nreal-world dataset for unsupervised anomaly detection. In CVPR, 2019.\n[3] Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Uninformed students: Studentteacher anomaly detection with discriminative latent embeddings. In CVPR, 2020.\n\n10\n\n\f[4] Paul Bergmann, Xin Jin, David Sattlegger, and Carsten Steger. The mvtec 3d-ad dataset for unsupervised\n3d anomaly detection and localization. arXiv preprint arXiv:2112.09045, 2021.\n[5] Tri Cao, Jiawen Zhu, and Guansong Pang. Anomaly detection under distribution shift. In ICCV, 2023.\n[6] Yunkang Cao, Xiaohao Xu, Yuqi Cheng, Chen Sun, Zongwei Du, Liang Gao, and Weiming Shen. Personalizing vision-language models with hybrid prompts for zero-shot anomaly detection. IEEE Transactions\non Cybernetics, 55(4):1917–1929, 2025.\n[7] Yunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng, Weiming Shen, and Giacomo Boracchi.\nAdaCLIP: Adapting CLIP with hybrid learnable prompts for zero-shot anomaly detection. In ECCV, 2024.\n[8] Yuanhong Chen, Yu Tian, Guansong Pang, and Gustavo Carneiro. Deep one-class classification via\ninterpolated gaussian descriptor. In AAAI, 2022.\n[9] Zining Chen, Xingshuang Luo, Weiqiu Wang, Zhicheng Zhao, Fei Su, and Aidong Men. Filter or\ncompensate: Towards invariant representation from distribution shift for anomaly detection. In AAAI, 2025.\n[10] Niv Cohen and Yedid Hoshen. Sub-image anomaly detection with deep pyramid correspondences. ArXiv,\nabs/2005.02357, 2020.\n[11] Alex Costanzino, Pierluigi Zama Ramirez, Giuseppe Lisanti, and Luigi Di Stefano. Multimodal industrial\nanomaly detection by crossmodal feature mapping. In CVPR, 2024.\n[12] Simon Damm, Mike Laszkiewicz, Johannes Lederer, and Asja Fischer. AnomalyDINO: Boosting patchbased few-shot anomaly detection with dinov2. arXiv, 2024.\n[13] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and Romaric Audigier. PaDiM: A patch distribution\nmodeling framework for anomaly detection and localization. In ICPR, 2021.\n[14] Choubo Ding, Guansong Pang, and Chunhua Shen. Catching both gray and black swans: Open-set\nsupervised anomaly detection. In CVPR, 2022.\n[15] Zheng Fang, Xiaoyang Wang, Haocheng Li, Jiejie Liu, Qiugui Hu, and Jimin Xiao. FastRecon: Few-shot\nindustrial anomaly detection via fast feature reconstruction. In ICCV, 2023.\n[16] Zhihao Gu, Jiangning Zhang, Liang Liu, Xu Chen, Jinlong Peng, Zhenye Gan, Guannan Jiang, Annan Shu,\nYabiao Wang, and Lizhuang Ma. Rethinking reverse distillation for multi-modal anomaly detection. In\nAAAI, 2024.\n[17] Jia Guo, Shuai Lu, Lize Jia, Weihang Zhang, and Huiqi Li. Recontrast: Domain-specific anomaly detection\nvia contrastive reconstruction. In NeurIPS, volume 36, pages 10721–10740, 2023.\n[18] Jia Guo, Shuai Lu, Weihang Zhang, Fang Chen, Huiqi Li, and Hongen Liao. Dinomaly: The less is more\nphilosophy in multi-class unsupervised anomaly detection. In CVPR, pages 20405–20415, 2025.\n[19] Haoyang He, Jiangning Zhang, Hongxu Chen, Xuhai Chen, Zhishan Li, Xu Chen, Yabiao Wang, Chengjie\nWang, and Lei Xie. A diffusion-based framework for multi-class anomaly detection. In AAAI, 2024.\n[20] Kelei He, Chen Gan, Zhuoyuan Li, Islem Rekik, Zihao Yin, Wen Ji, Yang Gao, Qian Wang, Junfeng Zhang,\nand Dinggang Shen. Transformers in medical image analysis. Intelligent Medicine, 3(1):59–78, 2023.\n[21] Chaoqin Huang, Haoyan Guan, Aofan Jiang, Ya Zhang, Michael Spratling, and Yan-Feng Wang. Registration based few-shot anomaly detection. In ECCV, pages 303–319, 2022.\n[22] Chaoqin Huang, Aofan Jiang, Jinghao Feng, Ya Zhang, Xinchao Wang, and Yanfeng Wang. Adapting\nvisual-language models for generalizable anomaly detection in medical images. In CVPR, pages 11375–\n11385, 2024.\n[23] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang, Avinash Ravichandran, and Onkar Dabeer.\nWinCLIP: Zero-/few-shot anomaly classification and segmentation. In CVPR, 2023.\n[24] Stepan Jezek, Martin Jonak, Radim Burget, Pavel Dvorak, and Milos Skotak. Deep learning-based defect\ndetection of metal parts: Evaluating current methods in complex conditions. In ICUMT, 2021.\n[25] Xi Jiang, Jian Li, Hanqiu Deng, Yong Liu, Bin-Bin Gao, Yifeng Zhou, Jialin Li, Chengjie Wang, and Feng\nZheng. MMAD: A comprehensive benchmark for multimodal large language models in industrial anomaly\ndetection. In ICLR, 2025.\n\n11\n\n\f[26] Xi Jiang, Jianlin Liu, Jinbao Wang, Qiang Nie, Kai Wu, Yong Liu, Chengjie Wang, and Feng Zheng.\nSoftPatch: Unsupervised anomaly detection with noisy data. In NeurIPS, 2022.\n[27] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional\nneural networks. In NeurIPS, volume 25, 2012.\n[28] Mingyu Lee and Jongwon Choi. Text-guided variational image generation for industrial anomaly detection\nand segmentation. In CVPR, 2024.\n[29] Jiarui Lei, Xiaobo Hu, Yue Wang, and Dong Liu. PyramidFlow: High-resolution defect contrastive\nlocalization using pyramid normalizing flow. In CVPR, 2023.\n[30] Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas Pfister. CutPaste: Self-supervised learning for\nanomaly detection and localization. In CVPR, 2021.\n[31] Xiaofan Li, Zhizhong Zhang, Xin Tan, Chengwei Chen, Yanyun Qu, Yuan Xie, and Lizhuang Ma.\nPromptAD: Learning prompts with only normal samples for few-shot anomaly detection. In CVPR, 2024.\n[32] Xiaoya Li, Xiaofei Sun, Yuxian Meng, Junjun Liang, Fei Wu, and Jiwei Li. Dice loss for data-imbalanced\nnlp tasks. In ACL, 2020.\n[33] Yiyue Li, Shaoting Zhang, Kang Li, and Qicheng Lao. One-to-Normal: Anomaly personalization for\nfew-shot anomaly detection. In NeurIPS, 2024.\n[34] Jiang Lin and Yaping Yan. A comprehensive augmentation framework for anomaly detection. In AAAI,\n2024.\n[35] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object\ndetection. In ICCV, 2017.\n[36] Jiaqi Liu, Guoyang Xie, Ruitao Chen, Xinpeng Li, Jinbao Wang, Yong Liu, Chengjie Wang, and Feng\nZheng. Real3D-AD: A dataset of point cloud anomaly detection. In NeurIPS, 2024.\n[37] Wenrui Liu, Hong Chang, Bingpeng Ma, Shiguang Shan, and Xilin Chen. Diversity-measurable anomaly\ndetection. In CVPR, 2023.\n[38] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431–3440, 2015.\n[39] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019.\n[40] Ruiying Lu, YuJie Wu, Long Tian, Dongsheng Wang, Bo Chen, Xiyang Liu, and Ruimin Hu. Hierarchical\nvector quantized transformer for multi-class unsupervised anomaly detection. In NeurIPS, 2023.\n[41] Wei Luo, Yunkang Cao, Haiming Yao, Xiaotian Zhang, Jianan Lou, Yuqi Cheng, Weiming Shen, and\nWenyong Yu. Exploring intrinsic normal prototypes within a single image for universal anomaly detection.\nIn CVPR, pages 9974–9983, June 2025.\n[42] Wenxi Lv, Qinliang Su, and Wenchao Xu. One-for-all few-shot anomaly detection via instance-induced\nprompt learning. In ICLR, 2025.\n[43] Shuai Lyu, Fangjian Liao, Zeqi Ma, Rongchen Zhang, Dongmei Mo, and Waikeung Wong. MVREC: A\ngeneral few-shot defect classification model using multi-view region-context. In AAAI, 2025.\n[44] Declan McIntosh and Alexandra Branzan Albu. Inter-realization channels: Unsupervised anomaly detection\nbeyond one-class classification. In CVPR, 2023.\n[45] Bjoern H Menze, Andras Jakab, Stefan Bauer, Jayashree Kalpathy-Cramer, Keyvan Farahani, Justin Kirby,\nYuliya Burren, Nicole Porz, Johannes Slotboom, Roland Wiest, et al. The multimodal brain tumor image\nsegmentation benchmark (brats). IEEE transactions on medical imaging, 34(10):1993–2024, 2014.\n[46] Pankaj Mishra, Riccardo Verk, Daniele Fornasier, Claudio Piciarelli, and Gian Luca Foresti. VT-ADL: A\nvision transformer network for image anomaly detection and localization. In ISIE, pages 01–06, 2021.\n[47] Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov,\nPierre Fernandez, Daniel HAZIZA, Francisco Massa, Alaaeldin El-Nouby, Mido Assran, Nicolas Ballas,\nWojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu\nSharma, Gabriel Synnaeve, Hu Xu, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr\nBojanowski. DINOv2: Learning robust visual features without supervision. Transactions on Machine\nLearning Research, 2024.\n\n12\n\n\f[48] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, and Peter Gehler.\nTowards total recall in industrial anomaly detection. In CVPR, 2022.\n[49] Luc PJ Sträter, Mohammadreza Salehi, Efstratios Gavves, Cees GM Snoek, and Yuki M Asano. Generalad:\nAnomaly detection across domains by attending to distorted features. In ECCV, 2024.\n[50] Fenfang Tao, Guo-Sen Xie, Fang Zhao, and Xiangbo Shu. Kernel-aware graph prompt learning for few-shot\nanomaly detection. In AAAI, 2025.\n[51] Tran Dinh Tien, Anh Tuan Nguyen, Nguyen Hoang Tran, Ta Duc Huy, Soan Duong, Chanh D Tr Nguyen,\nand Steven QH Truong. Revisiting reverse distillation for anomaly detection. In CVPR, 2023.\n[52] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz\nKaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.\n[53] Xiaolei Wang, Xiaoyang Wang, Huihui Bai, Eng Gee Lim, and Jimin Xiao. CNC: Cross-modal normality\nconstraint for unsupervised multi-class anomaly detection. In AAAI, 2025.\n[54] Xiaolei Wang, Xiaoyang Wang, Huihui Bai, Eng Gee Lim, and Jimin Xiao. Cnc: Cross-modal normality\nconstraint for unsupervised multi-class anomaly detection. In AAAI, volume 39, pages 7943–7951, 2025.\n[55] Xiaolei Wang, Xiaoyang Wang, Huihui Bai, Eng Gee Lim, and Jimin Xiao. Decad: Decoupling anomalies\nin latent space for multi-class unsupervised anomaly detection. In ICCV, 2025.\n[56] Xiaolei Wang, Xiaoyang Wang, Huihui Bai, Eng Gee Lim, and Jimin Xiao. Icc: Intra-cluster contraction\nfor pedestrian anomaly detection under one-class classification setting. IEEE Transactions on Artificial\nIntelligence, 2025.\n[57] Xiaoyang Wang, Huihui Bai, Limin Yu, Yao Zhao, and Jimin Xiao. Towards the uncharted: Densitydescending feature perturbation for semi-supervised semantic segmentation. In CVPR, pages 3303–3312,\n2024.\n[58] Guoyang Xie, Jinbao Wang, Jiaqi Liu, Yaochu Jin, and Feng Zheng. Pushing the limits of fewshot anomaly\ndetection in industry vision: Graphcore. In ICLR, 2023.\n[59] Hui-Yue Yang, Hui Chen, Ao Wang, Kai Chen, Zijia Lin, Yongliang Tang, Pengcheng Gao, Yuming Quan,\nJungong Han, and Guiguang Ding. Promptable anomaly segmentation with sam through self-perception\ntuning. In AAAI, 2025.\n[60] Xincheng Yao, Zixin Chen, Chao Gao, Guangtao Zhai, and Chongyang Zhang. ResAD: A simple\nframework for class generalizable anomaly detection. In NeurIPS, 2024.\n[61] Xincheng Yao, Ruoqi Li, Jing Zhang, Jun Sun, and Chongyang Zhang. Explicit boundary guided semipush-pull contrastive learning for supervised anomaly detection. In CVPR, 2023.\n[62] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. DRAEM-a discriminatively trained reconstruction\nembedding for surface anomaly detection. In ICCV, 2021.\n[63] Hui Zhang, Zuxuan Wu, Zheng Wang, Zhineng Chen, and Yu-Gang Jiang. Prototypical residual networks\nfor anomaly detection and localization. In CVPR, 2023.\n[64] Ximiao Zhang, Min Xu, and Xiuzhuang Zhou. RealNet: A feature selection network with realistic synthetic\nanomaly for anomaly detection. In CVPR, 2024.\n[65] Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, and Jiming Chen. AnomalyCLIP: Object-agnostic\nprompt learning for zero-shot anomaly detection. In ICLR, 2024.\n[66] Qihang Zhou, Jiangtao Yan, Shibo He, Wenchao Meng, and Jiming Chen. PointAD: Comprehending 3d\nanomalies from points and pixels for zero-shot 3d anomaly detection. In NeurIPS, 2024.\n[67] Jiawen Zhu, Choubo Ding, Yu Tian, and Guansong Pang. Anomaly heterogeneity learning for open-set\nsupervised anomaly detection. In CVPR, 2024.\n[68] Jiawen Zhu and Guansong Pang. Toward generalist anomaly detection via in-context residual learning\nwith few-shot sample prompts. In CVPR, 2024.\n[69] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and Onkar Dabeer. Spot-the-difference\nself-supervised pre-training for anomaly detection and segmentation. In ECCV, 2022.\n\n13\n\n\fNeurIPS Paper Checklist\n1. Claims\nQuestion: Do the main claims made in the abstract and introduction accurately reflect the\npaper’s contributions and scope?\nAnswer: [Yes]\nJustification: Our contributions are summarized in the Abstract and Introduction sections.\nGuidelines:\n• The answer NA means that the abstract and introduction do not include the claims\nmade in the paper.\n• The abstract and/or introduction should clearly state the claims made, including the\ncontributions made in the paper and important assumptions and limitations. A No or\nNA answer to this question will not be perceived well by the reviewers.\n• The claims made should match theoretical and experimental results, and reflect how\nmuch the results can be expected to generalize to other settings.\n• It is fine to include aspirational goals as motivation as long as it is clear that these goals\nare not attained by the paper.\n2. Limitations\nQuestion: Does the paper discuss the limitations of the work performed by the authors?\nAnswer: [Yes]\nJustification: Please see Appendix E.\nGuidelines:\n• The answer NA means that the paper has no limitation while the answer No means that\nthe paper has limitations, but those are not discussed in the paper.\n• The authors are encouraged to create a separate \"Limitations\" section in their paper.\n• The paper should point out any strong assumptions and how robust the results are to\nviolations of these assumptions (e.g., independence assumptions, noiseless settings,\nmodel well-specification, asymptotic approximations only holding locally). The authors\nshould reflect on how these assumptions might be violated in practice and what the\nimplications would be.\n• The authors should reflect on the scope of the claims made, e.g., if the approach was\nonly tested on a few datasets or with a few runs. In general, empirical results often\ndepend on implicit assumptions, which should be articulated.\n• The authors should reflect on the factors that influence the performance of the approach.\nFor example, a facial recognition algorithm may perform poorly when image resolution\nis low or images are taken in low lighting. Or a speech-to-text system might not be\nused reliably to provide closed captions for online lectures because it fails to handle\ntechnical jargon.\n• The authors should discuss the computational efficiency of the proposed algorithms\nand how they scale with dataset size.\n• If applicable, the authors should discuss possible limitations of their approach to\naddress problems of privacy and fairness.\n• While the authors might fear that complete honesty about limitations might be used by\nreviewers as grounds for rejection, a worse outcome might be that reviewers discover\nlimitations that aren’t acknowledged in the paper. The authors should use their best\njudgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers\nwill be specifically instructed to not penalize honesty concerning limitations.\n3. Theory assumptions and proofs\nQuestion: For each theoretical result, does the paper provide the full set of assumptions and\na complete (and correct) proof?\nAnswer: [NA]\n14\n\n\fJustification: This paper does not include theoretical results.\nGuidelines:\n• The answer NA means that the paper does not include theoretical results.\n• All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.\n• All assumptions should be clearly stated or referenced in the statement of any theorems.\n• The proofs can either appear in the main paper or the supplemental material, but if\nthey appear in the supplemental material, the authors are encouraged to provide a short\nproof sketch to provide intuition.\n• Inversely, any informal proof provided in the core of the paper should be complemented\nby formal proofs provided in appendix or supplemental material.\n• Theorems and Lemmas that the proof relies upon should be properly referenced.\n4. Experimental result reproducibility\nQuestion: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions\nof the paper (regardless of whether the code and data are provided or not)?\nAnswer: [Yes]\nJustification: Please see the Implementation Details in Sec. 4.1.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• If the paper includes experiments, a No answer to this question will not be perceived\nwell by the reviewers: Making the paper reproducible is important, regardless of\nwhether the code and data are provided or not.\n• If the contribution is a dataset and/or model, the authors should describe the steps taken\nto make their results reproducible or verifiable.\n• Depending on the contribution, reproducibility can be accomplished in various ways.\nFor example, if the contribution is a novel architecture, describing the architecture fully\nmight suffice, or if the contribution is a specific model and empirical evaluation, it may\nbe necessary to either make it possible for others to replicate the model with the same\ndataset, or provide access to the model. In general. releasing code and data is often\none good way to accomplish this, but reproducibility can also be provided via detailed\ninstructions for how to replicate the results, access to a hosted model (e.g., in the case\nof a large language model), releasing of a model checkpoint, or other means that are\nappropriate to the research performed.\n• While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the\nnature of the contribution. For example\n(a) If the contribution is primarily a new algorithm, the paper should make it clear how\nto reproduce that algorithm.\n(b) If the contribution is primarily a new model architecture, the paper should describe\nthe architecture clearly and fully.\n(c) If the contribution is a new model (e.g., a large language model), then there should\neither be a way to access this model for reproducing the results or a way to reproduce\nthe model (e.g., with an open-source dataset or instructions for how to construct\nthe dataset).\n(d) We recognize that reproducibility may be tricky in some cases, in which case\nauthors are welcome to describe the particular way they provide for reproducibility.\nIn the case of closed-source models, it may be that access to the model is limited in\nsome way (e.g., to registered users), but it should be possible for other researchers\nto have some path to reproducing or verifying the results.\n5. Open access to data and code\nQuestion: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental\nmaterial?\n15\n\n\fAnswer: [Yes]\nJustification: As mentioned in the Abstract, our code and data will be made publicly\navailable.\nGuidelines:\n• The answer NA means that paper does not include experiments requiring code.\n• Please see the NeurIPS code and data submission guidelines (https://nips.cc/\npublic/guides/CodeSubmissionPolicy) for more details.\n• While we encourage the release of code and data, we understand that this might not be\npossible, so “No” is an acceptable answer. Papers cannot be rejected simply for not\nincluding code, unless this is central to the contribution (e.g., for a new open-source\nbenchmark).\n• The instructions should contain the exact command and environment needed to run to\nreproduce the results. See the NeurIPS code and data submission guidelines (https:\n//nips.cc/public/guides/CodeSubmissionPolicy) for more details.\n• The authors should provide instructions on data access and preparation, including how\nto access the raw data, preprocessed data, intermediate data, and generated data, etc.\n• The authors should provide scripts to reproduce all experimental results for the new\nproposed method and baselines. If only a subset of experiments are reproducible, they\nshould state which ones are omitted from the script and why.\n• At submission time, to preserve anonymity, the authors should release anonymized\nversions (if applicable).\n• Providing as much information as possible in supplemental material (appended to the\npaper) is recommended, but including URLs to data and code is permitted.\n6. Experimental setting/details\nQuestion: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the\nresults?\nAnswer: [Yes]\nJustification: Please see Sec. 4.1 and Appendix F.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• The experimental setting should be presented in the core of the paper to a level of detail\nthat is necessary to appreciate the results and make sense of them.\n• The full details can be provided either with the code, in appendix, or as supplemental\nmaterial.\n7. Experiment statistical significance\nQuestion: Does the paper report error bars suitably and correctly defined or other appropriate\ninformation about the statistical significance of the experiments?\nAnswer: [Yes]\nJustification: As mentioned in Sec. 4.1, we report results averaged across 3 independent\nruns with different random seeds. The detailed results can be found in Appendix G.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• The authors should answer \"Yes\" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support\nthe main claims of the paper.\n• The factors of variability that the error bars are capturing should be clearly stated (for\nexample, train/test split, initialization, random drawing of some parameter, or overall\nrun with given experimental conditions).\n• The method for calculating the error bars should be explained (closed form formula,\ncall to a library function, bootstrap, etc.)\n• The assumptions made should be given (e.g., Normally distributed errors).\n16\n\n\f• It should be clear whether the error bar is the standard deviation or the standard error\nof the mean.\n• It is OK to report 1-sigma error bars, but one should state it. The authors should\npreferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis\nof Normality of errors is not verified.\n• For asymmetric distributions, the authors should be careful not to show in tables or\nfigures symmetric error bars that would yield results that are out of range (e.g. negative\nerror rates).\n• If error bars are reported in tables or plots, The authors should explain in the text how\nthey were calculated and reference the corresponding figures or tables in the text.\n8. Experiments compute resources\nQuestion: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce\nthe experiments?\nAnswer: [Yes]\nJustification: Please see the Implementation Details in Sec. 4.1 and Efficiency Analysis at\nSec. 4.5.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• The paper should indicate the type of compute workers CPU or GPU, internal cluster,\nor cloud provider, including relevant memory and storage.\n• The paper should provide the amount of compute required for each of the individual\nexperimental runs as well as estimate the total compute.\n• The paper should disclose whether the full research project required more compute\nthan the experiments reported in the paper (e.g., preliminary or failed experiments that\ndidn’t make it into the paper).\n9. Code of ethics\nQuestion: Does the research conducted in the paper conform, in every respect, with the\nNeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?\nAnswer: [Yes]\nJustification: We have read the NeurIPS Code of Ethics and confirm that our research\ncomplies with these ethical standards.\nGuidelines:\n• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.\n• If the authors answer No, they should explain the special circumstances that require a\ndeviation from the Code of Ethics.\n• The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).\n10. Broader impacts\nQuestion: Does the paper discuss both potential positive societal impacts and negative\nsocietal impacts of the work performed?\nAnswer: [Yes]\nJustification: Please see the Appendix E.\nGuidelines:\n• The answer NA means that there is no societal impact of the work performed.\n• If the authors answer NA or No, they should explain why their work has no societal\nimpact or why the paper does not address societal impact.\n• Examples of negative societal impacts include potential malicious or unintended uses\n(e.g., disinformation, generating fake profiles, surveillance), fairness considerations\n(e.g., deployment of technologies that could make decisions that unfairly impact specific\ngroups), privacy considerations, and security considerations.\n17\n\n\f• The conference expects that many papers will be foundational research and not tied\nto particular applications, let alone deployments. However, if there is a direct path to\nany negative applications, the authors should point it out. For example, it is legitimate\nto point out that an improvement in the quality of generative models could be used to\ngenerate deepfakes for disinformation. On the other hand, it is not needed to point out\nthat a generic algorithm for optimizing neural networks could enable people to train\nmodels that generate Deepfakes faster.\n• The authors should consider possible harms that could arise when the technology is\nbeing used as intended and functioning correctly, harms that could arise when the\ntechnology is being used as intended but gives incorrect results, and harms following\nfrom (intentional or unintentional) misuse of the technology.\n• If there are negative societal impacts, the authors could also discuss possible mitigation\nstrategies (e.g., gated release of models, providing defenses in addition to attacks,\nmechanisms for monitoring misuse, mechanisms to monitor how a system learns from\nfeedback over time, improving the efficiency and accessibility of ML).\n11. Safeguards\nQuestion: Does the paper describe safeguards that have been put in place for responsible\nrelease of data or models that have a high risk for misuse (e.g., pretrained language models,\nimage generators, or scraped datasets)?\nAnswer: [NA]\nJustification: We think that our paper poses no such risks.\nGuidelines:\n• The answer NA means that the paper poses no such risks.\n• Released models that have a high risk for misuse or dual-use should be released with\nnecessary safeguards to allow for controlled use of the model, for example by requiring\nthat users adhere to usage guidelines or restrictions to access the model or implementing\nsafety filters.\n• Datasets that have been scraped from the Internet could pose safety risks. The authors\nshould describe how they avoided releasing unsafe images.\n• We recognize that providing effective safeguards is challenging, and many papers do\nnot require this, but we encourage authors to take this into account and make a best\nfaith effort.\n12. Licenses for existing assets\nQuestion: Are the creators or original owners of assets (e.g., code, data, models), used in\nthe paper, properly credited and are the license and terms of use explicitly mentioned and\nproperly respected?\nAnswer: [Yes]\nJustification: The datasets utilized in this paper are all open-source, and we have cited the\ncorresponding papers accordingly.\nGuidelines:\n• The answer NA means that the paper does not use existing assets.\n• The authors should cite the original paper that produced the code package or dataset.\n• The authors should state which version of the asset is used and, if possible, include a\nURL.\n• The name of the license (e.g., CC-BY 4.0) should be included for each asset.\n• For scraped data from a particular source (e.g., website), the copyright and terms of\nservice of that source should be provided.\n• If assets are released, the license, copyright information, and terms of use in the\npackage should be provided. For popular datasets, paperswithcode.com/datasets\nhas curated licenses for some datasets. Their licensing guide can help determine the\nlicense of a dataset.\n• For existing datasets that are re-packaged, both the original license and the license of\nthe derived asset (if it has changed) should be provided.\n18\n\n\f• If this information is not available online, the authors are encouraged to reach out to\nthe asset’s creators.\n13. New assets\nQuestion: Are new assets introduced in the paper well documented and is the documentation\nprovided alongside the assets?\nAnswer: [NA]\nJustification: Our paper introduces a new anomaly detection framework without releasing\nnew assets.\nGuidelines:\n• The answer NA means that the paper does not release new assets.\n• Researchers should communicate the details of the dataset/code/model as part of their\nsubmissions via structured templates. This includes details about training, license,\nlimitations, etc.\n• The paper should discuss whether and how consent was obtained from people whose\nasset is used.\n• At submission time, remember to anonymize your assets (if applicable). You can either\ncreate an anonymized URL or include an anonymized zip file.\n14. Crowdsourcing and research with human subjects\nQuestion: For crowdsourcing experiments and research with human subjects, does the paper\ninclude the full text of instructions given to participants and screenshots, if applicable, as\nwell as details about compensation (if any)?\nAnswer: [NA]\nJustification: Our paper does not involve crowdsourcing nor research with human subjects.\nGuidelines:\n• The answer NA means that the paper does not involve crowdsourcing nor research with\nhuman subjects.\n• Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be\nincluded in the main paper.\n• According to the NeurIPS Code of Ethics, workers involved in data collection, curation,\nor other labor should be paid at least the minimum wage in the country of the data\ncollector.\n15. Institutional review board (IRB) approvals or equivalent for research with human\nsubjects\nQuestion: Does the paper describe potential risks incurred by study participants, whether\nsuch risks were disclosed to the subjects, and whether Institutional Review Board (IRB)\napprovals (or an equivalent approval/review based on the requirements of your country or\ninstitution) were obtained?\nAnswer: [NA]\nJustification: Our paper does not involve crowdsourcing nor research with human subjects.\nGuidelines:\n• The answer NA means that the paper does not involve crowdsourcing nor research with\nhuman subjects.\n• Depending on the country in which research is conducted, IRB approval (or equivalent)\nmay be required for any human subjects research. If you obtained IRB approval, you\nshould clearly state this in the paper.\n• We recognize that the procedures for this may vary significantly between institutions\nand locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the\nguidelines for their institution.\n• For initial submissions, do not include any information that would break anonymity (if\napplicable), such as the institution conducting the review.\n19\n\n\f16. Declaration of LLM usage\nQuestion: Does the paper describe the usage of LLMs if it is an important, original, or\nnon-standard component of the core methods in this research? Note that if the LLM is used\nonly for writing, editing, or formatting purposes and does not impact the core methodology,\nscientific rigorousness, or originality of the research, declaration is not required.\nAnswer: [NA]\nJustification: The LLM is used only for editing, and the core method development in our\npaper does not involve LLMs as any important.\nGuidelines:\n• The answer NA means that the core method development in this research does not\ninvolve LLMs as any important, original, or non-standard components.\n• Please refer to our LLM policy (https://neurips.cc/Conferences/2025/LLM)\nfor what should or should not be described.\n\n20\n\n\fA\n\nDataset Collection\n\nTo implement our normal-abnormal-guided generalist anomaly detection, we construct new benchmarks using three popular public datasets, including MVTecAD [2], VisA [69], and BraTS [45]. We\nconduct evaluations from two perspectives: (1) industrial-to-industrial evaluation across different\nindustrial scenarios (MVTecAD ↔ VisA), and (2) industrial-to-medical evaluation across industrial\nand medical domains (MVTecAD → BraTS). Specifically, when MVTecAD serves as the training\nset, we test on VisA and BraTS; when testing on MVTecAD, we use VisA as the training set.\nOriginal Dataset Structure. Each dataset\nis individually divided into its own training Table 5: Statistics of the datasets. |C| denotes the\nand test sets. For all datasets, their respec- number of classes, |T | denotes the number of defect\ntive training sets contain only good samples, types, N and A represent the normal and abnormal\nwhile each dataset has a unique structure for samples, respectively. K1 /K2 denotes the number of\nits corresponding test set. As shown in Tab. 5. normal/abnormal reference samples.\nMVTecAD contains 15 object classes with 73\nTest\nReference\ndifferent defect types, distinguishing between\nDataset\n|C| |T | N\nA\nN\nA\nvarious defect categories. VisA includes 12\nMVTecAD 15\n73 467 1258 15 × K1 73 × K2\nobject classes with various defect types, but\nVisA\n12\n962 1200 12 × K1 12 × K2\nBraTS\n1\n1\n154 1097 1 × K1\n1 × K2\nall anomalies within each object class are\ngrouped together without specific categorization. BraTS exclusively comprises brain MRI scans, with abnormal samples including tumour\nsegmentation.\nOur Input Data. During both training and testing, we implement a random sampling strategy to\nconstruct our input data. Specifically, our input data consists of a query input and a reference set that\nincludes both normal and abnormal samples. We first randomly select a sample from the entire test set\nas the query input. Then, based on the query input’s category, we randomly select K1 normal samples\nfrom the training set as normal references. Additionally, according to the query input’s defect-type,\nwe randomly select K2 abnormal samples as abnormal references. During training, each episode\ninput are randomly combined samples. Unlike the training process, during testing, we randomly\nselected reference set only once for each anomaly type and then use this set to test all samples of this\nanomaly type. The detailed statistics of our reference set are shown in Tab. 5.\nDefect type between Query and Reference.\nAs shown in Fig. 4, there are some input cases:\nQuery\nAbnormal Reference Normal Reference\n(a) the input query and abnormal reference\nsamples belong to the same defect type; (b) (a)\nsame\nthe input query and abnormal reference samdefect type\nples exhibit different defect types; (c) when\nthe input query is normal, the abnormal reference randomly selects one defect type. The (b)\ndifferent\nMVTecAD dataset categorizes different dedefect type\nfect types separately, thereby ensuring that\nthe input query (xq ) and abnormal reference\nsamples (Ra ) belong to the same defect cat- (c)\nrandom\ndefect type\negory (Fig. 4a). In contrast, the VisA dataset\ncombines all anomaly samples for each product type without distinguishing defect types,\nFigure 4: Some examples of our input data\nwhich results in cases where the input query\nand abnormal reference may exhibit different types of anomalies (Fig. 4b). Additionally, when the\ninput query is normal, the abnormal reference randomly selects one defect type (Fig. 4c).\n\nB\n\nResidual Features\n\nTo explore the guidance of abnormal residual features in anomaly detection, we visualize the feature\ndistribution in the original vision space and the residual feature space. As shown in Fig. 5, the\nfeatures from different defect types are significantly different in the original vision space, while\nthese features are more concentrated in their distribution in the residual feature space, suggesting\nit provides a unified cross-domain representation for anomalies. Moreover, as shown in Fig. 6, the\n21\n\n\fL2-norm of normal and abnormal features are overlapped in the original vision space, while they are\nseparated in the residual feature space, indicating that residual features offer a more discriminative\nattribute for distinguishing between normal and abnormal samples.\n(a) Original Vision Space\n\n(b) Residual Space\n\n(a) L2-Norm Distribution of Image Features\n\n(b) L2-Norm Distribution of Residual Features\n\nFigure 5: T-SNE visualization of features. Differ- Figure 6: (a) In the original visual feature space,\nent colours denote different defect types. (a) In the L2-norm distributions of normal and anomathe original vision space, the features from differ- lous features exhibit significant overlap. (b) In\nent defect types are significantly different. (b) In the residual feature space, the L2-norm distributhe residual feature space, these features are more tions of normal and anomalous features are more\noverlapped in their distribution.\nclearly separated.\n\nC\n\nMore Abnormal References\n\nConsidering the scarcity of anomalous samples Table 6: The AUROC performance comparison\nin real-world scenarios, we focused on using between 1 and 2 abnormal references (A1 and A2 ).\nonly one anomalous reference sample in the\nmain text. To further explore the scalability\nSetting\nMVTecAD\nVisA\nMean\n∆\nof the NAGL framework, we conducted experN 1 + A1\n95.8\n88.5\n92.2\niments using two anomalous reference samples.\nN 1 + A2\n96.5\n89.5\n93.0\n+ 0.8\nAs shown in Table 6, using two anomalous ref2\n1\nN +A\n96.8\n89.8\n93.3\nerence samples improved the performance of\nN 2 + A2\n97.3\n90.5\n93.9\n+ 0.6\nthe NAGL framework on both MVTecAD and\n4\n1\nN +A\n97.1\n91.2\n94.2\nVisA datasets. This shows NAGL effectively\nN 4 + A2\n97.5\n92.2\n94.9\n+ 0.7\nuses multiple anomalous references to improve\ndetection performance.\n\nD\n\nCompared with ViT-based Results\n\nDue to the extensive training time required for ResAD, we only reproduced the CNN-based (WideResNet50) results in the main text, maintaining identical training hyperparameters as specified in the\noriginal paper. As shown in Tab. 7, for a more equitable comparison, we also compare our approach\nwith ViT-based results. It is clear that our method still achieves competitive performance.\nTable 7: The AUROC performance comparison of ViT-based backbones on MVTecAD and VisA\ndatasets.\n\nE\n\nSetting\n\nMethod\n\nMVTecAD\nImage Pixel\n\nVisA\nImage Pixel\n\nSetting\n\nMethod\n\nMVTecAD\nImage Pixel\n\nVisA\nImage Pixel\n\nN2\n\nWinCLIP\nInCTRL\nResAD\n\n94.4\n94.0\n94.4\n\n96.0\n95.6\n\n84.6\n85.8\n84.5\n\n96.8\n95.1\n\nN4\n\nWinCLIP\nInCTRL\nResAD\n\n95.2\n94.5\n94.2\n\n96.2\n96.9\n\n87.3\n87.7\n90.8\n\n97.2\n97.5\n\nN 2 + A1\n\nOurs\n\n96.8\n\n96.8\n\n89.8\n\n97.6\n\nN 4 + A1\n\nOurs\n\n97.1\n\n97.0\n\n91.2\n\n97.8\n\nDiscussion\n\nLimitations: A drawback of our study is that it focuses solely on image data for experimentation. It\nwould be highly beneficial to apply our approach to other data types, like video and time series, to\nthoroughly assess the adaptability of our method.\nSocial Impacts: As a unified framework for generalist anomaly detection, the introduced approach\ndoes not raise specific ethical issues or adverse societal effects. The datasets utilized are publicly\navailable. All qualitative illustrations are derived from industrial product imagery, ensuring no\nviolation of personal privacy.\n22\n\n\fF\n\nHyperparameter Analysis\n\nFig. 7 shows the impact of the number of learnable proxies M . We observe that the performance of our method increases as M increases.\nVisA\nThis is because a larger number of proxies can\nImage\nPixel\nbetter capture the diversity of the feature space,\nMVTecAD\nImage\nwhich is beneficial for the refinement process.\nPixel\nHowever, the performance improvement diminishes as M exceeds 25. One possible reason\nis the model becomes over-parameterized, leading to overfitting. Therefore, we set M = 25 Figure 7: Impact of the number of learnable proxin our experiments to balance performance and ies M on MVTecAD and VisA datasets.\nefficiency.\n98.0\n\n97.0\n\n96.0\n\n96.0\n\n94.0\n92.0\n\n95.0\n\n90.0\n88.0\n\n94.0\n\n86.0\n84.0\n\n93.0\n\n10\n\nG\n\n15\n\n20\n\n25\n\n30\n\n50\n\n10\n\n15\n\n20\n\n25\n\n30\n\n50\n\nAdditional Results\n\nAdditionally, we evaluated the performance of our proposed method on the MVTec3D and MVTecLOCO datasets to further investigate its generalizability. As shown in Tab. 8, our method achieves\ncompetitive results compared to ResAD in both 3D anomaly detection and logical anomaly detection,\ndemonstrating its generalizability.\nTable 8: Comparison of the proposed method with the ResAD on MVTec3D and MVTecLOCO\ndatasets.\nSetting\n\nMethod\n\nMVTec3D\nMVTecLOCO\nImage-level\nPixel-level\nImage-level\nPixel-level\nAUROC AP F1-max AUROC PRO F1-max AUROC AP F1-max AUROC PRO F1-max\n\nN1\nResAD∗\nN 1 + A1\nOurs\n\n63.8\n83.0\n\n86.4\n95.0\n\n88.7\n91.7\n\n94.2\n94.7\n\n88.2\n98.4\n\n21.2\n50.3\n\n60.6\n63.3\n\n73.9\n76.3\n\n77.8\n78.4\n\n65.9\n66.6\n\n60.8\n69.9\n\n17.9\n19.4\n\nN2\nResAD∗\nN 2 + A1\nOurs\n\n66.7\n82.8\n\n88.6\n94.9\n\n88.9\n91.6\n\n94.9\n94.8\n\n90.1\n98.4\n\n24.5\n51.3\n\n62.3\n64.6\n\n76.3\n77.4\n\n77.7\n78.0\n\n66.0\n66.3\n\n62.3\n69.3\n\n18.3\n18.5\n\nN4\nResAD∗\nN 4 + A1\nOurs\n\n70.1\n86.9\n\n89.4\n96.4\n\n88.9\n92.3\n\n95.0\n95.4\n\n91.4\n98.6\n\n26.0\n54.2\n\n65.7\n71.5\n\n77.5\n81.5\n\n77.7\n79.1\n\n67.5\n66.9\n\n60.7\n69.2\n\n19.1\n18.6\n\nAs shown in Fig. 8, we provide further qualitative results obtained from our NAGL for pixel-level\nanomaly detection. The results demonstrate that our approach accurately localizes both large and\nsmall surface defects across various test cases. Furthermore, we report the detailed subset-level results\n(mean ± std) of NAGL on MVTecAD, VisA, BraTS, MVTec3D and MVTecLOCO datasets, under\nN 1 + A1 (Tab. 9), N 2 + A1 (Tab. 10), and N 4 + A1 (Tab. 11) settings. We also report performance\non the BTAD and MPDD datasets.\nBottle\n\nCable\n\nZipper\n\nCandle\n\nLeather\n\nCapsule\n\nPCB 4\n\nCapsules\n\nFigure 8: Qualitative results for eight subcategories with different defect types.\n\n23\n\n\fTable 9: The comprehensive results of our NAGL framework, evaluated under settings with N 1 + A1 .\nDataset\n\nMVTecAD\n\nVisA\n\nBraTS\n\nMVTec3D\n\nMVTecLOCO\n\nBTAD\n\nMPDD\n\nObjects\n\nAUROC\n\nImage-level\nAP\n\nF1-max\n\nAUROC\n\nPixel-level\nPRO\n\nF1-max\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal_nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n99.2±0.9\n93.1±0.9\n91.5±7.1\n100.0±0.0\n99.8±0.2\n99.5±0.4\n100.0±0.0\n99.4±0.1\n93.6±1.6\n77.2±0.9\n99.8±0.1\n99.4±0.2\n86.1±4.2\n99.8±0.1\n99.1±0.2\n\n99.7±0.4\n96.3±0.6\n98.1±1.7\n100.0±0.0\n99.9±0.1\n99.7±0.2\n100.0±0.0\n99.9±0.0\n98.7±0.3\n91.5±0.4\n99.9±0.0\n99.8±0.0\n79.3±6.9\n99.9±0.0\n99.8±0.1\n\n99.2±0.0\n90.4±2.0\n95.5±0.7\n100.0±0.0\n99.4±0.5\n98.3±1.1\n100.0±0.0\n98.2±0.3\n95.9±0.5\n86.7±0.2\n99.0±0.3\n98.3±0.0\n76.7±4.1\n98.9±0.5\n98.5±0.5\n\n98.2±0.1\n94.2±0.6\n98.1±0.2\n99.3±0.0\n99.4±0.0\n99.5±0.1\n99.1±0.1\n95.2±0.3\n94.2±0.3\n97.8±0.4\n96.1±0.4\n99.2±0.1\n84.3±3.7\n96.0±0.9\n97.9±0.1\n\n95.8±0.2\n87.8±0.5\n96.7±0.4\n98.5±0.0\n96.9±0.3\n97.1±0.4\n98.5±0.3\n93.0±0.5\n96.2±0.1\n92.2±0.8\n91.4±0.3\n95.1±0.2\n64.7±1.7\n95.8±0.5\n94.0±0.3\n\n76.2±0.8\n58.9±0.8\n46.8±5.3\n68.9±0.6\n51.4±0.9\n77.5±2.7\n41.3±1.4\n68.5±1.2\n52.9±2.3\n43.2±2.4\n70.1±0.4\n65.9±2.2\n39.1±6.4\n67.9±0.7\n54.5±0.6\n\nMean\n\n95.8±0.7\n\n97.5±0.6\n\n95.7±0.3\n\n96.6±0.2\n\n92.9±0.0\n\n58.9±0.5\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe_fryum\n\n93.9±0.7\n96.7±0.4\n88.5±2.3\n97.3±0.3\n95.7±0.7\n89.2±2.6\n59.5±7.5\n94.9±0.7\n86.3±0.9\n85.6±2.1\n79.1±11.1\n95.8±0.6\n\n94.3±0.3\n98.0±0.2\n94.3±0.9\n98.9±0.1\n98.1±0.3\n88.7±3.1\n55.9±6.3\n93.4±0.7\n84.3±1.4\n88.5±1.6\n80.3±7.4\n98.0±0.3\n\n87.3±1.0\n93.5±0.1\n87.2±1.8\n95.7±0.3\n92.8±0.9\n83.1±2.3\n68.3±1.0\n90.6±1.2\n80.0±1.4\n78.5±0.7\n76.3±9.7\n91.9±1.0\n\n99.0±0.0\n97.9±0.4\n98.7±0.2\n99.3±0.1\n95.8±0.4\n99.4±0.0\n98.2±0.6\n98.9±0.2\n95.6±0.1\n93.7±0.1\n94.9±0.6\n98.8±0.1\n\n97.1±0.3\n96.4±0.4\n97.6±1.1\n84.6±0.6\n91.1±0.4\n94.1±1.0\n86.2±2.5\n94.2±0.1\n86.1±0.3\n86.6±0.1\n81.9±3.7\n97.8±0.0\n\n37.6±0.9\n44.4±4.4\n56.7±1.5\n68.7±0.4\n40.8±2.4\n27.6±2.9\n12.6±4.2\n60.7±4.6\n35.5±1.0\n42.0±2.5\n25.7±2.2\n48.9±2.2\n\nMean\n\n88.5±1.4\n\n89.4±1.2\n\n85.4±0.7\n\n97.5±0.1\n\n91.1±0.4\n\n41.8±0.5\n\nbrain\n\n78.1±3.4\n\n95.4±0.9\n\n93.8±0.3\n\n96.5±0.1\n\n79.4±0.5\n\n49.4±1.0\n\nbagel\ncable_gland\ncarrot\ncookie\ndowel\nfoam\npeach\npotato\nrope\ntire\n\n95.5±2.0\n77.2±11.1\n87.4±5.0\n83.9±6.1\n74.8±2.7\n78.0±2.2\n93.8±1.8\n67.7±8.5\n96.2±1.3\n75.3±5.8\n\n98.9±0.5\n93.4±4.2\n96.8±1.5\n95.3±1.8\n92.9±1.2\n94.6±0.5\n98.0±0.9\n89.7±3.6\n98.6±0.4\n92.5±1.8\n\n95.9±1.6\n90.4±0.7\n93.0±1.3\n90.5±1.9\n90.7±1.0\n88.9±0.0\n94.9±0.8\n89.9±1.0\n94.7±0.8\n87.9±0.4\n\n98.9±0.1\n95.6±2.2\n99.1±0.2\n92.9±0.3\n94.3±0.5\n79.8±1.2\n99.2±0.1\n98.1±0.3\n97.7±0.0\n91.9±0.3\n\n99.7±0.1\n98.4±0.8\n99.8±0.0\n97.7±0.2\n98.6±0.2\n92.8±0.7\n99.8±0.0\n99.5±0.1\n99.4±0.0\n98.2±0.1\n\n66.9±0.8\n38.5±20.1\n54.2±2.8\n57.7±4.2\n40.0±3.5\n43.5±1.7\n62.5±4.4\n42.5±4.6\n50.4±0.2\n46.4±0.9\n\nMean\n\n83.0±1.5\n\n95.0±0.6\n\n91.7±0.4\n\n94.7±0.2\n\n98.4±0.1\n\n50.3±2.4\n\nbreakfast_box\njuice_bottle\npushpins\nscrew_bag\nsplicing_connectors\nMean\n\n77.1±2.8\n50.8±2.1\n62.7±0.6\n59.7±1.1\n66.2±5.3\n63.3±1.2\n\n87.1±1.7\n74.6±1.9\n66.4±1.4\n75.8±1.0\n77.5±6.1\n76.3±1.0\n\n79.3±1.8\n83.5±0.3\n73.5±1.9\n78.5±0.3\n76.9±0.4\n78.4±0.5\n\n67.1±1.6\n71.4±0.5\n53.1±1.4\n67.8±1.6\n73.7±1.3\n66.6±0.3\n\n79.7±1.2\n85.9±0.4\n54.3±1.4\n63.7±1.2\n65.7±3.5\n69.9±1.0\n\n32.3±0.9\n30.8±1.7\n3.1±0.1\n10.8±0.1\n20.0±1.9\n19.4±0.2\n\n01\n02\n03\n\n85.9±3.0\n93.6±1.4\n99.8±0.0\n\n95.0±1.1\n99.0±0.2\n96.7±0.5\n\n86.9±2.0\n95.6±0.6\n93.2±2.1\n\n65.4±1.7\n68.4±5.8\n97.3±0.3\n\n93.3±1.0\n96.9±0.4\n99.5±0.0\n\n50.9±2.2\n64.6±3.2\n65.6±1.6\n\nMean\n\n93.1±1.3\n\n96.9±0.5\n\n91.9±1.3\n\n77.1±2.0\n\n96.6±0.3\n\n60.4±0.7\n\nbracket_black\nbracket_brown\nbracket_white\nconnector\nmetal_plate\ntubes\n\n55.7±2.9\n57.6±4.2\n76.2±2.8\n87.1±3.2\n99.9±0.0\n94.5±1.1\n\n66.6±6.5\n75.0±3.8\n68.9±7.3\n70.9±6.1\n100.0±0.0\n97.8±0.6\n\n76.0±1.6\n81.6±0.7\n84.6±2.1\n76.4±3.9\n99.3±0.0\n92.0±0.5\n\n92.0±1.2\n87.0±1.3\n95.9±0.7\n91.2±1.5\n89.7±0.9\n95.5±0.5\n\n95.3±0.6\n94.9±0.2\n99.7±0.0\n97.4±0.5\n96.5±0.5\n98.8±0.1\n\n23.1±5.8\n10.9±0.3\n24.7±4.1\n28.8±4.7\n73.2±1.7\n64.6±1.5\n\nMean\n\n78.5±0.8\n\n79.9±1.1\n\n85.0±0.5\n\n91.9±0.6\n\n97.1±0.2\n\n37.5±2.5\n\n24\n\n\fTable 10: The comprehensive results of our NAGL framework, evaluated under settings with N 2 +A1 .\nDataset\n\nMVTecAD\n\nVisA\n\nBraTS\n\nMVTec3D\n\nMVTecLOCO\n\nBTAD\n\nMPDD\n\nObjects\n\nAUROC\n\nImage-level\nAP\n\nF1-max\n\nAUROC\n\nPixel-level\nPRO\n\nF1-max\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal_nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n99.2±1.0\n93.7±0.4\n90.8±8.3\n100.0±0.0\n99.9±0.1\n99.8±0.1\n100.0±0.0\n99.8±0.1\n95.5±1.6\n86.0±0.9\n99.9±0.1\n99.4±0.7\n88.0±4.1\n99.8±0.1\n99.5±0.2\n\n99.7±0.4\n96.6±0.3\n97.8±2.1\n100.0±0.0\n100.0±0.0\n99.9±0.1\n100.0±0.0\n99.9±0.0\n99.1±0.4\n95.2±0.4\n100.0±0.0\n99.7±0.3\n80.8±4.6\n99.9±0.0\n99.9±0.0\n\n99.5±0.5\n90.8±0.5\n95.4±1.3\n100.0±0.0\n99.7±0.5\n99.3±0.0\n100.0±0.0\n99.3±0.3\n96.6±0.2\n88.6±1.6\n99.6±0.3\n98.4±1.6\n79.2±4.7\n99.2±0.0\n98.9±0.2\n\n98.2±0.2\n94.7±0.1\n98.1±0.1\n99.3±0.0\n99.4±0.0\n99.6±0.1\n99.1±0.0\n95.5±0.3\n94.3±0.3\n98.2±0.2\n96.1±0.3\n99.2±0.1\n85.2±1.2\n96.4±0.8\n98.0±0.2\n\n96.0±0.5\n88.5±0.1\n96.8±0.5\n98.5±0.0\n97.0±0.0\n97.4±0.4\n98.4±0.3\n93.5±0.5\n96.2±0.2\n93.5±0.3\n91.4±0.4\n95.5±0.2\n66.0±1.8\n95.9±0.3\n94.1±0.4\n\n76.5±1.4\n60.0±1.4\n47.4±5.2\n68.9±0.4\n51.3±0.8\n79.8±1.0\n41.8±1.0\n70.2±1.1\n54.4±1.1\n48.8±0.4\n69.9±0.4\n65.5±2.0\n39.0±4.0\n68.8±1.4\n54.7±0.7\n\nMean\n\n96.8±0.8\n\n97.9±0.4\n\n96.3±0.5\n\n96.8±0.2\n\n93.2±0.2\n\n59.8±0.3\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe_fryum\n\n93.7±0.7\n96.9±1.0\n90.1±3.6\n97.7±0.5\n95.9±0.1\n89.1±0.3\n63.2±5.4\n94.8±0.8\n86.6±1.6\n88.9±1.1\n84.6±10.7\n96.5±1.2\n\n94.2±0.5\n98.2±0.5\n95.3±1.7\n99.0±0.2\n98.2±0.1\n88.5±0.8\n59.3±4.3\n92.8±1.2\n84.4±1.4\n91.2±0.7\n87.4±8.3\n98.3±0.6\n\n87.9±0.5\n93.4±1.7\n88.9±2.6\n95.5±0.4\n94.0±0.2\n83.4±0.5\n68.8±1.4\n91.8±0.4\n81.5±2.4\n83.1±1.8\n80.0±9.6\n93.1±0.8\n\n99.0±0.0\n97.9±0.2\n98.7±0.1\n99.3±0.1\n95.7±0.2\n99.4±0.0\n98.3±0.2\n99.0±0.1\n95.7±0.1\n93.9±0.1\n95.2±0.5\n98.9±0.1\n\n97.1±0.2\n96.5±0.4\n97.8±0.8\n85.1±1.3\n91.1±0.3\n93.8±0.6\n86.7±0.4\n94.3±0.1\n86.5±0.1\n87.3±0.0\n83.2±4.0\n97.8±0.1\n\n37.9±1.2\n48.0±3.7\n57.2±0.5\n68.1±0.7\n41.3±1.2\n27.1±1.8\n17.3±3.8\n61.1±1.8\n36.9±0.8\n44.1±2.5\n29.7±1.8\n50.7±1.5\n\nMean\n\n89.8±1.5\n\n90.6±0.9\n\n86.8±1.1\n\n97.6±0.0\n\n91.4±0.4\n\n43.3±0.3\n\nbrain\n\n82.1±3.0\n\n96.6±1.0\n\n93.9±0.1\n\n96.8±0.2\n\n79.9±0.4\n\n51.8±1.5\n\nbagel\ncable_gland\ncarrot\ncookie\ndowel\nfoam\npeach\npotato\nrope\ntire\n\n95.6±2.6\n82.0±4.7\n87.1±1.9\n81.1±6.5\n74.3±2.2\n80.5±2.1\n94.2±2.5\n67.4±2.8\n96.4±1.3\n69.3±12.0\n\n98.9±0.7\n95.4±1.1\n96.9±0.5\n94.4±1.9\n92.4±1.3\n95.2±0.5\n98.2±1.1\n89.7±1.4\n98.7±0.4\n89.2±6.2\n\n95.3±1.8\n91.0±1.2\n92.4±1.2\n90.0±1.8\n90.6±0.5\n89.4±0.5\n94.8±1.4\n89.5±0.4\n95.3±0.5\n87.6±0.3\n\n99.0±0.1\n96.0±1.4\n99.1±0.1\n92.4±0.7\n94.8±0.4\n79.9±0.7\n99.2±0.1\n98.2±0.1\n97.7±0.1\n91.7±0.9\n\n99.6±0.0\n98.4±0.5\n99.8±0.0\n97.6±0.2\n98.8±0.1\n92.9±0.4\n99.8±0.0\n99.6±0.0\n99.4±0.0\n98.1±0.2\n\n67.8±1.0\n48.5±2.3\n55.3±2.9\n56.9±3.4\n40.7±2.6\n43.7±0.6\n62.8±3.7\n42.7±3.3\n50.4±0.3\n44.1±5.3\n\nMean\n\n82.8±2.9\n\n94.9±1.1\n\n91.6±0.6\n\n94.8±0.3\n\n98.4±0.1\n\n51.3±1.7\n\nbreakfast_box\njuice_bottle\npushpins\nscrew_bag\nsplicing_connectors\nMean\n\n78.1±2.1\n58.8±3.7\n57.0±2.1\n60.0±2.7\n69.4±4.8\n64.6±1.4\n\n88.3±0.9\n79.2±1.6\n63.3±4.4\n76.2±2.0\n80.2±5.0\n77.4±1.7\n\n78.8±1.5\n83.9±0.8\n72.0±0.5\n78.2±0.0\n77.2±0.4\n78.0±0.2\n\n64.4±1.9\n70.9±0.7\n51.8±0.8\n69.2±0.6\n75.0±0.7\n66.3±0.4\n\n77.7±1.5\n85.6±0.4\n53.9±1.2\n65.2±1.3\n64.3±2.1\n69.3±0.4\n\n29.9±1.9\n29.4±1.0\n3.0±0.3\n10.9±0.1\n19.3±0.8\n18.5±0.5\n\n01\n02\n03\n\n86.4±0.2\n93.1±0.7\n99.7±0.1\n\n95.0±0.1\n98.9±0.1\n95.5±1.8\n\n85.9±0.6\n95.6±0.2\n91.8±2.8\n\n65.6±2.7\n65.5±2.0\n97.2±0.0\n\n93.5±1.1\n96.9±0.1\n99.5±0.0\n\n52.1±1.3\n65.2±1.6\n64.6±0.5\n\nMean\n\n93.0±0.3\n\n96.5±0.5\n\n91.1±0.9\n\n76.1±1.4\n\n96.7±0.4\n\n60.6±1.0\n\nbracket_black\nbracket_brown\nbracket_white\nconnector\nmetal_plate\ntubes\n\n64.6±8.6\n60.8±1.4\n81.1±6.7\n87.8±4.0\n99.9±0.1\n94.0±0.6\n\n73.6±7.7\n75.6±1.6\n77.1±10.9\n72.6±6.3\n100.0±0.0\n97.6±0.3\n\n77.8±2.4\n82.0±1.0\n84.7±1.0\n77.8±2.1\n99.5±0.4\n91.8±0.8\n\n94.0±0.9\n89.0±0.8\n96.5±1.3\n92.0±1.6\n90.0±0.7\n95.6±0.5\n\n96.5±0.6\n95.4±0.5\n99.8±0.1\n97.6±0.5\n96.6±0.4\n98.8±0.1\n\n26.5±3.8\n13.1±1.1\n23.3±4.5\n30.7±4.5\n73.5±1.6\n64.9±0.8\n\nMean\n\n81.4±2.9\n\n82.7±3.0\n\n85.6±0.3\n\n92.9±0.5\n\n97.5±0.1\n\n38.7±1.9\n\n25\n\n\fTable 11: The comprehensive results of our NAGL framework, evaluated under settings with N 4 +A1 .\nDataset\n\nMVTecAD\n\nVisA\n\nBraTS\n\nMVTec3D\n\nMVTecLOCO\n\nBTAD\n\nMPDD\n\nObjects\n\nAUROC\n\nImage-level\nAP\n\nF1-max\n\nAUROC\n\nPixel-level\nPRO\n\nF1-max\n\nbottle\ncable\ncapsule\ncarpet\ngrid\nhazelnut\nleather\nmetal_nut\npill\nscrew\ntile\ntoothbrush\ntransistor\nwood\nzipper\n\n99.8±0.2\n94.7±0.7\n97.4±1.0\n100.0±0.0\n99.8±0.3\n99.8±0.2\n100.0±0.0\n99.8±0.0\n95.3±1.4\n84.4±4.2\n100.0±0.0\n99.8±0.2\n85.7±5.9\n99.8±0.3\n99.5±0.2\n\n99.9±0.1\n97.2±0.3\n99.5±0.2\n100.0±0.0\n99.9±0.1\n99.9±0.1\n100.0±0.0\n100.0±0.0\n99.1±0.3\n94.5±1.8\n100.0±0.0\n99.9±0.1\n79.9±7.0\n99.9±0.1\n99.9±0.1\n\n99.2±0.0\n91.2±0.5\n97.3±0.8\n100.0±0.0\n99.7±0.5\n99.3±0.7\n100.0±0.0\n99.1±0.3\n96.3±0.5\n88.4±0.9\n99.6±0.3\n98.9±0.9\n79.0±4.4\n98.9±0.5\n98.7±0.4\n\n98.1±0.2\n95.2±0.3\n98.4±0.0\n99.3±0.0\n99.4±0.0\n99.6±0.1\n99.1±0.0\n96.0±0.3\n95.3±0.2\n98.3±0.3\n96.0±0.3\n99.2±0.0\n85.8±1.2\n96.4±0.3\n98.3±0.4\n\n95.7±0.2\n89.4±0.8\n97.3±0.1\n98.4±0.0\n97.0±0.1\n97.5±0.7\n98.2±0.3\n94.0±0.1\n96.2±0.2\n93.8±0.7\n91.2±0.2\n95.5±0.5\n67.8±1.7\n95.7±0.3\n94.2±0.5\n\n76.6±0.7\n61.0±1.2\n52.4±0.4\n68.5±0.2\n51.3±0.9\n79.7±1.5\n41.0±1.1\n72.6±1.1\n55.0±0.9\n47.0±1.9\n69.5±0.5\n64.7±1.4\n38.4±0.9\n69.1±1.1\n54.7±0.6\n\nMean\n\n97.1±0.6\n\n98.0±0.5\n\n96.4±0.2\n\n97.0±0.0\n\n93.5±0.2\n\n60.1±0.1\n\ncandle\ncapsules\ncashew\nchewinggum\nfryum\nmacaroni1\nmacaroni2\npcb1\npcb2\npcb3\npcb4\npipe_fryum\n\n94.0±0.4\n97.5±0.2\n92.7±1.5\n97.6±0.1\n95.8±0.9\n89.5±2.1\n66.2±5.0\n95.4±0.7\n88.4±1.1\n89.0±1.4\n91.0±3.5\n97.1±1.2\n\n94.4±0.6\n98.4±0.1\n96.7±0.6\n99.0±0.0\n98.2±0.4\n88.8±1.9\n63.2±4.8\n93.3±0.8\n85.8±0.8\n91.6±1.1\n91.9±2.7\n98.6±0.6\n\n87.5±0.7\n94.5±0.6\n89.6±1.8\n95.5±0.3\n94.0±1.2\n83.5±0.9\n70.0±1.1\n92.7±0.8\n82.9±0.6\n83.1±2.0\n86.1±4.0\n93.7±1.3\n\n99.1±0.1\n98.1±0.4\n98.7±0.2\n99.2±0.1\n96.2±0.6\n99.4±0.1\n98.5±0.1\n98.9±0.1\n95.7±0.1\n95.2±0.5\n95.3±0.3\n98.9±0.1\n\n96.8±0.1\n96.8±0.5\n98.0±0.5\n85.7±1.2\n90.8±0.6\n93.6±0.5\n87.6±0.2\n94.2±0.1\n86.5±0.2\n87.4±0.3\n83.1±1.3\n97.7±0.0\n\n38.2±0.6\n48.6±4.6\n59.1±0.2\n68.1±0.8\n41.7±0.7\n26.5±1.2\n22.3±1.8\n60.4±2.0\n38.5±1.1\n42.5±3.9\n30.3±1.0\n51.3±1.0\n\nMean\n\n91.2±1.1\n\n91.7±0.8\n\n87.8±0.9\n\n97.8±0.0\n\n91.5±0.2\n\n44.0±0.6\n\nbrain\n\n84.9±1.7\n\n97.3±0.4\n\n94.1±0.1\n\n97.1±0.4\n\n80.7±0.5\n\n54.7±2.8\n\nbagel\ncable_gland\ncarrot\ncookie\ndowel\nfoam\npeach\npotato\nrope\ntire\n\n96.0±1.9\n91.5±0.7\n90.1±1.1\n85.3±2.1\n83.4±4.9\n79.9±5.0\n96.8±1.5\n68.7±3.2\n96.8±1.2\n80.4±4.8\n\n99.0±0.5\n97.9±0.1\n97.7±0.3\n95.7±0.6\n95.4±2.1\n95.1±1.2\n99.2±0.3\n90.9±0.7\n98.8±0.5\n94.2±1.3\n\n95.8±1.4\n92.9±1.5\n93.8±0.4\n89.9±0.1\n90.3±1.0\n90.1±1.0\n96.3±1.2\n89.6±0.2\n95.6±1.3\n88.6±1.3\n\n99.0±0.1\n98.1±0.2\n99.3±0.1\n93.0±0.1\n95.8±0.6\n79.7±0.7\n99.4±0.0\n98.2±0.2\n97.7±0.1\n93.2±0.2\n\n99.7±0.0\n99.2±0.1\n99.8±0.0\n97.7±0.0\n99.1±0.2\n92.7±0.3\n99.8±0.0\n99.6±0.0\n99.4±0.0\n98.5±0.1\n\n67.0±3.2\n56.3±0.4\n57.7±0.5\n58.8±1.1\n46.0±6.4\n43.9±1.4\n69.0±0.6\n43.9±1.7\n50.8±0.4\n48.5±0.4\n\nMean\n\n86.9±1.8\n\n96.4±0.5\n\n92.3±0.7\n\n95.4±0.0\n\n98.6±0.0\n\n54.2±0.4\n\nbreakfast_box\njuice_bottle\npushpins\nscrew_bag\nsplicing_connectors\nMean\n\n79.5±2.2\n75.0±7.4\n65.0±8.2\n65.5±5.3\n72.7±9.1\n71.5±3.1\n\n89.1±1.0\n88.5±5.4\n69.1±5.8\n79.3±2.5\n81.6±8.0\n81.5±2.2\n\n79.5±1.7\n84.1±0.6\n74.5±3.0\n79.0±1.4\n78.5±1.7\n79.1±0.8\n\n64.9±1.1\n70.2±0.2\n53.6±1.1\n70.0±0.9\n76.1±1.4\n66.9±0.6\n\n77.7±1.0\n85.2±0.2\n53.5±2.0\n64.7±0.2\n65.2±4.0\n69.2±0.5\n\n30.6±0.8\n28.3±0.6\n3.4±0.3\n10.9±0.1\n19.9±1.3\n18.6±0.4\n\n01\n02\n03\n\n90.2±2.7\n93.4±0.9\n99.7±0.1\n\n96.4±0.9\n98.9±0.2\n96.3±1.0\n\n89.0±1.7\n95.7±0.2\n92.7±2.2\n\n67.8±0.8\n64.3±1.7\n97.2±0.2\n\n93.8±0.7\n96.9±0.1\n99.5±0.0\n\n52.9±0.9\n64.9±1.6\n65.7±0.9\n\nMean\n\n94.4±1.2\n\n97.2±0.5\n\n92.5±0.9\n\n76.4±0.9\n\n96.8±0.2\n\n61.2±0.4\n\nbracket_black\nbracket_brown\nbracket_white\nconnector\nmetal_plate\ntubes\n\n68.9±11.5\n60.7±8.8\n72.6±17.4\n86.3±2.7\n100.0±0.0\n95.8±0.8\n\n76.0±10.0\n73.3±5.4\n69.7±20.9\n74.6±3.5\n100.0±0.0\n98.3±0.3\n\n78.9±2.2\n83.2±1.1\n82.2±6.2\n77.2±3.9\n99.5±0.4\n93.8±1.1\n\n95.4±1.6\n90.4±1.7\n96.5±1.4\n92.2±1.1\n90.4±0.5\n96.1±0.3\n\n97.6±1.2\n96.0±0.5\n99.8±0.1\n97.7±0.3\n96.7±0.4\n99.0±0.1\n\n27.2±3.0\n15.3±2.0\n28.2±3.6\n36.2±6.0\n73.0±1.9\n66.1±0.1\n\nMean\n\n80.7±3.0\n\n82.0±3.9\n\n85.8±1.3\n\n93.5±0.7\n\n97.8±0.3\n\n41.0±1.1\n\n26\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"