"<!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>Rethinking Continual Anomaly Detection on the Edge:\nBenchmarking Under Realistic Industrial Conditions\nChad Weatherly, Sen Lin\n\narXiv:2605.24251v2 [cs.LG] 29 Jun 2026\n\nUniversity of Houston\n\nAbstract. Continual anomaly detection (CAD) addresses the need for industrial inspection systems to\nadapt to evolving production conditions, yet existing methods share three critical gaps: unrealistic evaluation, no systematic comparison, and no consideration of edge deployment constraints. We introduce\na unified benchmark combining discrete-task evaluation on structural and logical anomalies, a novel\ncontinuous drift protocol, the first head-to-head comparison of all published CAD methods, and computational efficiency profiling on edge hardware. Our results reveal that existing CAD methods do not\nconsistently outperform traditional approaches with simple experience replay. Thus motivated, we propose DINOSaur, a training-free method combining a frozen DINOv3 backbone with spatially-indexed\ncoreset memory and neighborhood-restricted anomaly scoring. DINOSaur achieves zero forgetting by\nconstruction, outperforms all evaluated methods on every protocol except geometric drift (where all\nmethods collapse to chance), and runs at sub-100 ms inference on an NVIDIA Jetson Orin Nano, with\non-device adaptation to new tasks in under 30 seconds.\nKeywords: Continual Learning · Anomaly Detection · Industrial Inspection · Benchmark · Edge Deployment\n\n1\n\nIntroduction\n\nThe rise of Industry 4.0 has brought increased automation to manufacturing, including the adoption of AIdriven quality control. In production environments, poor quality control can be extremely costly, and missed\ndefects can result in warranty claims, product recalls, and significant reputational damage [11]. Anomaly\ndetection (AD), which identifies defective products using models trained primarily on normal samples, has\nemerged as a natural fit for automated visual inspection [7] in industrial environments.\nHowever, real-world manufacturing processes are never truly static. Environmental conditions fluctuate,\ntools wear and degrade, material batches vary, and production parameters drift over time. These factors cause\nthe distribution of normal product appearances to shift continuously, posing a fundamental challenge for AD\nsystems trained under the assumption of a fixed data distribution. When the normal distribution changes, a\npreviously deployed AD model may either miss genuine defects or flag normal variations as anomalous, both\nof which carry significant economic consequences. Continual learning (CL) offers a framework that enables\nmodels to adapt to new data while retaining knowledge of previously learned distributions [32]. Several recent\nworks have proposed methods for continual anomaly detection (CAD), combining AD architectures with CL\nstrategies to maintain performance as data evolves across sequential tasks [19, 23, 31].\nDespite this progress, we identify three critical gaps in the current CAD literature:\n(1) Computational feasibility ignored. Industrial AD systems typically run on edge devices with limited compute, often requiring multiple inference passes per second to keep pace with production throughput.\nRecent CAD methods employ large-scale architectures built on vision-language models (VLMs), diffusion\nmodels, or large vision transformers, with no analysis of whether these models could feasibly be deployed in\nthe constrained environments [13, 20, 33, 40]. While recent work studies efficient anomaly detection on edge\nhardware [3, 4], it targets static or single-backbone replay settings. Our feasibility concern is with dedicated\nCAD methods, whose added machinery for sequential learning and task identification has not been examined\nfor edge deployment.\n(2) Unrealistic and narrow evaluation. Existing CAD benchmarks treat each product categories\nas distinct tasks, creating sharp and discrete boundaries (e.g., bottle to cable). In reality, industrial drift is\ngradual—the same product changes appearance over time due to process variations. No existing benchmark\ncaptures this continuous drift scenario. Moreover, evaluation is limited to structural anomalies (surface\n\n\f2\n\nWeatherly, Lin\n\ndefects), ignoring logical anomalies (missing components, incorrect arrangements) [6]—a significant unsolved\nchallenge that no CAD method has been evaluated on.\n(3) Lack of systematic comparison. The three published CAD methods, i.e., DNE [19], IUF [31], and\nUCAD [23], were each evaluated independently against different baselines and under different experimental\nconditions. The three methods have never been comprehensively evaluated against one another, making it\nimpossible to understand their relative strengths and weaknesses, let alone their feasibility in real-world\nscenarios.\nTo address these gaps, this paper makes the following contributions:\n– We introduce a unified evaluation framework for CAD that, for the first time, combines a head-tohead comparison of all published CAD methods, a novel continuous drift protocol, evaluation on logical\nanomalies, and computational efficiency profiling on edge hardware.\n– Our evaluation reveals that dedicated CAD methods do not consistently outperform traditional\nbaselines with simple experience replay. Motivated by this finding, we propose DINOSaur1 , a trainingfree method that outperforms all evaluated approaches at a fraction of the computational cost, enabling\npractical edge deployment.\n\n2\n\nRelated Work\n\nAnomaly Detection in Industrial Settings. Industrial anomaly detection (IAD) methods broadly fall\ninto two paradigms. Distribution-based methods [10, 25, 27] model the distribution of normal-sample features and flag out-of-distribution test samples as anomalous, using techniques such as nearest-neighbor\nscoring, multivariate Gaussian fitting, or learned normality scores. Reconstruction-based methods [35, 36]\ntrain encoder-decoder networks on normal images and use high reconstruction error as an anomaly signal.\nUnified or multi-class AD [35] handles multiple categories simultaneously but assumes access to all data at\nonce, unlike CAD’s sequential constraint.\nLarge-Scale Models for Anomaly Detection. Recent work has applied large foundation models to AD,\nincluding LLM-based reasoning [13], vision-language prompting [40], in-context learning [41], and diffusion\nmodels [20, 33]. While these achieve strong benchmark results, they require billions of parameters and GPUclass hardware with inference latencies measured in seconds per image—fundamentally incompatible with\nedge deployment where throughput of several images per second is required. Moreover, these large models\nare not immune to catastrophic forgetting: adapting vision-language models such as CLIP to sequential tasks\ncauses significant degradation in zero-shot transfer ability [39], and multimodal LLMs similarly fail to retain\ntheir pre-trained visual understanding after fine-tuning [38]. This dual challenge—computational infeasibility\nand susceptibility to forgetting—further motivates our focus on lightweight, training-free approaches for\nedge-deployed CAD.\nContinual Learning. CL addresses the problem of learning from a sequence of tasks {D1 , D2 , . . . , DT },\nsubject to the constraint that when training on task t, only dataset Dt is accessible (data from D1 , . . . , Dt−1\nis unavailable). Each task is a unique set of data, Dt = {xt , yt } for t ∈ [1, 2, . . . , T ]. Under the CL framework,\nwe aim to build a model that can continuously learn new tasks with minimum Catastrophic Forgetting of\nthe knowledge learned from previous tasks [32].\nExisting CL strategies fall into three broad families. Regularization-based methods add penalty terms to\nthe loss function that restrict weight updates in order to preserve the important knowledge for previous\ntasks. Elastic Weight Consolidation (EWC) [17] uses Fisher information to identify important parameters,\nSynaptic Intelligence (SI) [37] tracks parameter importance online, and Memory Aware Synapses (MAS) [1]\ncomputes importance based on output sensitivity. Architecture-based methods allocate dedicated parameters\nor sub-networks for different tasks, as in Progressive Neural Networks [28]. Memory-based methods store\ninformation about previous tasks and modify the new task learning to leverage this information, which can\nbe further divided into rehearsal-based methods and gradient projection based methods. The former stores raw\nexemplars or feature representations from previous tasks and replay them during training on new tasks, such\nas Experience Replay [26] and Dark Experience Replay [9]. The latter [21,22,29] stores gradient information\nof previous tasks in this memory and uses this to modify the gradient direction for the new task. Empirically,\n1\n\nCode and data: https://github.com/Continue-Edge-AI-Lab/Rethinking-Continual-AD\n\n\fRethinking Continual Anomaly Detection\n\n3\n\nmemory-based methods consistently achieve the strongest performance across CL benchmarks [32], as they\nmost directly address forgetting by maintaining access to past information.\nContinual Anomaly Detection. To date, three published methods have specifically addressed the problem\nof CAD in realistic industrial settings. DNE [19] stores per-task embedding statistics from a Vision Transformer (ViT) backbone and scores anomalies via Mahalanobis distance at image-level only. IUF [31] uses a\nViT encoder-decoder with regularized latent space separation and constrained gradient updates. UCAD [23]\ncombines contrastive learning with SAM [16] for texture decomposition and a task-specific knowledge bank.\nDetailed architectural descriptions of each method are provided in Sec. A.\nSeveral benchmarks for CAD have emerged very recently, but don’t compare CAD methods directly.\nBugarin et al . [8] introduce a pixel-level CAD benchmark on MVTec-AD, evaluating off-the-shelf AD methods (PatchCore, CFA, STFPM, EfficientAD, FastFlow, among others) wrapped with standard replay or\nmemory-bank strategies. Pezzè et al . [24] similarly benchmark existing AD methods under replay, contributing a compressed-replay strategy that reduces memory via super-resolution but with no new detection\narchitecture. Continual-MEGA [18] offers a large-scale benchmark and evaluates zero-shot generalization; its\nevaluated methods are CAD methods and CLIP-based VLMs, though it proposes a CLIP-based baseline with\nmixture-of-expert adapters specifically to mitigate forgetting in large models. A common thread across all\nthree is reliance on generic CL strategies, predominantly replay, applied to conventional AD backbones, without methods designed around the specific constraints of continual anomaly detection (e.g., non-stationary\nnormality, unsupervised, or edge deployment). Closest to our edge focus, Barusco et al . reduce the cost of\nstatic AD on edge hardware [3] and study continual VAD on the edge with compressed replay [4], but both\napply generic replay to a single static backbone and do not compare dedicated CAD methods, continuous\ndrift, or logical anomalies. Our benchmark differs in several further respects: we are the first to include a\ncontinuous drift protocol (rather than only discrete category shifts), the first to evaluate CAD on logical\nanomalies via MVTec-LOCO, and the first to profile computational efficiency on actual edge hardware.\n\n3\n\nA Unified Benchmark for Continual Anomaly Detection\n\n3.1\n\nMotivation\n\nThe central motivation for our benchmark is the disconnect between how CAD methods are currently evaluated and how industrial AD systems actually operate. In a real manufacturing environment, an inspection\nsystem monitors the same product over time. The product’s visual appearance changes gradually as environmental conditions shift (temperature, humidity, lighting), tools degrade, material batches change, or\nproduction processes drift. These changes create a continuous evolution of the normal data distribution—not\nthe sharp, categorical shifts simulated by existing IAD datasets. For example, a factory inspecting magnetic\ntiles for surface defects will experience gradual sensor degradation, seasonal lighting shifts, and material\nbatch variation—all of which alter what “normal” looks like, yet the system must continue detecting genuine defects throughout. This is fundamentally different from a system that must suddenly transition from\ninspecting bottles to inspecting cables.\nBeyond the distribution drift problem, existing CAD evaluations are also narrow in scope. Industrial\ndefects are not limited to surface-level structural anomalies; logical anomalies, such as missing components\nand incorrect arrangements, are equally prevalent and require fundamentally different detection strategies,\nyet no published CAD method has been evaluated on them.\nOur benchmark therefore evaluates CAD methods along three axes corresponding to the identified gaps:\n(1) evaluation realism and scope, covering both the standard discrete task protocol and a novel continuous\ndrift protocol alongside logical anomaly evaluation via MVTec-LOCO; (2) systematic comparison of all\nexisting CAD methods against each other and against traditional AD baselines; and (3) computational\nefficiency profiling for edge deployment feasibility.\n3.2\n\nDiscrete Task Protocol\n\nFor our discrete task protocol, we used the standard datasets for both AD and CAD [34]:\nMVTec-AD. MVTec-AD [7] contains 15 object categories spanning textures and objects, each treated\nas a separate task learned sequentially. Only normal samples are used during training (unsupervised setting),\n\n\f4\n\nWeatherly, Lin\n\nreflecting the practical reality that anomalous samples are scarce in manufacturing. This protocol serves as\nour baseline for direct comparison with existing methods.\nMVTec-LOCO. MVTec-LOCO [6] contains 5 categories that include both structural and logical anomalies—defects requiring global scene understanding. The sequential protocol mirrors MVTec-AD, with each\ncategory as a task.\n3.3\n\nContinuous Drift Protocol\n\nTo simulate realistic industrial data drift, we design a protocol based on the Magnetic Tile Defects (MTD)\ndataset [14]. MTD contains a single product category (magnetic tiles) with multiple defect types (blowhole,\ncrack, break, fray, uneven), making it ideal for studying within-product distribution shift rather than betweenproduct category changes.\nDrift Simulation via Progressive Augmentation. We construct a sequence of T = 10 tasks from the MTD\ndataset by applying image augmentations of progressively increasing intensity. Let A(x, α) denote an augmentation function applied to image x with intensity α. For task t ∈ {1, . . . , T }, the intensity is greater for\neach successive task:\n  \\alpha _t &gt; \\alpha _{t-1} ~ \\forall ~ t &gt; 1. \\label {eq:intensity} \n(1)\nThe data for each task is:\n  D_t = \\{ \\mathcal {A}(\\mathbf {x}, \\alpha _t) \\mid \\mathbf {x} \\in D_{\\text {MTD}} \\}, \\label {eq:task_data} \n\n(2)\n\nwhere DMTD is the original MTD dataset. As t increases, images undergo more severe distortion, simulating\ngradual environmental or process drift.\nAugmentation Types. We run three separate experimental tracks, each simulating a different category of\nreal-world drift:\n– Color distortion: simulates lighting changes and material batch variation via progressive hue, saturation, brightness, and contrast shifts.\n– Gaussian blur: simulates sensor degradation and focus drift via increasing kernel size and standard\ndeviation.\n– Geometric distortion: simulates orientation changes and camera misalignment via progressive perspective transforms, rotations, and warping.\nEach augmentation type maps to documented sources of variation in industrial environments [12], providing interpretable and physically motivated drift scenarios rather than arbitrary distribution shifts. We\nempirically evaluated the intensity ranges to ensure that the magnetic tile objects were still visible. The\nexact parameter values for all 10 intensity levels of each drift type are provided in Sec. C.3 and illustrated\nin Figure 1.\n3.4\n\nEvaluation Metrics\n\nImage-level anomaly scores are obtained by taking the maximum patch-level score. We evaluate all methods\nusing the following metrics:\nImage-level AUROC (Area Under the ROC Curve) measures threshold-independent discrimination\nbetween normal and anomalous images. We report the final AUROC averaged across all tasks after training\non the last task.\nImage-level Accuracy provides a threshold-dependent measure of classification performance on both\nnormal and anomalous samples.\nRecall (Sensitivity) specifically measures the fraction of anomalous samples correctly identified, which\nis critical in industrial settings where missed defects (false negatives) carry higher costs than false positives.\nAccuracy and recall use a fixed threshold (97.5th percentile of training scores); details on threshold selection\nare in Sec. B. Since AUROC is threshold-independent, it remains our primary metric.\nPixel-level AUROC measures localization of the defect region, complementing image-level detection.\nIn distribution-based methods like DINOSaur and PatchCore, pixel-level anomaly maps are derived directly\n\n\fRethinking Continual Anomaly Detection\n\n5\n\nIncreasing Drift Intensity\nOriginal\n\nTask 1\n\nColor Distortion\nTask 3\nTask 5\n\nTask 7\n\nTask 10\n\nw=[0.00, 0.05]\n\nw=[0.10, 0.15]\n\nw=[0.20, 0.25]\n\nw=[0.30, 0.35]\n\nw=[0.45, 0.50]\n\nk=1, =0.5\n\nk=5, =1.5\n\nk=9, =2.5\n\nk=13, =3.5\n\nk=19, =5.0\n\n=2°, s=0.01\n\n=6°, s=0.03\n\n=10°, s=0.05\n\n=14°, s=0.07\n\n=20°, s=0.10\n\nGaussian Blur\n\nGeometric Distortion\n\nFig. 1: Progressive augmentation on MTD across tasks for each drift type. Top: Color distortion (brightness, contrast,\nsaturation). Middle: Gaussian blur (increasing kernel size and σ). Bottom: Geometric distortion (rotation, translation,\nscale, shear). Intensity increases from left (Task 1, minimal distortion) to right (Task 10, maximum distortion). Defect\nmasks are unchanged under blur and color augmentation, and are transformed identically to the image under geometric\naugmentation.\n\nfrom the same patch-level scores used for image-level prediction, where the image score is the maximum over\npatch scores. We therefore expect the two to be tightly coupled, and we verify this in Sec. 5.3: across the\nprotocols where pixel scoring is meaningful (excluding geometric drift, where transform padding dominates)\nthey correlate at r=0.945 and preserve the ranking of the top methods, confirming that they are corollaries.\nImage-level AUROC remains our primary metric, as it matches the binary pass/fail decision common in\nindustrial inspection, while pixel-level AUROC shows that our conclusions are not an artifact of metric\nchoice.\nForgetting Measure. To quantify catastrophic forgetting, we adopt the standard Forgetting Measure\n(FM) [32]. Let at,j denote the performance on task j after the model has been trained on task t. The\nforgetting for task j after training on the final task T is:\n  f_j = \\max _{t \\in \\{1, \\ldots , T-1\\}} a_{t,j} - a_{T,j}, \\label {eq:forgetting_per_task} \n\n(3)\n\n  \\text {FM} = \\frac {1}{T-1} \\sum _{j=1}^{T-1} f_j. \\label {eq:forgetting_measure} \n\n(4)\n\nand the average Forgetting Measure is:\n\nA positive FM indicates performance degradation (catastrophic forgetting), while an FM of zero indicates\nzero forgetting of previous tasks.\nComputational Efficiency. We report model size (total parameters), inference latency (ms/image),\nand peak memory usage, which directly determine edge deployment feasibility on hardware such as NVIDIA\nJetson and Raspberry Pi.\n\n\f6\n\nWeatherly, Lin\n\nFig. 2: Overview of the DINOSaur architecture. Top: During training, a frozen DINOv3 ViT-S/16 extracts CLS and\npatch tokens, which are stored in a task-specific memory bank via CLS prototyping and greedy coreset selection.\nBottom: During inference, the test image’s CLS token is compared to stored prototypes for task routing, and patch\ntokens are scored against the selected memory bank using neighborhood-restricted nearest-neighbor search.\n\n4\n\nDINOSaur: DINO Spatial Anomaly Unsupervised Recognition\n\n4.1\n\nMotivation\n\nExisting CAD methods employ increasingly complex architectures—UCAD incorporates SAM [16], IUF\ntrains a full ViT encoder-decoder, and DNE requires task-specific distribution estimation—yet, as we demonstrate in Sec. 5, this complexity does not consistently translate into superior performance. Memory-based\nCL mechanisms consistently achieve the strongest results [32], and in industrial settings long-term storage\nis rarely a constraint even on edge devices. We therefore hypothesize that a powerful frozen feature extractor paired with a non-parametric memory bank is sufficient: it yields competitive performance with zero\nforgetting by construction, since no model weights are updated. Thus motivated, we propose DINOSaur: a\nminimal baseline combining a frozen feature extractor with spatially-structured memory and neighborhoodbased anomaly scoring, designed for edge deployment. An overview is shown in Figure 2.\n4.2\n\nFeature Extraction with DINOv3\n\nDINOSaur uses a frozen DINOv3 ViT-S/16 [30] as its feature backbone—the smallest variant in the DINOv3\nfamily, with only 21M parameters—to demonstrate that strong CAD performance does not require large\nbackbones. Larger variants (ViT-B/16, ViT-L/16) would likely improve detection quality at the cost of\nhigher inference latency and memory usage; we deliberately select the smallest backbone to establish a lower\nbound representative of edge deployment constraints. We also chose to use the ViT version, as the CLS Token\nis necessary for task identification and routing. DINOv3 is a self-supervised vision transformer trained with\nstudent-teacher distillation and Gram anchoring, producing both a global CLS token and spatially distinctive\npatch-level features, considered current state of the art in producing embedding vectors with hierarchical\nconceptual understanding.\nGiven an input image x ∈ RH×W ×3 , the frozen DINOv3 encoder Φ produces a set of patch-level feature\nvectors:\n  \\{\\mathbf {p}_1, \\mathbf {p}_2, \\ldots , \\mathbf {p}_N\\} = \\Phi (\\mathbf {x}), \\quad \\mathbf {p}_i \\in \\mathbb {R}^d, \\label {eq:feature_extraction} \n(5)\nwhere N = (H/s) × (W/s) is the number of patches determined by the patch size s, and d is the feature\ndimension. We extract features from the final layer of the transformer, as these features contain descriptive,\nhierarchical and semantic understanding of the image patch.\nUsing a frozen backbone eliminates weight updates—the primary source of catastrophic forgetting—while\nDINOv3’s self-supervised features provide strong semantic representations without task-specific adaptation.\n\n\fRethinking Continual Anomaly Detection\n\n4.3\n\n7\n\nSpatially-Indexed Memory Bank\n\nRather than aggregating all patch features into a single flat memory bank, DINOSaur maintains a novel\nspatially-indexed memory where each patch location has its own independent\n√ Given D training\n√ coreset.\nimages from the current task, we collect, for each spatial location (i, j) in the N × N patch grid, the set\nof all feature vectors observed at that position across the task training set:\n  \\mathcal {P}_{i,j} = \\{ \\mathbf {p}_{i,j}^{(k)} \\mid k = 1, \\ldots , D \\}, \\quad |\\mathcal {P}_{i,j}| = D. \\label {eq:location_pool} \n\n(6)\n\nWe then apply greedy coreset selection [27] independently at each location, iteratively choosing the point\nfarthest from the current coreset, ensuring we have a representative set of location-specific feature vectors\nwhile also minimizing our memory bank size. This yields a per-location coreset Ci,j of size M = max(20, ⌊D ·\nρ⌋), where ρ is the coreset ratio, a hyperparameter\nin the range (0, 1]. The full memory bank for a task\n√\n√\nN × N ×M ×e\n, where e is the embedding dimension of the feature\nis the spatially-structured tensor M ∈ R\nvectors. This structure preserves the spatial layout of the image in the memory bank, which is essential for\nthe neighborhood-based scoring described below.\n4.4\n\nNeighborhood-Restricted Anomaly Scoring\n\nDuring inference, a test image must first be routed to the appropriate task-specific memory bank (described\nin Sec. 4.5). Given the selected memory bank M, we compute the anomaly score for each test patch by\ncomparing it only to memory features within a local spatial neighborhood. Given a test patch at location\n(i, j) with feature vector ptest\ni,j , we define the neighborhood memory as the union of patch coresets within a\nradius r:\n  \\mathcal {N}_{i,j}^{r} = \\bigcup _{\\substack {i' \\in [i-r, i+r] \\\\ j' \\in [j-r, j+r]}} \\mathcal {C}_{i',j'}. \\label {eq:neighborhood} \n(7)\n\nThe patch-level anomaly score is then:\n  s_{i,j} = \\min _{\\mathbf {c} \\in \\mathcal {N}_{i,j}^{r}} \\| \\mathbf {p}_{i,j}^{\\text {test}} - \\mathbf {c} \\|_2, \\label {eq:patch_score} \n\n(8)\n\nand the image-level score is the maximum over all patch locations:\n  S(\\mathbf {x}_{\\text {test}}) = \\max _{(i,j)} \\; s_{i,j}. \\label {eq:image_score} \n\n(9)\n\nThis neighborhood restriction enforces spatial consistency—anomalies are detected based on what should\nappear at a given location—and reduces computation from N · M to at most (2r + 1)2 · M comparisons per\npatch, a 4× reduction for our default r = 3 on a 14 × 14 grid.\n4.5\n\nContinual Learning via Task-Specific Memory\n\nDINOSaur handles continual learning through two complementary mechanisms: task-specific memory\nbanks and CLS token prototypes for unsupervised task identification.\n1) Task-specific memory. Rather than accumulating all features into a single growing bank, DINOSaur\nmaintains a separate, spatially-indexed memory bank M(t) for each task t. When a new task arrives, its normal training images are processed through the frozen encoder, and a new per-location coreset is constructed\nand stored independently for that task, giving us a smaller memory footprint by using an optimal set of\nembedding vectors. Since the feature extractor Φ is never updated, the number of tasks able to be processed\nis limited mainly by memory and storage constraints, not model architecture.\n2) CLS token prototypes. DINOv3 also produces a global CLS token z ∈ Re per image. During training\non task t, we compute the mean CLS token µt across all training images as a compact task prototype. At\ntest time, unsupervised task routing selects the closest prototype:\n  t^* = \\arg \\min _{t} \\| \\mathbf {z}^{\\text {test}} - \\boldsymbol {\\mu }^{t} \\|_2, \\label {eq:task_id} \n∗\n\n(10)\n\nand the selected task’s memory bank M(t ) is used for scoring. This requires no task labels at inference—only\na single distance computation per stored task.\n\n\f8\n\nWeatherly, Lin\n\n5\n\nExperiments\n\n5.1\n\nExperimental Setup\n\nEvaluated Methods. We evaluate the following methods:\n– CAD methods: DNE [19], IUF [31], and UCAD [23]—the three published continual anomaly detection\nmethods.\n– Traditional AD baselines with replay: PatchCore [27] and EfficientAD [5]—augmented with experience replay [26]. Replay budget and augmentation strategy details are in Sec. B.2.\n– DINOSaur (ours)—the proposed baseline described in Sec. 4.\nFor all methods, we use official implementations where available and faithfully reimplement otherwise,\nmatching reported hyperparameters. All methods are trained for 300 epochs per task.\nTraining Protocol. All experiments use the unsupervised setting, where only normal samples are available\nduring training, reflecting real industrial scenarios. Models are trained sequentially on each task without\naccess to previous task data (the standard CL constraint), except for the generous replay buffer provided to\nPatchCore and EfficientAD. Task orderings for all protocols are provided in Sec. C. Training is conducted\non a single NVIDIA RTX 4090. Edge inference profiling is performed on an NVIDIA Jetson Orin Nano and\na Raspberry Pi 5, as detailed in Sec. 5.4.\n5.2\n\nMain Results\n\nTable 1 presents the image-level AUROC, Accuracy, Recall, and Forgetting Measure (FM) for all evaluated\nmethods on MVTec-AD and MVTec-LOCO. Key findings:\n– DINOSaur and PatchCore with replay dominate on both protocols; dedicated CAD methods fall short.\n– DNE and IUF collapse to predicting “normal” (zero recall on MVTec-AD), revealing fundamental architectural limitations in the unsupervised setting.\n– Among dedicated CAD methods, only UCAD demonstrates meaningful learning, yet lags PatchCore by\nover 12 percentage points in AUROC on MVTec-AD.\n– DINOSaur and UCAD achieve zero forgetting; PatchCore’s modest forgetting shows that replay alone\nmitigates catastrophic forgetting.\nWhile DINOSaur and PatchCore both occupy the top tier, the two methods differ in fundamental ways.\nPatchCore aggregates all patch features into a single flat memory bank and scores test patches via global\nnearest-neighbor search, relying on experience replay (100 samples per previous task) to mitigate forgetting\nwhen new tasks arrive. DINOSaur, by contrast, requires no replay, and its spatially-indexed memory with\nneighborhood-restricted scoring (Sec. 4.4) enforces spatial consistency that a flat bank cannot. This architectural difference translates directly to edge performance: DINOSaur is 23% faster than PatchCore on the\nJetson (91.6 vs. 119 ms; Tab. 4) while achieving higher AUROC on every protocol. Moreover, DINOSaur’s\nperformance is tunable via the coreset ratio ρ: on smaller or less variable tasks, reducing ρ below the default\n10% would further decrease storage and latency with only modest AUROC loss (Tab. 5), giving practitioners\nan explicit efficiency–accuracy knob. We note that our PatchCore∗ baseline is mechanistically equivalent to\nPatchcoreCL [2]: both maintain persistent feature access without weight updates and use task-structured\nretrieval. Beyond the spatial indexing and neighborhood-restricted scoring above, DINOSaur further differs\nfrom both through explicit CLS-prototype task routing.\nThe continuous drift results (Tab. 2) reveal distinct patterns across drift types. On color and blur drift,\nDINOSaur and PatchCore clearly separate from dedicated CAD methods, confirming that strong features\nmatter more than specialized CL mechanisms under continuous shift. Notably, continuous drift is not uniformly easier than discrete task shifts: DINOSaur and PatchCore achieve comparable or lower AUROC on\nMTD color and blur drift than on MVTec-AD, while the weaker CAD methods (DNE, IUF) show similar near-chance performance regardless of protocol, suggesting their failures are fundamental architectural\nlimitations rather than protocol-specific artifacts.\n\n\fRethinking Continual Anomaly Detection\n\n9\n\nTable 1: Discrete-Task Results: Image-level AUROC (↑), Accuracy (↑), Recall (↑), and Forgetting Measure (↓) on\nMVTec-AD and MVTec-LOCO, averaged across all tasks. Methods marked with ∗ are augmented with experience\nreplay. Best results per column are in bold.\nMVTec-AD\nMethod\n\nMVTec-LOCO\n\nAUROC\n\nAcc\n\nRecall\n\nDNE [19]\nIUF [31]\nUCAD [23]\n\n0.500\n0.508\n0.798\n\n0.277\n0.300\n0.635\n\nPatchCore∗ [27]\nEfficientAD∗ [5]\n\n0.925\n0.529\n\n0.808\n0.310\n\nDINOSaur (ours)\n\n0.968\n\nFM\n\nAUROC\n\nAcc\n\nRecall\n\nFM\n\n0.000\n0.012\n0.074 −0.066\n0.552\n0.000\n\n0.500\n0.572\n0.629\n\n0.368\n0.436\n0.537\n\n0.000 −0.022\n0.234\n0.002\n0.389\n0.000\n\n0.804\n0.071\n\n0.023\n0.051\n\n0.743\n0.485\n\n0.655\n0.384\n\n0.521\n0.053\n\n0.038\n0.025\n\n0.829 0.991\n\n0.000\n\n0.768\n\n0.709 0.845\n\n0.000\n\nTable 2: Continuous Drift Results: Image-level AUROC (↑), Accuracy (↑), Recall (↑), and Forgetting Measure (↓)\non MTD-Color, MTD-Geo, and MTD-Blur, averaged across all tasks. Methods marked with ∗ are augmented with\nexperience replay. Best results per column are in bold.\nMTD-Color\nMethod\n\nAUROC Acc Recall\n\nMTD-Geo\nFM\n\nAUROC Acc Recall\n\nMTD-Blur\nFM\n\nAUROC Acc Recall\n\nFM\n\nDNE [19]\nIUF [31]\nUCAD [23]\n\n0.520\n0.521\n0.566\n\n0.529 0.308 0.021\n0.532 0.294 −0.008\n0.591 0.141 0.030\n\n0.480 0.517 0.342 0.032\n0.525 0.588 0.048 0.002\n0.480 0.548 0.107 0.007\n\n0.555\n0.516\n0.582\n\n0.573 0.062 −0.003\n0.567 0.042 0.001\n0.586 0.137 0.003\n\nPatchCore∗ [27]\nEfficientAD∗ [5]\n\n0.836\n0.565\n\n0.710 0.530 −0.043\n0.573 0.080 −0.007\n\n0.509\n0.510\n\n0.564 0.042 −0.008\n0.567 0.050 −0.004\n\n0.832\n0.566\n\n0.751 0.685 −0.022\n0.564 0.051 −0.010\n\nDINOSaur (ours) 0.928 0.836 0.861 0.000\n\n0.519\n\n0.567 0.050\n\n0.891 0.810 0.676 −0.002\n\n0.013\n\nAmong drift types, geometric distortion is uniquely challenging—all methods collapse near chance. This\nis because geometric transformations fundamentally alter the spatial relationships between patch features,\ndisrupting the very structure that distribution-based methods rely on. Color and blur distortions, by contrast, modify appearance while preserving spatial structure, making them far more amenable to patch-based\ndetection. This distinction has practical implications: industrial scenarios involving mechanical deformation\nor perspective changes (e.g., conveyor belt misalignment, camera drift) may require fundamentally different\nrepresentations than those sufficient for photometric variations. DINOSaur maintains near-zero forgetting\nacross all drift types (FM ≤ 0.013), and on color drift PatchCore actually exhibits negative FM (−0.043),\nindicating backward transfer—continued training on shifted data improves detection on earlier tasks.\n\n5.3\n\nPixel-level Evaluation\n\nTable 3 reports image- and pixel-level AUROC side by side. Across the protocols where pixel scoring is\nmeaningful (MVTec-AD, MVTec-LOCO, MTD-color, MTD-blur), the two correlate at r=0.945 and preserve\nthe ranking of the top methods, confirming that pixel-level performance is largely a corollary of image-level\ndetection. DINOSaur retains its pixel-level lead on all four. We omit geometric pixel-AUROC, where the\naffine padding dominates the pooled metric. DNE has no spatial map, so its pixel entries are undefined.\nTable 3: Image- vs. pixel-level AUROC (↑), averaged across all tasks. Image-level numbers are reproduced from\nTabs. 1 and 2. DNE has no spatial map (“—”). Under geometric drift, pixel-level scoring is unreliable because the\naffine padding dominates the pooled metric, so we omit it (“—”). Best pixel-level result per protocol is in bold.\nMVTec-AD\n\nMVTec-LOCO\n\nMTD-Color\n\nMTD-Geo\n\nMTD-Blur\n\nMethod\n\nimg\n\npix\n\nimg\n\npix\n\nimg\n\npix\n\nimg\n\npix\n\nimg\n\npix\n\nDNE [19]\nIUF [31]\nUCAD [23]\n\n0.500\n0.508\n0.798\n\n—\n0.525\n0.822\n\n0.500\n0.572\n0.629\n\n—\n0.606\n0.651\n\n0.520\n0.521\n0.566\n\n—\n0.557\n0.564\n\n0.480\n0.525\n0.480\n\n—\n—\n—\n\n0.555\n0.516\n0.582\n\n—\n0.585\n0.537\n\nPatchCore∗ [27]\nEfficientAD∗ [5]\n\n0.925\n0.529\n\n0.945\n0.402\n\n0.743\n0.485\n\n0.742\n0.429\n\n0.836\n0.565\n\n0.770\n0.599\n\n0.509\n0.510\n\n—\n—\n\n0.832\n0.566\n\n0.730\n0.636\n\nDINOSaur (ours) 0.968 0.947 0.768\n\n0.810\n\n0.928 0.875 0.519\n\n—\n\n0.891 0.857\n\n\f10\n\nWeatherly, Lin\n\nTable 4: Computational efficiency on two edge platforms (NVIDIA Jetson Orin Nano, Raspberry Pi 5). Latency is\nmean ± std over 30 single-image runs. Storage is measured on-device per task; “—” marks weight-update methods\nwith no task-indexed storage (DINOSaur storage shown for MVTec-AD). IUF exceeded the Jetson’s memory (OOM).\nFPS = frames per second; ∗ = experience replay. Best latency per platform in bold.\nJetson Orin Nano Raspberry Pi 5\nMethod\n\n5.4\n\nParams (M) Storage/Task (MB) Inf. (ms)\n\nFPS\n\nInf. (ms)\n\nFPS\n\nDNE [19]\nIUF [31]\nUCAD [23]\n\n86.6\n631.1\n36.0\n\n2.3\n—\n1.2\n\n60.7 ± 4.9 16.5 560.0 ± 6.1 1.8\nOOM\n— 3668.6 ± 69.6 0.3\n956.5 ± 7.3 1.0 1058.0 ± 15.4 0.9\n\nPatchCore∗ [27]\nEfficientAD∗ [5]\n\n9.3\n8.1\n\n5.0\n—\n\n119.0 ± 2.4 8.4 1074.5 ± 7.9 0.9\n34.7 ± 0.1 28.8 1318.2 ± 4.3 0.8\n\nDINOSaur (ours)\n\n21.6\n\n7.1\n\n91.6 ± 9.6\n\n10.9\n\n630.6 ± 10.2 1.6\n\nComputational Efficiency\n\nTab. 4 compares the computational requirements of all evaluated methods on two representative edge platforms. Industrial inspection systems typically require processing multiple images per second on hardware\nwith limited GPU memory; a method that cannot meet these constraints is not a viable CAD solution\nregardless of its detection metrics.\nAmong the dedicated CAD methods, IUF exceeds the Jetson’s GPU memory entirely and requires 3.7\nseconds per image on the Raspberry Pi. UCAD’s reliance on SAM [16] results in nearly 1 second per image\non both devices. DNE is the most efficient method overall—fastest on the Raspberry Pi (560 ms, 1.8 FPS)\nand competitive on the Jetson (60.7 ms)—but achieves near-chance AUROC, making its speed advantage\nmoot in practice.\nAmong methods with meaningful detection, DINOSaur achieves sub-100 ms inference on the Jetson\n(91.6 ms, 10.9 FPS), faster than PatchCore (119 ms). EfficientAD is faster (34.7 ms) but collapses in detection under continual learning. On the CPU-only Raspberry Pi 5, DINOSaur (630.6 ms) is second-fastest\nafter DNE. Per-task storage (7.1 MB on MVTec-AD) scales with ρ and training set size; details are in Sec. B.2.\nOn-Device Training Feasibility. Training cost matters as much as inference for edge deployment.\nGradient-based methods (DNE, IUF, UCAD, EfficientAD) require forward and backward passes over hundreds of epochs per task, with memory far exceeding inference. DINOSaur instead adapts to a new task with\na single forward pass per image plus coreset selection, enabling autonomous on-device adaptation without\ncloud connectivity.\n5.5\n\nAnalysis and Discussion\n\nOn the four protocols with meaningful signal, no dedicated CAD method achieves the top AUROC; DINOSaur leads all four, followed by PatchCore with replay. Under geometric drift every method, dedicated\nor not, sits at chance. This raises a fundamental question: are the performance gains reported in prior CAD\npapers genuine algorithmic advances, or artifacts of experimental protocol? We identify the unsupervised setting as a key factor. All of our experiments train on normal samples only, which is substantially harder than\nthe supervised setting used in some prior evaluations of DNE and IUF, which use synthetic anomaly generation. The near-chance performance of these methods suggests that their architectures may rely on anomaly\nexamples during training to learn meaningful decision boundaries—a luxury that real industrial deployments\nrarely afford. When this crutch is removed, dedicated CL mechanisms provide no measurable benefit over\nsimple replay, and the added architectural complexity yields no return on investment for edge-constrained\ndeployment.\nTask Ordering Invariance. Because DINOSaur’s backbone is frozen and each task receives an independent\nmemory bank, its final performance is completely invariant to task ordering—a structural guarantee no other\nevaluated method provides, since all others either update weights or replay across tasks. This eliminates a\nconfound in CL evaluation and simplifies deployment. Extended analysis is in Sec. D.\n\n\fRethinking Continual Anomaly Detection\n\nDINOSaur Hyperparameter Sensitivity. DINOSaur has two hyperparameters: the coreset ratio ρ and the neighborhood radius r. We\nperform a grid search over ρ ∈ {1%, 2.5%, 5%, 10%, 20%} and r ∈\n{0, 1, 2, 3, 4}, reporting the average AUROC across all five protocols\nin Tab. 5. Performance increases monotonically with ρ but with diminishing returns (1.5% gain from 10% to 20%), while r has a smaller\nbut consistent effect. We select ρ=10% and r=3, balancing detection\nquality against edge efficiency (sub-100 ms inference on the Jetson).\nThe full per-dataset breakdown is in the appendix.\n\n6\n\nConclusion\n\n11\n\nTable 5: Hyperparameter sensitivity:\naverage image-level AUROC across all\nfive benchmark protocols for each coreset ratio (ρ) and neighborhood radius\n(r) combination. The selected configuration (ρ=10%, r=3) is bolded.\nNeighborhood radius r\nCoreset ratio ρ\n1%\n2.5%\n5%\n10%\n20%\n\n0\n\n1\n\n2\n\n3\n\n4\n\n0.771\n0.765\n0.771\n0.787\n0.803\n\n0.773\n0.770\n0.775\n0.790\n0.816\n\n0.773\n0.775\n0.777\n0.794\n0.819\n\n0.780\n0.776\n0.781\n0.801\n0.816\n\n0.778\n0.782\n0.785\n0.798\n0.822\n\nWe introduced a unified CAD benchmark addressing three gaps in the\nliterature, i.e., unrealistic evaluation, lack of systematic comparison,\nand neglect of edge constraints, and showed that existing CAD methods do not consistently outperform traditional AD baselines with simple experience replay. Motivated by this\nfinding, we proposed DINOSaur, which combines a frozen DINOv3 backbone with spatially-indexed coreset memory and task identification/routing to achieve state-of-the-art performance with zero forgetting by\nconstruction across four of the five benchmark protocols (every method collapses to chance under geometric\ndrift). Its training-free design enables on-device adaptation in under 30 seconds on an NVIDIA Jetson Orin\nNano, making it practical for autonomous industrial deployment.\nFuture Work. Three directions remain open. First, geometric drift collapses every method to chance; addressing it will likely require geometrically equivariant feature representations beyond what current frozen\nbackbones provide. Second, DINOSaur’s neighborhood scoring is inherently local, so logical anomalies that\nrequire holistic scene understanding would benefit from added global reasoning alongside the spatial memory. Finally, extending the benchmark to online streaming without explicit task boundaries would bring\nevaluation closer to real industrial deployment.\n\nReferences\n1. Aljundi, R., Babiloni, F., Elhoseiny, M., Rohrbach, M., Tuytelaars, T.: Memory aware synapses: Learning what\n(not) to forget. In: Ferrari, V., Hebert, M., Sminchisescu, C., Weiss, Y. (eds.) Computer Vision – ECCV 2018,\nvol. 11207, pp. 144–161. Springer International Publishing. https://doi.org/10.1007/978-3-030-01219-9_9,\nhttps://link.springer.com/10.1007/978-3-030-01219-9_9, series Title: Lecture Notes in Computer Science\n2. Barusco, M., Borsatti, F., Beda, N., Pezze, D.D., Susto, G.A.: Towards continual visual anomaly detection in\nthe medical domain. In: Proceedings of the International Workshop on Personalized Incremental Learning in\nMedicine (PILM) (2025). https://doi.org/10.1145/3746259.3760434, https://arxiv.org/abs/2508.18013,\narXiv:2508.18013\n3. Barusco, M., Borsatti, F., Pezze, D.D., Paissan, F., Farella, E., Susto, G.A.: PaSTe: Improving the efficiency of\nvisual anomaly detection at the edge. In: 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW). IEEE (2025), https://openaccess.thecvf.com/content/CVPR2025W/VAND/html/\nBarusco_PaSTe_Improving_the_Efficiency_of_Visual_Anomaly_Detection_at_the_CVPRW_2025_paper.html\n4. Barusco, M., D’Antoni, L., Pezze, D.D., Borsatti, F., Susto, G.A.: Memory efficient continual learning for edgebased visual anomaly detection (2025), https://arxiv.org/abs/2503.02691, arXiv:2503.02691\n5. Batzner, K., Heckler, L., König, R.: EfficientAD: Accurate visual anomaly detection at millisecond-level latencies.\npp. 128–138. https://openaccess.thecvf.com/content/WACV2024/html/Batzner_EfficientAD_Accurate_\nVisual_Anomaly_Detection_at_Millisecond-Level_Latencies_WACV_2024_paper.html\n6. Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., Steger, C.: Beyond dents and scratches: Logical constraints\nin unsupervised anomaly detection and localization 130(4), 947–969. https://doi.org/10.1007/s11263-02201578-9, https://doi.org/10.1007/s11263-022-01578-9\n7. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: MVTec AD — a comprehensive real-world dataset for\nunsupervised anomaly detection. In: 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition\n(CVPR). pp. 9584–9592. IEEE. https://doi.org/10.1109/CVPR.2019.00982, https://ieeexplore.ieee.org/\ndocument/8954181/\n\n\f12\n\nWeatherly, Lin\n\n8. Bugarin, N., Bugaric, J., Barusco, M., Pezze, D.D., Susto, G.A.: Unveiling the anomalies in an ever-changing\nworld: A benchmark for pixel-level anomaly detection in continual learning. In: 2024 IEEE/CVF Conference on\nComputer Vision and Pattern Recognition Workshops (CVPRW). pp. 4065–4074. IEEE. https://doi.org/10.\n1109/CVPRW63382.2024.00410, https://ieeexplore.ieee.org/document/10678644/\n9. Buzzega, P., Boschini, M., Porrello, A., Abati, D., CALDERARA, S.: Dark experience for general\ncontinual learning: a strong, simple baseline. In: Advances in Neural Information Processing Systems.\nvol. 33, pp. 15920–15930. Curran Associates, Inc., https://proceedings.neurips.cc/paper/2020/hash/\nb704ea2c39778f07c617f6b7ce480e9e-Abstract.html\n10. Defard, T., Setkov, A., Loesch, A., Audigier, R.: PaDiM: A patch distribution modeling framework for anomaly\ndetection and localization. In: Del Bimbo, A., Cucchiara, R., Sclaroff, S., Farinella, G.M., Mei, T., Bertini, M.,\nEscalante, H.J., Vezzani, R. (eds.) Pattern Recognition. ICPR International Workshops and Challenges. pp.\n475–489. Springer International Publishing. https://doi.org/10.1007/978-3-030-68799-1_35\n11. Dimitriou, E., Georgiou, A.: Automatic inspection systems cut quality control costs by 60% 2(1), 23–33, https:\n//theeducationjournals.com/index.php/NJQIBE/article/view/147\n12. Faber, K., Corizzo, R., Sniezynski, B., Japkowicz, N.: Lifelong continual learning for anomaly detection: New\nchallenges, perspectives, and insights 12, 41364–41380. https://doi.org/10.1109/ACCESS.2024.3377690,\nhttps://ieeexplore.ieee.org/document/10473036/?arnumber=10473036, conference Name: IEEE Access\n13. Gu, Z., Zhu, B., Zhu, G., Chen, Y., Tang, M., Wang, J.: AnomalyGPT: Detecting industrial anomalies using\nlarge vision-language models 38(3), 1932–1940. https://doi.org/10.1609/aaai.v38i3.27963, https://ojs.\naaai.org/index.php/AAAI/article/view/27963\n14. Huang, Y., Qiu, C., Yuan, K.: Saliency of magnetic tile surface defects 36(1), 85–96. https://doi.org/10.1007/\ns00371-018-1588-5, https://doi.org/10.1007/s00371-018-1588-5\n15. Huang, Y., Qiu, C., Yuan, K.: Surface defect saliency of magnetic tile. The Visual Computer 36(1), 85–96 (2020).\nhttps://doi.org/10.1007/s00371-018-1588-5\n16. Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A.C., Lo,\nW.Y., Dollar, P., Girshick, R.: Segment anything. pp. 4015–4026. https://openaccess.thecvf.com/content/\nICCV2023/html/Kirillov_Segment_Anything_ICCV_2023_paper.html\n17. Kirkpatrick, J., Pascanu, R., Rabinowitz, N., Veness, J., Desjardins, G., Rusu, A.A., Milan, K., Quan, J., Ramalho, T., Grabska-Barwinska, A., Hassabis, D., Clopath, C., Kumaran, D., Hadsell, R.: Overcoming catastrophic forgetting in neural networks 114(13), 3521–3526. https://doi.org/10.1073/pnas.1611835114,\nhttps://pnas.org/doi/full/10.1073/pnas.1611835114\n18. Lee, G., Oh, Y., Jang, G., Lee, S., Song, J., Cha, S., Yoo, Y.: Continual-MEGA: A large-scale benchmark for\ngeneralizable continual anomaly detection. https://doi.org/10.48550/arXiv.2506.00956, http://arxiv.org/\nabs/2506.00956, version: 1\n19. Li, W., Zhan, J., Wang, J., Xia, B., Gao, B.B., Liu, J., Wang, C., Zheng, F.: Towards continual adaptation\nin industrial anomaly detection. In: Proceedings of the 30th ACM International Conference on Multimedia.\npp. 2871–2880. MM ’22, Association for Computing Machinery. https://doi.org/10.1145/3503161.3548232,\nhttps://doi.org/10.1145/3503161.3548232\n20. Li, X., Tan, X., Chen, Z., Zhang, Z., Zhang, R., Guo, R., Jiang, G., Chen, Y., Qu, Y., Ma, L., Xie, Y.:\nOne-for-more: Continual diffusion model for anomaly detection. pp. 4766–4775. https://openaccess.thecvf.\ncom/content/CVPR2025/html/Li_One-for-More_Continual_Diffusion_Model_for_Anomaly_Detection_CVPR_\n2025_paper.html\n21. Lin, S., Yang, L., Fan, D., Zhang, J.: Beyond not-forgetting: Continual learning with backward knowledge transfer 35, 16165–16177, https : / / proceedings . neurips . cc / paper _ files / paper / 2022 / hash /\n6728fcf94660c59c938319a6833a6073-Abstract-Conference.html\n22. Lin, S., Yang, L., Fan, D., Zhang, J.: TRGP: Trust region gradient projection for continual learning. In: International Conference on Learning Representations (ICLR). https://openreview.net/forum?id=iEvAf8i6JjO\n23. Liu, J., Wu, K., Nie, Q., Chen, Y., Gao, B.B., Liu, Y., Wang, J., Wang, C., Zheng, F.: Unsupervised continual\nanomaly detection with contrastively-learned prompt 38(4), 3639–3647. https://doi.org/10.1609/aaai.v38i4.\n28153, https://ojs.aaai.org/index.php/AAAI/article/view/28153\n24. Pezze, D.D., Anello, E., Masiero, C., Susto, G.A.: Continual learning approaches for anomaly detection 16(4),\n111. https://doi.org/10.1007/s12530-025-09732-7, https://doi.org/10.1007/s12530-025-09732-7\n25. Reiss, T., Cohen, N., Bergman, L., Hoshen, Y.: PANDA: Adapting pretrained features for anomaly detection and\nsegmentation. In: 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 2805–\n2813. IEEE. https://doi.org/10.1109/CVPR46437.2021.00283, https://ieeexplore.ieee.org/document/\n9577693/\n26. Rolnick, D., Ahuja, A., Schwarz, J., Lillicrap, T., Wayne, G.: Experience replay for continual learning. In: Advances in Neural Information Processing Systems. vol. 32. Curran Associates, Inc., https://papers.nips.cc/\npaper_files/paper/2019/hash/fa7cdfad1a5aaf8370ebeda47a1ff1c3-Abstract.html\n\n\fRethinking Continual Anomaly Detection\n\n13\n\n27. Roth, K., Pemula, L., Zepeda, J., Scholkopf, B., Brox, T., Gehler, P.: Towards total recall in industrial anomaly\ndetection. In: 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 14298–\n14308. IEEE. https://doi.org/10.1109/CVPR52688.2022.01392, https://ieeexplore.ieee.org/document/\n9879738/\n28. Rusu, A.A., Rabinowitz, N.C., Desjardins, G., Soyer, H., Kirkpatrick, J., Kavukcuoglu, K., Pascanu, R., Hadsell,\nR.: Progressive neural networks. https://doi.org/10.48550/arXiv.1606.04671, http://arxiv.org/abs/1606.\n04671\n29. Saha, G., Garg, I., Roy, K.: Gradient projection memory for continual learning. In: International Conference on\nLearning Representations (ICLR). https://openreview.net/forum?id=3AOj0RCNC2\n30. Siméoni, O., Vo, H.V., Seitzer, M., Baldassarre, F., Oquab, M., Jose, C., Khalidov, V., Szafraniec, M., Yi, S.,\nRamamonjisoa, M., Massa, F., Haziza, D., Wehrstedt, L., Wang, J., Darcet, T., Moutakanni, T., Sentana, L.,\nRoberts, C., Vedaldi, A., Tolan, J., Brandt, J., Couprie, C., Mairal, J., Jégou, H., Labatut, P., Bojanowski, P.:\nDINOv3. https://doi.org/10.48550/arXiv.2508.10104, http://arxiv.org/abs/2508.10104\n31. Tang, J., Lu, H., Xu, X., Wu, R., Hu, S., Zhang, T., Cheng, T.W., Ge, M., Chen, Y.C., Tsung, F.: An incremental\nunified framework for small defect inspection. In: Leonardis, A., Ricci, E., Roth, S., Russakovsky, O., Sattler, T.,\nVarol, G. (eds.) Computer Vision – ECCV 2024. pp. 307–324. Springer Nature Switzerland. https://doi.org/\n10.1007/978-3-031-72751-1_18\n32. Wang, L., Zhang, X., Su, H., Zhu, J.: A comprehensive survey of continual learning: Theory, method and application 46(8), 5362–5383. https://doi.org/10.1109/TPAMI.2024.3367329, https://ieeexplore.ieee.org/\ndocument/10444954\n33. Wyatt, J., Leach, A., Schmon, S.M., Willcocks, C.G.: AnoDDPM: Anomaly detection with denoising diffusion\nprobabilistic models using simplex noise. pp. 650–656. https://openaccess.thecvf.com/content/CVPR2022W/\nNTIRE/html/Wyatt_AnoDDPM_Anomaly_Detection_With_Denoising_Diffusion_Probabilistic_Models_Using_\nSimplex_CVPRW_2022_paper.html\n34. Xie, G., Wang, J., Liu, J., Lyu, J., Liu, Y., Wang, C., Zheng, F., Jin, Y.: IM-IAD: Industrial image anomaly\ndetection benchmark in manufacturing 54(5), 2720–2733. https://doi.org/10.1109/TCYB.2024.3357213,\nhttps://ieeexplore.ieee.org/document/10443076/, conference Name: IEEE Transactions on Cybernetics\n35. You, Z., Cui, L., Shen, Y., Yang, K., Lu, X., Zheng, Y., Le, X.: A unified model for multi-class\nanomaly detection 35, 4571–4584, https : / / proceedings . neurips . cc / paper _ files / paper / 2022 / hash /\n1d774c112926348c3e25ea47d87c835b-Abstract-Conference.html\n36. Zavrtanik, V., Kristan, M., Skocaj, D.: DRÆM – a discriminatively trained reconstruction embedding for surface\nanomaly detection. In: 2021 IEEE/CVF International Conference on Computer Vision (ICCV). pp. 8310–8319.\nIEEE. https://doi.org/10.1109/ICCV48922.2021.00822, https://ieeexplore.ieee.org/document/9710329/\n37. Zenke, F., Poole, B., Ganguli, S.: Continual learning through synaptic intelligence. In: Proceedings of the 34th\nInternational Conference on Machine Learning. pp. 3987–3995. PMLR, https://proceedings.mlr.press/v70/\nzenke17a.html\n38. Zhai, Y., Tong, S., Li, X., Cai, M., Qu, Q., Lee, Y.J., Ma, Y.: Investigating the catastrophic forgetting in\nmultimodal large language models. In: Conference on Parsimony and Learning, Proceedings of Machine Learning\nResearch. vol. 234, pp. 202–227. https://proceedings.mlr.press/v234/zhai24a.html\n39. Zheng, Z., Ma, M., Wang, K., Qin, Z., Yue, X., You, Y.: Preventing zero-shot transfer degradation in continual\nlearning of vision-language models. In: Proceedings of the IEEE/CVF International Conference on Computer\nVision (ICCV). https://openaccess.thecvf.com/content/ICCV2023/papers/Zheng_Preventing_Zero-Shot_\nTransfer_Degradation_in_Continual_Learning_of_Vision-Language_Models_ICCV_2023_paper.pdf\n40. Zhou, Q., Pang, G., Tian, Y., He, S., Chen, J.: AnomalyCLIP: Object-agnostic prompt learning for zero-shot\nanomaly detection. https://openreview.net/forum?id=buC4E91xZE\n41. Zhu, J., Pang, G.: Toward generalist anomaly detection via in-context residual learning with few-shot sample prompts. pp. 17826–17836. https : / / openaccess . thecvf . com / content / CVPR2024 / html / Zhu _ Toward _\nGeneralist_Anomaly_Detection_via_In- context_Residual_Learning_with_Few- shot_CVPR_2024_paper.\nhtml\n\n\f14\n\nWeatherly, Lin\n\nThis appendix provides supporting material referenced from the main text: extended method descriptions\n(Sec. A), detailed training procedures (Sec. B), per-task dataset specifications (Sec. C), extended analysis\n(Sec. D), and full algorithmic pseudocode for DINOSaur (Sec. E).\n\nA\n\nExtended Related Work\n\nThis section expands on the method descriptions provided in the main text (Section 2). We discuss largescale models for anomaly detection in the main text (Section 2.1); here we provide additional architectural\ndetails for the three dedicated continual anomaly detection methods.\nA.1\n\nContinual Anomaly Detection Methods\n\nDNE (Distribution of Normal Embeddings) [19] introduced the first framework for CAD. During training\non each task, DNE extracts feature embeddings using a vision transformer (ViT-B/16) backbone and stores\nthe mean vector, shrunk covariance matrix, and sample count of the embedding distribution per task. During\ninference, a global distribution is reconstructed from the stored per-task statistics, and anomaly scores are\ncomputed via Mahalanobis distance. DNE operates at image-level only and does not produce pixel-level\nsegmentation maps. Notably, the feature embeddings are not regularized to be task-specific, meaning the\nstored statistics may not accurately capture task-distinct distributions as the number of tasks grows.\nIUF (Incremental Unified Framework) [31] uses an encoder-decoder architecture with ViT components\n(embedding dimension 64, 4 attention heads, 4 layers), where the latent space is explicitly regularized to\nseparate task-specific distributions into non-overlapping regions via a V-projection mechanism. Gradient\nupdates are constrained to preserve important parameters for previous tasks through a weight regularization term (β = 0.5) that penalizes divergence from the previous task’s parameters. The training objective\ncombines reconstruction loss, discriminator loss, and a singular value penalty to encourage low-rank latent\nrepresentations.\nUCAD (Unsupervised Continual Anomaly Detection) [23] combines contrastive learning with a prompting mechanism for task identification and adaptation. It leverages the Segment Anything Model (SAM) [16]\nto decompose image textures, then uses contrastive learning to store task-specific feature distributions in a\nknowledge bank for inference. UCAD maintains three memory components: a key memory (196 representative patches via farthest point sampling), a knowledge memory (196 patches via greedy coreset selection),\nand a prompt memory (learned task-specific prompts). Task identification at inference time uses the key\nmemory to route test images to the appropriate knowledge bank.\n\nB\n\nTraining Procedures\n\nAll experiments share a common training framework. We describe the shared configuration and per-method\ndetails below.\nB.1\n\nShared Configuration\n\nAll methods are trained sequentially on tasks in a fixed order (see Sec. C for per-dataset task orderings).\nWe use the Adam optimizer with a learning rate of 7.5 × 10−4 and weight decay of 10−4 across all methods. The training batch size is 12 for all methods. Input images are resized to 224 × 224 pixels (except\nEfficientAD, which uses 256 × 256) and normalized with ImageNet statistics (µ = [0.485, 0.456, 0.406],\nσ = [0.229, 0.224, 0.225]). All training is performed on a single NVIDIA RTX 4090 GPU (24 GB VRAM).\nFor methods that support experience replay (PatchCore and EfficientAD), 100 nominal training samples\nfrom previous tasks are replayed during each new task’s training. No data augmentation is applied to replay\nsamples. DINOSaur does not use experience replay; its frozen backbone and task-specific memory banks\neliminate the need for replaying old data.\nB.2\n\nPer-Method Training Details\n\nTab. 6 summarizes the key training parameters for each method.\n\n\fRethinking Continual Anomaly Detection\n\n15\n\nTable 6: Training hyperparameters and key architectural details for all evaluated methods. “Epochs” indicates the\nnumber of full passes over the training data per task. Methods marked with † require only a single forward pass for\nfeature extraction (no gradient-based optimization), and thus complete training in one epoch.\nDNE\n\nIUF\n\nUCAD\n\nBackbone\nViT-B/16 Custom ViT Custom ViT\nBackbone frozen\nNo\nNo\nYes\nEmbed. dim.\n768\n64\n768\nEpochs/task\n300\n300\n300\nLoss\nCE\nComposite\nContrastive\nReplay\nNo\nNo\nNo\nTrainable params (M)\n85.98\n631.07\nPrompt only\n\nPatchCore∗\n\nEfficientAD∗\n\nResNet-18\nYes\n512\n1†\n—\nYes (100)\n0.79\n\nPDN\nDINOv3 ViT-S/16\nPartially\nYes\n384\n384\n300\n1†\nMSE (3-part)\n—\nYes (100)\nNo\n5.38\n0.00\n\nDINOSaur\n\nDNE. DNE fine-tunes a ViT-B/16 backbone (86.57M total parameters) with a linear classification head\n(768 → 2) using cross-entropy loss over 300 epochs per task. The classification head is frozen after the\nfirst task, and subsequent tasks only update the backbone. After training each task, DNE stores per-task\nstatistics: a 768-dimensional mean vector and a 768 × 768 shrunk covariance matrix (shrinkage α = 0.5),\nyielding approximately 2.3 MB of storage per task. At inference, a global distribution is reconstructed from\nall stored task statistics, and anomaly scores are computed via Mahalanobis distance. The anomaly threshold\nis set at the 97.5th percentile of training set anomaly scores.\nIUF. IUF trains an encoder-decoder architecture (631.07M parameters) with a composite loss function:\n  \\mathcal {L}_{\\mathrm {IUF}} = \\lambda _1 \\mathcal {L}_{\\mathrm {recon}} + \\lambda _2 \\mathcal {L}_{\\mathrm {disc}} + \\lambda _3 \\mathcal {L}_{\\mathrm {svd}}, \n\n(11)\n\nwhere λ1 = 1.0, λ2 = 0.5, and λ3 = 8.0. The singular value loss Lsvd encourages low-rank latent representations by penalizing singular values beyond a cutoff t = 1. After each task, model weights are saved and a\nregularization term (β = 0.5) pulls parameters toward the previous task’s weights during subsequent training. IUF operates only in the unsupervised setting; the supervised pathway was not used in our experiments.\nThe anomaly threshold is set at the 97.5th percentile.\nUCAD. UCAD uses a frozen ViT backbone with a learnable prompt parameter of shape (5, 768) trained\nvia contrastive loss:\n  \\mathcal {L}_{\\mathrm {UCAD}} = \\lambda _\\alpha \\mathcal {L}_{\\mathrm {neg}} - \\lambda _\\beta \\mathcal {L}_{\\mathrm {pos}}, \n(12)\nwhere λα = λβ = 1.0 and the loss components use cosine similarity between patch features. After training\neach task for 300 epochs, UCAD updates three memory banks: key memory (196 patches via farthest point\nsampling), knowledge memory (196 patches via greedy coreset), and the learned prompt. At inference, the 5\nnearest neighbors in the knowledge bank determine patch-level anomaly scores, which are upsampled to the\noriginal image resolution. The anomaly threshold is set at the 97.5th percentile.\nPatchCore. PatchCore uses a frozen ResNet-18 backbone (9.33M parameters) and requires only a single\nepoch of feature extraction per task (no gradient updates). We deliberately select the smaller ResNet-18\nvariant to establish a lower bound representative of edge deployment, consistent with our choice of ViTS/16 for DINOSaur. Features from intermediate layers are concatenated and projected to 512 dimensions\nvia a random linear projection, then pooled with an adaptive average pooling layer (kernel size 3, stride 1,\npadding 1), producing a 28 × 28 spatial feature map per image. A greedy coreset of 5% of the accumulated\nfeature vectors is retained in the memory bank (minimum 500 samples). During inference, anomaly scores\nare computed as the distance to the nearest coreset entry, re-weighted by the 3 nearest neighbors of that\nmatch. The anomaly threshold is set at the 97.5th percentile.\nEfficientAD. EfficientAD trains a student Patch Description Network (PDN) and an autoencoder to distill\nknowledge from a pre-trained teacher PDN. The teacher is pre-trained on ImageNet with a separate optimizer\n(Adam, lr = 10−3 ) for 60,000 iterations at batch size 16, using ResNet34 features normalized via Welford’s\n\n\f16\n\nWeatherly, Lin\n\nTable 7: DINOSaur task storage at ρ = 10% for each benchmark dataset. D denotes the approximate number of\ntraining images per task. The minimum coreset size of 20 per location applies when ⌊D · ρ⌋ &lt; 20. Storage values are\nmeasured on-device and include serialization overhead.\n\nDataset\nMVTec-AD\nMVTec-LOCO\nMTD (all drift types)\n\nTasks D (approx.) M per loc. Total (MB)\n15\n5\n10\n\n60–391\n357–572\n443\n\n20–39\n35–57\n44\n\n106.8\n35.6\n71.2\n\nrunning statistics (computed on 10,000 samples). The student and autoencoder are jointly trained for 300\nepochs per task with a three-part MSE loss:\n  \\mathcal {L}_{\\mathrm {EAD}} = \\mathcal {L}_{\\mathrm {ST}} + \\mathcal {L}_{\\mathrm {AE}} + \\mathcal {L}_{\\mathrm {STAE}}, \n\n(13)\n\nwhere LST uses hard example mining (phard = 0.999), LAE distills teacher features into the autoencoder, and\nLSTAE aligns student and autoencoder outputs. The student outputs a 768-dimensional feature (two 384-dim\nhalves), and the final anomaly map combines student-teacher and student-autoencoder discrepancies with\nequal weight (0.5 each). Input images are resized to 256 × 256 (student/teacher) and 512 × 512 (ResNet34\nfeature extractor). The anomaly threshold is set at the 97.5th percentile.\nDINOSaur. DINOSaur uses a completely frozen DINOv3 ViT-S/16 backbone (21.6M parameters, 0 trainable) and requires only a single epoch of feature extraction per task. The backbone produces 196 patch tokens\nof dimension 384 on a 14 × 14 spatial grid plus a 384-dimensional CLS token. Per-location greedy coreset\nselection retains ρ = 10% of patch features (minimum 20 per location), and the CLS token mean is stored as\nthe task prototype. At inference, the test image’s CLS token is compared against all stored prototypes for\ntask routing, and patch anomaly scores are computed within a spatial neighborhood of radius r = 3 (yielding\na 7 × 7 window). The image-level score is the maximum patch anomaly score. The anomaly threshold is set\nat the 97.5th percentile of training set scores. The coreset ratio ρ and neighborhood radius r were selected\nvia grid search over ρ ∈ {1%, 2.5%, 5%, 10%, 20%} and r ∈ {0, 1, 2, 3, 4}; see the main text for details. Full\nalgorithmic details are provided in Sec. E.\nReplay Strategy Details. For PatchCore and EfficientAD, we employ a generous replay budget of 100\nnominal training samples from previous tasks during each new task’s training. This replay budget was\nselected to give replay-augmented baselines a strong chance at retaining prior knowledge. On discrete-task\nbenchmarks (MVTec-AD and MVTec-LOCO), the typical category contains 200–400 training images, such\nthat 100 samples represents 25–50% of the original training set. No data augmentation is applied to replay\nsamples. For the MTD continuous drift protocol, the augmentation parameter range is widened to encompass\nthe distributions of previous task training data, providing traditional methods with access to ample past\ninformation and isolating the effect of dedicated CL mechanisms. DINOSaur does not use experience replay:\nbecause its backbone is frozen and each task receives an independent memory bank, there is no mechanism\nthrough which old data could influence the new task’s memory, and no forgetting to mitigate.\nDINOSaur Per-Task Storage. DINOSaur’s per-task storage depends on the training set size D and the\ncoreset ratio ρ, since the memory bank stores M = max(20, ⌊D · ρ⌋) feature vectors of dimension 384 at each\nof the 196 spatial locations, plus a 384-dimensional CLS prototype. The theoretical per-task storage in bytes\nis 196 × M × 384 × 4 + 384 × 4 (using 32-bit floats), yielding approximately 5.8 MB for M =20. We report\nthe measured storage throughout the paper.\nAt ρ = 10%, most MVTec-AD categories (with D &lt; 200) are dominated by the minimum coreset size of 20,\nwhile larger categories (e.g., hazelnut with D=391, yielding M =39) and the MTD dataset (D=443, M =44)\nexceed this minimum. Larger coreset ratios or larger datasets would increase per-task storage proportionally.\nIn deployment scenarios with thousands of training images per task, storage would grow accordingly, and\npractitioners should consider the tradeoff between coreset ratio and available RAM on the target edge device.\n\n\fRethinking Continual Anomaly Detection\n\nC\n\nDataset and Task Specifications\n\nC.1\n\nMVTec-AD\n\n17\n\nMVTec-AD [7] comprises 15 industrial inspection categories spanning textures and objects. Each category\nis treated as a separate task, trained in alphabetical order: bottle, cable, capsule, carpet, grid, hazelnut,\nleather, metal_nut, pill, screw, tile, toothbrush, transistor, wood, zipper. Training sets contain only defectfree (nominal) images; test sets contain both nominal and defective images across multiple defect types\nper category. The discrete category boundaries represent the traditional evaluation paradigm for continual\nanomaly detection.\n\nC.2\n\nMVTec-LOCO\n\nMVTec-LOCO [6] extends MVTec-AD with 5 categories specifically designed to evaluate logical and structural anomalies that cannot be detected by purely local feature comparisons. Categories are trained in\nalphabetical order. This dataset tests whether methods can detect anomalies requiring global reasoning\n(e.g., missing or misplaced components) in addition to local texture anomalies.\n\nC.3\n\nAugmented MTD\n\nThe Magnetic Tile Defects (MTD) dataset [15] provides a single product category with multiple defect\ntypes. To simulate realistic continuous drift scenarios, we augment nominal training images with controlled\ndistortions at 10 ascending intensity levels, each level defining a task. Tasks are trained in ascending order\nof distortion severity, simulating gradual environmental drift in an industrial setting.\n\nColor Drift. Color distortions are applied by randomly adjusting brightness, contrast, and saturation.\nEach task defines a narrow, non-overlapping intensity band, ensuring that successive tasks represent progressively stronger—but bounded—distortions without overlap. The 10 intensity bands are [0.0, 0.05], [0.05, 0.1],\n[0.1, 0.15], [0.15, 0.2], [0.2, 0.25], [0.25, 0.3], [0.3, 0.35], [0.35, 0.4], [0.4, 0.45], [0.45, 0.5]. For each training image, a perturbation magnitude is sampled uniformly within the task’s band, and applied as a multiplicative\nfactor (1±v) to brightness, contrast, and saturation simultaneously, where v is the sampled value. This design\nensures each task occupies a distinct region of the distortion space, preventing later tasks from producing\nnear-identity images.\n\nBlur Drift. Gaussian blur is applied with 10 kernel-sigma pairs of increasing severity: (1, 0.5), (3, 1.0),\n(5, 1.5), (7, 2.0), (9, 2.5), (11, 3.0), (13, 3.5), (15, 4.0), (17, 4.5), (19, 5.0), where the first element is the kernel\nsize and the second is the standard deviation.\n\nGeometric Drift. Geometric distortions combine rotation, translation, scale, and shear transformations applied simultaneously with increasing magnitude. The 10 levels use nominal parameter tuples (rotation◦ , translation px, scale, shear◦ ): (2, 1, 0.01, 1), (4, 2, 0.02, 2), (6, 3, 0.03, 3), (8, 4, 0.04, 4), (10, 5, 0.05, 5), (12, 6, 0.06, 6),\n(14, 7, 0.07, 7), (16, 8, 0.08, 8), (18, 9, 0.09, 9), (20, 10, 0.10, 10). Rather than applying these nominal values\ndirectly, each task samples its actual parameters from a narrow window below the nominal: rotation from\n[nom−2, nom], translation from [nom−1, nom] per axis, scale from [nom−0.01, nom], and shear from [nom−1, nom].\nThese parameters are sampled once at task initialization and held fixed for all images within that task,\nmimicking a stable but shifted operating condition (e.g., gradual conveyor belt misalignment). This narrowwindow design ensures each task occupies a bounded region of the geometric distortion space without overlapping previous tasks.\n\n\f18\n\nWeatherly, Lin\n\nD\n\nExtended Analysis\n\nD.1\n\nDetailed Forgetting Analysis\n\nMVTec-AD. DINOSaur and UCAD exhibit zero forgetting on MVTec-AD (FM = 0.000), though for\nfundamentally different reasons: DINOSaur’s frozen backbone prevents catastrophic forgetting by design,\nwhile UCAD’s task-specific mechanisms isolate learned distributions. IUF shows strong backward transfer\n(−0.066), suggesting that continued training actually improves performance on earlier tasks—though this\nis less meaningful given IUF’s near-chance AUROC. PatchCore’s modest forgetting (0.023) demonstrates\nthat experience replay effectively mitigates catastrophic forgetting even without dedicated CL components,\nparticularly when the base method is strong.\nMVTec-LOCO. Forgetting on MVTec-LOCO is generally low across all methods, with DINOSaur and\nUCAD again showing zero forgetting, while PatchCore (0.038) and EfficientAD (0.025) exhibit modest degradation. DNE’s negative FM (−0.022) indicates backward transfer, though its near-chance AUROC limits the\npractical significance of this finding.\nAugmented MTD. The Forgetting Measures on MTD are uniformly lower than on the discrete-task\nbenchmarks for all methods. On color and blur drift, PatchCore actually exhibits negative FM (−0.043\nand −0.022), indicating backward transfer—continued training on shifted data improves detection on earlier\ntasks. DINOSaur shows near-zero forgetting across all drift types (FM ≤ 0.013), consistent with its frozenbackbone design.\nD.2\n\nDo CL Components Help? Extended Discussion\n\nOur most striking finding is that dedicated CL mechanisms do not consistently improve upon traditional AD\nmethods augmented with simple experience replay. On MVTec-AD, DNE (0.500) and IUF (0.508) perform\nnear chance level, while UCAD (0.798) shows meaningful learning but still falls well short of PatchCore with\nreplay (0.925) and DINOSaur (0.968). On the continuous drift protocol, a similar pattern holds: DINOSaur\nand PatchCore dominate on color and blur drift, and on geometric drift—where all methods struggle—\nIUF marginally leads (0.525 vs. 0.519 for DINOSaur) but all methods remain at chance, so no method\nmeaningfully leads there. On the four protocols with meaningful signal, no dedicated CAD method achieves\nthe top AUROC.\nThis raises a fundamental question: are the performance gains reported in prior CAD papers genuine\nalgorithmic advances, or artifacts of experimental protocol? Several factors may contribute to this discrepancy:\n– Prior works may have benefited from extensive hyperparameter tuning on their specific evaluation protocol.\n– The discrete MVTec-AD category protocol may not be the right testbed for evaluating CL capabilities,\nas the task shifts are so extreme that even modest CL mechanisms appear effective relative to a non-CL\nbaseline.\n– Most critically, all of our experiments use the unsupervised setting—where only normal samples are\navailable during training—which is substantially harder than the supervised setting used in some prior\nevaluations of DNE and IUF. The near-chance performance of these methods suggests that their architectures may rely on anomaly examples during training to learn meaningful decision boundaries, a\nluxury that real industrial deployments rarely afford.\n– When considering computational constraints for edge deployment, the complexity added by dedicated\nCL mechanisms provides no clear return on investment.\nD.3\n\nRobustness to Drift Type: Extended Analysis\n\nComparing the two evaluation paradigms reveals that continuous drift is not uniformly easier than discrete\ntask shifts. Strong methods (DINOSaur, PatchCore) achieve comparable or lower AUROC on MTD color\n\n\fRethinking Continual Anomaly Detection\n\n19\n\nAlgorithm 1: DINOSaur Training (Task t)\nInput: Training set Dt = {x1 , . . . , x|Dt | }, frozen encoder Φ, coreset ratio ρ\nOutput: Memory bank M(t) , CLS prototype µt\n/* Feature extraction (Eq. 4)\nfor each image xk ∈ Dt do\n(k)\n(k)\n2\n{p1 , . . . , pN }, z(k) ← Φ(xk )\n3 end\n\n*/\n\n/* CLS prototype computation\nP|Dt | (k)\nt\n1\n4 µ ← |D |\nk=1 z\nt\n\n*/\n\n/* Spatially-indexed coreset selection (Eq. 5)\n√\n√\nfor each spatial location (i, j) in N × N grid do\n(k)\n6\nPi,j ← {pi,j | k = 1, . . . , |Dt |}\n7\nM ← max(20, ⌊|Dt | · ρ⌋)\n8\nCi,j ← GreedyCoreset(Pi,j , M )\n9 end\n(t)\n10 M\n← {Ci,j }(i,j)\n(t)\nt\n11 return M , µ\n\n*/\n\n1\n\n5\n\n▷ Store spatially-indexed memory bank\n\nand blur drift than on MVTec-AD, and all methods collapse near chance on geometric drift. The weaker\nCAD methods (DNE, IUF) show similar near-chance performance regardless of protocol, suggesting their\nfailures are not protocol-specific but rather fundamental limitations of their architectures in the unsupervised\nsetting.\nAmong drift types, geometric distortion is the most challenging, likely because it fundamentally alters\nthe spatial relationships between patch features. Color and blur distortions modify appearance but preserve\nspatial structure, making them more amenable to distribution-based detection approaches. This finding has\npractical implications: industrial scenarios involving mechanical deformation or perspective changes (e.g.,\nconveyor belt misalignment, camera drift) may require fundamentally different representations than those\nsufficient for photometric variations.\n\nE\n\nDINOSaur Algorithm\n\nWe provide the complete DINOSaur training and inference procedures in Algorithms 1 and 2. Notation follows\nthe main text: Φ denotes the frozen DINOv3 ViT-S/16 encoder, pi,j a patch feature at spatial location (i, j),\nz the CLS token, M(t) the spatially-indexed memory bank for task t, Ci,j the coreset at location (i, j), µt\nr\nthe CLS prototype for task t, Ni,j\nthe neighborhood memory within radius r, and ρ the coreset ratio.\n\n\f20\n\nWeatherly, Lin\n\nAlgorithm 2: DINOSaur Inference\nInput: Test image xtest , frozen encoder Φ, memory banks {M(t) }Tt=1 , prototypes {µt }Tt=1 , neighborhood\nradius r\nOutput: Image-level anomaly score S(xtest )\n/* Feature extraction\ntest\ntest\n← Φ(xtest )\n{ptest\n1 , . . . , pN }, z\n\n*/\n\n1\n\n/* Task routing via CLS prototypes (Eq. 9)\nt∗ ← arg mint ∥ztest − µt ∥2\n\n*/\n\n2\n\n/* Neighborhood-restricted anomaly scoring (Eqs. 6–8)\n√\n√\nfor each spatial location (i, j) in N × N grid do\n∗\nS\n(t )\nr\n← i′ ∈[i−r,i+r] Ci′ ,j ′\n4\nNi,j\n\n*/\n▷ Neighborhood memory\n\n5\n\n▷ Patch anomaly score\n\n3\n\nj ′ ∈[j−r,j+r]\ntest\nr ∥p\nsi,j ← minc∈Ni,j\ni,j − c∥2\n\nend\n7 S(xtest ) ← max(i,j) si,j\n8 return S(xtest )\n6\n\n▷ Image-level score\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"