"<!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>This CVPR paper is the Open Access version, provided by the Computer Vision Foundation.\nExcept for this watermark, it is identical to the accepted version;\nthe final published version of the proceedings is available on IEEE Xplore.\n\nHierarchical Point-Patch Fusion with Adaptive Patch Codebook for 3D Shape\nAnomaly Detection\nXueyang Kang1 * †\n\nZizhao Li1†\n\nTian Lan2\nDong Gong3\nLiangliang Nan4‡\n\nKourosh Khoshelham1\n\n1\n\nThe University of Melbourne, Parkville, Victoria 3010, Australia\n2\nTsinghua University, Haidian District, Beijing 100871, China\n3\nThe University of New South Wales, Sydney, NSW 2052, Australia\n4\nDelft University of Technology, Mekelweg 5, 2628 CD Delft, Netherlands\n\nAbstract\n3D shape anomaly detection is a crucial task for industrial\ninspection and geometric analysis. Existing deep learning approaches typically learn representations of normal\nshapes and identify anomalies via out-of-distribution feature detection or decoder-based reconstruction. They often\nfail to generalize across diverse anomaly types and scales,\nsuch as global geometric errors (e.g., planar shifts, angle\nmisalignments), and are sensitive to noisy or incomplete local points during training. To address these limitations, we\npropose a hierarchical point–patch anomaly scoring network that jointly models regional part features and local\npoint features for robust anomaly reasoning. An adaptive\npatchification module integrates self-supervised decomposition to capture complex structural deviations. Beyond\nevaluations on public benchmarks (Anomaly-ShapeNet and\nReal3D-AD), we release an industrial test set with real\nCAD models exhibiting planar, angular, and structural defects. Experiments on public and industrial datasets show\nsuperior AUC-ROC and AUC-PR performance, including\nover 40% point-level improvement on the new industrial\nanomaly type and average object-level gains of 7% on\nReal3D-AD and 4% on Anomaly-ShapeNet, demonstrating\nstrong robustness and generalization. The code and test\ndata are publicly available at: github.com/Shape-AnomalyCodebook.git\n\nFigure 1. Patch feature fusion for 3D shape anomaly detection\nin point clouds. Normal patches {Sj }, j ∈ {1, . . . , 6} and abnormal patches {S̃j } are ordered by distance to the object center.\nThe left heatmap visualizes the cosine similarity between patch\nfeatures, where higher values indicate stronger similarity between\nnormal and abnormal patches. Anomalous regions exhibit distinctive feature discrepancies in the last row, indicating ambiguous\npatch correspondences. These patch-level differences are fused to\nguide pointwise anomaly detection, with red regions in the right\npoint cloud marking detected anomalies.\n\n1. Introduction\n\nautonomous approaches typically rely on geometric comparisons between a normal template and a test shape. A\nset of normal shapes is encoded into latent features as a\nreference, and anomalies are detected by comparing the\nfeature distributions using Out-of-Distribution (OOD) detection [21, 23, 24, 36, 38]. Early research focused on\n2D image anomaly detection, such as MVTec AD [3],\nwhere methods detect anomalies by identifying appearance\ndifferences (e.g., cracks) between test images and templates [12, 13, 19].\nWith the emergence of 3D anomaly detection benchmarks such as Real3D-AD [17], MVTec 3D-AD [4], and\nAnomaly-ShapeNet [14], research has increasingly shifted\ntoward 3D geometric domains. Recent approaches, including dual-memory branches [8] and teacher–student architectures [25], model the distribution gap between nor-\n\nShape anomaly detection is a fundamental industrial challenge, aiming to identify and localize structural or geometric defects in manufactured 3D products. Conventional\n* Project leader: kangxueyang@126.com\n† Zizhao contributed to baselines and backbone choice.\n‡ Corresponding author: Liangliang.Nan@tudelft.nl\n\n24258\n\n\fmal and anomalous features. Multimodal methods further\nimprove discrimination by fusing RGB images and point\nclouds [9, 20, 32]. Zero-shot and few-shot settings are\nexplored by aligning point clouds with multi-view image\nprojections [6, 40] or leveraging view synthesis [44]. Despite these advances, most methods struggle with largescale structural anomalies and planar displacements common in industrial scenarios, as they rely primarily on local point representations. Reconstruction-based methods,\nsuch as DRAEM-A [35] and R3D-AD [41], reconstruct\nnormal shapes and detect anomalies via reconstruction errors, but are sensitive to noise, unstable in planar or concave regions, and depend heavily on negative augmentation.\nSimilarly, point-wise or keypoint-based approaches, including 3DKeyAD [32], geometric descriptor methods [2], and\nPO3AD [34], focus on per-point regression and are effective\nmainly for small local defects, while remaining inadequate\nfor large structural displacements or part misalignments that\nare underrepresented in public benchmarks.\n\nlighting strong robustness over state-of-the-art baselines.\n\n2. Related Work\nAnomaly detection applications. The MVTec-AD [3]\nbenchmark catalyzed extensive research in image anomaly\ndetection, spawning methods that model normal distributions or synthesize pseudo anomalies [12, 19, 27, 35, 37,\n38]. In 3D vision, shape anomaly detection identifies geometric deviations from learned normal shapes through OOD\ndetection, where anomalous inputs fall outside the normal\nfeature distribution. MVTec-3D-AD [4] enabled multimodal methods combining RGB and point cloud [9, 30, 31,\n44], though gains over single-modality approaches remain\nmarginal. OOD detection extends beyond industrial inspection to medical imaging [11, 43] and hyperspectral sensing [33, 43], with summary surveys available [15].\nReconstruction-based anomaly detection. A major line of\nanomaly detection research relies on reconstruction, where\nmodels learn to reproduce normal inputs and detect deviations [35]. These methods train models to learn geometric representations of normal shapes and reconstruct\npoint clouds for comparison with inputs at inference. IMRNet [14], for instance, employs a masked autoencoder\nto reconstruct point clouds, while R3D-AD [41] leverages diffusion to recover normal distributions. Lastly,\nPO3AD [34] directly regresses point-wise offsets between\npseudo anomalies and normal inputs.\nMemory bank-based anomaly detection. Memory bank\nmechanisms have been extensively adopted in computer vision tasks such as semantic segmentation [1, 39] and object detection [29]. For anomaly detection, early works\nintegrated a memory module with an autoencoder to store\nnormal patterns [10], retrieving the closest memory feature for reconstruction, where large reconstruction errors\nsignal anomalies. Subsequent methods extended this concept to geometric data by mapping local shape features into\na memory space representing the normal feature distribution, so that anomalous inputs are naturally projected outof-distribution. Some approaches employ hybrid representation learning across RGB and point cloud modalities [40]\nfor anomaly detection. In contrast, others use a shared\ncross-modal memory [31] to fuse visual and geometric features before anomaly classification.\n\nTo address these challenges, we first construct a small\nindustrial test dataset consisting of eight real components\nwith anomalies such as planar displacements and large\ngear-angle misalignments. We then propose an adaptive multi-scale patch-based encoding framework for 3D\nshape anomaly detection. Our method extracts multi-scale\npatches from normal shapes and stores their features in\na lightweight, position-invariant patch feature codebook,\nwhich is queried by pseudo-negative inputs during training\nto infer patch-level discrepancies. Unlike point-based methods that rely only on local geometry, this design provides\nmulti-scale references for detecting anomalies at different\nscales, enabling more robust and scale-aware reasoning.\nAlthough patch-based decomposition has been explored in\nsegmentation and completion tasks [1, 26], our approach\nintroduces adaptive patch scales tailored to anomaly detection. During inference, anomalous shapes undergo the same\nmulti-scale patchification, and their patch features are compared with the codebook to compute patch similarity scores.\nTo summarize, our main contributions are threefold:\n• An adaptive patchification module that extracts multiscale patches from normal shapes and caches them in\na lightweight, position-invariant patch codebook, which\ncaptures the invariant geometry of various scales.\n• A patch–point feature fusion model that integrates\npatch-level and point-level features via cross-attention. A\npost-modulation based on patch similarity between normal and anomalous regions enables adaptive discrimination of anomalies across diverse scales and types.\n• A new industrial 3D anomaly test set featuring realistic\nmanufacturing defects such as gear cracks and planar displacements. Extensive experiments demonstrate superior\nperformance with over 40% improvement on industrial\nanomalies and average gains of 7% on Real3D-AD, high-\n\n3. Method\nWe generate pseudo-abnormal shapes S̃ from normal inputs\nS via negative augmentation [34], enabling robust anomaly\ndiscrimination. During inference, only S̃ is provided, with\npatch features retrieved from a pre-cached normal codebook. Both S ∈ RN ×3 and S̃ ∈ RN ×3 are divided into\npatches Sj and S̃j via Farthest Point Sampling (FPS)\npatchification. The patch feature extraction module (a)\n\n24259\n\n\fencodes patch centers into normal features tk ∈ Rd (template) and anomalous features pj ∈ Rd . Normal features\npopulate the shape patch codebook (b) for anomaly retrieval. During inference, patch correspondences between\npj and tk are established via similarity-based querying, followed by point-to-patch cross-attention (c) that fuses local point features with nearest normal patch embeddings.\nThe part score modulation module (d) refines fused features through gated modulation and predicts point-wise offset ô ∈ RN ×3 , which is mapped by scoring function\nϕ : RN ×3 → R to normalized anomaly scores in [0, 1].\n\n(l)\n\nNote that the patch center x̄i for the query differs from the\n(l)\ngeometric sphere cluster center cj used for encoder query-\n\n3.1. Patchification &amp; negative augmentation\nDuring training, given a normal shape S, we apply negative augmentation to generate pseudo-anomalous shapes\nS̃. Specifically, random points on S are selected as\nanomaly centers, around which local geometric deformations are introduced using Gaussian kernel-based displacements guided by the local normal directions. Positive\nand negative displacements simulate concave or sink-type\nanomalies, following the strategy of Real3D-AD [17]. To\nfurther simulate bulging deformations, the normal directions are modulated by a sine wave function, creating alternating signs of deformation. Additionally, random holes\nand planar cut-offs using cubic or cylindrical masks are applied to mimic missing or displaced surface regions. This\naugmentation strategy generates diverse, realistic structural\ndefects that resemble those observed in real test cases.\nWe then adopt an adaptive patchification process that\nextracts patches at three scales (e.g., 8, 32, 64), providing multi-scale references that help the model distinguish\nanomalies of varying sizes and improve robustness to noisy\npoints. Specifically, for each level l ∈ {1, 2, 3}, patches of\nsize pl are sampled from S, where p1 &lt; p2 &lt; p3 correspond to fine, medium, and coarse resolutions, respectively.\nThese multi-scale patches capture geometric details across\nvarying granularities, enabling the network to model local\nfine structures and broader contextual cues jointly.\n\n3.2. Adaptive patch feature extraction\n(l)\n\nFor each patch at level l ∈ {1, 2, 3}, denoted as S̃j conj,(l)\n\ntaining points {xi\n\n(l)\n\n(l)\n\ning. Specifically, pj denotes the centroid feature computed from the actual point distribution within the patch,\nwhereas the center feature corresponds to the geometric\nsphere center. For clarity, we omit the superscript j and\nlevel l in subsequent notations; all point indices i implicitly\ncorrespond to their associated patch j and scale level l. The\n()\nsame process applies to template patch feature tk .\n\n(l)\n\n∈ R3 | i ∈ Nj }, where Nj denotes\n(l)\n\nthe point set of patch S̃j , point-wise features are extracted\nj,(l)\n\nusing a pre-trained 3D UNet encoder. Each point xi\nis\n(l)\nprocessed to obtain its feature representation zi . The cor(l)\nresponding patch feature pj is computed as the mean of\nall point coordinates relative to the patch centroid and processed by the pre-trained encoder f :\n!\nX j,(l)\n1\n(l)\n(l)\npj = f\n(xi − cj ) .\n(1)\n(l)\n|Nj |\n(l)\ni∈Nj\n\n24260\n\n3.3. Shape patch feature codebook\nDuring training, the extracted patch features at scale l,\n(l)\n(l)\n{tk }, k ∈ Nk , from the normal shape input S are stored\nin a multi-scale shape patch feature codebook, where the\nhash key of each patch position serves as the key, and the\ncorresponding patch features form the value set. The patch\nfeatures are ordered by their distance from the patch center to the object centroid. To reduce redundancy and limit\nmemory usage, the codebook patch features are extracted\nfrom the relative point distribution within each patch, ensuring translation invariance. When symmetry is present, as\nshown in the input of Fig. 2, identical corner regions share\nthe same patch feature, which is stored once and referenced\nby position for reuse during repeated retrieval. This process\nis repeated independently for each scale l ∈ {1, 2, 3} to\nbuild codebooks for fine, medium, and coarse resolutions.\nDuring inference, the patch features of a test input at\n(l)\nscale l, {pj }, serve as queries to retrieve the most sim(l)\n\nilar entries {tj } from the corresponding scale codebook\nusing cosine similarity. The overall similarity score at each\nscale is computed by summing the feature similarities along\nthe diagonal positions:\n(l)\n\nNPatch\n\nα\n\n(l)\n\n=\n\nX\n\n(l)\n\n(l)\n\n(pj · tj ),\n\n(2)\n\nj=1\n\nwhere a higher α(l) indicates stronger correspondence between the test and normal patches at scale l. The scale\nl∗ with the maximal similarity sum is selected through\nargmaxl∈1,2,3 α(l) , and the retrieved patch features at scale\nl∗ are used to guide anomaly-aware feature modulation for\nfinal prediction. This multi-scale retrieval ensures that both\nlocal and global patch correspondences are considered, enhancing robustness to geometric scale variations.\nThe codebook update follows a thresholded similarity\nscheme. Each normalized patch feature is compared to existing entries using cosine similarity; features exceeding a\nthreshold τ are merged via count-weighted averaging to\nsuppress redundancy, while dissimilar features create new\nentries to preserve geometric diversity. Spatial hash keys\nfrom 3D positions are stored to maintain coverage across\n\n\fFigure 2. Overview of the proposed shape anomaly detection framework. The pipeline processes a normal shape S through several\nmodules: Patchification segments the input into patches {Sj }, while Negative Augmentation generates pseudo anomalous shapes S̃ that\nare also patchified during training (red regions indicate anomalies); (a) Adaptive Patch Feature Extraction computes features for each\npatch by averaging its points and querying a pre-trained UNet to obtain patch features {pj }; (b) Template Codebook stores a dictionary of\nnormal template patch features {tk }, from which each patch retrieves its closest matching patch; (c) Point to Patch Cross-attention fuses\nthe template features {tk } with point-level features extracted from the pre-trained UNet encoder through multi-head attention mechanism;\n(d) Patch Score Modulation modulates the cross-attention outputs using similarity scores between normal and abnormal patch features\n{tk }, {pj }, with the modulated features fed into MLP regression layers to predict the anomaly score δpred . During training, (e) the loss is\ncomputed as ô − ogt , where ogt represents the ground-truth offset direction derived from the difference S − S̃. During inference (indicated\nby green arrows), only the test shape is input for anomaly detection.\n\nRotary position embedding. To incorporate relative spatial relationships between points and their corresponding\npatches, we adopt Rotary Position Embedding (RoPE) [28].\nRoPE encodes relative positional information by rotating\nfeature embedding according to the angular offset between\na point xi and its patch center x̄i:\n\nlocations. We provide the pseudo code for the algorithm\nimplementation in Algorithm 1.\nAlgorithm 1 Adaptive Patch Codebook Update\n(l)\n\n(l)\n\nRequire: Patch feature tj ∈ R32 , hash keys Hj =\nH (l) (pj = (xj , yj , zj )), codebook C (l) , threshold τ ,\nMerging times ni\nEnsure: Updated codebook C (l)\n(l)\n(l)\n(l)\n1: Normalize: tj ← tj /∥tj ∥2\n(l)\n(l)\n(l)\n2: for each (ci , Hi ) ∈ C\ndo ▷ Iterate over codebook\n(l)\n(l)\n3:\nsi ← (tj )⊤ ci\n▷ Cosine similarity\n4:\nif si ≥ (τ = 0.85)\nthen\n▷\nMerge\nsimilar features\n(l)\n(l)\nni ci +si tj\n(l)\n,\n▷\nCount-weighted\nmerge\n5:\nci ←\nni +si\n(l)\n(l)\n6:\nHi ← Hi ∪ {H (l) (pj )} ▷ Add position hash\n7:\nreturn C (l)\n8:\nend if\n9: end for\n(l)\n10: C (l) ← C (l) ∪ {(tj , {H (l) (pj )})}\n▷ Add new entry\n11: return C (l)\n\nRoPE(xi , x̄i ) = RdΘ,i (xi − x̄i ).\n\n(3)\n\nwhere RdΘ,i is a rotation matrix applied over the d-D embedding space and parameterized by frequency Θ.\nRoPE-enhanced cross attention. Given the RoPEtransformed embeddings, cross-attention between point and\npatch tokens is then computed as,\nAttn(q, k, v) =\n\nαi =\nEach point coordinate xi from the pre-trained U-Net encoder is associated with a point feature zi . During inference, the point features {zi } are mapped to query tokens {qi }, while the retrieved patch codebook features {tk }\nserve as key-value tokens {ki , vi } in a RoPE-based multihead cross-attention module.\n\n24261\n\nαi vi = ẑi ,\n\n(4)\n\n\u0001⊤\n\u0001\nRdΘ,n ϕ(qn )\nRdΘ,n φ(kn ) vn\n,\nPN\n⊤\nn=1 ϕ(qn ) φ(kn )\n\n(5)\n\ni=1\n\nPN\n\n3.4. Point-to-patch cross attention\n\nN\nX\n\nn=1\n\nwhere qn , kn , and vn denote the query, key, and value,\nrespectively. ϕ(·) and φ(·) are non-negative feature mappings, typically ϕ(x) = φ(x) = elu(x) + 1. Multi-head\nconcatenation followed by linear projection yields updated\npoint tokens {ẑi }, enabling patch-guided, geometry-aware\nfeature fusion for anomaly detection. This cross-attention\n\n\fTo encourage alignment between the predicted and true offset directions, a cosine similarity loss is used:\n!\nN\n1 X1\nôi · ogt\ni\nLsim = −\n,\n(10)\n1+\nN i=1 2\n∥ôi ∥2 ∥ogt\ni ∥2 + ϵ\n\nmechanism embeds patch-level priors into point-level features. By attending to retrieved normal patch embeddings,\neach point aligns with its normal patch geometry, improving detection of both fine-grained local defects and large\nstructural misalignments.\n\n3.5. Patch score modulation\nGiven the normalized patch features {pj } of an anomalous shape and the patch features {tk } of a normal shape,\nthe patch-level discrepancy is first computed as ∆fkj =\n(1 − tk · pj ) between the matched normal patch k and the\ncorresponding anomaly patch j. A gating function σi (·) estimates the anomaly likelihood ρi = σi (MLPgate (∆fkj )) of\nith feature, while a modulation network Mmod (·) predicts\nthe feature-wise scaling and shifting parameters (γi , βi ) =\nMmod (∆fkj ). The final modulated feature is defined as:\nz′i = ρi ⊙ (γi ⊙ ẑi + βi ) ,\n\n(6)\n\nwhere ẑi is the cross-attended feature in Eq. (4), ⊙ represents element-wise multiplication, and z′i is the modulated\npoint feature corresponding to the i-th point within the jth patch after RoPE-enhanced cross-attention. The gate\nρi ∈ [0, 1] adaptively weights each patch contribution to\nthe anomaly score based on the inverse feature similarity\nin Eq. (2).\nFinally, the refined point features z′i are concatenated\nwith the attended point features ẑi and passed through a\nmultilayer perceptron (MLP) for residual prediction of the\nanomaly offset vector ôi :\nôi = MLP (Concat[z′i , ẑi ]) + ẑi ,\n\n(7)\n\nwhere ôi represents the predicted anomaly offset vector for\neach point. This gated modulation mechanism adaptively\nemphasizes discriminative patch–point relationships to detect precise shape anomalies of varying sizes.\n\n3.6. Loss function\n3\nFor each point xi in an abnormal shape, let ogt\ni ∈ R denote the ground-truth offset vector from the abnormal point\nto its corresponding normal counterpart, and ôi be the predicted offset. The network jointly predicts (a) the pointwise anomaly offset ôi , and (b) a direction mask m̂i indicating the sign of deviation. The overall anomaly loss combines three complementary terms:\n\nLanomaly = Ldist + λsim Lsim + λBCE LBCE ,\n\n(8)\n\nwhere λsim and λBCE balance the offset direction and mask\nlabel supervision. The offset regression loss minimizes the\nmean absolute distance between predicted and ground-truth\noffset vectors:\n\nwhere ϵ is a small constant (10−6 ) for numerical stability.\nFinally, a binary cross-entropy loss supervises the predicted\nanomaly sign mask m̂i against its ground-truth label mgt\ni :\nN\n\u0003\n1 X \u0002 gt\nmi log(m̂i ) + (1 − mgt\ni ) log(1 − m̂i ) .\nN i=1\n(11)\nThis combined loss jointly constrains the magnitude, direction, and offset sign consistency of anomaly predictions, enabling stable training and accurate point-wise shape\nanomaly localization. During inference, the predicted offset\nmagnitude ôi is normalized into the anomaly score δ̂i using the same L1 normalization strategy as in PO3AD [34],\nyielding anomaly score δ̂i within [0, 1]. Final anomaly\nscores are calculated solely for points designated as valid\nby the mask.\n\nLBCE = −\n\n4. Experiments &amp; Results\n4.1. Experimental setup\nDatasets &amp; preprocessing. We primarily use two benchmark 3D point-cloud anomaly-detection datasets for\nevaluation, including Real3D-AD [17] and Anomaly\nShapeNet [14]. The Anomaly ShapeNet dataset contains\n40 categories with a total of 1,600 samples, including both\nnormal and anomalous shapes. Real3D-AD includes 12 categories, each with 4 normal template samples and 100 test\nsamples containing anomalies. Additionally, we introduce\na new industrial evaluation dataset comprising 8 normal\nsamples and 8 corresponding test samples with angular misalignment and planar displacements. Since Real3D-AD test\nscans are half-sided, while the training data are full 360◦\nscans, we adopt the same half-sided configuration during\ncodebook construction for consistency.\nFor preprocessing, negative augmentation is applied to\ntwo geometric scales (0.01 and 0.1), while angular displacement uses intersection cut-off ratios between 0.1 and 0.5.\nAll inputs are normalized into canonical space and voxelized into 2563 grids. For Anomaly ShapeNet and Real3DAD, multi-scale patching is performed at three scales with\npatch numbers 32, 64, 192 and corresponding patch sizes\n64, 32, 8. For our own test set, we adopt inverse patch scaling with patch numbers 8, 32, 64 and corresponding patch\nsizes 192, 64, 32 to emphasize large structural variations.\n\nN\n\nLdist =\n\n1 X\nôi − ogt\ni 1.\nN i=1\n\n(9)\n\nBaselines. We follow recent state-of-the-art learningbased baselines, including PO3AD [34], R3D-AD [41], and\n\n24262\n\n\fISMP [16], using their official implementations and default\nconfigurations. For qualitative comparison, we visualize the\nresults using the provided training code for these methods.\nSince pre-trained weights are unavailable for several categories, only PO3AD is evaluated on our newly created test\nsamples, as other models fail to generalize to unseen categories. Evaluation metrics include the Area Under the Receiver Operating Characteristic Curve (AUC-ROC) and the\nArea Under the Precision-Recall Curve (AUC-PR).\nTraining &amp; evaluation. All categories are trained for\n1500 epochs using the Adam optimizer with a learning rate\nof 1 × 10−3 . The weighting coefficients λsim and λBCE\nin Eq. (8) are both set to 0.5. The point feature extraction backbone is a Minkowski 3D U-Net [7] pre-trained\non large-scale 3D data. For our own test samples, 10,000\npoints are uniformly sampled from each mesh, covering\nboth normal and anomalous cases for evaluation.\n\ntypes including angular shifts, bending, concavity, surface\nsinks, and bulges. While R3D-AD [41] produces unstable\ndetections and PO3AD [34] yields many false positives, our\nmethod consistently delivers accurate localization aligned\nwith ground truth across all datasets.\n\n4.3. Ablation study\nTime complexity &amp; memory Our model achieves similar\ninference speed (178 ms) to PO3AD (172 ms) and R3DAD\n(183 ms) while offering stronger performance on global\nanomalies. In terms of GPU memory usage, R3DAD requires 2318 MB, PO3AD 2013 MB, and ours 2125 MB for\nthe same point input. As shown in Tab. 4, the 3D UNet\nbackbone dominates computation (51.7%), followed by the\nRoPE cross-attention decoder (29.4%). FPS patchification\naccounts for 14.4% of inference time, while the lightweight\nMLP head contributes minimal overhead (4.5%). All timings were measured on a single NVIDIA RTX 3090 GPU\nwith a batch size of 1.\n\n4.2. Evaluation results\nWe present quantitative results of object-level AUC-ROC\nperformance across three 3D anomaly detection datasets.\nSpecifically, results on Anomaly-ShapeNet are shown\nin Tab. 1 with anomaly portions from 1% to 7%, results on\nReal3D-AD in Tab. 2 with portions from 1% to 5.4%, and\nresults on our Industry dataset in Tab. 3 where the anomaly\nratio varies from below 1% to over 80%. Since each class\nin the proposed test set contains only one instance, objectlevel metrics are not applicable; thus, we use point-level\nmetrics. For point-level results on the other two datasets,\nplease refer to the supplementary material. These datasets\ncollectively cover a broad range of anomaly densities and\nspatial distributions.\nAs shown in Tab. 1, our approach achieves state-of-theart average performance across 40 classes. Although it is\nslightly lower (by only 3%–5%) than PO3AD [34] on a\nfew cases such as “bottle0”, “eraser0”, and “helmet0”, the\noverall results remain dominant. Note that class-specific\nweights are unavailable in PO3AD, preventing exact reproduction; thus, we report the paper’s original results. As\nshown in Tab. 2, although a few classes (e.g., “Chicken”,\n“Diamond”, and “Fish”) have the second-best method outperforming our method, our method still averages a 7.5%\nmargin over the second-best method.\nOn our Industry dataset (Tab. 3) with challenging angular misalignment and planar displacements, our model substantially outperforms all baselines. R3D-AD [41] fails on\nmost samples, while our model exceeds PO3AD [34] by\nover 50% in point-level AUC-ROC, demonstrating strong\nrobustness under real industrial conditions. We further\nprovide Point-level AUC-ROC(↑) results for AnomalyShapeNet and Real3DAD in the supplementary file.\nQualitative comparisons in Fig. 3 cover diverse anomaly\n\nHyperparameter analysis Fig. 4 presents a sensitivity\nanalysis of multi-scale patch settings on Real3D-AD [17].\nIncreasing the voxel size consistently improves both objectlevel and point-level AUC-ROC, with performance saturating beyond 1283 , indicating sufficient geometric detail capture. The patch number, evaluated at voxel resolution 2563\nand patch size 16, yields steady gains before plateauing after 128 patches, suggesting diminishing returns from finer\nspatial partitioning. In contrast, the patch size, tested at\nvoxel resolution 2563 and patch number 32, peaks at size 64\nand gradually declines at larger scales (128, 256), as oversized patches blur fine-grained anomaly boundaries. Overall, moderate voxel resolution (≥ 1283 ), sufficient patch\nnumbers (≥ 128), and a balanced patch size (64) provide\nthe best trade-off between local detail and global representation for robust anomaly detection and localization.\nPatchification strategy We evaluate the impact of different patchification strategies on performance, including semantic-part-based, FPS voxel-based, 3D grid, FPS\nsphere, and multi-scale sphere patchification. For semanticpart-based patchification, we use Find3D [22] with part-text\nprompts and PartField [18] on meshes, followed by pointcloud sampling with part labels. As shown, the multi-scale\npatchification achieves the best anomaly detection performance, while the semantic-part-based variant also attains\ncomparable AUC-ROC to ISMP [16] in Tab. 2. However,\nlarge semantic parts lack sufficient geometric granularity\nfor fine feature matching. Additional details on patchification strategies are provided in the supplementary materials.\n\n24263\n\nAblation of design choices. As shown in Tab. 6, removing negative augmentation significantly reduces the ability\n\n\fFigure 3. Qualitative comparison on three datasets (green letters): our crafted industrial components (1st–2nd rows), Real3D-AD (3rd), and\nAnomaly-ShapeNet (4th). The dashed line indicates different object classes. Representative anomaly types (in blue) include displacement,\nbending, concavity, sinks, and bulges. Anomaly points are highlighted in red. Ground truth uses red masks (first two rows) or red contours\n(last two rows) to indicate anomaly regions overlaid with an anomalous mesh. Each column shows results from a specific method.\nTable 1. Comparison of object-level AUC-ROC results (%) of various methods on the Anomaly-ShapeNet dataset.\nMethod\n\nashtray0\n\nbag0\n\nbottle0\n\nbottle1\n\nbottle3\n\nbowl0\n\nbowl1\n\nbowl2\n\nbowl3\n\nbowl4\n\nbowl5\n\nbucket0\n\nbucket1\n\ncap0\n\nCPMF [5]\nReg3D-AD ([17])\nIMRNet [14]\nR3D-AD [41]\nISMP [16]\nPO3AD [34]\nOurs\n\n35.3\n59.7\n67.1\n83.3\n86.5\n100.0\n100.0\n\n64.3\n70.6\n66.0\n72.0\n73.4\n83.3\n85.2\n\n52.0\n48.6\n55.2\n73.3\n72.2\n90.0\n87.9\n\n48.2\n69.5\n70.0\n73.7\n86.9\n93.3\n93.8\n\n40.5\n52.5\n64.0\n78.1\n74.0\n92.6\n91.3\n\n78.3\n67.1\n68.1\n81.9\n76.2\n92.2\n94.8\n\n63.9\n52.5\n70.2\n77.8\n70.2\n82.9\n88.4\n\n62.5\n49.0\n68.5\n74.1\n70.6\n83.3\n86.7\n\n65.8\n34.8\n59.9\n76.7\n85.1\n88.1\n86.9\n\n68.3\n66.3\n67.6\n74.4\n75.3\n98.1\n97.1\n\n68.5\n59.3\n71.0\n65.6\n73.3\n84.9\n89.3\n\n48.2\n61.0\n58.0\n68.3\n54.5\n85.3\n87.0\n\n60.1\n75.2\n77.1\n75.6\n68.3\n78.7\n83.9\n\n60.1\n69.3\n73.7\n82.2\n67.2\n87.7\n90.5\n\nMethod\n\ncap3\n\ncap4\n\ncap5\n\ncup0\n\ncup1\n\neraser0\n\nheadset0\n\nheadset1\n\nhelmet0\n\nhelmet1\n\nhelmet2\n\nhelmet3\n\njar0\n\nmicro.\n\nCPMF [5]\nReg3D-AD [17]\nIMRNet [14]\nR3D-AD [41]\nISMP [16]\nPO3AD [34]\nOurs\n\n55.1\n72.5\n77.5\n73.0\n77.5\n85.9\n86.4\n\n55.3\n64.3\n65.2\n68.1\n66.1\n79.2\n79.8\n\n69.7\n46.7\n65.2\n67.0\n77.0\n67.0\n80.1\n\n49.7\n51.0\n64.3\n77.6\n55.2\n87.1\n89.2\n\n49.9\n53.8\n75.7\n75.7\n85.1\n83.3\n85.6\n\n68.9\n34.3\n54.8\n89.0\n52.4\n99.5\n94.0\n\n64.3\n53.7\n72.0\n73.8\n47.2\n80.8\n81.7\n\n45.8\n61.0\n67.6\n79.5\n84.3\n92.3\n92.8\n\n55.5\n60.0\n59.7\n75.7\n61.5\n76.2\n78.1\n\n58.9\n38.1\n60.0\n72.0\n60.3\n96.1\n93.7\n\n46.2\n61.4\n64.1\n63.3\n56.8\n86.9\n88.4\n\n52.0\n36.7\n57.3\n70.7\n52.2\n75.4\n83.9\n\n61.0\n59.2\n78.0\n83.8\n66.1\n86.6\n88.7\n\n50.9\n41.4\n75.5\n76.2\n60.0\n77.6\n80.3\n\nMethod\n\nshelf0\n\ntap0\n\ntap1\n\nvase0\n\nvase1\n\nvase2\n\nvase3\n\nvase4\n\nvase5\n\nvase7\n\nvase8\n\nvase9\n\nAverage\n\nCPMF [5]\nReg3D-AD [17]\nIMRNet [14]\nR3D-AD [41]\nISMP [16]\nPO3AD [34]\nOurs\n\n68.5\n68.8\n60.3\n69.6\n70.1\n57.3\n74.1\n\n35.9\n67.6\n67.6\n73.6\n84.4\n74.5\n88.2\n\n69.7\n64.1\n69.6\n90.0\n67.8\n68.1\n92.4\n\n45.1\n53.3\n53.3\n78.8\n68.7\n85.8\n89.5\n\n34.5\n70.2\n75.7\n72.9\n53.4\n74.2\n82.9\n\n58.2\n60.5\n61.4\n75.2\n77.3\n95.2\n96.3\n\n58.2\n65.0\n70.0\n74.2\n62.2\n82.1\n84.7\n\n51.4\n50.0\n52.4\n63.0\n54.6\n67.5\n80.4\n\n61.8\n52.0\n67.6\n75.7\n58.0\n85.2\n89.0\n\n39.7\n46.2\n63.5\n77.1\n74.7\n96.6\n93.1\n\n52.9\n62.0\n63.0\n72.1\n73.6\n73.9\n82.5\n\n60.9\n59.4\n59.4\n71.8\n82.3\n83.0\n87.2\n\n55.9\n57.2\n66.1\n74.9\n69.1\n83.9\n87.6\n\n24264\n\n\fall patch point features ∈ R32 . Among these, the second approach, using mean point coordinates as queries, achieves\nthe best performance. Finally, RoPE-based cross-attention\nproves essential for effective patch–point feature fusion: removing ML modulation of normal and anomalous features\nreduces accuracy by about 4%, while disabling point-wise\nfusion leads to a significant drop of more than 10%. Empirically, selecting the most relevant scale by max in Eq. (2)\noutperforms fusing all scales (e.g., 84.2% vs. 81.2% AUCROC on Real3D-AD), since anomaly scales vary across categories and forced fusion can dilute discriminative features.\n\nTable 2. Object-level AUC-ROC results (%) of methods on the\nReal3D-AD dataset.\nCategory\n\nCPMF\n[5]\n\nReg3D-AD\n[17]\n\nIMRNet\n[14]\n\nR3D-AD\n[41]\n\nGroup3AD\n[42]\n\nPO3AD\n[34]\n\nISMP\n[16]\n\nOurs\n\nAirplane\nCar\nCandy\nChicken\nDiamond\nDuck\nFish\nGemstone\nSeahorse\nShell\nStarfish\nToffees\n\n70.1\n55.1\n55.2\n50.4\n52.3\n58.2\n55.8\n58.9\n72.9\n65.3\n70.0\n39.0\n\n71.6\n69.7\n68.5\n85.2\n90.0\n58.4\n91.5\n41.7\n76.2\n58.3\n50.6\n82.7\n\n76.2\n71.1\n75.5\n78.0\n90.5\n51.7\n88.0\n67.4\n60.4\n66.5\n67.4\n77.4\n\n77.2\n69.3\n71.3\n71.4\n68.5\n90.9\n69.2\n66.5\n72.0\n84.0\n70.1\n70.3\n\n74.4\n72.8\n84.7\n78.6\n93.2\n67.9\n97.6\n53.9\n84.1\n58.5\n56.2\n79.6\n\n80.4\n65.4\n78.5\n68.6\n80.1\n82.0\n85.9\n69.3\n75.6\n80.0\n75.8\n77.1\n\n85.8\n73.1\n85.2\n71.4\n94.8\n71.2\n94.5\n46.8\n72.9\n62.3\n66.0\n84.2\n\n87.5\n75.6\n86.8\n82.3\n90.1\n91.6\n92.4\n70.1\n86.3\n83.7\n78.5\n85.9\n\nAverage\n\n58.6\n\n70.4\n\n72.5\n\n73.4\n\n75.1\n\n76.5\n\n76.7\n\n84.2\n\nTable 3. Point-level AUC-ROC results (%) of methods on the Industry dataset.\nMethod\nR3D-AD [41]\nPO3AD [34]\nISMP [16]\nOurs\n\nTable 6. Ablation study on the effectiveness of individual modules\nand pre-processing designs on the Real3D-AD [17] dataset (Best\nviewed when zoomed in.).\n\nBearing\nCap\n\nDynamixel\nPlate\n\nFranka\nConnector\n\nHull\n\nM4\nTensioning\nSpool\n\nTeeth\nWrist\nServo\n\nTeeth\nCarpals\n\nWrist\nPulley\nBase\n\nAvg\n\n—\n21.6\n53.5\n67.8\n\n—\n25.3\n35.8\n64.3\n\n—\n18.2\n51.1\n75.6\n\n19.1\n36.5\n68.4\n78.1\n\n20.8\n5.9\n60.3\n82.3\n\n—\n7.8\n57.9\n85.9\n\n—\n5.1\n49.9\n89.5\n\n—\n30.9\n37.2\n61.2\n\n20.0\n18.9\n51.8\n75.6\n\nMetric\nAUC-ROC\nAUC-PR\nMetric\nAUC-ROC\nAUC-PR\n\nNo Neg-Aug\n\nPooling\n\nMean Point\n\nMean Feature\n\nRoPE Cross-Atten\n\n68.2\n65.1\n\n77.8\n75.9\n\n79.4\n73.6\n\n76.5\n78.3\n\n84.2\n82.7\n\nVanilla Cross-Atten\n\nNo MLP Modul\n\nNo Cross-Atten\n\nMulti-scale Modulation\n\nFull\n\n79.1\n77.4\n\n80.3\n78.5\n\n72.6\n70.8\n\n81.2\n79.3\n\n84.2\n82.7\n\nTable 4. Inference time breakdown of model components.\nModule\n\nTime (ms)\n\nPercentage (%)\n\n3D UNet (MinkUNet34C)\n\n92.1\n\n51.7\n\nRoPE Cross-Attention Decoder\n\n52.3\n\n29.4\n\nMLP-based Head\n\n8.0\n\n4.5\n\nFPS Patchification\n\n25.7\n\n14.4\n\nTotal\n\n178.1\n\n100.0\n\nFigure 5. t-SNE visualization of point feature distributions. ‘+’\ndenotes patch centers; colors indicate 32 patch membership. (a)\nWithout fusion, features scatter with poor separation, lacking discriminative structure despite close patch centers. (b) With patch\nfeature modulation and fusion, clusters are well-separated.\n\nTo better illustrate the benefits of patch features, we\npresent the results in Fig. 5 for 32 patches on the “starfish”\nclass. For the tests, the model is trained for an equivalent of\n1000 epochs. Without fusion (Fig. 5a), point features scatter\nwith poor separation, indicating weak discriminative power\nfor reliable anomaly localization. With our patch feature\nmodulation and fusion, the features form well-separated\nclusters with clear margins (Fig. 5b), enabling more accurate anomaly discrimination for regression. For additional\nablation results on patch parameters such as patch size and\npatch number, please refer to the supplementary material.\n\nFigure 4. AUC-ROC performance under varying configuration parameters. Three parameter groups are compared: voxel size, patch\nnumber, and patch size. Each parameter is evaluated at objectlevel (solid lines) and point-level (dashed lines).\nTable 5. Comparison of patch generation strategies (with figure\nexample over column headers) in terms of object-level and pointlevel AUC-ROC performance (%) on Real3D-AD dataset.\n\nMetric\nObject (%)\nPoint (%)\n\n5. Conclusion\n\nSemantic Parts FPS Voxels 3D Grids FPS Spheres Multi-scale Spheres\n75.1\n81.4\n80.3\n81.9\n84.2\n78.2\n82.5\n81.7\n82.6\n85.3\n\nof the model to bridge the gap between normal and anomalous samples, resulting in degraded performance. We then\ncompare three patch feature extraction methods: (1) direct\npooling of point features ∈ R32 , and (2) computing the\nmean point coordinates ∈ R3 within each patch and querying the pre-trained encoder for its feature, and (3) averaging\n\nWe propose a multi-scale patch-based framework for shape\nanomaly detection. We further introduce a real industrial\ntest set with planar and angular displacement defects.\n\n24265\n\nLimitations &amp; future work. Our method remains sensitive to sampling randomness. Future work will explore\nincorporating topological or semantic part cues to produce\nmore consistent patches and scale to real industrial data.\n\n\fAcknowledgements\nThe first two authors acknowledge the financial support\nfrom the University of Melbourne through the Melbourne\nResearch Scholarship. This research was supported by the\nUniversity of Melbourne’s Research Computing Services\nand the Petascale Campus initiative.\n\n[11] Matthäus Heer, Janis Postels, Xiaoran Chen, Ender\nKonukoglu, and Shadi Albarqouni. The ood blind spot of\nunsupervised anomaly detection. In Medical Imaging with\nDeep Learning, pages 286–300. PMLR, 2021. 2\n[12] Teng Hu, Jiangning Zhang, Ran Yi, Yuzhen Du, Xu Chen,\nLiang Liu, Yabiao Wang, and Chengjie Wang. Anomalydiffusion: Few-shot anomaly image generation with diffusion\nmodel. In Proceedings of the AAAI conference on artificial\nintelligence, pages 8526–8534, 2024. 1, 2\n[13] Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas\nPfister. Cutpaste: Self-supervised learning for anomaly detection and localization. In Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition,\npages 9664–9674, 2021. 1\n[14] Wenqiao Li, Xiaohao Xu, Yao Gu, Bozhong Zheng,\nShenghua Gao, and Yingna Wu. Towards scalable 3d\nanomaly detection and localization: A benchmark via 3d\nanomaly synthesis and a self-supervised learning network. In\nProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 22207–22216,\n2024. 1, 2, 5, 7, 8\n[15] Zizhao Li, Xueyang Kang, Joseph West, and Kourosh\nKhoshelham. Out-of-distribution detection in 3d applications: a review. arXiv preprint arXiv:2507.00570, 2025. 2\n[16] Hanzhe Liang, Guoyang Xie, Chengbin Hou, Bingshu Wang,\nCan Gao, and Jinbao Wang. Look inside for more: Internal\nspatial modality perception for 3d anomaly detection. Proceedings of the AAAI Conference on Artificial Intelligence,\n39(5):5146–5154, 2025. 6, 7, 8\n[17] Jiaqi Liu, Guoyang Xie, Ruitao Chen, Xinpeng Li, Jinbao\nWang, Yong Liu, Chengjie Wang, and Feng Zheng. Real3dad: A dataset of point cloud anomaly detection. Advances\nin Neural Information Processing Systems, 36:30402–30415,\n2023. 1, 3, 5, 6, 7, 8\n[18] Minghua Liu, Mikaela Angelina Uy, Donglai Xiang, Hao Su,\nSanja Fidler, Nicholas Sharp, and Jun Gao. Partfield: Learning 3d feature fields for part segmentation and beyond. In\nProceedings of the IEEE/CVF International Conference on\nComputer Vision, pages 9704–9715, 2025. 6\n[19] Zhikang Liu, Yiming Zhou, Yuansheng Xu, and Zilei Wang.\nSimplenet: A simple network for image anomaly detection\nand localization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages\n20402–20411, 2023. 1, 2\n[20] Kaifang Long, Guoyang Xie, Lianbo Ma, Jiaqi Liu, and\nZhichao Lu. Revisiting multimodal fusion for 3d anomaly\ndetection from an architectural perspective. In Proceedings of the AAAI Conference on Artificial Intelligence, pages\n12273–12281, 2025. 2\n[21] Haodong Lu, Dong Gong, Shuo Wang, Jason Xue, Lina Yao,\nand Kristen Moore. Learning with mixture of prototypes for\nout-of-distribution detection. In The Twelfth International\nConference on Learning Representations, 2024. 1\n[22] Ziqi Ma, Yisong Yue, and Georgia Gkioxari. Find any part\nin 3d, 2024. 6\n[23] Yifei Ming, Yiyou Sun, Ousmane Dia, and Yixuan Li. How\nto exploit hyperspherical embeddings for out-of-distribution\n\nReferences\n[1] Inigo Alonso, Alberto Sabater, David Ferstl, Luis Montesano, and Ana C Murillo. Semi-supervised semantic segmentation with pixel-level contrastive learning from a classwise memory bank. In Proceedings of the IEEE/CVF international conference on computer vision, pages 8219–8228,\n2021. 2\n[2] Paul Bergmann and David Sattlegger. Anomaly detection in\n3d point clouds using deep geometric descriptors. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2613–2623, 2023. 2\n[3] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. Mvtec ad–a comprehensive real-world\ndataset for unsupervised anomaly detection. In Proceedings\nof the IEEE/CVF conference on computer vision and pattern\nrecognition, pages 9592–9600, 2019. 1, 2\n[4] Paul Bergmann, Xin Jin, David Sattlegger, and Carsten Steger. The mvtec 3d-ad dataset for unsupervised 3d anomaly\ndetection and localization. arXiv preprint arXiv:2112.09045,\n2021. 1, 2\n[5] Yunkang Cao, Xiaohao Xu, and Weiming Shen. Complementary pseudo multimodal feature for point cloud anomaly\ndetection. Pattern Recognition, 156:110761, 2024. 7, 8\n[6] Yuqi Cheng, Yunkang Cao, Guoyang Xie, Zhichao Lu, and\nWeiming Shen. Towards zero-shot point cloud anomaly detection: A multi-view projection framework. arXiv preprint\narXiv:2409.13162, 2024. 2\n[7] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d\nspatio-temporal convnets: Minkowski convolutional neural\nnetworks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3075–3084,\n2019. 6\n[8] Yu-Min Chu, Liu Chieh, Ting-I Hsieh, Hwann-Tzong Chen,\nand Tyng-Luh Liu. Shape-guided dual-memory learning for\n3d anomaly detection. Proceedings of Machine Learning Research, 2023. 1\n[9] Alex Costanzino, Pierluigi Zama Ramirez, Giuseppe Lisanti,\nand Luigi Di Stefano. Multimodal industrial anomaly detection by crossmodal feature mapping. In Proceedings of\nthe IEEE/CVF Conference on Computer Vision and Pattern\nRecognition, pages 17234–17243, 2024. 2\n[10] Dong Gong, Lingqiao Liu, Vuong Le, Budhaditya Saha,\nMoussa Reda Mansour, Svetha Venkatesh, and Anton\nvan den Hengel. Memorizing normality to detect anomaly:\nMemory-augmented deep autoencoder for unsupervised\nanomaly detection. In Proceedings of the IEEE/CVF international conference on computer vision, pages 1705–1714,\n2019. 2\n\n24266\n\n\fdetection? In The Eleventh International Conference on\nLearning Representations, 2023. 1\n[24] Sen Pei, Xin Zhang, Bin Fan, and Gaofeng Meng. Outof-distribution detection with boundary aware learning. In\nEuropean Conference on Computer Vision, pages 235–251.\nSpringer, 2022. 1\n[25] Jianjian Qin, Chunzhi Gu, Jun Yu, and Chao Zhang.\nTeacher–student network for 3d point cloud anomaly detection with few normal samples. Expert Systems with Applications, 228:120371, 2023. 1\n[26] Yuchen Rao, Yinyu Nie, and Angela Dai. Patchcomplete:\nLearning multi-resolution patch priors for 3d shape completion on unseen categories. Advances in Neural Information\nProcessing Systems, 35:34436–34450, 2022. 2\n[27] Hannah M Schlüter, Jeremy Tan, Benjamin Hou, and Bernhard Kainz. Natural synthetic anomalies for self-supervised\nanomaly detection and localization. In European Conference\non Computer Vision, pages 474–489. Springer, 2022. 2\n[28] Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen\nBo, and Yunfeng Liu. Roformer: Enhanced transformer with\nrotary position embedding. Neurocomputing, 568:127063,\n2024. 4\n[29] Guanxiong Sun, Yang Hua, Guosheng Hu, and Neil Robertson. Mamba: Multi-level aggregation via memory bank for\nvideo object detection. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 2620–2627, 2021. 2\n[30] Chengjie Wang, Haokun Zhu, Jinlong Peng, Yue Wang,\nRan Yi, Yunsheng Wu, Lizhuang Ma, and Jiangning Zhang.\nM3dm-nr: Rgb-3d noisy-resistant industrial anomaly detection via multimodal denoising. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2025. 2\n[31] Yue Wang, Jinlong Peng, Jiangning Zhang, Ran Yi, Yabiao\nWang, and Chengjie Wang. Multimodal industrial anomaly\ndetection via hybrid fusion. In Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition,\npages 8032–8041, 2023. 2\n[32] Zi Wang, Katsuya Hotta, Koichiro Kamide, Yawen Zou,\nChao Zhang, and Jun Yu. 3dkeyad: High-resolution 3d point\ncloud anomaly detection via keypoint-guided point clustering. arXiv preprint arXiv:2507.13110, 2025. 2\n[33] Jingkang Yang, Kaiyang Zhou, and Ziwei Liu. Full-spectrum\nout-of-distribution detection. International Journal of Computer Vision, 131(10):2607–2622, 2023. 2\n[34] Jianan Ye, Weiguang Zhao, Xi Yang, Guangliang Cheng, and\nKaizhu Huang. Po3ad: Predicting point offsets toward better 3d point cloud anomaly detection. In Proceedings of the\nComputer Vision and Pattern Recognition Conference, pages\n1353–1362, 2025. 2, 5, 6, 7, 8\n[35] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. Draema discriminatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF\ninternational conference on computer vision, pages 8330–\n8339, 2021. 2\n[36] Jinsong Zhang, Qiang Fu, Xu Chen, Lun Du, Zelin Li, Gang\nWang, xiaoguang Liu, Shi Han, and Dongmei Zhang. Outof-distribution detection based on in-distribution data patterns memorization with modern hopfield energy. In The\n\n24267\n\nEleventh International Conference on Learning Representations, 2023. 1\n[37] Ximiao Zhang, Min Xu, and Xiuzhuang Zhou. Realnet: A\nfeature selection network with realistic synthetic anomaly for\nanomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages\n16699–16708, 2024. 2\n[38] Haotian Zheng, Qizhou Wang, Zhen Fang, Xiaobo Xia, Feng\nLiu, Tongliang Liu, and Bo Han. Out-of-distribution detection learning with unreliable out-of-distribution sources. Advances in neural information processing systems, 36:72110–\n72123, 2023. 1, 2\n[39] Junbao Zhou, Ziqi Pang, and Yu-Xiong Wang. Rmem: Restricted memory banks improve video object segmentation.\nIn Proceedings of the IEEE/CVF Conference on Computer\nVision and Pattern Recognition, pages 18602–18611, 2024.\n2\n[40] Qihang Zhou, Jiangtao Yan, Shibo He, Wenchao Meng,\nand Jiming Chen. Pointad: Comprehending 3d anomalies\nfrom points and pixels for zero-shot 3d anomaly detection.\nAdvances in Neural Information Processing Systems, 37:\n84866–84896, 2024. 2\n[41] Zheyuan Zhou, Le Wang, Naiyu Fang, Zili Wang, Lemiao\nQiu, and Shuyou Zhang. R3d-ad: Reconstruction via diffusion for 3d anomaly detection. In European conference on\ncomputer vision, pages 91–107. Springer, 2024. 2, 5, 6, 7, 8\n[42] Hongze Zhu, Guoyang Xie, Chengbin Hou, Tao Dai, Can\nGao, Jinbao Wang, and Linlin Shen. Towards high-resolution\n3d anomaly detection via group-level feature contrastive\nlearning. In Proceedings of the 32nd ACM International\nConference on Multimedia, pages 4680–4689, 2024. 8\n[43] David Zimmerer, Peter M Full, Fabian Isensee, Paul Jäger,\nTim Adler, Jens Petersen, Gregor Köhler, Tobias Ross, Annika Reinke, Antanas Kascenas, et al. Mood 2020: A public\nbenchmark for out-of-distribution detection and localization\non medical images. IEEE Transactions on Medical Imaging,\n41(10):2728–2738, 2022. 2\n[44] Zuo Zuo, Jiahao Dong, Yao Wu, Yanyun Qu, and Zongze\nWu. Clip3d-ad: Extending clip for 3d few-shot anomaly detection with multi-view images generation. arXiv preprint\narXiv:2406.18941, 2024. 2\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"