"<!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>SubspaceAD: Training-Free Few-Shot Anomaly Detection\nvia Subspace Modeling\nCamile Lendering Erkut Akdag Egor Bondarev\nAIMS Group, Department of Electrical Engineering, Eindhoven University of Technology\n\narXiv:2602.23013v3 [cs.CV] 13 May 2026\n\n{c.r.lendering, e.akdag, e.bondarev}@tue.nl\n\nAbstract\nDetecting visual anomalies in industrial inspection often requires training with only a few normal images per category.\nRecent few-shot methods achieve strong results employing\nfoundation-model features, but typically rely on memory\nbanks, auxiliary datasets, or multi-modal tuning of visionlanguage models. We therefore question whether such complexity is necessary given the feature representations of vision foundation models. To answer this question, we introduce SubspaceAD, a training-free method, that operates in\ntwo simple stages. First, patch-level features are extracted\nfrom a small set of normal images by a frozen DINOv2 backbone. Second, a Principal Component Analysis (PCA) model\nis fit to these features to estimate the low-dimensional subspace of normal variations. At inference, anomalies are\ndetected via the reconstruction residual with respect to this\nsubspace, producing interpretable and statistically grounded\nanomaly scores. Despite its simplicity, SubspaceAD achieves\nstate-of-the-art performance across one-shot and few-shot\nsettings without training, prompt tuning, or memory banks.\nIn the one-shot anomaly detection setting, SubspaceAD\nachieves image-level and pixel-level AUROC of 97.1% and\n97.5% on the MVTec-AD dataset, and 93.2% and 98.2%\non the VisA dataset, respectively, surpassing prior state-ofthe-art results. Code and demo are available at https:\n//github.com/CLendering/SubspaceAD\n\nFigure 1. One-shot segmentation results of SubspaceAD on the\nMVTec-AD dataset [4], where SubspaceAD only uses one normal\nimage per category. Each example shows a test sample with its\npredicted anomaly mask (overlaid in dark blue), across all 15 categories of the MVTec-AD dataset.\n\ndefect-free images per category to model normality, which\nis rarely feasible in practice. At the other extreme, zeroshot methods [18, 40, 42] leverage vision-language models\n(VLMs) and textual prompts to detect anomalies without any\nnormal samples. However, such methods often struggle with\ndetection of subtle, non-semantic defects (e.g., small cracks)\nthat cannot be easily captured by language alone. This paper\nfocuses on the practical and challenging few-shot regime,\nwhere only a small number of normal images are available to\ndefine what constitutes normal appearance for a given object\ncategory.\nTo address the few-shot challenge, recent studies have\nintroduced increasingly complex deep learning techniques,\nwhich can be divided into three categories. The first one comprises reconstruction-based approaches [3, 16, 34], which\nlearn to reproduce only normal samples and employ reconstruction residuals as indicators of abnormality. The\nsecond category relies on large memory banks of features [10, 11, 31], storing large collections of patch embeddings from normal images and performing anomaly detection via nearest-neighbor retrieval in feature space. More recently, VLM approaches have adapted models like CLIP [30]\n\n1. Introduction\nDetecting visual anomalies in images is a long-standing\nchallenge in computer vision [7, 28]. In industrial inspection,\neven subtle deviations from normal appearance, such as\nscratches, contaminations, or missing components, can lead\nto downstream failures or safety risks. Development of\nsystems that automatically detect such defects is therefore\nessential for reliable and cost-efficient production.\nThe primary challenge in industrial anomaly detection\n(AD) is data scarcity: full-shot methods require hundreds of\n1\n\n\f2. Related Work\n\nthrough prompt tuning [18, 23, 25] to enable text-guided\nanomaly detection.\n\n2.1. Reconstruction-Based Approaches\n\nWhile methods across these three categories achieve\nstrong performance on benchmarks such as MVTec-AD [4]\nand VisA [43], they have become increasingly complex.\nThese methods often require extensive data augmentation,\ncareful hyperparameter tuning, multi-stage training, auxiliary learning objectives, or large-footprint memory banks,\nmaking them difficult to deploy and maintain in real-world\nindustrial settings. In parallel, representation learning has\nadvanced substantially. Foundation vision models, such as\nDINOv2, produce dense and transferable features that capture both semantic and structural properties of images, even\nfor domains they were never trained on [6, 27, 36]. With\nfeatures of such quality, one may ask a simple question: do\nwe still need complex pipelines, large memory banks, and\nmulti-stage tuning to detect anomalies?\n\nReconstruction-based approaches detect anomalies by learning to reproduce only normal samples and identifying deviations through reconstruction error. Early methods rely\non autoencoders or variational autoencoders to reconstruct\nnormal appearance, assuming that anomalies cannot be accurately recovered [3, 34]. Generative models extend this\nidea by aligning reconstructions with a learned normal data\nmanifold as demonstrated in [1, 33]. More recent developments introduce perceptual losses, diffusion-based priors,\nor feature regression strategies to avoid the common pitfall of over-generalization, where the model inadvertently\nlearns to reconstruct anomalous patterns [13, 16]. One of\nthe latest works, FastRecon [15] learns a transform matrix\nfrom a few normal samples to reconstruct features as normal, by regression with distribution regularization. While\nthese methods have shown success across industrial defect\nbenchmarks, they require explicit training, hyperparameter\ntuning, and careful balancing between reconstruction quality\nand anomaly sensitivity.\n\nThis paper argues that the answer is no. By leveraging strong foundation features, we show that a far simpler\nalternative is not only feasible but superior. Specifically,\nwe propose a purely statistical approach based on Principal Component Analysis (PCA) [26, 29]. Given only a few\nnormal images, PCA defines a low-dimensional subspace\nthat captures the ‘principal’ variation of normal appearance.\nDeviations from this subspace, quantified by the reconstruction residuals, directly indicate anomalies. This approach\nfollows the well-established statistical principle: anomalies\n(or outliers) manifest as deviations from the dominant PCA\nsubspace of normal data [35].\n\n2.2. Memory Bank-Based Anomaly Detection\nAnother major direction in anomaly detection involves storing representative patch features of normal samples in a memory bank and identifying anomalies via nearest-neighbor\nmatching. For instance, SPADE [10] uses multi-resolution\nfeature correspondences inspired by k-NN and operates in a\ntraining-free manner, making it suitable for detecting anomalies in few-shot settings. PatchCore [31], another trainingfree anomaly detection method, reduces memory redundancy\nby selecting a compact core set of embeddings to improve\nretrieval efficiency. This method has demonstrated the ability\nto handle few-shot anomaly detection. Related approaches\nestimate feature distributions at spatial locations [12], use\nflow-based transformations for density modeling [41], or distill pre-trained teacher networks to compress normality priors [13]. More recent methods such as AnomalyDINO [11]\nleverage features from vision foundation models (e.g., DINOv2) to improve both robustness and localization quality.\nDespite their strong performance, memory-bank methods\ntypically require storing thousands to millions of patch descriptors and performing nearest-neighbor search at inference, which can become computationally heavy, especially\nin few-shot or multi-category deployment scenarios.\n\nThis minimalist method, termed SubspaceAD, is trainingfree, parameter-light, and interpretable. As demonstrated in\nFig. 1, this simple formulation is powerful enough to localize diverse defect patterns even when provided with only a\nsingle normal reference sample per category. Extensive experiments show that SubspaceAD surpasses the performance\nof recently proposed reconstruction-based, memory-bankbased, and VLM-based approaches, suggesting that with\nsufficiently expressive features, classical statistical modeling\ncan once again serve as a powerful foundation for visual\nanomaly detection. Summarizing, this paper provides the\nfollowing contributions:\n• We introduce SubspaceAD, a minimalist, training-free\nmethod for few-shot (k ∈ {1, 2, 4}) anomaly detection\nthat combines frozen DINOv2 features with PCA to model\nnormal appearance.\n• Through comprehensive evaluations on MVTec-AD and\nVisA datasets, SubspaceAD outperforms state-of-theart reconstruction-, memory-bank-, and VLM-based approaches across all few-shot settings.\n• SubspaceAD is interpretable and parameter-free, requiring only a single normal image per category and a single\nforward pass per test image.\n\n2.3. Foundational Models and VLM-Based Approaches\nLarge-scale foundation models [8, 17, 21, 24, 30], including\nvision-only approaches such as, DINO [6, 27], have significantly influenced visual representation learning, both in the\nunimodal and multimodal domains. With the success of\n2\n\n\flarge-scale vision-language models like CLIP [30], recent\nworks have explored leveraging text prompts for anomaly\ndetection. For instance, WinCLIP [18] is one of the first\nworks to adopt CLIP for anomaly detection. It utilizes manually designed text prompts to detect anomalies across predefined multi-scale windows, while constructing a multi-scale\nmemory bank for feature matching in few-shot settings. Subsequent methods, like AnoVL [14] and PromptAD [23],\nautomate prompt creation or learn prompt adapters, while\nothers attempt to learn generic normality and abnormality\nprompts across categories using auxiliary datasets [5, 42].\nSpecifically, PromptAD [23] proposes semantic concatenation to reverse prompt’s semantics and directly optimize a set\nof learnable context vectors. IIPAD [25] instead generates\nprompts directly from the available normal instances rather\nthan learning category-specific prompts. This enables a single shared prompt space that generalizes across categories,\nimproving few-shot anomaly detection efficiency without\nextra training data. Although these approaches improve flexibility, they follow a one-class-per-prompt paradigm and\noften depend on additional normal/anomalous data, prompt\ntuning, or domain-specific textual priors.\n\nmethod. An overview of SubspaceAD is provided in Fig. 2,\nwhich operates in two straightforward stages. First, patchlevel features are extracted from a small set of k normal\nimages by a frozen DINOv2-G backbone. Second, a Principal Component Analysis (PCA) model is fit to these features\nto estimate the low-dimensional subspace of normal variation. At inference, anomalies are detected and localized from\nthe reconstruction residuals of test features with respect to\nthis subspace.\n\n3.1. Problem Formulation\nGiven a small set of k anomaly-free training images Itrain =\n{I1 , . . . , Ik } and a test image Itest , the goal is to define an\nanomaly scoring function A, which predicts an anomaly\nlikelihood for every spatial position p in Itest :\n  A(I_{\\mathrm {test}}, p) \\in [0,1]. \n\n(1)\n\nIn the few-shot regime, the key challenge is to model the\nmanifold of normal patch features using only a limited number of clean samples. It is assumed that patch-level features\nfrom normal samples lie near a low-dimensional linear subspace embedded in the feature space of a foundation model,\nwhile anomalous regions correspond to samples with large\nreconstruction residuals outside this subspace.\n\n2.4. Few-Shot and Training-Free Anomaly Detection\nFew-shot anomaly detection methods vary in how they characterize normal variation. Training-free vision-based approaches, such as DN2 [2], SPADE [10] and PatchCore [32]\ntypically store normal patch features and detect anomalies via nearest-neighbor retrieval. Methods requiring finetuning, including PaDiM [12] and GraphCore [39], instead\nlearn parametric models of feature distributions. Beyond\npurely visual pipelines, vision–language approaches such\nas ADP [19], WinCLIP [18] and GPT-4V-based anomaly\nreasoning [40], use text prompts or language alignment to\nguide few-shot detection, while zero-, few-shot like APRILGAN [9] and AnomalyCLIP [42] aim to generalize across\ncategories without additional training. Batched zero-shot\nframeworks MuSc [22] and ACR [20] further exploit collective statistics across test sets rather than evaluating samples\nindependently. Collectively, these approaches demonstrate a\nshift toward reducing supervision and eliminating training\noverhead, while maintaining strong anomaly discrimination.\nOur work follows this direction but departs from reliance on\nmemory banks or prompt tuning by modeling normal variation through a simple PCA-based subspace formulation.\n\n3.2. Feature Extraction\nThe core of SubspaceAD is the dense feature representation extracted from a pre-trained vision model. A frozen\nDINOv2-G model [27] is employed as the feature extraction\nmodel to obtain patch-level features. Given an input image,\nthe model produces a sequence of patch tokens, where each\ntoken corresponds to a 14 × 14 patch of the image.\nCrucially, instead of using only the tokens from the final\ntransformer block, tokens are aggregated from multiple intermediate layers to obtain a more robust representation that\nbalances high-level semantics with low-level spatial detail.\nThis multi-layer fusion improves sensitivity to subtle anomalies while preserving global context cues, a design choice\nsupported in the ablation study (Sec. 4.7, Table 3).\nLet fl (p) ∈ RD denote the patch token at spatial position\np from transformer block l, where D is the model’s feature\ndimension (e.g., 1536 for DINOv2-G). Tokens are extracted\nfrom a set of layers L (layers 22–28 in DINOv2-G). The\nfinal feature vector xp ∈ RD for position p is defined as the\nmean-pooled representation (multi-layer averaging):\n\n3. Method\n\n  x_p = \\frac {1}{|\\mathcal {L}|} \\sum _{l \\in \\mathcal {L}} f_l(p). \n\nThe proposed SubspaceAD method models the linear subspace of normal patch features, eliminating the need for\nmemory banks, prompt tuning, or external data. Anomaly\nscores are computed via reconstruction errors from this subspace, resulting in a training-free, compact, and interpretable\n\n(2)\n\nThis process yields a feature vector xp for each patch.\nTogether, these vectors form a dense feature map X ∈\nRh×w×D for each image, where h and w denote the spatial grid dimensions.\n3\n\n\fNormal Samples\n\nPCA Fitting\n\nFitting\nInference\n\nPCA Model\n\nPre-trained Feature\nExtractor (DINOv2)\nAnomalous Samples\n\n...\n\nSubspaceAD\n\nReconstruction\nError\n\n...\n\nAnomaly\nSegmentation\n\nmean(-)\n\nFigure 2. Overview of SubspaceAD. (Fitting): Aggregated patch features are collected from k normal samples using a frozen DINOv2-G\nmodel and a PCA model is fitted to capture the subspace of normal variation. (Inference): Features of a test image are extracted, projected\nonto the normal subspace, and the reconstruction error is computed, providing the anomaly segmentation map directly. PCA figure from [38].\n\nFor PCA-based modeling, averaging the features across\nmultiple intermediate layers is particularly beneficial. Since\nthe anomaly score is derived from the residual variance orthogonal to the principal subspace, its reliability depends on\nhow well the feature distribution captures meaningful structure rather than noise. Intermediate layers in DINOv2 contain a mix of semantic and structural information, whereas\nthe deepest layers tend to collapse local detail into categorylevel abstractions. Therefore, averaging the features across\nseveral middle layers stabilizes the covariance estimation, reduces layer-specific variance, and ensures that the principal\ncomponents represent stable patterns of normal appearance.\nTo build a representative covariance matrix from only k\nnormal images, data augmentation is applied. For each of the\nk normal images, Na = 30 augmented views are generated\nby applying random rotations between 0◦ and 345◦ , as rotational variance is common in industrial inspection. Features\nare extracted from all k × (1 + Na ) images (the original,\nplus its augmentations), forming the set of all patch features\nas Xnormal . This ensures that the estimated subspace captures common geometric variations and is not biased by a\nsingle view. The method consists of a single fitting phase\n(on k normal images) and an inference phase applied per test\nimage, as illustrated in Fig. 2.\n\n  x = \\mu + C z + \\epsilon , \\quad z \\sim \\mathcal {N}(0, I_r), \\quad \\epsilon \\sim \\mathcal {N}(0, \\sigma ^2 I_C),  (3)\nwhere C ∈ RD×r contains the top r eigenvectors of Σ,\nz ∈ Rr is a latent variable (with Ir being the r × r identity\nmatrix), and ϵ is an isotropic noise term (with IC being the\nD × D identity matrix). The matrix C forms an orthonormal basis for the subspace of normal variation. Under this\nprobabilistic formulation [37], the squared reconstruction\nresidual ∥(x − µ) − CC ⊤ (x − µ)∥22 corresponds to the negative log-likelihood component orthogonal to the subspace,\nthus defining an anomaly score.\nThe number of retained components r is chosen such that\nthe explained variance exceeds a predefined threshold τ :\n  \\sum _{i=1}^r \\lambda _i \\;\\ge \\; \\tau \\sum _{i=1}^D \\lambda _i, \\qquad \\tau = 0.99, \n(4)\nwhere λi denotes the i-th eigenvalue of Σ. This high threshold is chosen to ensure the subspace captures the vast majority of normal variation, while discarding minor noise\ncomponents (see Sec. 4.7 for an empirical analysis). The\nresulting model is fully described by the mean vector µ and\nthe basis matrix C.\n\n3.3. Subspace Modeling of Normal Features\n\n3.4. Anomaly Scoring and Localization\n\nNormal patch features are modeled via Principal Component\nAnalysis (PCA). This model is fit to the set of all normal\nfeatures Xnormal , which contains all patch vectors xp collected from the k original and augmented normal images\n(as defined in Sec. 3.2). From this set, the empirical mean\nµ ∈ RD and covariance matrix Σ ∈ RD×D are computed.\nPCA gives a closed-form parameter-free estimate of the\ndominant linear subspace of the data. We use deterministic\nPCA for simplicity and numerical stability, making it wellsuited for the proposed few-shot regime where overfitting\nmust be avoided. Each patch feature x ∈ RD is modeled as:\n\nFor a test image, its corresponding patch feature map Xtest ∈\nRh×w×D is extracted as described in Sec. 3.2. This map\nconsists of all patch feature vectors xp for the image.\nPatch-level Scoring. Each patch feature vector xp is projected onto the normal subspace:\n  x_{\\mathrm {proj}} = \\mu + CC^\\top (x_p - \\mu ), \n\n(5)\n\nand assigned a residual-based anomaly score given by:\n  S(x_p) = \\lVert x_p - x_{\\mathrm {proj}} \\rVert _2^2. \n4\n\n(6)\n\n\f4.1. Datasets\n\nThis score measures the deviation of each feature vector\nfrom the principal subspace of normal variation, resulting in\na low-resolution anomaly map M ∈ Rh×w .\n\nSubspaceAD is evaluated on two widely used industrial anomaly detection benchmarks: MVTec-AD [4] and\nVisA [43]. Both datasets contain multiple subsets of distinct\nobject and texture categories. MVTec-AD contains 15 categories with image resolutions ranging from 700×700 to\n1024×1024 pixels, while VisA includes higher-resolution\nimages (around 1500×1000 pixels) and a broader range of\ncomplex real-world anomaly types. Since anomaly detection\nis formulated as a one-class problem, the training set for each\ncategory consists only of normal (defect-free) samples, while\nthe test set contains both normal and anomalous instances.\nAnomalies in the test set are annotated with ground-truth\nlabels at both the image and pixel levels.\n\nImage-level Aggregation. To aggregate patch-level scores\ninto a single image-level prediction, we employ a tail-robust\nstatistic, the empirical tail value-at-risk (TVaR), which averages the top ρ% of patch scores in the anomaly map M .\nLet Hρ (M ) denote the set of scores in M at or above the\n(100 − ρ)-th percentile. The image-level score simg is then\ncomputed as the mean of this set:\n  s_{\\mathrm {img}} = \\operatorname {mean}\\!\\bigl (H_{\\rho }(M)\\bigr ). \n\n(7)\n\nWe set ρ = 1%, following prior work [11], which balances\nsensitivity to subtle defects with robustness to sparse false\npositives.\n\n4.2. Evaluation Metrics\n\nPixel-level Localization. For visualization and pixel-level\nevaluation, the patch-level anomaly map M is bilinearly upsampled to the original image resolution and smoothed using\na Gaussian filter with σ = 4 to suppress high-frequency\nnoise while preserving localization accuracy. Finally, the\nnormalized anomaly score function is defined as\n  A(I_{\\mathrm {test}}, p) = \\mathrm {Norm}\\big (S(x_p)\\big ), \n\nFollowing standard practice [11, 31], performance is evaluated at both the image and pixel levels. Image-level anomaly\ndetection is measured by the Area Under the Receiver Operating Characteristic (AUROC) and Average Precision (AUPR).\nPixel-level localization is assessed via pixel-wise AUROC\nand the Per-Region Overlap (PRO), which accounts for the\nspatial extent of anomalous regions.\n\n(8)\n\nwhere Norm(·) denotes min–max normalization to [0, 1].\nThese normalized maps are used for visualization, while\nAUROC and PRO metrics are computed using the raw (unnormalized) scores.\n\n4.3. Implementation Details\n\nLet n = k × (1 + Na ) × (h × w) denote the total number\nof normal patch features (with k normal training images)\nand D the feature dimension. PCA fitting requires O(nD2 )\ntime for covariance computation and O(D3 ) for eigendecomposition, both negligible in the few-shot regime. The\nresulting model consists only of µ ∈ RD and C ∈ RD×r ,\ntypically requiring less than 1 MB of storage per category.\nInference on a 672 × 672 image takes approximately 300 ms\non a single NVIDIA H100 GPU, with the majority of time\ndominated by the DINOv2-G forward pass (∼226 ms), and\nthe subspace projection and the scoring take only ∼74 ms\n(see Appendix D for a hardware-normalized analysis).\n\nThe frozen DINOv2-G model [27] is deployed for feature\nextraction, with features averaged across layers 22–28, as\ndescribed in Sec. 3.2. For few-shot fitting, k ∈ {1, 2, 4}\nnormal images are randomly selected, and Na = 30 random rotations (from 0◦ to 345◦ ) are applied to each, except\nfor the orientation-sensitive transistor category. For completeness, a fully rotation-agnostic evaluation is provided in\nAppendix G. The PCA variance threshold is set to τ = 0.99,\nand TVaR aggregation uses ρ = 1% [11]. Importantly, we\napply a single, fixed image resolution of 672 px across all\ncategories and shots for both MVTec-AD and VisA datasets\n(see Sec. 4.7 for sensitivity analysis). Each few-shot configuration is evaluated over 5 independent runs with different\nrandom seeds, reporting the mean and standard deviation.\nAll experiments are performed on a single NVIDIA H100\nGPU.\n\n4. Experiments\n\n4.4. Baselines\n\nThe performance of SubspaceAD is evaluated against recent\nstate-of-the-art methods under 1-, 2-, and 4-shot settings,\nreporting both image-level and pixel-level results (Sec. 4.5).\nWe further assess its generalization under the batched 0shot setting, where the entire unlabeled test set is modeled\njointly without any reference images (Sec. 4.6). Finally,\nablation studies are conducted to validate the model design choices, including the foundation-model backbone, input image resolution, layer aggregation strategy, and PCA\nexplained-variance threshold τ (Sec. 4.7).\n\nWe compare SubspaceAD against representative few-shot\nmethods across three dominant paradigms: (1) memory-bankbased approaches, including SPADE [10], PatchCore [31],\nand AnomalyDINO [11]; (2) reconstruction-based methods, such as FastRecon [15]; and (3) VLM-based models,\nincluding WinCLIP [18], PromptAD [23], and IIPAD [25].\n\n3.5. Complexity and Memory Analysis\n\n4.5. Comparison to the State-of-the-Art\nTable 1 compares SubspaceAD with recent few-shot methods\non MVTec-AD and VisA under 1-, 2-, and 4-shot settings.\n5\n\n\fTable 1. Comparison of anomaly detection and localization performance on MVTec-AD and VisA across different few-shot settings. Results\nfor SubspaceAD (ours) are reported as mean ± standard deviation over 5 seeds. Best results are in bold, and second-best are underlined.\nMVTec-AD\nImage-level\n\nVisA\nPixel-level\n\nImage-level\n\nPixel-level\n\nSetup\n\nMethod\n\nAUROC\n\nAUPR\n\nAUROC\n\nPRO\n\nAUROC\n\nAUPR\n\nAUROC\n\nPRO\n\n0-shot\n\nWinCLIP\n\n91.8\n\n96.5\n\n85.1\n\n64.6\n\n78.1\n\n81.2\n\n79.6\n\n56.8\n\n1-shot\n\nSPADE\nPatchCore\nFastRecon\nWinCLIP\nPromptAD\nIIPAD\nAnomalyDINO\nSubspaceAD (ours)\n\n81.0\n83.4\n93.1\n94.6\n94.2\n96.6\n97.1 ± 0.9\n\n90.6\n92.2\n96.5\n97.1\n97.2\n98.2\n98.6 ± 0.4\n\n91.2\n92.0\n95.2\n95.9\n96.4\n96.8\n97.5 ± 0.1\n\n83.9\n79.7\n87.1\n87.9\n89.8\n92.7\n94.5 ± 0.2\n\n79.5\n79.9\n83.8\n86.9\n85.4\n87.4\n93.2 ± 0.8\n\n82.0\n82.8\n85.1\n88.4\n87.5\n89.0\n93.0 ± 0.8\n\n95.6\n95.4\n96.4\n96.7\n96.9\n97.8\n98.2 ± 0.1\n\n84.1\n80.5\n85.1\n85.1\n87.3\n92.5\n95.5 ± 0.1\n\n2-shot\n\nSPADE\nPatchCore\nFastRecon\nWinCLIP\nPromptAD\nIIPAD\nAnomalyDINO\nSubspaceAD (ours)\n\n82.9\n86.3\n91.0\n94.4\n95.7\n95.7\n96.9\n97.5 ± 0.7\n\n91.7\n93.8\n97.0\n97.9\n97.9\n98.2\n98.8 ± 0.4\n\n92.0\n93.3\n95.9\n96.0\n96.2\n96.7\n97.0\n97.8 ± 0.1\n\n85.7\n82.3\n88.4\n88.5\n90.3\n93.1\n94.9 ± 0.1\n\n80.7\n81.6\n84.6\n88.3\n86.7\n89.7\n93.8 ± 0.4\n\n82.3\n84.8\n85.8\n90.0\n88.6\n90.7\n93.4 ± 0.7\n\n96.2\n96.1\n96.8\n97.1\n97.2\n98.0\n98.3 ± 0.0\n\n85.7\n82.6\n86.2\n85.8\n87.9\n93.4\n95.7 ± 0.1\n\n4-shot\n\nSPADE\nPatchCore\nFastRecon\nWinCLIP\nPromptAD\nIIPAD\nAnomalyDINO\nSubspaceAD (ours)\n\n84.8\n88.8\n94.2\n95.2\n96.6\n96.1\n97.7\n98.0 ± 0.4\n\n92.5\n94.5\n97.3\n98.5\n98.1\n98.7\n99.0 ± 0.2\n\n92.7\n94.3\n97.0\n96.2\n96.5\n97.0\n97.2\n97.9 ± 0.1\n\n87.0\n84.3\n89.0\n90.5\n91.2\n93.4\n95.1 ± 0.1\n\n81.7\n85.3\n87.3\n89.1\n88.3\n92.6\n94.7 ± 0.2\n\n83.4\n87.5\n88.8\n90.8\n89.6\n92.9\n94.3 ± 0.5\n\n96.6\n96.8\n97.2\n97.4\n97.4\n98.2\n98.4 ± 0.0\n\n87.3\n84.9\n87.6\n86.2\n88.3\n94.1\n96.0 ± 0.1\n\nUsing a 672 px resolution (Sec. 4.7), SubspaceAD consistently achieves new state-of-the-art average performance\nacross all evaluated image- and pixel-level metrics.\nOn MVTec-AD, SubspaceAD attains 97.1% image-level\nand 97.5% pixel-level AUROC in the 1-shot setting, outperforming all prior methods. On the more challenging VisA\nbenchmark, SubspaceAD achieves 93.2% image-level AUROC and 95.5% PRO, surpassing the prior state-of-the-art\n(AnomalyDINO) by 5.8% and 3.0%, respectively.\nAs the number of reference samples increases, our method\nmaintains its lead across all metrics. In the 4-shot setting, SubspaceAD achieves the highest PRO on MVTecAD (95.1%) and VisA (96.0%). These results validate our\ncentral claim: leveraging strong foundation features with a\nparameter-free statistical model can outperform more complex state-of-the-art methods. We also report performance\nunder the full-shot setting (see Appendix C).\nMoreover, qualitative results in Fig. 3 demonstrate that\nour method produces cleaner, sharper, and more spatially\nprecise anomaly maps across both benchmarks. Further\nper-category results are included in Appendix A, and repre-\n\nsentative failure modes are discussed in Appendix F.\n\n4.6. Batched 0-Shot Performance\nSubspaceAD is further evaluated under the batched 0-shot\nsetting, which differs fundamentally from prompt-based,\nzero-shot, or few-shot paradigms. Following the protocol of\nAnomalyDINO [11] and MuSc [22], the entire test set for a\ncategory is used to construct the model, assuming that the\nmajority of image patches are anomaly-free. Unlike memory–bank approaches that store all patches across images,\nSubspaceAD fits a single PCA subspace on all patch tokens\nextracted from the unlabeled test set of that category and\ncomputes anomaly scores based on reconstruction residuals.\nTable 2 compares the performance of SubspaceAD\nagainst other batched 0-shot methods. SubspaceAD achieves\nstate-of-the-art performance on the VisA dataset with an\nimage-level AUROC of 94.1%, matching the performance of\nMuSc and outperforming AnomalyDINO. On MVTec-AD,\nour method achieves a competitive 96.6% AUROC.\nSubspaceAD differs from prior batched 0-shot approaches\nin how it models the unlabeled test set. AnomalyDINO\n6\n\n\f(a) VisA\n\n(b) MVTec-AD\n\nFigure 3. Qualitative comparison on VisA and MVTec-AD (1-shot). SubspaceAD produces sharper and more precise anomaly maps than\nPromptAD [23] and AnomalyDINO [11], with fewer false activations and better alignment with ground-truth defects across both datasets.\nMore qualitative examples are provided in Appendix E.\n\nTable 2. Batched 0-shot anomaly detection. All values are imagelevel AUROC (%). Best results are in bold, second-best are\nunderlined.\nMethod\n\nMVTec-AD\n\nVisA\n\nZero-shot methods\nWinCLIP [18]\nAnomalyCLIP [42]\n\n91.8\n91.5\n\n78.1\n82.1\n\nBatched zero-shot methods\nACR [20]\nMuSc [22]\nAnomalyDINO-S (448) [11]\nAnomalyDINO-S (672) [11]\n\n85.8\n97.8\n93.0\n94.2\n\n–\n94.1\n89.7\n90.7\n\nSubspaceAD (ours)\n\n96.6\n\n94.1\n\ntion strategy, (3) DINOv2 backbone scale, and (4) PCA\nexplained-variance threshold τ . All experiments are performed on the MVTec-AD and VisA datasets.\nImage Resolution. Fig. 4 shows the effect of input resolution. On VisA (dashed lines), performance improves from\n256 px but quickly saturates, remaining largely stable between 448 px and 672 px. A similar trend is observed on\nMVTec-AD (solid lines), where all resolutions above 448 px\nperform comparably across metrics. These results indicate\nthat the method is largely robust to resolution once sufficient\nspatial detail is available.\nLayer Aggregation. Table 3 compares aggregation strategies considering 4-shot results. Using only the last layer\nleads to a substantial performance drop (89.3% I-AUROC\n\nbuilds a memory bank from all test patches, allowing anomalous regions to retrieve other anomalies as nearest neighbors\nand suppressing their anomaly scores. MuSc [22] alleviates this through mutual similarity filtering, but it requires\ndense cross-image comparisons and remains sensitive to\ncontaminated categories. In contrast, SubspaceAD fits a\nsingle PCA model to all test tokens, where the principal\ncomponents capture the shared, high-variance structure of\nnormal data, while rare and uncorrelated anomalies reconstruct poorly and receive high anomaly scores. This compact,\ndistribution-level modeling yields competitive performance\non MVTec-AD (96.6%) and achieves state-of-the-art results\non VisA (94.1%), showing that even in the batched 0-shot\nregime, a simple subspace is sufficient for strong anomaly\ndiscrimination.\n\nShot_Label\nk=1\n\nk=2\nk=4\n\nDataset\n\nMVTec AD\n\nI-AUROC\n\nVisA\n\nI-AUPR\n\n98.0%\n97.5%\n\nScore\n\n96.0%\n94.0%\n\n95.0%\n\n92.0%\n\n92.5%\n\n90.0%\n\n90.0%\n256\n\n336\n\n518\n\n672\n\nP-AUROC\n\n98.50%\n\nScore\n\n448\n\n336\n\n94.5%\n\n98.00%\n\n93.0%\n\n97.75%\n\n91.5%\n\n448\n\n518\n\n672\n\n518\n\n672\n\nPRO\n\n96.0%\n\n98.25%\n\n97.50%\n\n90.0%\n256\n\n4.7. Ablation Study\n\n256\n\n336\n\n448\n\n518\n\nImage Resolution (px)\n\n672\n\n256\n\n336\n\n448\n\nImage Resolution (px)\n\nFigure 4. Effect of image resolution on performance across both\ndatasets. Performance peaks at 672 px on both MVTec-AD (solid)\nand VisA (dashed).\n\nWe analyze the impact of design choices in SubspaceAD,\nincluding (1) input image resolution, (2) layer aggrega7\n\n\fExplained Variance τ . Table 4 shows the effect of the PCA\nexplained-variance threshold τ . Performance remains stable\nfor τ ∈ [0.95, 0.99], showing that SubspaceAD is not overly\nsensitive to this hyperparameter. However, the τ = 0.99\nthreshold yields the best results for VisA and the strongest localization performance (PRO) on MVTec-AD. Consequently,\nwe adopt τ = 0.99 for all experiments. As expected, setting\nτ = 1.00 (using the full feature space) causes performance\nto drop sharply, confirming that anomalies primarily reside\nin the residual subspace.\n\non VisA). Averaging the final 7 layers (34-40) achieves better\nresults but remains suboptimal. The Mean-pool (Middle-7)\nconfiguration, averaging layers 22-28, delivers the best overall performance, reaching 95.0% PRO on MVTec-AD and\n94.1% I-AUROC on VisA. While Concat (Middle-7) yields\na higher I-AUROC on MVTec-AD (98.6%), our chosen\npooling method provides the most robust and discriminative\nrepresentation across both benchmarks.\nTable 3. Evaluation of feature aggregation strategies (4-shot). The\nselected approach Mean-pool (Middle-7) achieves the best overall\nperformance, with image-level AUROC and PRO given in (%).\nMVTec-AD\nStrategy\nMean-pool (Middle-7)\nMean-pool (Final-7)\nConcat (Middle-7)\nLast layer only\n\nTable 4. Analysis of PCA explained variance τ . Image-level AUROC (I-AUROC) and PRO (%) are given for k ∈ {1, 2, 4} on both\nMVTec-AD and VisA datasets. Best results are in bold.\n\nVisA\n\nI-AUROC\n\nPRO\n\nI-AUROC\n\nPRO\n\n98.4\n98.2\n98.6\n97.6\n\n95.0\n93.3\n95.0\n92.5\n\n94.1\n91.9\n93.8\n89.3\n\n95.1\n93.5\n95.0\n91.2\n\nMVTec-AD\nτ\n\nBackbone Scale. SubspaceAD is evaluated using four DINOv2 backbones: ViT-S/14, ViT-B/14, ViT-L/14, and ViTG/14, as illustrated in Fig. 5. While larger backbones consistently yield better performance, practical deployment constraints (e.g., edge-device memory and latency) are governed\nprimarily by the chosen encoder. Because SubspaceAD\nadds negligible computational overhead, it can be readily\ndeployed with smaller, edge-friendly variants like DINOv2S/14. For completeness, we also report results with DINOv3\nbackbones (Appendix B), performing slightly worse in this\nsetting.\n\nBackbone\nDINOv2-S\n\nDINOv2-L\nDINOv2-G\n\nDINOv2-B\n\nDataset\n\nMVTec AD\n\nI-AUROC\n\nScore\n\nVisA\n\n96.0%\n\n93.0%\n\nk=1 k=2 k=4 k=1 k=2 k=4\n\nI-AUROC (%)\n0.95 98.0 98.2\n0.96 98.1 98.2\n0.97 98.1 98.2\n0.99 98.1 98.2\n1.00 45.6 41.4\n\n98.4\n98.4\n98.5\n98.4\n40.5\n\n92.2\n92.4\n92.4\n92.5\n35.3\n\n93.4\n93.5\n93.6\n93.6\n37.9\n\n93.7\n93.9\n93.9\n94.1\n38.3\n\nPRO (%)\n0.95 94.4\n0.96 94.4\n0.97 94.5\n0.99 94.6\n1.00 55.2\n\n94.9\n95.0\n95.0\n95.0\n52.6\n\n93.9\n94.0\n94.1\n94.2\n48.3\n\n94.3\n94.4\n94.5\n94.8\n48.6\n\n94.6\n94.8\n94.8\n95.1\n49.2\n\n94.7\n94.7\n94.7\n94.8\n52.7\n\nSummary. The ablations show that performance is highly\ndependent on specific design choices. Model scale and the\nfeature aggregation strategy have the strongest influence,\nfollowed closely by input resolution. The PCA threshold,\nin contrast, acts primarily as a fine-tuner. Overall, strong\nfoundation features combined with a simple statistical subspace are sufficient for high-performing few-shot anomaly\ndetection.\n\nI-AUPR\n\n96.0%\n\nVisA\n\n92.0%\n\n5. Conclusion\n\n90.0%\n88.0%\n87.0%\n\nThis paper introduced SubspaceAD, a training-free framework for few-shot visual anomaly detection that leverages\nthe representational strength of vision foundation models.\nBy extracting patch-level features from a frozen DINOv2-G\nencoder and modeling normal variation through a simple\nPCA subspace, the method detects anomalies via reconstruction residuals without requiring memory banks, auxiliary\ndatasets, prompt tuning, or any form of training. Despite\nits simple formulation, SubspaceAD achieves state-of-theart performance across one- and few-shot settings on both\nMVTec-AD and VisA datasets, demonstrating that complex\narchitectures and multi-stage optimization are unnecessary\nwhen expressive feature representations are available.\n\n84.0%\n\nP-AUROC\n\n98.40%\n98.00%\n\nScore\n\nPRO\n\n96.0%\n94.0%\n\n97.60%\n92.0%\n97.20%\n90.0%\n\n96.80%\n1\n\n2\n\nk-Shot\n\n4\n\n1\n\n2\n\nk-Shot\n\n4\n\nFigure 5. Impact of backbone scale on SubspaceAD performance\non both datasets. Performance improves with increasing model\ncapacity, indicating that richer foundation features directly enhance\nfew-shot anomaly detection.\n\n8\n\n\fAcknowledgements\n\n[13] Hanqiu Deng and Xingyu Li. Anomaly detection via reverse\ndistillation from one-class embedding. In Proceedings of the\nIEEE/CVF conference on computer vision and pattern\nrecognition, pages 9737–9746, 2022. 2\n[14] Hanqiu Deng, Zhaoxiang Zhang, Jinan Bao, and Xingyu Li.\nAnovl: Adapting vision-language models for unified\nzero-shot anomaly localization. arXiv preprint\narXiv:2308.15939, 2(5), 2023. 3\n[15] Zheng Fang, Xiaoyang Wang, Haocheng Li, Jiejie Liu,\nQiugui Hu, and Jimin Xiao. Fastrecon: Few-shot industrial\nanomaly detection via fast feature reconstruction. In\nProceedings of the IEEE/CVF International Conference on\nComputer Vision, pages 17481–17490, 2023. 2, 5\n[16] Matic Fučka, Vitjan Zavrtanik, and Danijel Skočaj.\nTransfusion–a transparency-based diffusion model for\nanomaly detection. In European conference on computer\nvision, pages 91–108. Springer, 2024. 1, 2\n[17] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr\nDollár, and Ross Girshick. Masked autoencoders are scalable\nvision learners. In Proceedings of the IEEE/CVF conference\non computer vision and pattern recognition, pages\n16000–16009, 2022. 2\n[18] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang,\nAvinash Ravichandran, and Onkar Dabeer. Winclip:\nZero-/few-shot anomaly classification and segmentation. In\nProceedings of the IEEE/CVF Conference on Computer\nVision and Pattern Recognition, pages 19606–19616, 2023.\n1, 2, 3, 5, 7, 4\n[19] Sangkyung Kwak, Jongheon Jeong, Hankook Lee,\nWoohyuck Kim, Dongho Seo, Woojin Yun, Wonjin Lee, and\nJinwoo Shin. Few-shot anomaly detection via\npersonalization. IEEE Access, 12:11035–11051, 2024. 3\n[20] Aodong Li, Chen Qiu, Marius Kloft, Padhraic Smyth, Maja\nRudolph, and Stephan Mandt. Zero-shot anomaly detection\nvia batch normalization. Advances in Neural Information\nProcessing Systems, 36:40963–40993, 2023. 3, 7\n[21] Chunyuan Li, Zhe Gan, Zhengyuan Yang, Jianwei Yang,\nLinjie Li, Lijuan Wang, Jianfeng Gao, et al. Multimodal\nfoundation models: From specialists to general-purpose\nassistants. Foundations and Trends® in Computer Graphics\nand Vision, 16(1-2):1–214, 2024. 2\n[22] Xurui Li, Ziming Huang, Feng Xue, and Yu Zhou. Musc:\nZero-shot industrial anomaly classification and segmentation\nwith mutual scoring of the unlabeled images. In The Twelfth\nInternational Conference on Learning Representations, 2024.\n3, 6, 7\n[23] Xiaofan Li, Zhizhong Zhang, Xin Tan, Chengwei Chen,\nYanyun Qu, Yuan Xie, and Lizhuang Ma. Promptad:\nLearning prompts with only normal samples for few-shot\nanomaly detection. In Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition,\npages 16838–16848, 2024. 2, 3, 5, 7\n[24] Shilong Liu, Zhaoyang Zeng, Tianhe Ren, Feng Li, Hao\nZhang, Jie Yang, Qing Jiang, Chunyuan Li, Jianwei Yang,\nHang Su, et al. Grounding dino: Marrying dino with\ngrounded pre-training for open-set object detection. In\nEuropean conference on computer vision, pages 38–55.\nSpringer, 2024. 2\n\nThis work is supported by the ADVISOR ITEA 241007 project.\n\nReferences\n[1] Samet Akcay, Amir Atapour-Abarghouei, and Toby P\nBreckon. Ganomaly: Semi-supervised anomaly detection via\nadversarial training. In Asian conference on computer vision,\npages 622–637. Springer, 2018. 2\n[2] Liron Bergman, Niv Cohen, and Yedid Hoshen. Deep nearest\nneighbor anomaly detection. arXiv preprint\narXiv:2002.10445, 2020. 3\n[3] Paul Bergmann, Sindy Löwe, Michael Fauser, David\nSattlegger, and Carsten Steger. Improving unsupervised\ndefect segmentation by applying structural similarity to\nautoencoders. arXiv preprint arXiv:1807.02011, 2018. 1, 2\n[4] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. Mvtec ad–a comprehensive real-world\ndataset for unsupervised anomaly detection. In Proceedings\nof the IEEE/CVF conference on computer vision and pattern\nrecognition, pages 9592–9600, 2019. 1, 2, 5\n[5] Yunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng,\nWeiming Shen, and Giacomo Boracchi. Adaclip: Adapting\nclip with hybrid learnable prompts for zero-shot anomaly\ndetection. In European Conference on Computer Vision,\npages 55–72. Springer, 2024. 3\n[6] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou,\nJulien Mairal, Piotr Bojanowski, and Armand Joulin.\nEmerging properties in self-supervised vision transformers.\nIn Proceedings of the IEEE/CVF international conference on\ncomputer vision, pages 9650–9660, 2021. 2\n[7] Varun Chandola, Arindam Banerjee, and Vipin Kumar.\nAnomaly detection: A survey. ACM computing surveys\n(CSUR), 41(3):1–58, 2009. 1\n[8] Ting Chen, Simon Kornblith, Mohammad Norouzi, and\nGeoffrey Hinton. A simple framework for contrastive\nlearning of visual representations. In International\nconference on machine learning, pages 1597–1607. PmLR,\n2020. 2\n[9] Xuhai Chen, Yue Han, and Jiangning Zhang. A\nzero-/few-shot anomaly classification and segmentation\nmethod for cvpr 2023 (vand) workshop challenge tracks 1\n&amp;2. 1st Place on Zero-shot AD and 4th Place on Few-shot\nAD, 2305:17382, 2023. 3\n[10] Niv Cohen and Yedid Hoshen. Sub-image anomaly detection\nwith deep pyramid correspondences. arXiv preprint\narXiv:2005.02357, 2020. 1, 2, 3, 5\n[11] Simon Damm, Mike Laszkiewicz, Johannes Lederer, and\nAsja Fischer. Anomalydino: Boosting patch-based few-shot\nanomaly detection with dinov2. In 2025 IEEE/CVF Winter\nConference on Applications of Computer Vision (WACV),\npages 1319–1329. IEEE, 2025. 1, 2, 5, 6, 7, 4\n[12] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and\nRomaric Audigier. Padim: a patch distribution modeling\nframework for anomaly detection and localization. In\nInternational conference on pattern recognition, pages\n475–489. Springer, 2021. 2, 3\n\n9\n\n\f[25] Wenxi Lv, Qinliang Su, and Wenchao Xu. One-for-all\nfew-shot anomaly detection via instance-induced prompt\nlearning. In The Thirteenth International Conference on\nLearning Representations, 2025. 2, 3, 5\n[26] Andrzej Maćkiewicz and Waldemar Ratajczak. Principal\ncomponents analysis (pca). Computers &amp; Geosciences, 19\n(3):303–342, 1993. 2\n[27] Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy\nVo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez,\nDaniel Haziza, Francisco Massa, Alaaeldin El-Nouby, et al.\nDinov2: Learning robust visual features without supervision.\narXiv preprint arXiv:2304.07193, 2023. 2, 3, 5\n[28] Guansong Pang, Chunhua Shen, Longbing Cao, and Anton\nVan Den Hengel. Deep learning for anomaly detection: A\nreview. ACM computing surveys (CSUR), 54(2):1–38, 2021.\n1\n[29] Karl Pearson. Liii. on lines and planes of closest fit to\nsystems of points in space. The London, Edinburgh, and\nDublin philosophical magazine and journal of science, 2(11):\n559–572, 1901. 2\n[30] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya\nRamesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,\nAmanda Askell, Pamela Mishkin, Jack Clark, et al. Learning\ntransferable visual models from natural language supervision.\nIn International conference on machine learning, pages\n8748–8763. PmLR, 2021. 1, 2, 3\n[31] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard\nSchölkopf, Thomas Brox, and Peter Gehler. Towards total\nrecall in industrial anomaly detection. In Proceedings of the\nIEEE/CVF conference on computer vision and pattern\nrecognition, pages 14318–14328, 2022. 1, 2, 5\n[32] João Santos, Triet Tran, and Oliver Rippel. Optimizing\npatchcore for few/many-shot anomaly detection. arXiv\npreprint arXiv:2307.10792, 2023. 3\n[33] Thomas Schlegl, Philipp Seeböck, Sebastian M. Waldstein,\nUrsula Schmidt-Erfurth, and Georg Langs. Unsupervised\nanomaly detection with generative adversarial networks to\nguide marker discovery. CoRR, abs/1703.05921, 2017. 2\n[34] Thomas Schlegl, Philipp Seeböck, Sebastian M Waldstein,\nGeorg Langs, and Ursula Schmidt-Erfurth. f-anogan: Fast\nunsupervised anomaly detection with generative adversarial\nnetworks. Medical image analysis, 54:30–44, 2019. 1, 2\n[35] Mei-Ling Shyu, Shu-Ching Chen, Kanoksri Sarinnapakorn,\nand Liwu Chang. A novel anomaly detection scheme based\non principal component classifier. In Proceedings of\nInternational Conference on Data Mining, 2003. 2\n[36] Oriane Siméoni, Huy V Vo, Maximilian Seitzer, Federico\nBaldassarre, Maxime Oquab, Cijo Jose, Vasil Khalidov, Marc\nSzafraniec, Seungeun Yi, Michaël Ramamonjisoa, et al.\nDinov3. arXiv preprint arXiv:2508.10104, 2025. 2, 1\n[37] Michael E Tipping and Christopher M Bishop. Probabilistic\nprincipal component analysis. Journal of the Royal\nStatistical Society Series B: Statistical Methodology, 61(3):\n611–622, 1999. 4\n[38] Wikipedia contributors. Principal component analysis —\nWikipedia, the free encyclopedia, 2026. [Online; accessed\n3-March-2026]. 4\n\n[39] Guoyang Xie, Jinbao Wang, Jiaqi Liu, Feng Zheng, and\nYaochu Jin. Pushing the limits of fewshot anomaly detection\nin industry vision: Graphcore. arXiv preprint\narXiv:2301.12082, 2023. 3\n[40] Xiaohao Xu, Yunkang Cao, Huaxin Zhang, Nong Sang, and\nXiaonan Huang. Customizing visual-language foundation\nmodels for multi-modal anomaly detection and reasoning.\narXiv preprint arXiv:2403.11083, 2024. 1, 3\n[41] Jiawei Yu, Ye Zheng, Xiang Wang, Wei Li, Yushuang Wu,\nRui Zhao, and Liwei Wu. Fastflow: Unsupervised anomaly\ndetection and localization via 2d normalizing flows. arXiv\npreprint arXiv:2111.07677, 2021. 2\n[42] Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, and\nJiming Chen. Anomalyclip: Object-agnostic prompt learning\nfor zero-shot anomaly detection. arXiv preprint\narXiv:2310.18961, 2023. 1, 3, 7\n[43] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang,\nand Onkar Dabeer. Spot-the-difference self-supervised\npre-training for anomaly detection and segmentation. In\nEuropean conference on computer vision, pages 392–408.\nSpringer, 2022. 2, 5, 1\n\n10\n\n\fSubspaceAD: Training-Free Few-Shot Anomaly Detection\nvia Subspace Modeling\nSupplementary Material\nA. Per-Category Few-Shot Results\n\n(96.9% vs. 96.1%). This is notable because AnomalyDINO stores\ndense patch-level features for every normal image and performs\nK-NN retrieval over these embeddings, typically on the order of\n106 feature vectors per category on VisA. In contrast, SubspaceAD\nperforms a single forward pass and a lightweight subspace\nprojection, requiring no feature memory banks.\n\nTables 5 and 6 provide per-category few-shot performance on the\nMVTec-AD and VisA datasets.\nMVTec-AD (Table 5). SubspaceAD achieves consistently strong\nperformance across nearly all MVTec-AD categories. Even with\nonly one normal image, several categories (e.g., Bottle, Carpet,\nGrid, Leather, Tile, Toothbrush) reach perfect or near-perfect\nimage-level AUROC, indicating robust capture of normal\nappearance from one example. The Transistor category is a\nnotable exception, with a 1-shot Pixel PRO score of 68.9%. This\nlimitation is due to the characteristic of patch-based visual\nanomaly detection, which focuses on local appearance and\ntherefore does not explicitly account for logical or structural\nanomalies, such as missing or misplaced components.\n\nD. Inference Time Analysis\nAn analysis of inference speed is presented in Table 10. To ensure\nan algorithmic comparison independent of hardware, we further\nevaluate the standalone scoring head latency (isolated from the\nbackbone forward pass) in Table 9.\nEnd-to-End Latency. Table 10 reports the end-to-end inference\ntimes for various backbone configurations. Because these\nmeasurements were obtained on different hardware (NVIDIA A40\nfor AnomalyDINO vs. NVIDIA H100 for SubspaceAD), direct\nwall-clock speed comparisons are not appropriate. For both\nmethods, the total inference time is primarily dominated by the\nforward pass of the frozen backbone. The key distinction is\narchitectural: SubspaceAD achieves its performance using only the\nbackbone and a lightweight projection, eliminating the need to\nstore or search through feature memory banks.\n\nVisA (Table 6). SubspaceAD exhibits greater performance\nvariability across VisA categories, which is expected given the\ndataset’s higher visual diversity and complex backgrounds [43].\nCategories such as Cashew and Chewing Gum achieve excellent\nresults, with 1-shot image-level AUROC scores of 97.7% and\n99.2%, respectively. Conversely, categories like Macaroni2\n(80.4%) and PCB3 (86.5%) are more challenging. This\ndegradation primarily stems from background artifacts that\nresemble true defects and from the high intra-class variability of\nnormal samples. Both factors hinder patch-based methods from\nforming a compact subspace of normality from only a few shots.\n\nAlgorithmic Fairness (Scoring Head Only). To isolate the\nscoring mechanism from the backbone’s overhead, we measured\nthe time required to compute anomaly scores from extracted\nfeatures on an H100. As shown in Table 9, both methods exhibit\ncomparable latency in the few-shot regime. SubspaceAD requires\n≈74 ms per image, while AnomalyDINO requires ≈80 ms. While\nour subspace projection time is strictly invariant to the size of the\nsupport set once the PCA components are determined, the k-NN\nretrieval overhead of AnomalyDINO remains similarly marginal\nfor the small values of K evaluated here.\n\nB. Performance of DINOv3 Backbones\nFor completeness, we report the few-shot results using the\nDINOv3-7B backbone [36] in Table 7. These results are obtained\nusing 4096-dimensional features, extracted from layers 22–28 with\n16×16 patch tokens. SubspaceAD448 and SubspaceAD672 denote\nmodels evaluated at input image resolutions of 448×448 and\n672×672 pixels, respectively. As shown in Table 7, the DINOv3\nbackbone does not improve over the DINOv2-G backbone used in\nthe main paper (see Table 1), with DINOv2-G remaining stronger\noverall, especially for localization metrics.\n\nE. Additional Qualitative Results\nTo complement the qualitative experiments in the main paper\n(Fig. 1 and Fig. 3), this section provides a more extensive set of\nqualitative results. We present detailed anomaly maps for\nrepresentative samples from the VisA dataset in Fig. 6 and the\nMVTec-AD dataset in Fig. 7. These examples further illustrate the\nmodel’s localization performance across diverse object categories\nand anomaly types.\n\nC. Full-Shot Setting Analysis\nA comparison in the full-shot setting, where all available normal\ntraining samples are used to build the model of normality, is\nprovided in Table 8. On MVTec-AD, AnomalyDINO obtains\nslightly higher image-level performance, with 99.5% I-AUROC\ncompared to 99.2% for SubspaceAD. Both methods achieve the\nsame Pixel AUROC of 98.2%, while SubspaceAD obtains a higher\nPixel PRO score of 95.6% compared to 95.0%.\nOn the more challenging VisA dataset, SubspaceAD surpasses\nAnomalyDINO across all reported metrics, including image-level\nAUROC (98.2% vs. 97.6%), image-level AUPR (98.3% vs.\n98.0%), pixel-level AUROC (99.1% vs. 98.8%), and Pixel PRO\n\nF. Failure Cases and Limitations\nWhile SubspaceAD demonstrates strong performance, it is\nimportant to acknowledge its limitations, particularly those\ninherent to patch-based, few-shot methodologies. Two primary\nmodes of failure are identified, which are common challenges in\nthis domain and are illustrated in Fig. 8.\n\n1\n\n\fTable 5. Detailed few-shot anomaly segmentation results of SubspaceAD on the MVTec AD dataset. We report mean Image AUROC (%),\nImage AUPR (%), Pixel AUROC (%), and Pixel PRO (%) results.\n1-shot\n\nCategory\n\n2-shot\n\n4-shot\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPRO\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPRO\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPRO\n\nBottle\nCable\nCapsule\nCarpet\nGrid\nHazelnut\nLeather\nMetal Nut\nPill\nScrew\nTile\nToothbrush\nTransistor\nWood\nZipper\n\n100.0 ± 0.0\n92.1 ± 1.4\n88.1 ± 11.3\n100.0 ± 0.0\n100.0 ± 0.0\n97.6 ± 3.4\n100.0 ± 0.0\n100.0 ± 0.0\n96.2 ± 0.8\n88.4 ± 1.7\n100.0 ± 0.1\n98.8 ± 1.4\n96.6 ± 0.8\n99.6 ± 0.2\n99.1 ± 0.5\n\n100.0 ± 0.0\n95.5 ± 0.7\n96.8 ± 3.9\n100.0 ± 0.0\n100.0 ± 0.0\n98.6 ± 2.0\n100.0 ± 0.0\n100.0 ± 0.0\n99.2 ± 0.2\n95.4 ± 0.9\n100.0 ± 0.0\n99.5 ± 0.6\n94.5 ± 1.4\n99.9 ± 0.0\n99.8 ± 0.1\n\n98.6 ± 0.0\n95.6 ± 0.2\n98.0 ± 0.2\n99.2 ± 0.0\n99.5 ± 0.0\n99.5 ± 0.2\n98.9 ± 0.0\n97.2 ± 0.9\n95.5 ± 0.5\n99.1 ± 0.1\n97.7 ± 0.1\n98.9 ± 0.5\n90.4 ± 1.1\n96.7 ± 0.3\n98.3 ± 0.2\n\n96.5 ± 0.1\n90.3 ± 0.7\n96.7 ± 0.5\n98.2 ± 0.1\n98.1 ± 0.1\n97.1 ± 1.2\n98.3 ± 0.1\n95.9 ± 0.9\n97.8 ± 0.1\n96.2 ± 0.3\n94.8 ± 0.2\n97.0 ± 0.6\n68.9 ± 1.4\n96.5 ± 0.2\n95.4 ± 0.6\n\n100.0 ± 0.0\n92.7 ± 1.2\n92.7 ± 3.6\n100.0 ± 0.0\n100.0 ± 0.0\n97.3 ± 6.0\n100.0 ± 0.0\n100.0 ± 0.0\n96.6 ± 0.5\n90.2 ± 2.8\n100.0 ± 0.0\n96.7 ± 3.4\n96.7 ± 1.3\n99.7 ± 0.1\n99.5 ± 0.2\n\n100.0 ± 0.0\n96.2 ± 0.6\n98.4 ± 0.9\n100.0 ± 0.0\n100.0 ± 0.0\n98.1 ± 4.3\n100.0 ± 0.0\n100.0 ± 0.0\n99.4 ± 0.1\n96.2 ± 1.2\n100.0 ± 0.0\n98.7 ± 1.3\n94.7 ± 2.3\n99.9 ± 0.0\n99.9 ± 0.0\n\n98.7 ± 0.0\n95.6 ± 0.2\n98.2 ± 0.1\n99.2 ± 0.0\n99.5 ± 0.0\n99.6 ± 0.1\n98.9 ± 0.0\n97.8 ± 0.2\n95.8 ± 0.2\n99.2 ± 0.1\n97.7 ± 0.1\n98.8 ± 0.5\n92.1 ± 0.8\n96.8 ± 0.5\n98.4 ± 0.2\n\n96.7 ± 0.1\n90.6 ± 0.5\n97.1 ± 0.2\n98.2 ± 0.0\n98.2 ± 0.1\n97.8 ± 0.6\n98.3 ± 0.1\n96.5 ± 0.2\n97.9 ± 0.1\n96.7 ± 0.3\n94.7 ± 0.2\n96.9 ± 0.7\n71.5 ± 1.2\n96.7 ± 0.2\n95.8 ± 0.4\n\n100.0 ± 0.0\n93.5 ± 0.7\n93.4 ± 4.8\n100.0 ± 0.0\n100.0 ± 0.0\n99.4 ± 1.4\n100.0 ± 0.0\n100.0 ± 0.0\n97.2 ± 0.8\n91.9 ± 1.1\n100.0 ± 0.1\n98.8 ± 0.7\n96.3 ± 2.4\n99.7 ± 0.1\n99.5 ± 0.2\n\n100.0 ± 0.0\n96.7 ± 0.5\n98.5 ± 1.2\n100.0 ± 0.0\n100.0 ± 0.0\n99.6 ± 0.8\n100.0 ± 0.0\n100.0 ± 0.0\n99.4 ± 0.2\n96.9 ± 0.5\n100.0 ± 0.0\n99.6 ± 0.3\n94.7 ± 3.0\n99.9 ± 0.0\n99.9 ± 0.1\n\n98.7 ± 0.0\n95.7 ± 0.2\n98.3 ± 0.1\n99.3 ± 0.0\n99.5 ± 0.0\n99.6 ± 0.0\n98.9 ± 0.0\n97.8 ± 0.1\n96.2 ± 0.4\n99.3 ± 0.0\n97.7 ± 0.1\n99.2 ± 0.2\n92.6 ± 1.1\n96.8 ± 0.2\n98.6 ± 0.1\n\n96.7 ± 0.1\n90.9 ± 0.4\n97.3 ± 0.2\n98.3 ± 0.0\n98.3 ± 0.1\n98.1 ± 0.3\n98.3 ± 0.1\n96.5 ± 0.2\n98.1 ± 0.2\n97.0 ± 0.1\n94.6 ± 0.1\n97.5 ± 0.4\n72.7 ± 1.5\n96.6 ± 0.1\n96.2 ± 0.3\n\nMean\n\n97.1 ± 0.9\n\n98.6 ± 0.4\n\n97.5 ± 0.1\n\n94.5 ± 0.2\n\n97.5 ± 0.7\n\n98.8 ± 0.4\n\n97.8 ± 0.1\n\n94.9 ± 0.1\n\n98.0 ± 0.4\n\n99.0 ± 0.2\n\n97.9 ± 0.1\n\n95.1 ± 0.1\n\nTable 6. Detailed few-shot anomaly segmentation results of SubspaceAD on the VisA dataset. We report mean Image AUROC (%), Image\nAUPR (%), Pixel AUROC (%), and Pixel PRO (%) results.\n1-shot\n\nCategory\n\n2-shot\n\n4-shot\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPRO\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPRO\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPRO\n\nCandle\nCapsules\nCashew\nChewing Gum\nFryum\nMacaroni1\nMacaroni2\nPCB1\nPCB2\nPCB3\nPCB4\nPipe Fryum\n\n94.4 ± 0.8\n96.5 ± 0.7\n97.7 ± 0.7\n99.2 ± 0.1\n97.0 ± 0.6\n92.0 ± 1.1\n80.4 ± 5.1\n92.4 ± 3.2\n88.7 ± 2.2\n86.5 ± 1.8\n98.3 ± 0.7\n95.7 ± 2.3\n\n94.2 ± 0.7\n97.9 ± 0.4\n98.9 ± 0.3\n99.6 ± 0.1\n98.7 ± 0.3\n91.5 ± 1.4\n76.2 ± 8.0\n90.8 ± 2.6\n86.7 ± 2.1\n86.1 ± 2.2\n98.1 ± 0.8\n97.6 ± 1.3\n\n99.4 ± 0.0\n98.5 ± 0.2\n99.0 ± 0.0\n99.6 ± 0.0\n96.5 ± 0.3\n99.6 ± 0.0\n99.7 ± 0.0\n99.3 ± 0.0\n96.9 ± 0.3\n95.0 ± 0.4\n96.4 ± 0.4\n98.7 ± 0.1\n\n97.9 ± 0.2\n97.0 ± 0.3\n98.5 ± 0.2\n96.0 ± 0.2\n95.4 ± 0.5\n95.8 ± 0.3\n97.5 ± 0.5\n95.0 ± 0.5\n91.4 ± 0.6\n90.4 ± 0.8\n92.2 ± 1.1\n98.3 ± 0.1\n\n94.2 ± 0.5\n96.8 ± 0.3\n97.9 ± 1.3\n99.1 ± 0.1\n97.9 ± 0.1\n92.6 ± 1.4\n81.4 ± 5.4\n92.8 ± 1.4\n90.5 ± 1.0\n88.0 ± 2.6\n98.1 ± 0.6\n96.1 ± 1.9\n\n93.8 ± 0.7\n98.1 ± 0.2\n99.0 ± 0.6\n99.6 ± 0.0\n99.1 ± 0.1\n92.1 ± 1.4\n77.1 ± 9.0\n91.2 ± 1.0\n87.5 ± 1.6\n87.4 ± 3.1\n97.8 ± 0.8\n97.8 ± 1.0\n\n99.4 ± 0.0\n98.6 ± 0.1\n99.2 ± 0.1\n99.6 ± 0.0\n96.8 ± 0.1\n99.7 ± 0.0\n99.7 ± 0.1\n99.3 ± 0.0\n97.1 ± 0.1\n95.2 ± 0.1\n96.6 ± 0.3\n98.9 ± 0.1\n\n98.1 ± 0.1\n97.2 ± 0.3\n98.6 ± 0.1\n96.3 ± 0.1\n95.5 ± 0.3\n96.2 ± 0.4\n97.8 ± 0.2\n95.1 ± 0.3\n92.2 ± 0.3\n91.1 ± 0.6\n92.3 ± 0.9\n98.4 ± 0.1\n\n93.9 ± 0.9\n97.0 ± 0.9\n98.7 ± 0.8\n99.1 ± 0.0\n98.1 ± 0.3\n94.2 ± 1.6\n84.7 ± 3.9\n93.2 ± 0.9\n91.7 ± 1.3\n89.9 ± 2.3\n98.4 ± 0.4\n97.8 ± 0.3\n\n93.4 ± 1.1\n98.2 ± 0.6\n99.4 ± 0.4\n99.5 ± 0.0\n99.2 ± 0.1\n93.7 ± 1.3\n81.8 ± 6.5\n91.6 ± 0.9\n88.9 ± 1.7\n89.8 ± 2.0\n98.0 ± 0.6\n98.7 ± 0.2\n\n99.4 ± 0.0\n98.6 ± 0.1\n99.3 ± 0.1\n99.6 ± 0.0\n97.0 ± 0.1\n99.8 ± 0.0\n99.8 ± 0.0\n99.4 ± 0.0\n97.2 ± 0.0\n95.4 ± 0.2\n96.8 ± 0.2\n99.0 ± 0.0\n\n98.1 ± 0.1\n97.3 ± 0.3\n98.7 ± 0.1\n96.2 ± 0.1\n95.7 ± 0.3\n96.8 ± 0.4\n98.0 ± 0.2\n95.3 ± 0.1\n92.7 ± 0.2\n91.8 ± 0.4\n92.4 ± 1.0\n98.5 ± 0.1\n\nMean\n\n93.2 ± 0.8\n\n93.0 ± 0.8\n\n98.2 ± 0.1\n\n95.5 ± 0.1\n\n93.8 ± 0.4\n\n93.4 ± 0.7\n\n98.3 ± 0.0\n\n95.7 ± 0.1\n\n94.7 ± 0.2\n\n94.3 ± 0.5\n\n98.4 ± 0.0\n\n96.0 ± 0.1\n\nFigure 7. Additional qualitative results on MVTec-AD. Examples\nfrom six categories (Bottle, Cable, Metal Nut, Pill, Zipper, Grid).\nRows show the input image, ground-truth mask, and our prediction.\nSubspaceAD effectively localizes structural, positional, and surface\nanomalies across varied MVTec categories.\n\nFigure 6. Additional qualitative results on VisA. Examples from\nsix categories (PCB1–4, Chewing Gum, Fryum). Rows show the\ninput image, ground-truth mask, and our prediction. SubspaceAD\naccurately localizes both subtle texture anomalies and fine structural\ndefects across diverse VisA domains.\n\nmay be incorrectly identified as normal texture. The model lacks\nthe semantic, object-level understanding to know that a component\nshould be present in that specific location.\n\nLogical and Structural Anomalies. As a patch-based method,\nSubspaceAD excels at modeling the local appearance and texture\nof normal samples. However, it does not explicitly model global\nspatial relationships or semantic rules. Consequently, it struggles\nwith logical anomalies, such as a missing component. For example,\nin the MVTec-AD Transistor category (discussed in Appendix A),\nwhen a transistor is missing, the exposed circuit-board background\n\nBackground Artifacts and High Intra-Class Variance. The\nmodel struggles in categories with high normal variance or\ncomplex, cluttered backgrounds, as seen in some parts of the VisA\ndataset. As noted in Appendix A, categories Macaroni2 and PCB3\n\n2\n\n\fTable 7. Few-shot anomaly detection and localization results using the DINOv3-7B backbone. This backbone is consistently outperformed\nby DINOv2-G (see Table 1 in the main manuscript).\nMVTec-AD\nImage-level\nSetup\n\nMethod\n\n1-shot\n\nVisA\n\nPixel-level\n\nImage-level\n\nPixel-level\n\nAUROC\n\nAUPR\n\nAUROC\n\nPRO\n\nAUROC\n\nAUPR\n\nAUROC\n\nPRO\n\nSubspaceAD448 (DINOv3)\nSubspaceAD672 (DINOv3)\n\n96.4\n96.2\n\n98.0\n97.9\n\n97.3\n97.3\n\n94.0\n94.2\n\n91.8\n92.8\n\n91.9\n92.9\n\n98.0\n98.0\n\n93.8\n94.7\n\n2-shot\n\nSubspaceAD448 (DINOv3)\nSubspaceAD672 (DINOv3)\n\n97.1\n96.8\n\n98.3\n98.2\n\n97.6\n97.5\n\n94.5\n94.7\n\n92.9\n93.7\n\n92.7\n93.6\n\n98.2\n98.1\n\n94.3\n95.1\n\n4-shot\n\nSubspaceAD448 (DINOv3)\nSubspaceAD672 (DINOv3)\n\n97.6\n97.4\n\n98.6\n98.5\n\n97.8\n97.8\n\n94.8\n95.0\n\n93.7\n94.6\n\n93.4\n94.5\n\n98.3\n98.3\n\n94.7\n95.3\n\nTable 8. Comparison of anomaly detection and localization performance on MVTec-AD and VisA in the full-shot setting. Best results are in\nbold, and second-best are underlined.\nMVTec-AD\nImage-level\nSetup\n\nMethod\n\nFull-shot\nFull-shot\n\nAnomalyDINO\nSubspaceAD (Ours)\n\nVisA\n\nPixel-level\n\nImage-level\n\nPixel-level\n\nAUROC\n\nAUPR\n\nAUROC\n\nPRO\n\nAUROC\n\nAUPR\n\nAUROC\n\nPRO\n\n99.5\n99.2\n\n99.8\n99.6\n\n98.2\n98.2\n\n95.0\n95.6\n\n97.6\n98.2\n\n98.0\n98.3\n\n98.8\n99.1\n\n96.1\n96.9\n\nTable 9. Hardware-normalized scoring head latency (H100). We\nmeasure the time to process features after extraction. SubspaceAD\nlatency is invariant to K, whereas memory-bank retrieval scales\nwith the number of shots.\nMethod\n\nSetting (K)\n\nScoring Time (ms / img)\n\nAnomalyDINO\nAnomalyDINO\nAnomalyDINO\n\n1-shot\n2-shot\n4-shot\n\n80.1\n80.3\n80.5\n\nSubspaceAD (Ours)\n\n1–4 shot\n\n74.1\n\nare challenging because their normal samples exhibit significant\nvariation. This makes it difficult to form a single, compact\nsubspace of normality from only a few shots. Furthermore, benign\nbackground artifacts (e.g., shadows, debris) that are not present in\nthe few-shot support set may be incorrectly flagged as anomalies,\nsince the model has no mechanism to infer that such regions\nbelong to the normal background.\n\nFigure 8. Qualitative failure cases. Each row shows the image,\nground-truth mask, and our anomaly map. Examples include\nmissed structural defects (e.g., missing transistor component), incorrect detection of cable swaps, and false positives from intra-class\nvariability or background clutter.\n\nG. Impact of Rotation-Agnostic Preprocessing\n\nOutlook. Despite these limitations, the overall results demonstrate\nthat even a simple, training-free subspace model surpasses far\nmore complex approaches in both detection accuracy and\nefficiency. The clarity of its statistical formulation, combined with\nits strong few-shot generalization, highlights the potential of\nfoundation-model representations when paired with lightweight,\ninterpretable modeling. Future work may extend this direction by\nincorporating geometric or semantic priors to better handle logical\nand structural anomalies.\n\nIn the standard MVTec-AD dataset, the orientation of the\nTransistor object is strictly fixed, meaning misrotation explicitly\nconstitutes an anomaly. To assess the effect of a uniform,\nrotation-agnostic preprocessing pipeline across all categories, we\nconducted an ablation where random rotations were applied to the\nnormal support samples.\nHowever, for orientation-dependent categories like Transistor,\n\n3\n\n\fTable 10. Inference time comparison with AnomalyDINO on MVTec-AD (1-shot, 448px). Note that AnomalyDINO results are from the\nauthors’ paper [11], measured on an NVIDIA A40, while our measurements are obtained on an NVIDIA H100.\nMethod\n\nBackbone\n\nParams (M)\n\nWinCLIP [18]\n\nCLIP ViT-B/16+\n\n150.0\n\nNVIDIA T4\n\n389\n\nAnomalyDINO [11]\nAnomalyDINO [11]\nAnomalyDINO [11]\n\nDINOv2 ViT-S\nDINOv2 ViT-B\nDINOv2 ViT-L\n\n21.7\n85.8\n303.3\n\nNVIDIA A40\nNVIDIA A40\nNVIDIA A40\n\n60\n84\n141\n\nSubspaceAD (Ours) – DINOv2 Backbones (NVIDIA H100)\nSubspaceAD (Ours) DINOv2 ViT-S\n21.7\nNVIDIA H100\nSubspaceAD (Ours) DINOv2 ViT-B\n85.8\nNVIDIA H100\nSubspaceAD (Ours) DINOv2 ViT-L\n303.3\nNVIDIA H100\nSubspaceAD (Ours) DINOv2 ViT-G\n1100.0\nNVIDIA H100\n\n36\n56\n112\n127\n\nSubspaceAD (Ours) – DINOv3 Backbones (NVIDIA H100)\nSubspaceAD (Ours) DINOv3 ViT-S\n21.0\nNVIDIA H100\nSubspaceAD (Ours) DINOv3 ViT-B\n86.0\nNVIDIA H100\nSubspaceAD (Ours) DINOv3 ViT-7B\n7000.0\nNVIDIA H100\n\n16\n21\n330\n\nrotating the normal samples during PCA fitting fundamentally\nalters the model’s definition of normality. By incorporating rotated\nfeatures into the normal subspace, the model inadvertently learns\nto accept rotational defects as normal variations, causing it to miss\nactual misrotation anomalies during inference.\nTable 11 outlines the performance under this rotation-agnostic\nprotocol. As expected, forcing the subspace to account for\nrotational variance leads to explicit performance drops compared\nto the standard aligned baseline (cf. Table 5). In the 1-shot setting,\nImage AUROC decreases by 7.5 percentage points, from 96.6% to\n89.1%, while Pixel PRO drops by 6.3 percentage points, from\n68.9% to 62.6%. This degradation persists in the 4-shot setting,\nwhere Pixel PRO decreases by 8.3 percentage points, from 72.7%\nto 64.4%. These results demonstrate that applying uniform\nrotational preprocessing is counterproductive for categories where\norientation is a defining characteristic of the normal state.\nTable 11. Few-shot anomaly segmentation results of SubspaceAD\non the MVTec-AD Transistor category using a rotation-agnostic\nprotocol. We report mean Image AUROC (%), Image AUPR (%),\nPixel AUROC (%), and Pixel PRO (%) ± standard deviation across\n5 seeds.\nShots\n\nImg AUROC\n\nImg AUPR\n\nPxl AUROC\n\nPxl PRO\n\n1-shot\n2-shot\n4-shot\n\n89.1 ± 7.5\n92.6 ± 3.6\n93.4 ± 4.0\n\n84.7 ± 5.7\n88.5 ± 4.7\n90.3 ± 4.3\n\n82.3 ± 3.1\n83.6 ± 0.9\n84.0 ± 1.9\n\n62.6 ± 2.0\n63.7 ± 0.9\n64.4 ± 1.3\n\n4\n\nGPU\n\nTime (ms / image)\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"