"<!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>An Incremental Unified Framework for Small\nDefect Inspection\nJiaqi Tang1,2,3 , Hao Lu1,2 , Xiaogang Xu4 , Ruizheng Wu5 , Sixing Hu5 , Tong\nZhang6 , Tsz Wa Cheng6 , Ming Ge7 , Ying-Cong Chen1,2,3⋆ , and Fugee Tsung1,2\n1\n\narXiv:2312.08917v3 [cs.CV] 23 Sep 2024\n\nHong Kong University of Science and Technology (Guangzhou)\n2\nHong Kong University of Science and Technology\n3\nHKUST(GZ) – SmartMore Joint Lab\n4\nChinese University of Hong Kong\n5\nSmartMore Corporation\n6\nHong Kong Industrial Artificial Intelligence &amp; Robotics Centre\n7\nHong Kong Productivity Council\n{jtang092, hlu585}@connect.hkust-gz.edu.cn\nxiaogangxu00@gmail.com {ruizheng.wu, david.hu}@smartmore.com\n{jacquelinezhang, alancheng}@hkflair.org mingge@hkpc.org\nyingcongchen@hkust-gz.edu.cn season@ust.hk\n\nAbstract. Artificial Intelligence (AI)-driven defect inspection is pivotal\nin industrial manufacturing. However, existing inspection systems are\ntypically designed for specific industrial products and struggle with diverse product portfolios and evolving processes. Although some previous\nstudies attempt to address object dynamics by storing embeddings in\nthe reserved memory bank, these methods suffer from memory capacity\nlimitations and object distribution conflicts. To tackle these issues, we\npropose the Incremental Unified Framework (IUF), which integrates incremental learning into a unified reconstruction-based detection method,\nthus eliminating the need for feature storage in the memory. Based on\nIUF, we introduce Object-Aware Self-Attention (OASA) to delineate\ndistinct semantic boundaries. We also integrate Semantic Compression\nLoss (SCL) to optimize non-primary semantic space, enhancing network\nadaptability for new objects. Additionally, we prioritize retaining the\nfeatures of established objects during weight updates. Demonstrating\nprowess in both image and pixel-level defect inspection, our approach\nachieves state-of-the-art performance, supporting dynamic and scalable\nindustrial inspections.\nOur code is released at https://github.com/jqtangust/IUF.\nKeywords: Small Defect Inspection; Incremental Unified Framework\n\n1\n\nIntroduction\n\nAI-driven small defect inspection, commonly known as anomaly detection, is pivotal in numerous industrial manufacturing sectors [14, 26, 36, 42], spanning from\n⋆\n\nCorresponding author.\n\n\f2\n\nJ. Tang et al.\n\nFixed\nInput\n\nPredicted\nMask\n\nInput\n\nMore\nDefects\n\nModel 1\n\nModel 1\n\nModel 2\n\nModel 2\n\n···\n\n···\n\n···\n\n···\n\nPredicted\nMask\n\n···\n\nUnified\nModel\n\n···\n\nOriginal\nInput\n\nMemory\nBank\n\n···\n\n(C) One-Model-N-Objects\n\n···\n\n···\n\n···\n\n(B) One-Model-One-Object\nwith Defect-Incremental\n\n(A) One-Model-One-Object\nFixed\nInput\n\nPredicted\nMask for\nMore\nDefects\n\nModel 3\n\nModel 3\n···\n\nPredicted\nMask\n\n···\n\nBinary\nClassifier\n\nOriginal\nInput\n\n(D) One-Model-N-Objects\nwith Object-Incremental\n\n···\n\nOriginal\nPrediction\nMask\n\n···\n\nNew\nPrediction\nMask\n\nIncremental\nUnified\nModel\n\nTrue\nOR\nFalse\n\nNew\nObjects\n\n···\n\nIncremental\nNew\nObjects\n\n···\n\n(E) One-Model-N-Objects\nwith Incremental-Unified (Ours)\n\nFig. 1: Different framework in small defect inspection. (A) shows the most common\nOne-Model-One-Object pattern [9,10,20,23,29], which trains a separate model for each\nof the different objects. (B), based on (A), the types of defects are incrementing [5,7,31,\n32,37], which improves the generalization performance in detecting different defects. (C)\nshows a unified model [38,41] for multi-objects. (D) use a memory bank to incrementally\nrecord features for all objects for distinguishing [20]. (E) is our Incremental Unified\nframework, and it combines the advantages of both (C) and (D).\n\nmedical engineering [17] to material science [16], and electronic components [15].\nAutomated product inspections facilitated by these applications not only boast\nimpressive accuracy but also significantly reduce labor costs.\nWhile most of the current inspection systems [5,7,9,10,20,23,29,31,32,37] are\nspecifically designed for particular industrial products (One-Model-One-Object,\ncf. Fig. 1 (A) (B)), the ever-changing dynamics of real-world product variants\npresent two salient challenges. Firstly, there is a pressing need for a system capable of detecting multiple objects. Secondly, the adaptability of these systems\nto the frequently adjusted production schedules [33] is a lingering concern. Relying solely on acquiring new inspection equipment is neither cost-effective nor\nefficient due to increased deployment time.\nCurrently, only limited research addresses these challenges. One-Model-NObject approaches like UniAD [38] and OmiAD [41] propose a unified network\nsuitable for a broad spectrum of objects (Fig. 1 (C)). However, its capability\nis restricted when encountering dynamic or unfamiliar objects. On the other\nhand, CAD [20] suggests embedding features of multiple objects into a memory\nbank, with a binary classifier discerning defects (Fig. 1 (D)). Yet, the differences\nin object distributions can jeopardize memory bank features and impede pixel-\n\n\fAn Incremental Unified Framework for Small Defect Inspection\n(A)\n\nSpace\nImportance\n\n(B)\n\n(C)\n\nSemantic\nBoundary\n\nUpdating\nCompress\nSpace\nNon-Primary Space\n\n3\n\n(D)\n\nFig. 2: Semantic space in our methodology (B-D). In (A), all objects in the original\nsemantic space are tightly coupled, leading to “catastrophic forgetting”, i.e., the learning of new objects will result in forgetting previously learned objects. Our method\nfirstly builds a semantic boundary of each object (B), then compacts the non-primary\nsemantic space (C), and finally suppresses semantic updating in the previous objects’\nfeature space (D).\n\nlevel performance evaluation. Although Liu et al. [22] design a learnable prompt\nto find needed object information in the memory bank, this solution is still\nconstrained by escalating storage demands.\nTo surmount the confines of prior research, we introduce an Incremental\nUnified Framework (IUF), which integrates the multi-object unified model with\nobject-incremental learning, as depicted in Fig. 1 (E). IUF capitalizes on the\nunified model’s prowess, enabling pixel-precise defect inspection across diverse\nobjects without necessitating an embedded feature storage in the memory bank.\nIn this framework, one significant challenge is “catastrophic forgetting”, which\nhampers network efficacy in the Incremental Unified framework due to semantic\nfeature conflicts in the reconstruction network (Fig. 2 (A)). We propose ObjectAware Self-Attention (OASA), leveraging object category features to segregate\nthe semantic spaces of different objects (Fig.2 (B)). These features serve as semantic constraints within the encoding process of the reconstruction network,\nestablishing distinct feature boundaries in the semantic hyperplane, thereby alleviating feature coupling. Then, we introduce Semantic Compression Loss (SCL)\nto condense non-essential feature values, concentrating the feature space on principal components (Fig.2 (C)). This creates more semantic space for optimizing\nunseen objects and minimizing potential forgetting issues. Finally, when learning novel objects, we propose a new updating strategy to retain features of prior\nobjects and reduce interference from new objects in the prevailing feature space\n(Fig.2 (D)). Our framework offers a versatile solution for small defect inspection,\nadeptly navigating the challenges posed by feature space conflicts, and achieves\nstate-of-the-art (SOTA) performance at both image and pixel levels.\nTo summarize, our contributions are listed as follows:\n– We propose the Incremental Unified Framework (IUF), which can dynamically detect small defects in frequently-adjusted industrial scenarios. To the\nbest of our knowledge, IUF is the first framework to integrate incremental\nlearning into the unified reconstruction-based small defect detection method,\nthereby overcoming memory bank capacity limitations and object distribution conflicts.\n\n\f4\n\nJ. Tang et al.\n\n– Our framework incorporates Object-Aware Self-Attention (OASA), Semantic Compression Loss (SCL), and a new updating strategy, which together\nreduce the potential risk of feature conflicts and mitigate the catastrophic\nforgetting issue.\n– The Incremental Unified Framework (IUF) enables our method to deliver\nnot only image-level performance but also pixel-level location. Compared to\nother baselines, our method achieves SOTA performance.\n\n2\n\nRelated Work\n\nSmall Defect Inspection Small defect inspection (Anomaly Detection) primarily falls into two paradigms: feature embedding-based and reconstructionbased methods. Both aim to pinpoint the locations of defects.\nFeature embedding-based methods localize defective regions by discerning\nfeature distribution discrepancies between defective and non-defective images,\ne.g., SPADE [9], PaDim [10], PatchCore [30], GraphCore [35], SimpleNet [24].\nThese approaches extract diverse image features using a deep network and subsequently assess the dissimilarities between test image features and those of\nthe training dataset. If these disparities are substantial, they indicate defective\nregions. Another efficient method is the reconstruction-based approach, which\nrelies on an alternative hypothesis. Such methods posit that models trained\non normal samples excel in reproducing normal regions while struggling with\nanomalous regions [4, 8, 38, 41]. Therefore, many approaches aim to discover\nan optimal network architecture for effective sample reconstruction, including\nAutoencoder (AE) [4], Variational Autoencoder (VAE) [23], Generative Adversarial Networks (GANs) [1], Transformer [38], etc. Furthermore, beyond imagelevel reconstruction, certain methods endeavor to reconstruct features at a more\ngranular level, e.g., InTra [28] and UniAD [38]. Until recently, the majority of\nprior approaches adhered to the One-Model-One-Object pattern, as shown in\nFig. 1 (A). However, recent advancements such as UniAD [38] and OmniAL [41]\nhave extended the reconstruction paradigm to the One-Model-N-Objects pattern (depicted in Fig. 1 (C)). This progress curtails memory usage compared to\nthe one-model-one-object approach, propelling the entire problem into a more\ngeneral framework.\nIn the context of industrial defect inspection, scenarios often evolve over time.\nInitial training may not encompass all objects, but rather the acquisition of objects unfolds progressively in response to manufacturing schedules and adaptations. Hence, an ideal approach would involve continual learning of new objects\nwithin a dynamic environment, while preserving the existing objects. This approach aligns with industrial evolution needs. To address this, we introduce a\nframework for small defect inspection under Object-Incremental Learning, as\nillustrated in Fig. 1 (E).\nIncremental Learning for Small Defect Inspection There have been some\nprevious studies combining incremental learning and small defect inspection;\nhowever, these studies mainly focused on augmenting the defect types of one\n\n\fImage-level AUROC (%)\n\nPixel-level AUROC (%)\n\nAn Incremental Unified Framework for Small Defect Inspection\n100\n\n(A-1) 10-1 with 5 Steps\n\n90\n\n(B) Feature Conflict\n\nCatastrophic\nForgetting\n\n80\n70\n60\n10\n\n100\n\nDifferent\nSemantic\nPattern\n\nOur Framework\nUpper Boundary\n\n11\n\n12\n\n13\n\n14\n\nTask Number (n)\n\n60\n10\n\nPredicted\nMask\nCatastrophic\nForgetting\n\nIncremental\nLearning\nNew\nObject\n\nObject\n\nCatastrophic\nForgetting\n\n80\n70\n\nUnified\nModel\n\n15\n\n(A-2) 10-1 with 5 Steps\n\n90\n\n5\n\nSame\nSemantic\nPattern\n\nGround Truth\n(Mask)\n\nUnified\nModel\nOur Framework\nUpper Boundary\n\n11\n\n12\n\n13\n\nPrevious Object(s)\n14\n\nTask Number (n)\n\n15\n\nCurrent Object(s)\n\nNew Predicted\nMask\n\nFig. 3: Problems in task stream. 10 − 1 with 5 Steps is an example of a task stream\nprotocol, where we first train on 10 basic objects and then add one object at a time,\nwith the process being completed in 5 steps (Please see Sec. 5.1(Task Protocol) for\nmore details.). (A-1) and (A-2) demonstrate the performance of image-level and pixellevel models under the previous unified framework, UniAD [38], where catastrophic\nforgetting significantly occurs. The upper boundary represents the best performance\nwhen we can use all previous objects for joint training. (B) demonstrates the reason for\ncatastrophic forgetting. When training the current step, the training model overwrites\nthe previous semantic patterns, causing severe feature conflicts in the reconstructed\nnetwork.\n\nobject under a specific scenario [5, 7, 31, 32, 37] (Fig. 1 (C)). The primary goal\nof these methods is to enhance the model’s performance, which does not align\nwith the requirements of object-incremental learning.\nRecently, Li et al. [20] initially proposed a feature embedding-based method\nfor continuous learning of task sequences. However, due to the algorithm using a\nsingle memory bank to store all object information, which leads to interference\nbetween objects, the reference feature space cannot be exactly the same as the\ndetected objects. Consequently, this algorithm cannot compute pixel-level performance and can only provide image-level performance. Most recently, Liu et\nal. [22] proposed an unsupervised continual anomaly detection (UCAD) method.\nAlthough it attempts to distinguish features of different objects using contrastive\nlearning, this strategy still requires the assistance of a memory feature bank.\nUnlike previous solutions, our method avoids interference from multiple object classes caused by explicit memory objects. We propose the first reconstructionbased model for this continuous learning problem. Therefore, our method can\neffectively avoid the problem of feature space distribution differences between\ndifferent objects and only requires a reasonable feature space reassignment in\nthe reconstruction network.\n\n\f6\n\n3\n\nJ. Tang et al.\n\nProblem Formulation\n\nIn our Incremental Unified framework (IUF), we partition distinct objects x into\nindependent steps indexed by t = 1...N , corresponding to the number of objects.\nThe incremental flow of involving objects into IUF can be succinctly described\nas Tn , n ∈ 1, ..., N . During the learning process in the t-th step, the network\nundergoes updates using the model that does not access training data from\nprevious steps ranging from 1 to t − 1. Among these steps, we identify normal\n+\n+\nimages as x+ = {x+\no1 , xo2 , · · ·, xoN }, while defective images are represented as\n−\n−\n−\n−\nx = {xo1 , xo2 , · · ·, xoN }. Here, on denotes distinct objects within the dataset.\nFor small defect inspection by reconstruction methods [38], an autoencoder\nis required to reconstruct normal features in all objects, as Eq. 1,\n  \\label {recon} \\begin {aligned} &amp;\\hat {x} = f_r(x^{+}; \\theta ), \\\\ &amp;\\min L_1(\\hat {x},x^+) = \\min |\\hat {x} - x^{+}|, \\end {aligned} \n\n(1)\n\nwhere x̂ is the reconstructed features, θ is the network parameter, and fr (·) is\nthe reconstruction network. Combining Eq. (1) and our framework, this process\nis redefined as:\n  \\label {mtrecon} \\begin {aligned} \\textbf {Step n:}\\ &amp;\\hat {x_{o_n}} = f_r(x^{+}_{o_n}; \\theta ), \\\\ &amp;\\min L_1(\\hat {x_{o_n}},x^{+}_{o_n}) = \\min |\\hat {x_{o_n}} - x^{+}_{o_n}|, \\end {aligned} \n\n(2)\n\nwhere n ∈ [1, N ].\nIn such task pipelines, we notice that small defect inspection is also notably\nsusceptible to catastrophic forgetting, as shown in Fig. 3 (A-1) and (A-2). Unlike\nother incremental learning tasks, small defect inspection requires the reconstruction of normal features, necessitating the decoding of semantic information from\nmultiple channels. Without the rehearsal of the old category, the features of the\nnew category will modify and occupy the original feature channel, resulting in\nsemantic conflicts in space, as shown in Fig. 3.\nIntuitively, our objective is to reorganize distinct categories of features into\ntheir respective channels, while avoiding any potential semantic conflicts. Nevertheless, within our framework, the task of establishing meaningful semantic\nrelationships between these diverse categories presents a considerable challenge.\n\n4\n\nMethodology\n\nOverview To mitigate catastrophic forgetting, we propose three critical components for Incremental Unified small defect inspection. Firstly, we identify the\nsemantic boundary to highlight the differences among categories, thereby facilitating the preservation of old knowledge (Sec. 4.1). Secondly, we compact the\nsemantic space to maximize the compression of redundant features, which helps\nto alleviate the issue of semantic conflicts (Sec. 4.2). Finally, we sustain primary\nsemantic memory to minimize the feature forgetting of the old object, thereby\nimproving the retention of critical knowledge (Sec. 4.3).\n\n\fAn Incremental Unified Framework for Small Defect Inspection\nSA\n\nTransformer with\nSelf-Attention\n\nwith\nOASA Transformer\nObject-Aware Self-Attention\n\nLocating\nDefect\n\nOA … OA\nSA\nSA\n\nLocating\nDefect\n\nOriginal\nFeature\n\nSA … SA\n\nSA … SA\n\nReconstructed\nFeature\n\nOriginal\nFeature\n\nSA … SA\n\n(B) Ours\n\n…\n\n(A) Previous Reconstruction Network\n\nOutput\nFeature\n\nOASA\n\nReconstructed\nFeature\n\nAttention\nMap\n\nSemantic\nBoundary\nInserting\n\nSA … SA\n\n7\n\nCategory\nLabel\n\n𝑄\nStep 1: Bottle\nStep 2: Cable\nStep 3: Capsule\n…\nStep N: Zipper\n\n𝐾\n\n𝑉\n\nSemantic\nInformation\n\n𝐶𝑂𝑛\n\nInput\nFeature\n\nFig. 4: Identify object semantics by Object-Aware Self-Attention (Sec. 4.1). (A) is the\nreconstructed network from the previous method [38]. (B) is our current setup, which\ninserts the category attributes of an image into the reconstructed network via ObjectAware Self-Attention, thus constraining the semantic space to the corresponding image\nfeatures and constructing the semantic boundaries of the network.\n\n4.1\n\nIdentifying Semantics Boundary\n\nPrevious unified method [38] directly reconstructs all objects through one autoencoder, as in Fig. 4 (A), so multiple objects share the same semantic space\nin one model. So, the semantic spaces of different objects are tightly coupled.\nThis tight semantic coupling is likely to cause undifferentiated updating of\nthe feature space of the old objects when learning a new object, consequently\nresulting in a significant catastrophic forgetting of the old knowledge. Therefore,\nwe introduce a more explicit constraint to facilitate the network to distinguish\nthe feature semantic space among different objects. Specifically, for step n, we\nintroduce its category label, Ln , as in Eq. (3),\n  \\label {m1-3} \\begin {aligned} \\textbf {Step n:}\\ &amp; \\{y_n, C_{o_n} \\}= D(x^{+}_{o_n}; \\sigma ), \\\\ &amp;\\min L_{CE}(y_n, L_n) = \\min -\\sum _{i=1}^{N}L_{n}^{i}\\log (y_{n}^{i}), \\end {aligned} \n(3)\n\n3×Ho ×Wo\nindicates the normal object images in current step, yn\nwhere x+\non ∈ R\nis the final output of the discriminator, D(·), and σ is the parameter in this discriminator. LCE (·) is the cross-entropy loss, which contains N objects. Besides,\nD(·) also outputs Con ∈ RT ×C×H×W , which corresponding to T key layers of\nsemantic features, as Fig. 4 (B). By introducing the category label, each object is\nlimited to its corresponding semantic space in the reconstruction network, which\nhelps to identify the semantic boundary between different objects.\nSubsequently, to introduce this semantic boundary in the reconstruction\nnetwork, we designed an Object-Aware Self-Attention (OSOA) mechanism as\nEq. (4),\n\n  \\label {m1-2} \\text {Attention}(C_{o_n},Q,K,V)=\\textnormal {softmax}(\\frac {(C_{o_n} \\cdot Q) K^T}{\\sqrt {d_k}})V, \n\n(4)\n\nwhere · is Hadamard product, dk is the dimension of the key or query, and T\nis the matrix transpose operator. Q ∈ RT ×C×H×W is the query in T key layers\n\n\f8\n\nJ. Tang et al.\n\nof the transformer-based network. K and V are the keys and values of this\nnetwork, respectively. By inserting Con to Q, the reconstruction network can\nexplicitly identify semantic boundaries.\n4.2\n\nCompacting Semantic Space\n\nBy identifying semantic boundaries, we can further compress the feature space\nof old objects as much as possible, thus reserving more network capacity for\nnew objects, which can reduce feature conflicts. To meet this goal, we design\na compact feature regularization, which helps us to eliminate the redundant\nfeatures of old objects and leave more capacity for future unknown new objects.\nSpecifically, given a training sample, the latent features M ∈ RB×C×H×W is\nfirstly compressed by aggregating spatial features as in Eq. (5),\n  \\label {m2-1} \\hat {M} = \\frac {1}{H \\times W} \\sum _{h=1}^{H} \\sum _{w=1}^{W} M_n(b, c, h, w), \n\n(5)\n\nwhere M̂ ∈ RB×C represents the semantic information matrix of latent features\nin each batch. As is common in the field [11, 27], we hypothesize that different\nobjects of semantic features are distributed on distinct channels, while spatial\ninformation is relatively irrelevant. Then, we perform SVD on the first two dimensions B and C of M̂ . The representation formula is as Eq. (6),\n  \\begin {aligned}\\label {m2-2} \\hat {M}&amp;=USV^{T}\\\\ &amp;=\\underset {\\mathbf {Batch\\ Space}}{\\underbrace {\\left [ \\begin {matrix} u_{11}&amp; u_{12}&amp; u_{13}&amp; \\cdots &amp; u_{1B}\\\\ u_{21}&amp; u_{22}&amp; u_{23}&amp; \\cdots &amp; u_{2B}\\\\ u_{31}&amp; u_{32}&amp; u_{33}&amp; \\cdots &amp; u_{3B}\\\\ \\vdots &amp; \\vdots &amp; \\ddots &amp; \\ddots &amp; \\vdots \\\\ u_{B1}&amp; u_{B2}&amp; u_{B3}&amp; \\cdots &amp; u_{BB}\\\\ \\end {matrix} \\right ] }}\\left [ \\begin {matrix} \\sigma _1&amp; 0&amp; \\cdots &amp; 0\\\\ 0&amp; \\sigma _2&amp; \\cdots &amp; 0\\\\ \\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots \\\\ 0&amp; 0&amp; \\cdots &amp; \\sigma _C\\\\ 0&amp; 0&amp; \\cdots &amp; 0\\\\ \\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots \\\\ 0&amp; 0&amp; \\cdots &amp; 0\\\\ \\end {matrix} \\right ] \\underset {\\mathbf {Channel\\ Space}}{\\underbrace {\\left ( \\left [ \\begin {matrix} v_{11}&amp; v_{12}&amp; \\cdots &amp; v_{1C}\\\\ v_{21}&amp; v_{22}&amp; \\cdots &amp; v_{2C}\\\\ \\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots \\\\ v_{C1}&amp; v_{C2}&amp; \\cdots &amp; v_{CC}\\\\ \\end {matrix} \\right ] \\right ) ^T}}, \\end {aligned} \n\n(6)\n\nwhere three matrices obtained after SVD, i.e., U , S, and V T . Among them, U ∈\nRB×B is an orthogonal matrix for batch eigenspace, S = diag(σ1 , σ2 , ..., σC ) ∈\nRB×C is a diagonal matrix of eigenvalues, and V T ∈ RC×C is an orthogonal\nmatrix of channel eigenspace.\nSn reflects the importance of semantic information for M on each channel dimension. Larger eigenvalues correspond to more important semantic space, while\nsmaller eigenvalues correspond to relatively non-primary semantic space [12, 13,\n21]. Based on this fact, we can compress the features of each object by reducing\nthe non-primary semantic information. Therefore, we construct the Semantic\nCompression Loss (SCL) as in Eq. (7) and Fig. 5,\n  \\label {m2-3} L_{sc} = \\sum _{i=t}^{C} \\sigma _i , \n\n(7)\n\n\fAn Incremental Unified Framework for Small Defect Inspection\n\n9\n\nLayer x\n\nΔ𝜃𝜃𝑗𝑗\n\n𝐶𝐶\n\nProjection\n\nΔΘ𝑗𝑗\n\n𝑊𝑊\n\n…\n\n1\n\n1\n\n𝐶𝐶\n\nSemantic\n\n𝑆𝑆 Importance 𝑉𝑉 𝑇𝑇\n\nSemantic\nCompression\nLoss\n\n𝑇𝑇 −1\n(𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜\n)\n\n1\n\n…\n\n1\n0\n\n𝐶𝐶\n\n⊙\n\n𝐶𝐶\n\n1\n\nConstrain\n\n𝐶𝐶\n\n1\n\nSemantic\nImportance\n\n𝐶𝐶\n\n𝑊𝑊\n\n1\n\n𝐶𝐶\nUpdating\n\n1\n\n…\n\n1\n\n1\n\n𝐵𝐵\n\n𝑈𝑈\n\nΩ(𝑘𝑘, 𝑐𝑐)\n\n𝐶𝐶\n\n…\n\n𝐶𝐶\n\n𝑊𝑊\n\n𝐶𝐶\n\n…\n\n…\n\n…\n𝐶𝐶\n\n…\n\n1\n\n1\n\n1\n\n…\n\n1\n\n…\n\n𝑇𝑇\n𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜\n\n1\n\n…\n\n𝐵𝐵\n\n1\n\n𝐶𝐶\n\nReverse\nProjection\n\n1\n\n…\n\nSVD\n\n𝐵𝐵\n\n…\n\n…\n\nLatent Feature\n\nLayer x+1\n\nStep N+1\n\n…\n\n1\n\n1\n\n…\n\n𝐵𝐵\n\nBatch\n\nChannel\n\n…\n\n3\n\n𝐶𝐶\n\n…\n\n2\n\n…\n\nStep N\n\n1\n\n1 2 3 4\n\n𝑊𝑊\n\nΔ𝜃𝜃𝑗𝑗 ∗\n\nFig. 5: Semantic space operation. We perform an SVD decomposition of the semantic\nspace, based on the feature values that represent semantic importance, and compact\nthe non-primary space in Sec. 4.2. In addition, when learning a new object, we project\nthe update weights to the semantic space of previous features, and then block the\nweight updates that are semantically significant for previous information in Sec. 4.3.\n\nwhere t ∈ [1, C] is a hyperparameter, which is a scale factor that reflects the\ndegree of compression of the semantic feature space. To construct the total loss,\nwe use L = λ0 L1 + λ1 LCE + λ2 Lsc . λ0 is set to 1 as a standard of the base task,\nand λ1 is 0.5 as the auxiliary task experience for balancing different loss values. λ2\nis within the range of 1−10, and in practice, users can make custom adjustment of\nλ2 for controlling the old objects’ feature space. This loss continuously compacts\nthe non-primary feature space while achieving the final optimization goal.\n4.3\n\nReinforcing Primary Semantic Memory\n\nWhile we have taken measures to ensure the availability of the requisite semantic\nspace within the network, the risk of catastrophic forgetting still persists, particularly in an unregulated task stream, when significant feature space overlap\nexists between older and newer objects. Hence, it becomes imperative for us to\naddress dual concerns: firstly, how to retain the prior semantic information when\nupdating weights, and secondly, how to simultaneously acquire knowledge about\nnew objects without unduly influencing the semantic space associated with older\nobjects.\nVanilla gradient descent leads to an undifferentiated update of all feature\nspace, if θ = (θ1 , θ2 , . . . , θJ ) ∈ RC×W is the parameter of the model, and W is\nrelated to network structure. ∂L(θ)\n∂θj , j = 1, 2, . . . , J is the partial derivative of θ.\nThe process of model updating is shown in Eq. (8),\n  \\label {m3-1} \\begin {aligned} \\nabla \\theta _{j} &amp;= -\\alpha \\frac {\\partial L(\\theta )}{\\partial \\theta _j}, \\\\ \\theta _{j}^{'} &amp;\\leftarrow \\theta _j + \\nabla \\theta _j, \\end {aligned} \n(8)\n\n\f10\n\nJ. Tang et al.\n′\n\nwhere α is the learning rate, ∇θj is updating vector, and θj is the new weight\nnext iteration.\nRetaining Prior Semantic Information To maintain the semantics of the\nold objects, it is essential to continuously consolidate the existing weights in old\nobjects during the incremental process. Therefore, we constantly copy the old\nweight in gradient descent in the next step, as in Eq. (9),\n  \\label {m3-2} \\begin {aligned} \\theta _{j}^{'} \\leftarrow \\theta _j + \\nabla \\theta _j + \\beta \\theta ^{old}_j, \\end {aligned} \n\n(9)\n\nwhere θjold is the old weight in previous objects, and β is a hyper-parameter for\ncontrolling the magnitude of this regulation.\nDecreasing Rewriting of Prior Semantics Although we can retain prior\nsemantic information in updating weight, the rewriting of old semantic space\nstill happens. Therefore, suppressing weight updates in old semantic spaces will\nconstrain the new object to use other undisturbed semantic spaces, which will\nfurther reduce feature conflicts.\nBased on this motivation, we consider that the importance of the semantic\nspace can be represented by V T (Eq. (6)). Thus, we project the updating weight,\n∇θj , to the corresponding channel space in old objects, as in Eq. (10),\n  \\begin {aligned}\\label {m3-3} \\nabla \\Theta _j = V_{old}^T \\nabla \\theta _j, \\end {aligned} \n\n(10)\n\nT\nwhere ∇Θj ∈ RC×W is updating weight in channel space. Vold\nis channel eigenspace\nin previous steps.\nTo constrain the updating in primary semantic space in previous steps, we\nempirically use a log function to constrain the updating of different channels,\nc ∈ R1×C , as Eq. (11),\n  \\label {m3-4} \\Omega (k,c) = k \\times \\log (c), \n(11)\n\nwhere Ω(·) is constraining function. When the channel index c equals 1, the\nresult of the log function is 0, indicating that the model does not update in this\nspecific dimension. This is because the model is in the most crucial semantic\nspace for the previous objects. As the channel index c increases, this channel\nbecomes more likely to trigger model updates, and these dimensions become less\nimportant for representing previous objects.\nBy acting on this function to ∇Θj and then projecting it back to the original\nspace, we finally get the updating weight in the original space, as in Eq. (12)\nand Fig. 5,\n  \\label {m3-5} \\nabla \\theta ^{*}_j = (V_{old}^T)^{-1} \\Omega (k,n) \\odot \\nabla \\Theta _j, \n(12)\nwhere ⊙ is the channel-wise product. In summary, our updating is shown as\nEq. (13),\n(13)\n  \\label {m3-6} \\begin {aligned} \\theta ^{'}_j \\leftarrow \\theta _j + \\nabla \\theta ^{*}_j + \\beta \\theta ^{old}_j. \\end {aligned} \nBased on this, our model can reinforce the primary semantic memory of old\nobjects and overcome catastrophic forgetting significantly.\n\n\fAn Incremental Unified Framework for Small Defect Inspection\n\n5\n\nExperiments\n\n5.1\n\nExperimental Setup\n\n11\n\nDatasets We choose MVTec-AD [3] and VisA [43] as our dataset. MVTecAD [3] and VisA [43] have 15 and 12 types of objects, respectively. These two\nemployed datasets have well-recognized complex cases for real-world evaluation,\nand different objects’ feature domains show significantly varying distributions,\nso both of them can be available for our Incremental Unified Framework.\nTask Protocol According to our framework in Fig. 1 (E), our reconstruction\nmodel incrementally learns new objects. Based on the practical requirements of\nindustrial defect inspection, we set up our experiments in both single-step and\nmulti-step settings.\nWe represent our task stream as X − Y with N Step(s). Here, X denotes\nthe number of base objects before starting incremental learning, Y represents\nthe number of new objects incremented in each step, and N indicates the number\nof tasks during incremental learning. When training on base objects, N = 0, and\nafter one step, N = N + 1. Our task stream is shown as follows:\n– MVTec-AD [3]: 14 − 1 with 1 Step, 10 − 5 with 1 Step,\n3 − 3 with 4 Steps and 10 − 1 with 5 Steps.\n– VisA [43]: 11 − 1 with 1 Step, 8 − 4 with 1 Step, 8 − 1 with 4 Steps.\nBaselines We select some SOTA methods in small defect inspection as the\nbaseline, including PaDiM [10], DRAEM [39], PatchCore [30], PANDA [29],\nCutPaste [19], and UniAD [38]. Notably, some baselines integrate with the incremental learning protocol, CAD [20]. In addition, we integrate several available SOTA baselines in incremental learning with UniAD, including EWC [18],\nSI [40], MAS [2] and LVT [34].\nEvaluation Metrics Currently, there are two metrics for continual learning:\naverage accuracy (ACC) [25] and forgetting measure (FM) [6]. However, for\nindividual tasks, we usually use Pixel-level AUROC, Apix , and Image-level AUROC, Aimg , to characterize the detection accuracy. In this task, we combine\nthese two goals and define four metrics, as in Eq. (14),\n\n  \\label {metrics1} \\small ACC = \\left \\{ \\begin {aligned} &amp;\\frac {1}{N}\\sum _{i=1}^{N-1}{A_{N,i}^{\\mathbf {pix}}}\\,\\,\\\\ &amp;\\frac {1}{N}\\sum _{i=1}^{N-1}{A_{N,i}^{\\mathbf {img}}}\\\\ \\end {aligned} \\right . , FM = \\left \\{ \\begin {aligned} &amp;\\frac {1}{N-1}\\sum _{i=1}^{N-1}{\\max _{b\\in \\{1,\\cdots ,N-1\\}}}\\left ( A_{b,i}^{\\mathbf {pix}}-A_{N,i}^{\\mathbf {pix}} \\right )\\\\ &amp;\\frac {1}{N-1}\\sum _{i=1}^{N-1}{\\max _{b\\in \\{1,\\cdots ,N-1\\}}}\\left ( A_{b,i}^{\\mathbf {img}}-A_{N,i}^{\\mathbf {img}} \\right )\\\\ \\end {aligned} \\right . . \n\n5.2\n\n(14)\n\nExperiment Performance\n\nQuantitative Evaluation Table 1 (A) (B) shows that our method achieves\nSOTA performance with different experiment settings in pixel-level (A) and\nImage-level (B), respectively. We observe that the network performance is catastrophic forgetting in the reconstruction-based approach (UniAD [38]). While\n\n\f12\n\nJ. Tang et al.\n\nTable 1: Quantitative evaluation in MvTec AD [3] (A) and VisA [43] (B). “Image\n/ Pixel” shows the image-level and pixel-level performance respectively. “NA” is Not\nAvailable, since CAD [20]-based method cannot locate defects in pixel-level. Red and\nGray Red represents the best image-level and pixel-level performance respectively.\n(A) Quantitative Performance in MvTec [3].\n14 − 1 with 1 Step\n\n10 − 5 with 1 Step\n\n3 − 3 with 4 Steps\n\n10 − 1 with 5 Steps\n\nMethod\n\nACC(↑)\n\nACC(↑)\n\nACC(↑)\n\nACC(↑)\n\nPaDim [10]\nPatchCore [30]\nDRAEM [39]\n\n57.5 / 77.1 23.1 / 20.2 64.4 / 81.4 9.1 / 14.1 60.0 / 76.16 22.6 / 20.3 53.9 / 68.4 18.1 / 24.1\n66.5 / 83.8 34.2 / 24.1 69.6 / 62.4 22.6 / 25.2 62.4 / 77.9 37.3 / 22.1 55.3 / 73.8 30.8 / 27.5\n51.1 / 61.2 8.2 / 8.2 58.0 / 63.2 11.8 / 3.9 54.9 / 57.6 2.6 / 9.8 52.3 / 59.0 13.8 / 8.8\n\nUniAD [38]\nUniAD [38] + EWC [18]\nUniAD [38] + SI [40]\nUniAD [38] + MAS [2]\nUniAD [38] + LVT [34]\n\n85.7 / 89.6 18.3 / 13.3 86.7 / 91.5 14.9 / 10.6 81.3 / 88.7\n92.8 / 95.4 4.1 / 1.9 90.5 / 93.6 7.3 / 4.2 79.6 / 89.0\n85.7 / 89.5 18.4 / 13.4 84.1 / 88.3 20.2 / 17.0 81.9 / 88.5\n85.8 / 89.6 18.1 / 13.3 86.8 / 91.0 14.9 / 11.6 81.5 / 89.0\n80.4 / 86.0 29.1 / 20.6 87.1 / 90.6 14.1 / 12.3 80.4 / 88.6\n\nFM(↓)\n\nFM(↓)\n\nFM(↓)\n\nFM(↓)\n\n7.4 / 10.6 76.6 / 82.3 21.1 / 17.3\n9.5 / 10.1 89.6 / 93.8 5.4 / 3.6\n7.0 / 10.8 77.2 / 81.6 20.2 / 18.2\n7.2 / 10.2 77.9 / 82.0 19.5 / 17.7\n8.6 / 10.6 78.2 / 88.3 19.1 / 16.1\n\nCAD + DNE [20]\n84.5 / NA -2.0 / NA 87.8 / NA 1.1 / NA 80.3 / NA 6.6 / NA 77.7 / NA 9.7 / NA\nCAD [20] + CutPaste [19] 84.3 / NA -1.6 / NA 87.1 / NA -0.3 / NA 79.2 / NA 12.6 / NA 70.6 / NA 20.2 / NA\nCAD [20] + PANDA [29] 50.0 / NA 6.0 / NA 55.4 / NA 8.9 / NA 62.4 / NA 36.8 / NA 51.3 / NA 10.3 / NA\nOurs\n\n96.0 / 96.3 1.0 / 0.6 92.2 / 94.4 9.3 / 6.3\n\n84.2 / 91.1 10.0 / 8.4 94.2 / 95.1 3.2 / 1.0\n\n(B) Quantitative Performance in VisA [43].\n11 − 1 with 1 Step\n\n8 − 4 with 1 Step\n\n8 − 1 with 4 Steps\n\nMethod\n\nACC(↑)\n\nACC(↑)\n\nACC(↑)\n\nPaDim [10]\nPatchCore [30]\nDRAEM [39]\n\n59.7 / 84.3 20.6 / 14.2 60.3 / 84.2 21.8 / 14.0 54.3 / 83.4 21.1 / 9.7\n66.0 / 85.6 30.0 / 13.0 67.4 / 86.4 33.3 / 14.3 56.2 / 83.6 34.8 / 12.4\n48.4 / 60.5 30.6 / 15.8 63.6 / 49.6 17.7 / 29.7 51.8 / 63.4 25.9 / 10.5\n\nUniAD [38]\nUniAD [38] + EWC [18]\nUniAD [38] + SI [40]\nUniAD [38] + MAS [2]\nUniAD [38] + LVT [34]\n\n75.0 / 92.1 22.4 / 11.4 78.1 / 94.0 14.7 / 8.4 72.2 / 90.8 16.6 / 9.2\n78.7 / 95.4 14.9 / 4.8 80.5 / 95.4 10.0 / 5.3 72.3 / 92.3 16.5 / 7.3\n78.1 / 92.0 16.9 / 11.5 80.8 / 93.9 9.2 / 8.3 69.8 / 88.5 19.8 / 12.0\n75.4 / 91.8 21.5 / 11.9 78.4/ 94.0 14.1 / 8.4 72.1 / 90.6 16.7 / 9.4\n77.5 / 92.3 17.3 / 10.9 78.8/ 94.1 13.4 / 8.1 70.8 / 91.4 18.3 / 8.4\n\nFM(↓)\n\nFM(↓)\n\nFM(↓)\n\nCAD + DNE [20]\n71.2 / NA -10.2 / NA 64.1 / NA 6.1 / NA 58.6 / NA 10.2 / NA\nCAD [20] + CutPaste [19] 65.8 / NA 3.5 / NA 63.2 / NA 5.1 / NA 56.2 / NA 13.9 / NA\nCAD [20] + PANDA [29] 55.7 / NA -1.7 / NA 56.7 / NA -3.3 / NA 56.0 / NA -0.3 / NA\nOurs\n\n87.3 / 97.6 2.4 / 1.8 80.1 / 95.4 15.2 / 6.1 79.8 / 95.0 9.8 / 6.8\n\nsome continuous learning strategies [2, 18, 34, 40] can partially mitigate this\nproblem, our approach provides an optimal solution. Besides, compared with\nCAD-based methods, our method can offer not only pixel-level location but also\nSOTA performance for incrementing more objects. Overall, our algorithm can\novercome the above drawbacks and maintain a low level of forgetting.\nQualitative Evaluation for Defect Localization Fig. 6 shows the defect\nlocation (heatmap) of our method and other SOTA reconstruction-based approaches. We follow the same strategy in UniAD [38] to calculate the heatmap.\nRegions, where the occurring chance of defects is higher, are colored red. Conversely, regions, where defects are almost impossible to occur, are colored blue.\nOur method can significantly reduce semantic feature conflicts (In Fig. 3) and\noutput more accurate defect locations.\n\n\fAn Incremental Unified Framework for Small Defect Inspection\nInput\n\nUniAD [38]\n\nUniAD + SI [40] UniAD + MAS [2] UniAD + LVT [34] UniAD + EWC [18]\n\nOurs\n\n13\n\nGround Truth\n\nFig. 6: Qualitative evaluation in MVTec-AD [3] and VisA [43]. The intensity of red\nin the heatmap indicates a higher likelihood of defects, whereas blue signifies a lower\nprobability. Our approach outperforms existing baselines by significantly mitigating\nsemantic feature conflict and enhancing defect localization accuracy. (Please zoom in\nfor more details.)\n\n5.3\n\nAblation Study\n\nWe conduct the ablation study on MvTec AD [3] to evaluate the effectiveness of\ndifferent components in our proposed method.\nEffectiveness of Object-Aware Self-Attention To demonstrate the effectiveness of category labels, we ablate Object-Aware Self-Attention in our structure. “w/o OASA” in Table 2 shows that this structure can reduce catastrophic\nforgetting by category information insertion. Moreover, in Fig. 7 (“w/o OASA”),\nif there is no semantic boundary, the network can still detect anomalies in the\ncurrent object, but serious feature conflicts will occur in other regions of the\nobject, further affecting the overall performance of the network.\nEffectiveness of Semantic Compression Loss To demonstrate the effectiveness of Semantic Compression Loss, we ablate this loss in our training. “w/o\nSCL” in Table 2 shows that this structure can reduce catastrophic forgetting by\npreserving more space for new objects. Besides, in Fig. 7 (“w/o SCL”), by compressing more space for new objects, we can obtain clearer defect localization in\n\n\f14\n\nJ. Tang et al.\n\nTable 2: Quantitative evaluation in ablation study. The results show that three components, Object-Aware Self-Attention, semantic compression loss, and the updating\nstrategy, contribute to the performance improvement of the whole framework. Red and\nGray Red represents the best image-level and pixel-level performance respectively.\n14 − 1 with 1 Step 10 − 5 with 1 Step\n\n3 − 3 with 4 Steps 10 − 1 with 5 Steps\n\nACC(↑)\n\nACC(↑)\n\nFM(↓)\n\nACC(↑)\n\nFM(↓)\n\nFM(↓)\n\nACC(↑)\n\nFM(↓)\n\nw/o OASA 89.3 / 92.5 13.3 / 8.2 87.6 / 90.6 16.5 / 13.5 81.4 / 88.9 12.2 / 10.8 84.2 / 90.3 14.2 / 8.6\nw/o SCL 95.5 / 96.1 2.4 / 0.8 92.0 / 94.3 8.1 / 6.0 82.7 / 88.3 10.6 / 11.7 93.4 / 95.1 3.6 / 2.7\nw/o US\n95.9 / 96.2 1.1 / 0.7 88.6 / 93.3 16.5 / 8.5 83.5 / 89.5 10.9 / 10.3 85.6 / 90.5 13.5 / 8.4\nOurs\n\n96.0 / 96.3 1.0 / 0.6 92.2 / 94.4 9.3 / 6.3 84.2 / 91.1 10.0 / 8.4 94.2 / 95.1 3.2 / 1.0\n\nInput\n\nw/o OSOA\n\nw/o US\n\nw/o SCL\n\nOurs\n\nGround Truth\n\nFig. 7: Qualitative evaluation of ablation study. Compared with “w/o US” and “w/o\nOSOA”, it is obvious that our method can be more accurate in locating defects. Compared with “w/o SCL”, since increasing the available space of the model, our algorithm\ncan further reduce the feature conflict and reduce more interference in the background.\n(Please zoom in for more details.)\n\ndetail, which indicates that more network space can be explained in incremental\nlearning by semantic compression loss.\nEffectiveness of Our Updating Strategy To demonstrate the effectiveness\nof our updating strategy, we ablate this updating method, and “w/o US” in\nTable 2 shows that this method can reduce catastrophic forgetting. Also, in Fig. 7\n(“w/o US”), our algorithm can help memorize important semantic spaces for\nold objects, thus reducing the rewriting of semantic space in the reconstruction\nnetwork, thus leading to a better localization performance.\n\n6\n\nConclusion\n\nTo conclude, our incremental unified framework effectively integrates the multiobjects detection model with object-incremental learning, significantly enhancing the dynamic of defect inspection systems. Leveraging Object-Aware SelfAttention, Semantic Compression Loss, and updating strategy, we demarcate\nsemantic boundaries for objects and minimize interference during incrementing\nnew objects. Benchmarks demonstrate our SOTA performance at both the image level and pixel level. Widespread deployment of this technology will increase\nefficiency and reduce overhead in industrial manufacturing.\n\n\fAn Incremental Unified Framework for Small Defect Inspection\n\n15\n\nAcknowledgements\nThe research work is sponsored by AIR@InnoHK.\nBesides, this work is funded by National Natural Science Foundation of China\nGrant No. 72371271, the Guangzhou Industrial Information and Intelligent Key\nLaboratory Project (No. 2024A03J0628), the Nansha Key Area Science and\nTechnology Project (No. 2023ZD003), Project No. 2021JC02X191, and Natural\nScience Foundation of Zhejiang Pvovince, China (No. LD24F020002).\n\nReferences\n1. Akcay, S., Atapour-Abarghouei, A., Breckon, T.P.: Ganomaly: Semi-supervised\nanomaly detection via adversarial training. In: Computer Vision–ACCV 2018: 14th\nAsian Conference on Computer Vision, Perth, Australia, December 2–6, 2018, Revised Selected Papers, Part III 14. pp. 622–637. Springer (2019)\n2. Aljundi, R., Babiloni, F., Elhoseiny, M., Rohrbach, M., Tuytelaars, T.: Memory\naware synapses: Learning what (not) to forget. In: Proceedings of the European\nconference on computer vision (ECCV). pp. 139–154 (2018)\n3. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the\nIEEE/CVF conference on computer vision and pattern recognition (CVPR). pp.\n9592–9600 (2019)\n4. Bergmann, P., Löwe, S., Fauser, M., Sattlegger, D., Steger, C.: Improving unsupervised defect segmentation by applying structural similarity to autoencoders. arXiv\npreprint arXiv:1807.02011 (2018)\n5. Chang, C.Y., Su, Y.D., Li, W.Y.: Tire bubble defect detection using incremental\nlearning. Applied Sciences 12(23), 12186 (2022)\n6. Chaudhry, A., Dokania, P.K., Ajanthan, T., Torr, P.H.: Riemannian walk for incremental learning: Understanding forgetting and intransigence. In: Proceedings of\nthe European conference on computer vision (ECCV). pp. 532–547 (2018)\n7. Chen, C.H., Tu, C.H., Li, J.D., Chen, C.S.: Defect detection using deep lifelong\nlearning. In: 2021 IEEE 19th International Conference on Industrial Informatics\n(INDIN). pp. 1–6. IEEE (2021)\n8. Chen, L., You, Z., Zhang, N., Xi, J., Le, X.: Utrad: Anomaly detection and localization with u-transformer. Neural Networks 147, 53–62 (2022)\n9. Cohen, N., Hoshen, Y.: Sub-image anomaly detection with deep pyramid correspondences. arXiv preprint arXiv:2005.02357 (2020)\n10. Defard, T., Setkov, A., Loesch, A., Audigier, R.: Padim: a patch distribution modeling framework for anomaly detection and localization. In: International Conference\non Pattern Recognition. pp. 475–489. Springer (2021)\n11. Ding, X., Hao, T., Tan, J., Liu, J., Han, J., Guo, Y., Ding, G.: Resrep: Lossless\ncnn pruning via decoupling remembering and forgetting. In: Proceedings of the\nIEEE/CVF International Conference on Computer Vision (ICCV). pp. 4510–4520\n(October 2021)\n12. Han, L., Li, Y., Zhang, H., Milanfar, P., Metaxas, D., Yang, F.: Svdiff: Compact\nparameter space for diffusion fine-tuning. arXiv preprint arXiv:2303.11305 (2023)\n13. Hoefler, T., Alistarh, D., Ben-Nun, T., Dryden, N., Peste, A.: Sparsity in deep\nlearning: Pruning and growth for efficient inference and training in neural networks.\nThe Journal of Machine Learning Research 22(1), 10882–11005 (2021)\n\n\f16\n\nJ. Tang et al.\n\n14. Huong, T.T., Bac, T.P., Ha, K.N., Hoang, N.V., Hoang, N.X., Hung, N.T., Tran,\nK.P.: Federated learning-based explainable anomaly detection for industrial control\nsystems. IEEE Access 10, 53854–53872 (2022)\n15. Jayasekara, H., Zhang, Q., Yuen, C., Zhang, M., Woo, C.W., Low, J.: Detecting\nanomalous solder joints in multi-sliced pcb x-ray images: A deep learning based\napproach. SN Computer Science 4(3), 307 (2023)\n16. Kähler, F., Schmedemann, O., Schüppstuhl, T.: Anomaly detection for industrial\nsurface inspection: Application in maintenance of aircraft components. Procedia\nCIRP 107, 246–251 (2022)\n17. Khalil, A.A., E Ibrahim, F., Abbass, M.Y., Haggag, N., Mahrous, Y., Sedik, A.,\nElsherbeeny, Z., Khalaf, A.A., Rihan, M., El-Shafai, W., et al.: Efficient anomaly\ndetection from medical signals and images with convolutional neural networks for\ninternet of medical things (iomt) systems. International Journal for Numerical\nMethods in Biomedical Engineering 38(1), e3530 (2022)\n18. Kirkpatrick, J., Pascanu, R., Rabinowitz, N., Veness, J., Desjardins, G., Rusu,\nA.A., Milan, K., Quan, J., Ramalho, T., Grabska-Barwinska, A., et al.: Overcoming\ncatastrophic forgetting in neural networks. Proceedings of the national academy of\nsciences 114(13), 3521–3526 (2017)\n19. Li, C.L., Sohn, K., Yoon, J., Pfister, T.: Cutpaste: Self-supervised learning for\nanomaly detection and localization. In: Proceedings of the IEEE/CVF Conference\non Computer Vision and Pattern Recognition (CVPR). pp. 9664–9674 (June 2021)\n20. Li, W., Zhan, J., Wang, J., Xia, B., Gao, B.B., Liu, J., Wang, C., Zheng, F.:\nTowards continual adaptation in industrial anomaly detection. In: Proceedings of\nthe 30th ACM International Conference on Multimedia. pp. 2871–2880 (2022)\n21. Lin, M., Ji, R., Wang, Y., Zhang, Y., Zhang, B., Tian, Y., Shao, L.: Hrank: Filter\npruning using high-rank feature map. In: Proceedings of the IEEE/CVF conference\non computer vision and pattern recognition (CVPR). pp. 1529–1538 (2020)\n22. Liu, J., Wu, K., Nie, Q., Chen, Y., Gao, B.B., Liu, Y., Wang, J., Wang, C., Zheng,\nF.: Unsupervised continual anomaly detection with contrastively-learned prompt.\narXiv preprint arXiv:2401.01010 (2024)\n23. Liu, W., Li, R., Zheng, M., Karanam, S., Wu, Z., Bhanu, B., Radke, R.J., Camps,\nO.: Towards visually explaining variational autoencoders. In: Proceedings of the\nIEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 8642–\n8651 (2020)\n24. Liu, Z., Zhou, Y., Xu, Y., Wang, Z.: Simplenet: A simple network for image\nanomaly detection and localization. In: Proceedings of the IEEE/CVF Conference\non Computer Vision and Pattern Recognition. pp. 20402–20411 (2023)\n25. Lopez-Paz, D., Ranzato, M.: Gradient episodic memory for continual learning.\nAdvances in neural information processing systems 30 (2017)\n26. Lu, B., Xu, D., Huang, B.: Deep-learning-based anomaly detection for lace defect\ninspection employing videos in production line. Advanced Engineering Informatics\n51, 101471 (2022)\n27. Peng, C., Zhang, K., Ma, Y., Ma, J.: Cross fusion net: A fast semantic segmentation network for small-scale semantic information capturing in aerial scenes.\nIEEE Transactions on Geoscience and Remote Sensing 60, 1–13 (2022). https:\n//doi.org/10.1109/TGRS.2021.3053062\n28. Pirnay, J., Chai, K.: Inpainting transformer for anomaly detection. In: International\nConference on Image Analysis and Processing. pp. 394–406. Springer (2022)\n29. Reiss, T., Cohen, N., Bergman, L., Hoshen, Y.: Panda: Adapting pretrained features for anomaly detection and segmentation. In: Proceedings of the IEEE/CVF\n\n\fAn Incremental Unified Framework for Small Defect Inspection\n\n17\n\nConference on Computer Vision and Pattern Recognition (CVPR). pp. 2806–2814\n(2021)\n30. Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., Gehler, P.: Towards\ntotal recall in industrial anomaly detection. In: Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition. pp. 14318–14328 (2022)\n31. Sun, C., Gao, L., Li, X., Gao, Y.: A new knowledge distillation network for incremental few-shot surface defect detection. arXiv preprint arXiv:2209.00519 (2022)\n32. Sun, W., Al Kontar, R., Jin, J., Chang, T.S.: A continual learning framework for\nadaptive defect classification and inspection. Journal of Quality Technology pp.\n1–17 (2023)\n33. Towill, D.R., Evans, G.N., Cheema, P.: Analysis and design of an adaptive minimum reasonable inventory control system. Production Planning &amp; Control 8(6),\n545–557 (1997)\n34. Wang, Z., Liu, L., Duan, Y., Kong, Y., Tao, D.: Continual learning with lifelong\nvision transformer. In: Proceedings of the IEEE/CVF Conference on Computer\nVision and Pattern Recognition (CVPR). pp. 171–181 (2022)\n35. Xie, G., Wang, J., Liu, J., Zheng, F., Jin, Y.: Pushing the limits of fewshot anomaly\ndetection in industry vision: Graphcore. arXiv preprint arXiv:2301.12082 (2023)\n36. Yang, S., Chen, Z., Chen, P., Fang, X., Liu, S., Chen, Y.: Defect spectrum: A\ngranular look of large-scale defect datasets with rich semantics (2024), https:\n//arxiv.org/abs/2310.17316\n37. Yildiz, O., Chan, H., Raghavan, K., Judge, W., Cherukara, M.J., Balaprakash, P.,\nSankaranarayanan, S., Peterka, T.: Automated continual learning of defect identification in coherent diffraction imaging. In: 2022 IEEE/ACM International Workshop on Artificial Intelligence and Machine Learning for Scientific Applications\n(AI4S). pp. 1–6. IEEE (2022)\n38. You, Z., Cui, L., Shen, Y., Yang, K., Lu, X., Zheng, Y., Le, X.: A unified model for\nmulti-class anomaly detection. Advances in Neural Information Processing Systems\n35, 4571–4584 (2022)\n39. Zavrtanik, V., Kristan, M., Skovcaj, D.: Draem - a discriminatively trained reconstruction embedding for surface anomaly detection. 2021 IEEE/CVF International\nConference on Computer Vision (ICCV) (2021)\n40. Zenke, F., Poole, B., Ganguli, S.: Continual learning through synaptic intelligence.\nIn: International conference on machine learning. pp. 3987–3995. PMLR (2017)\n41. Zhao, Y.: Omnial: A unified cnn framework for unsupervised anomaly localization.\nIn: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern\nRecognition. pp. 3924–3933 (2023)\n42. Zhou, X., Liang, W., Shimizu, S., Ma, J., Jin, Q.: Siamese neural network based\nfew-shot learning for anomaly detection in industrial cyber-physical systems. IEEE\nTransactions on Industrial Informatics 17(8), 5790–5798 (2020)\n43. Zou, Y., Jeong, J., Pemula, L., Zhang, D., Dabeer, O.: Spot-the-difference selfsupervised pre-training for anomaly detection and segmentation. In: European\nConference on Computer Vision. pp. 392–408. Springer (2022)\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"