"<!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\nPDD: Manifold-Prior Diverse Distillation for Medical Anomaly Detection\nXijun Lu1 , Hongying Liu1,4 *, Fanhua Shang2,4∗ , Yanming Hui2 , Liang Wan1,3,4\n1\nMedical School, Tianjin University\n2\nSchool of Computer Science and Technology, Tianjin University\n3\nSchool of Computer Software, Tianjin University\n4\nThe Key Research Center for Surface Monitoring and Analysis of Relics, SMARC\n{xjunlu, hyliu2009, fhshang, ymhui, lwan}@tju.edu.cn\n\nAbstract\n\n(a) Medical Images\nVmamba\n\nMedical image anomaly detection faces unique challenges\ndue to subtle, heterogeneous anomalies embedded in complex anatomical structures. Through systematic Grad-CAM\nanalysis, we reveal that discriminative activation maps fail\non medical data, unlike their success on industrial datasets,\nmotivating the need for manifold-level modeling. We propose PDD (Manifold-Prior Diverse Distillation), a novel\nframework that unifies dual-teacher priors into a shared\nhigh-dimensional manifold and distills this knowledge into\ndual students with complementary behaviors. Specifically,\nfrozen VMamba-Tiny and wide-ResNet50 encoders provide\nglobal contextual and local structural priors, respectively.\nTheir features are unified through a Manifold Matching\nand Unification (MMU) module, while an Inter-Level Feature Adaption (InA) module enriches intermediate representations. The unified manifold is distilled into two students: one performs layer-wise distillation via InA for local consistency, while the other receives skip-projected representations through a Manifold Prior Affine (MPA) module to capture cross-layer dependencies. A diversity loss\nprevents representation collapse while maintaining detection sensitivity. Extensive experiments on multiple medical\ndatasets demonstrate that PDD significantly outperforms\nexisting state-of-the-art methods, achieving improvements\nof up to 11.8%, 2.9%, and 8.5% in terms of AUROC on\nHeadCT, BrainMRI, and ZhangLab datasets, respectively,\nand 3.4% in terms of F1 max on the Uni-Medical dataset,\nestablishing new state-of-the-art performance in medical\nimage anomaly detection. The implementation will be released at https://github.com/OxygenLu/PDD.\n\nResNet\n\nVmamba\n\nResNet\n\n“Diversity, Blurred boundaries, Fine-grained”\n\n(b) Industrial Images\nVmamba\n\nResNet\n\nVmamba\n\nResNet\n\n“Similar, Distinct boundaries, Visible”\nFigure 1. Grad-CAM visualization of frozen Vmamba and\nResNet across medical and industrial images. Within each\ngroup, feature maps progress from low-dimensional to highdimensional feature representations (top to bottom). At the same\nfeature dimension, the dispersed and aggregated activation patterns of the two backbones form complementary prior information.\n\n1. Introduction\nMedical image anomaly detection has attracted increasing\nattention as a crucial component for early disease screening\nand computer-aided diagnosis [4, 20, 23, 47]. Unlike con-\n\n* Corresponding authors\n\n28534\n\n\fventional anomaly detection on natural or industrial images,\nmedical anomalies often exhibit subtle, heterogeneous, and\nweakly contrasted patterns embedded in highly complex\nanatomical structures [16, 21]. These characteristics make\nunsupervised anomaly detection (UAD) particularly challenging, since models must learn a compact and stable manifold of normal anatomy solely from healthy samples, without access to annotated abnormal regions [2].\nRecent teacher–student frameworks have shown promising performance in anomaly detection, especially in industrial inspection tasks [3, 6, 8, 37]. However, as shown in\nFig. 1, Grad-CAM visualizations reveal a striking contrast:\non industrial datasets such as MVTec, Grad-CAM produces clean and highly localized heatmaps, while on medical datasets (e.g., BrainMRI, HeadCT), the heatmaps become diffuse, noisy, and anatomically inconsistent [4, 20].\nThis observation reveals a fundamental difference: industrial defects are typically texture-driven and spatially localized, while medical anomalies are structural deviations distributed across anatomical hierarchies with subtle, contextdependent boundaries [8, 10, 14, 16]. As a result, singlestream feature extractors are insufficient to learn a complete\nand anatomically coherent normal manifold.\nThese findings motivate the need for a principled approach that can integrate multiple complementary priors to\nlearn a robust and unified normal manifold for medical images [7, 26, 41, 42]. CNNs excel at capturing fine-grained\nlocal textures [5, 11, 25, 29, 33], whereas sequence models\nsuch as Mamba capture long-range dependencies and global\nstructural patterns [12, 15, 24, 27, 28, 36, 40]. However,\ndirectly fusing their features does not guarantee alignment\nbetween their heterogeneous manifolds, nor does it ensure\nthat downstream student networks preserve representation\ndiversity—an important property for reliably detecting subtle abnormal deviations [12, 44, 46].\nTo address these challenges, we propose a novel\nManifold-Prior Diverse Distillation (PDD) framework that\nunifies dual-teacher priors into a shared high-dimensional\nmanifold and distills this unified knowledge into dual students with complementary learning behaviors. Specifically, a frozen VMamba-Tiny encoder and a frozen wideResNet50 encoder provide global contextual and local\nstructural priors, respectively. Their multi-scale features are\naligned through the Manifold Matching and Unification\n(MMU) module, while the Inter-Level Feature Adaption\n(InA) module fuses intermediate features from both teachers. This unified manifold is then distilled into two structurally identical but functionally diverse students: Student\n1 performs layer-wise distillation from the fused teacher\nfeatures via InA, focusing on local consistency, while Student 2 receives skip-projected latent representations from\nthe unified manifold through the Manifold Prior Affine\n(MPA) module, enabling it to capture cross-layer contex-\n\ntual dependencies. A diversity loss ensures agreement on\nnormal structures while allowing diversity in detecting potential abnormalities.\nOur contributions can be summarized as follows:\n• We propose a novel dual-teacher architecture that leverages complementary representations from heterogeneous\nbackbones (VMamba-Tiny for global contextual priors\nand wide-ResNet50 for local structural priors), addressing the limitations of single-stream feature extractors in\nmedical anomaly detection.\n• We introduce a dual-teacher manifold matching and unification module (MMU) that integrates global contextual priors from VMamba-Tiny and local structural priors\nfrom wide-ResNet50 into a cohesive high-dimensional\nanatomical manifold.\n• We propose a dual-student diverse distillation strategy\nthat enhances representation stability by combining local distillation (via InA), cross-layer manifold projection\n(via MPA), and dual-student consistency regularization,\nachieving significant improvements over existing methods on multiple medical datasets.\n\n2. Related Work\n2.1. Visual anomaly detection\n\n28535\n\nVisual anomaly detection can be framed as identifying deviations from learned normal sample patterns. In recent\nyears, numerous effective, domain-specific anomaly detection models have emerged in both the medical and industrial\nfields. CutPaste [22], a method developed for industrial image analysis, introduced an auxiliary task (image cropping\nand rotation) to simulate anomalies, pioneering the application of self-supervised learning in anomaly detection. For\ninstance, f-AnoGAN [35], which is based on adversarial\ngenerative networks, identifies anomalies using discriminators operating on feature vectors in latent space; however,\nits iterative optimization process is inefficient, and the generator is prone to mode collapse.\nIn addition, recent efforts have focused on developing unified models for anomaly detection. For example,\nUniAD [44] employs a patch-based reconstruction method\noptimized for industrial applications; however, its performance degrades in other domains and requires a large number of normal samples for training. UniVAD [9] utilizes\npre-trained Grounding DINO [31] and SAM [19], achieving\ntraining-free anomaly detection and demonstrating satisfactory performance on cross-domain datasets.\nIn the field of medical image analysis, SQUID [41] and\nSimSID [42], proposed by Tiange Xiang et al., represent\nsuccessive works. These models incorporate a memory\nstorage module and transformer positional encoding, proving effective for medical images with fixed structures, such\nas X-rays, but ineffective at decoupling anatomical struc-\n\n\ftural information during dimensionality reduction processes\nlike CT (3D to 2D).\n\n3. Methodology\n\n2.2. Methods Based on Knowledge Distillation\n\nAs shown in Fig. 2, we propose PDD, a manifold-unified reverse distillation framework that employs dual-teacher and\ndual-student architecture to leverage complementary representations from heterogeneous backbones. The teachers\nconsist of frozen VMamba-Tiny and frozen wide-ResNet50\nencoders, which process input images in parallel and extract multi-scale intermediate features. These features are\nfused via the InA module (Fig. 2-(b)) to obtain enriched\nfused features fbi . The two teacher encoders compress input images into distinct high-dimensional manifold spaces:\nVMamba-Tiny learns sequential state-space representations\nwhile wide-ResNet50 captures spatial convolutional features. The MMU module (Fig. 2-(c)) performs geometric\nalignment between these heterogeneous manifolds, mapping semantically similar features to a unified manifold\nspace. The aligned features are fed into two student networks: Student 1 distills features from InA via FEi u for\nunified representations, while Student 2 incorporates multiscale manifold features through MLP-based skip connections to FEi p , distilling both prior knowledge from the unified manifold and enriched features from InA. This dualstudent design enables diverse reconstruction of normal\nsamples while maintaining sensitivity to anomalies.\n\nIn recent years, knowledge distillation based anomaly detection models have emerged as a promising method for balancing computational efficiency with model performance.\nThe traditional knowledge distillation (KD) paradigm involves transferring knowledge from a teacher network to\na student network for the identification and localization\nof anomalous samples. Typically, teacher and student\nnetworks adopt similar or identical architectures, resulting in insufficient representation diversity when processing\nout-of-distribution samples. RD4AD [6] pioneered a new\nparadigm termed reverse knowledge distillation, in which\nthe student network learns directly from the teacher’s highlevel features, progressively capturing multi-scale information across the teacher’s layers to enable the efficient separation of normal from anomalous samples. Inspired by\nRD4AD [6], Skip-TS [30] employs skip connections and\nmulti-scale feature sampling between the teacher and student networks, thereby mitigating the challenge of normal\npattern reconstruction prevalent in medical datasets—a limitation identified in RD4AD. More recently, CFRG [43] has\nbeen introduced, leveraging heterogeneous teacher-student\nnetworks to extract multi-scale features, utilizing recovery\nnetworks to reconstruct normal patterns from anomalous\nfeatures, and enabling fine-grained anomaly localization\nthrough segmentation networks. Our method introduces a\nnovel reverse knowledge distillation framework, aiming to\nenhance the consistency of the student networks to achieve\nmore effective separation of normal from anomalous patterns.\nSome studies have found that pre-trained networks on\nlarge datasets such as ImageNet-1k can serve as backbones\nfor anomaly detection. Models like SAM, Mamba, and\nDINO leverage their ability to extract features across images, enabling direct anomaly detection on samples. However, this computational efficiency comes at the cost of reduced feature extraction capability. UniVAD, as previously\nmentioned, requires explicit mask labeling for its target objects. Consequently, its performance on datasets lacking\nsuch annotations or characterized by fine-grained normal regions—such as BrainMRI [34] and CheXray [39]—exhibits\na significant gap compared to domain-specific models.\nHowever, existing methods typically employ singleteacher architectures and focus on homogeneous feature\nspaces, limiting their ability to capture diverse representations of normal patterns. Our work addresses these limitations by introducing a dual-teacher dual-student framework\nthat leverages heterogeneous backbones and unified manifold spaces to enable more diverse and robust normal pattern learning.\n\n3.1. Manifold-Unified Reverse Distillation\n\n3.2. Intra-Backbone Feature Fusion Strategy\nWe employ two heterogeneous backbone networks with\nlarge-scale pre-trained weights as teacher models: wideResNet50 and vanilla-VMamba-Tiny (VMamba-Tiny), denoted as Teacher 1 and Teacher 2, respectively. Both backbones have demonstrated strong performance on ImageNet1K, and their pre-trained weights exhibit powerful image\nfeature extraction capabilities. As shown in Fig. 1, GradCAM visualizations reveal distinct feature representations\nat shallow and deep layers for both ResNet and Mamba\nbackbones. The complementary nature of these representations suggests that fusing shallow features from wideResNet50 and VMamba-Tiny can significantly enrich the\nprior knowledge at each network layer, thereby obtaining a\nmore powerful feature extractor.\nTo this end, we design a lightweight inter-backbone feature fusion adapter, termed InA (Inter-Level Feature Adaption). Formally, we define the input image as xn ∈\nRC×H×W , which is reshaped and fed into the two teacher\nencoders. The VMamba backbone, as shown in Fig. 2, coni\nsists of 4 blocks denoted as FD\nfor i ∈ [1, 4]. The frozen\nm\nvanilla-VMamba-Tiny pre-trained weights output a feature\ni\nmap fm\n∈ Rh×w×c between each layer, where h, w, and\nc represent the height, width, and number of channels, respectively. Similarly, the wide-ResNet50 branch consists of\ni\n4 blocks, denoted as FD\nfor i ∈ [1, 4], which output feac\n\n28536\n\n\f(a) PDD Framework\nTeacher1\n\nStudent1\n\nℱ!\"𝒸\n\nℱ!$𝒸\n\nℱ!#𝒸\n\nInA\n\nInA\n\nℱ&amp;$#\n\nℱ!%𝒸\n\nInA\n\nℱ&amp;##\n\nℱ&amp;\"#\n\nMLP\n\nTeacher2\n\nStudent2\n\nInput\n\nAno Map\n\nℱ!#𝓂\n\nℱ!\"𝓂\n\nℱ!$𝓂\n\n(b) Inter-Level Feature Adaption\n\nℱ!%𝓂\n\nℱ&amp;$$\n\nMMU\n\nℱ&amp;#$\n\nℱ&amp;\"$\n\n(c) Manifold Matching and Unification\n\nCompress\nFrozen\n\nResNet\nDecoder\n\nTrainable\n\nInA\n\nVSSM\nDecoder\n\nInA\n\nInter-Level\nFeature Adaption\n\nMMU\n\nManifold Matching\nand Unification\n\nMLP\n\nMulti-layer\nPerception\n\nCNN manifold\n\n𝑓!\"\n\n𝑓!$\n\nVMamba\nmanifold\n\n𝑓!#\n\nUnification\n\nCompress\n\nFigure 2. Overview of the proposed PDD framework. The framework employs a dual-teacher and dual-student architecture. The teachers\nconsist of frozen VMamba-Tiny and frozen wide-ResNet50 encoders, whose intermediate features are fused via the InA module (shown\nin (b)) to obtain fbi . The two teacher encoders compress input images into distinct high-dimensional manifold spaces, which are then\ni\n,\naligned through the MMU module. The aligned features are fed into two student networks: Student 1 distills features from InA via FE\nu\ni\n,\nwhile Student 2 incorporates multi-scale manifold space features from the unified manifold through MLP-based skip connections to FE\np\ndistilling both prior and InA features. This enables diverse reconstruction of normal samples and effective separation of anomalies.\n′\n\n′\n\n′\n\ntures fci ∈ Rh ×w ×c between layers.\nThe shallow feature fusion process between the two\nbackbones is performed as follows:\n  S(f_{m}^{i}, f_{c}^{i}) = \\left ( \\frac {h'}{h},\\ \\frac {w'}{w} \\right ), \\quad \\tilde {f}_{m}^{i} = \\mathcal {U}(f_{m}^{i}, S), \n\n(1)\n\n  f_{b}^{i} = \\mathcal {F}_{\\text {InA}}\\left (f_{m}^{i}, f_{c}^{i}\\right ) = \\tilde {f}_{m}^{i} + f_{c}^{i}, \n\n(2)\n\nwhere S(·) is a scaling function that computes the spatial\nscaling factors, U(·) is an upsampling function that performs 2D bilinear interpolation to scale the Mamba feature\nmap to match the convolutional feature map dimensions,\nand FInA (·) implements the feature fusion at shallow layers, producing the fused feature fbi .\n\nmanifold spaces, as illustrated in Fig. 2-(c). Due to their\ndistinct architectural inductive biases, the two teacher encoders naturally embed input images into different highdimensional manifold spaces. The VMamba-Tiny encoder,\nwith its state-space modeling mechanism, learns representations in a sequential state-space manifold Mm ⊂ Rdm ,\nwhile the wide-ResNet50 encoder, with its convolutional\nstructure, captures features in a spatial convolutional manifold Mc ⊂ Rdc , where dm and dc denote the dimensions of\nthe respective manifolds. These heterogeneous manifolds\nencode complementary semantic information but exist in\ndifferent geometric spaces, making direct feature interaction challenging.\n\n3.3. Manifold Space Unification of Heterogeneous\nBackbones\nThe input image xn is processed by the two teacher encoders in parallel, and through their respective encoding\nprocesses, the image is compressed into high-dimensional\n\n28537\n\nThe deep features at the tail of the backbones contain\nrich high-level semantic information that is crucial for understanding the overall image semantics. To fully leverage\nthe high-level semantic features from both teacher networks\nand unify the heterogeneous manifolds into a common\nspace, we propose the Manifold Matching and Unification\n(MMU) module. The MMU module is responsible for fus-\n\n\fwhere L is the number of layers, and fbi represents the\nfused features from the InA module at layer i. This MSEbased loss ensures that Student 1 learns to capture the crossbackbone fused knowledge encoded in the InA features.\nRepresentation Strategy 2: Prior Knowledge-Guided\nReconstruction. The second student network, Student 2,\nincorporates prior knowledge from the unified manifold\nspace through the Manifold Prior Affine module. The prior\nknowledge is extracted from the unified manifold features\nfti via an MLP-based affine transformation:\n\ning the high-level semantic features from both teacher models, thereby strengthening the modeling capability for overall image semantic consistency.\n′\n′\n′\ni\nFormally, let fm\n∈ Rh×w×c and fci ∈ Rh ×w ×c denote\nthe tail features extracted from the VMamba and ResNet\nencoders at layer i, respectively. The MMU module first\nadapts the Mamba features through a channel-wise adaptation pathway. The MMU consists of a 1×1 dilated convolution and a 3 × 3 standard convolution, both activated by the\nGeLU function and connected in sequence, with a residual\nconnection. The adapted Mamba features are computed as:\n\n  z_{p}^{i} = \\text {MLP}(f_{t}^{i}) = W_{p}^{i} \\cdot f_{t}^{i} + b_{p}^{i}, \n  f_{m^c}^{i} = \\text {Res}\\left ([C^{3} \\circ \\mathcal {G}(\\text {BN}(C^{1}(f_{m}^{i})))], C^{1}(f_{m}^{i})\\right ), \n\n(3)\n\nwhere G denotes the GeLU activation function, C k represents a convolutional layer with kernel size k, BN denotes\nbatch normalization, and Res(·, ·) implements the residual\nconnection by element-wise addition. The 1 × 1 convolution C 1 performs channel-wise adaptation, while the 3 × 3\nconvolution C 3 captures spatial context, enabling the module to model both channel-wise relationships and spatial dependencies.\nThe unified features are then obtained by fusing the\nadapted Mamba features with the ResNet features:\n  f_{t}^{i} = \\mathcal {F}_{\\text {MMU}}\\left (f_{m}^{i}, f_{c}^{i}\\right ) = \\tilde {f}_{m^c}^{i} + f_{c}^{i}, \n\nwhere Wpi and bip are learnable weight matrix and bias vector, respectively. The transformed prior knowledge zpi is\nthen injected into Student 2 at each layer through skip connections, enabling the network to leverage both the prior\nknowledge from the unified manifold and the enriched features from InA. The optimization objective combines MSE\nloss and cosine similarity:\n  \\mathcal {L}_{\\text {prp}} = \\sum _{i=1}^{L} \\left [ \\alpha \\|f_{b}^{i} - \\mathcal {F}_{E_{p}}^{i}\\|_2^2 + \\beta \\left (1 - \\frac {f_{b}^{i} \\cdot \\mathcal {F}_{E_{p}}^{i}}{\\|f_{b}^{i}\\|_2 \\|\\mathcal {F}_{E_{p}}^{i}\\|_2}\\right ) \\right ], \n\n(4)\n\n(7)\nwhere FEi p denotes the features from Student 2 at layer i, α\nand β are weighting factors, and the cosine similarity term\nencourages angular alignment between the InA features and\nStudent 2 features.\nRepresentation Strategy 3: Student Diversity Optimization. To prevent both student networks from collapsing into a single representation mode and to enable diverse\nreconstruction of normal patterns, we introduce a diversity\nconstraint that encourages different representation strategies at different feature scales. Specifically, we apply an\ninverted cosine similarity constraint that encourages dissimilarity at low-dimensional feature spaces (to capture diversity) while maintaining similarity at high-dimensional feature spaces (to ensure consistency). The diversity loss is\ndefined as:\n\ni\ni\nwhere f˜m\nc denotes the spatially aligned version of fmc\ni\nto match the spatial dimensions of fc (if necessary), and\nFMMU (·, ·) implements the feature fusion. This unified feature fti combines the complementary semantic information\nfrom both heterogeneous manifolds, creating a common\nrepresentation space that preserves the strengths of both architectures while enabling effective feature interaction for\nthe subsequent student networks.\n\n3.4. Normal Pattern Representation Diversification\nAs shown in Fig. 3-(a), to achieve diverse reconstruction of\nnormal patterns while maintaining sensitivity to anomalies,\nwe design a dual-student architecture with three complementary representation strategies. The unified features fti\nfrom the MMU module serve as the input to both student\nnetworks, enabling them to learn different aspects of normal patterns.\nRepresentation Strategy 1: Basic Student Network\nDistillation. The first student network, denoted as Student\n1, receives features from the unified manifold space fti and\nlearns to reconstruct the fused features from the InA module. Formally, let FEi u denote the features extracted from\nStudent 1 at layer i. The distillation loss is defined as:\n  \\mathcal {L}_{\\text {kr}} = \\sum _{i=1}^{L} \\|f_{b}^{i} - \\mathcal {F}_{E_{u}}^{i}\\|_2^2, \n\n(6)\n\n  \\begin {split} \\mathcal {L}_{\\text {div}} &amp;= \\sum _{i=1}^{L_{\\text {low}}} \\max \\left (0, \\frac {\\mathcal {F}_{E_{u}}^{i} \\cdot \\mathcal {F}_{E_{p}}^{i}}{\\|\\mathcal {F}_{E_{u}}^{i}\\|_2 \\|\\mathcal {F}_{E_{p}}^{i}\\|_2} - \\tau _{\\text {low}}\\right ) \\\\ &amp;\\quad - \\sum _{i=L_{\\text {low}}+1}^{L} \\min \\left (0, \\frac {\\mathcal {F}_{E_{u}}^{i} \\cdot \\mathcal {F}_{E_{p}}^{i}}{\\|\\mathcal {F}_{E_{u}}^{i}\\|_2 \\|\\mathcal {F}_{E_{p}}^{i}\\|_2} - \\tau _{\\text {high}}\\right ), \\end {split} \n\n(8)\n\n(5)\n\nwhere Llow denotes the number of low-dimensional layers,\nτlow and τhigh are threshold parameters. The first term penalizes high cosine similarity in low-dimensional layers (encouraging diversity), while the second term penalizes low\ncosine similarity in high-dimensional layers (ensuring consistency). This design enables the framework to capture the\n\n28538\n\n\f𝑙!\"!\n\n𝑙#\"\n\n(a) Train\n\nMLP\n\nInA\n\nℱ#$ #\n\nAno Map\n\nMMU\n\nℱ!\" !\n\n𝑙$%&amp;\n\nNor&amp;Ano\n\nMLP\n\nInA\n\nDirection of Final Loss\nOptimizations\n\nℱ#$ $\n\nMMU\n\nNor\n\nℱ!\" 𝒸\n\nOptimal Solution\nSimulated Loss landscape\n\n(b) Inference\n\n(c) Zhanglab Chest X-ray\n\n(d) Zhanglab Final Loss Landscape\n\nFigure 3. Visualization of PDD pipeline and loss functions. Figure (a) illustrates the training process of PDD, which is trained exclusively\non normal samples. The training simultaneously optimizes three loss functions: lprp , lkr , and ldiv . Figure (c) shows the loss function\ncurves over 100 epochs on the ZhangLab Chest-Xray dataset. The combined direction of the three curves is represented in the simulated\nloss landscape in Figure (d), with arrows indicating the direction of loss descent. In the final 100 epochs, the training converges near the\noptimal solution, demonstrating that PDD effectively learns features of normal samples and can separate anomalies.\nTable 1. Comparison with six baselines on four medical datasets. Evaluation metric: AUROC (%). Bold: best; underline: second best.\nMethod→ f-AnoGAN[35] CutPaste[22] RD4AD[6] SQUID[41] SIMSID[42] Skip-TS[30] Ours(PDD)\nDataset ↓\nMIA’19\nCVPR’21\nCVPR’22\nCVPR’23\nTPAMI’24\nTIM’24\nHeadCT\n82.6\n73.0\n74.3\n75.4\n74.9\n85.7\n97.5\nZhanglab\n75.5\n73.3\n87.5\n87.6\n91.1\n79.2\n94.0\nBrainMRI\n77.1\n67.0\n80.9\n74.7\n81.5\n88.2\n96.7\n79.1\nCheXpert\n65.8\n65.5\n71.9\n78.1\n79.7\n68.7\n\ndiversity on medical imaging datasets, including variations\nin structure, density, and imaging protocols, while maintaining the ability to effectively separate anomalous patterns\nfrom normal ones.\nThe overall optimization objective combines the three\nloss functions with learnable weighting factors:\n  \\mathcal {L}_{\\text {total}} = \\lambda _{\\text {kr}} \\mathcal {L}_{\\text {kr}} + \\lambda _{\\text {prp}} \\mathcal {L}_{\\text {prp}} + \\lambda _{\\text {div}} \\mathcal {L}_{\\text {div}}, \n\n(9)\n\nmodel training, and evaluate on a test set consisting of 234\nnormal and 390 abnormal images.\nCheXpert [17]. This large-scale chest X-ray dataset provides a comprehensive benchmark for automated chest Xray interpretation. We train our model on 4,499 healthy images from the official training set and test on a balanced test\nset containing 250 normal and 250 abnormal images.\nHeadCT [38]. This dataset consists of 200 CT images\nfor brain hemorrhage detection. The training set contains\n60 normal images, while the test set comprises 140 images\nincluding 40 normal samples and 100 abnormal brain hemorrhage samples.\nBrainMRI [34]. This dataset contains 252 MRI images\nfor brain tumor detection. The training set includes 58 normal images, and the test set consists of 194 images with 40\nnormal samples and 154 abnormal samples.\nUni-Medical [45]. This multimodal dataset integrates\nthree medical imaging benchmarks from BMAD [1], encompassing brain, liver, and retinal imaging modalities.\nThe dataset includes 7,500 training and 3,715 test images\nfor the brain class, 1,542 training and 1,493 test images for\nthe liver class, and 4,297 training and 1,805 test images for\nthe retinal class.\nMetrics. We evaluate our model at the image level using three evaluation metrics: Area Under the Receiver Operating Characteristic curve (AU-ROC), Average Precision\n\nwhere λkr , λprp , and λdiv are the weighting parameters that\nbalance the contributions of knowledge distillation loss,\nprior knowledge loss, and diversity loss, respectively. These\nweights are either set as hyperparameters or learned during\ntraining to optimize the performance of the framework.\n\n4. Experiments\n4.1. Dataset and Experimental Setup\nDatasets. We evaluate the performance of our model on\nmultiple medical imaging datasets covering diverse anatomical regions and imaging modalities, including chest X-ray\nimages, brain MRI images, liver CT images, and retinal\nOCT images.\nZhangLab Chest X-ray [18]. This dataset contains\nchest X-ray images with healthy (normal) and pneumonia\n(anomaly) cases. Following the experimental protocol , we\nuse 1,249 healthy images from the official training set for\n\n28539\n\n\fTable 2. Comparison with SoTA methods on Uni-Medical dataset for multi-class anomaly localization with AU-ROC / AP / F1 max\nmetrics. Bold numbers denote the best (SoTA) results in each row, and underlined numbers denote the second-best results.\nMethod→\nCategory ↓\nbrain\nliver\nretinal\nMean\n\nRD4AD [6]\nCVPR’22\n82.4/94.4/91.5\n55.1/46.3/64.1\n89.2/86.7/78.5\n75.6/75.8/78.0\n\nUniAD [44] SimpleNet [32]\nNeurIPS’22\nCVPR’23\n89.9/97.5/92.6 82.3/95.6/90.9\n55.1/46.3/64.1 55.8/47.6/60.9\n84.6/79.4/73.9 88.8/87.6/78.6\n78.5/75.2/76.6 75.6/76.9/76.8\n\nDeSTSeg [46]\nCVPR’23\n84.5/95.0/92.1\n69.2/60.6/64.7\n88.3/83.8/79.2\n80.7/79.8/78.7\n\nDiAD [13]\nMambaAD [12]\nAAAI’24\nNeurIPS’24\n93.7/98.1/95.0 94.2/98.6/94.5\n59.2/55.6/60.9 63.2/53.1/64.7\n88.3/86.6/77.7 93.6/88.7/86.6\n80.4/80.1/77.8 83.7/80.1/82.0\n\nOurs(PDD)\n90.9/96.7/96.7\n59.7/50.5/70.5\n93.6/92.7/88.9\n81.4/80.0/85.4\n\nTable 3. Ablation on distillation paradigm and modular components on ZhangLab. Metrics: AUROC / AUPR / F1 max (%).\n\n(AP), and maximum F1 score (F1 max). Higher values indicate better performance for all these metrics.\nImplementation Details. All the input images are resized to 256 × 256 pixels. We trained our model using the\nAdam optimizer with an initial learning rate of 2 × 10−3 ,\nand the learning rate is updated using a cosine annealing\nschedule. All experiments are conducted on a single RTX\nA6000 GPU.\nAs illustrated in Fig. 3-(a), during the training phase, our\nmodel is trained exclusively on normal samples. The input images are processed through the InA, MMU, and MLP\nmodules, and the model is optimized using the loss functions described in the previous sections (Lkr , Lprp , and Ldiv ).\nDuring the inference phase, the trained model can perform\nanomaly detection on unknown samples (either normal or\nabnormal) by computing anomaly scores based on the reconstruction errors and feature discrepancies, as shown in\nFig. 3.\n\nModel\n\nInA w. MMU InA w. MMU RD\nMPA AUROC↑ AUPR↑ F1↑\n(2t1s)\n(2t2s)\n(1t1s)\n✗\n✗\n✓\n✓\n✗\n\nM1\nM2\nM3\nM4\nOurs\n\n✗\n✗\n✗\n✗\n✓\n\n✓\n✓\n✗\n✗\n✗\n\n✗\n✓\n✗\n✓\n✓\n\n81.5\n82.0\n90.8\n92.9\n94.0\n\n85.5\n86.1\n95.7\n96.6\n99.0\n\n84.8\n85.7\n89.7\n90.3\n96.6\n\nTable 4. Ablation on student consistency supervision and anomaly\nmap computation strategies on BrainMRI. Metrics: AUROC /\nAUPR / F1 max (%).\nModel Ldiv\n\n4.2. Comparative Experiment\n\nM1\nM2\nM3\nOurs\n\nWe compare PDD against 6 state-of-the-art baselines: fAnoGAN [35], CutPaste [22], RD4AD [6], SQUID [41],\nSIMSID [42], and Skip-TS [30]. As shown in Table 1,\nPDD achieves state-of-the-art AUROC on three out of 4\ndatasets—97.5% on HeadCT, 94.0% on Zhanglab, and\n96.7% on BrainMRI—surpassing the best baseline by 11.8,\n2.9, and 8.5 percentage points, respectively. On CheXpert,\nPDD remains competitive with the leading method SIMSID\n(79.1% vs. 79.7%).\nOn the Uni-Medical dataset (Table 2), PDD attains the\nhighest F1 max across all three categories: 96.7% (brain),\n70.5% (liver), and 88.9% (retinal), while also achieving the\nbest AP of 92.7% on the retinal category. Overall, PDD\nsurpasses the strongest competitor MambaAD by 3.4 percentage points on mean F1 max.\n\ncos(t1, s1)\ncos(s1, s2) AUROC↑ AUPR↑ F1↑\n+cos(t2, s2)\n\n✓\n✗\n✗\n✓\n\n✗\n✗\n✓\n✓\n\n✓\n✓\n✗\n✗\n\n32.50\n70.46\n93.41\n96.67\n\n81.23\n97.26\n98.81\n99.51\n\n93.02\n95.65\n95.93\n97.56\n\nTable 5. Ablation on τlow and τhigh across datasets. Metric: AUROC (%).\nZhangLab\nτhigh\nτlow\n\n0.40\n0.65\n\n0.30\n0.75\n\n0.75\n0.40\n\nHeadCT\n0.30\n0.65\n\n0.30\n0.75\n\nBrainMRI\n0.75\n0.40\n\n0.75\n0.40\n\nAUROC 94.52 96.18 95.92 96.92 97.31 96.15\n\n93.30\n\n4.3. Ablation Study\n\nAblation on Distillation Paradigms and Modular\nComponents. We evaluate different architectural configurations in Table 3, where (2t1s) and (2t2s) denote two\nteachers with one/two students, respectively. Starting from\na vanilla RD(1t1s) baseline (Model 1: 81.5% / 85.5% /\n84.8%), introducing the dual-teacher architecture with InA\nand MMU (Model 3) yields a substantial gain of 9.3 percentage points in AUROC, validating the benefit of complementary representations. Adding MPA (Model 4) further improves AUROC to 92.9%, and upgrading to a dualstudent design (our final model) achieves the best performance of 94.0% / 99.0% / 96.6%. These results con-\n\nTo validate the effectiveness of each component in our proposed PDD framework, we conduct comprehensive ablation studies on the ZhangLab Chest-Xray and BrainMRI\ndatasets. Table 3 presents the ablation results for different\ndistillation paradigms and modular components.\n\n28540\n\n\fGT\n\nSkip-TS\n\nOurs\n\nGT\n\nSkip-TS\n\nprevents student collapse into identical representations; and\n(3) the combination of diversity supervision and teacherstudent alignment achieves optimal results.\nHyper-parameter Sensitivity. We further conduct\nhyper-parameter ablations on the diversity thresholds\n(τlow , τhigh ) and the loss weights (λkr , λprp , λdiv ). As shown\nin Table 5, PDD achieves consistently strong AUROC\nacross datasets under different (τlow , τhigh ) combinations,\nindicating that the performance is not overly sensitive to\nthese thresholds and the method is robust to moderate parameter changes. We set τlow = 0.30 and τhigh = 0.75 in\nall experiments. For the overall objective, we use λkr =\nλprp = 0.02 and λdiv = 0.5, which provides a good balance between distillation, prior-guided reconstruction, and\ndiversity regularization.\n\nOurs\n\nFigure 4. Anomaly localization comparison between PDD and\nSkip-TS on the HeadCT dataset.\n\n4.4. Anomaly Localization\n\nGT\n\nRD4AD\n\nOurs\n\nGT\n\nRD4AD\n\nOurs\n\nOur anomaly localization is achieved during inference by\naggregating the cosine similarity between each teacherstudent pair, formulated as cos(t1 , s1 ) + cos(t2 , s2 ).\nFigure 4 presents qualitative anomaly localization results\non HeadCT, comparing PDD with Skip-TS [30]. Each column shows ground truth (left), Skip-TS predictions (middle), and PDD predictions (right). Our method achieves\nmore accurate localization, particularly for lesions with irregular boundaries and subtle pathological patterns that are\noften overlooked by Skip-TS.\nFigure 5 compares anomaly localization between PDD\nand RD4AD on the ZhangLab dataset. As shown, RD4AD\ntends to produce spurious activations on normal samples,\nwhile PDD maintains cleaner predictions with significantly\nfewer false positives, indicating stronger specificity in distinguishing normal regions from anomalies.\n\nFigure 5. Anomaly localization comparison between PDD and\nRD4AD on the ZhangLab dataset. PDD produces significantly\nfewer false positives on normal samples, demonstrating stronger\nspecificity.\n\nfirm that: (1) dual-teacher architecture with InA and MMU\neffectively leverages complementary representations; (2)\ndual-student design significantly enhances diverse normal\npattern learning; and (3) MPA provides useful prior knowledge for further improvement.\nAblation on Anomaly Localization. We investigate the\neffects of training-time student consistency supervision and\ninference-time anomaly map computation on BrainMRI, as\nshown in Table 4. Three components are examined: diversity loss Ldiv between two students during training, teacherstudent cosine similarity cos(t1, s1) + cos(t2, s2) for inference, and student-student cosine similarity cos(s1, s2)\nfor inference. Using only cos(s1, s2) with Ldiv (Model\n1) leads to poor AUROC of 32.50%, while removing Ldiv\n(Model 2) raises it to 70.46%, suggesting that Ldiv forces\ndivergent student representations that harm student-student\nbased localization. Switching to teacher-student alignment (Model 3) significantly boosts AUROC to 93.41%.\nOur final model combines Ldiv with teacher-student alignment, achieving the best performance of 96.67% / 99.51% /\n97.56%. This demonstrates that: (1) teacher-student alignment is essential for effective anomaly localization; (2) Ldiv\n\n28541\n\n5. Conclusion\nWe propose PDD (Manifold-Prior Diverse Distillation), a\nnovel framework for medical image anomaly detection. By\nunifying complementary priors from VMamba-Tiny and\nWide-ResNet50 via MMU and InA modules, and employing a dual-student architecture with MPA-based prior injection and diversity regularization, PDD enables diverse\nreconstruction of normal patterns while maintaining sensitivity to subtle anomalies. Experiments across multiple\nbenchmarks show that PDD achieves state-of-the-art performance, confirming the efficacy of manifold-level prior\nmodeling.\nDespite its strong results, PDD can generate false positives on non-pathological artifacts such as device markers\nor metallic implants. These artifacts deviate visually from\nnormal tissue but are clinically irrelevant. Mitigating this\nlimitation through artifact-aware priors or clinical context\nintegration is a key direction for future work.\n\n\f6. Acknowledgments\nThis work was supported by the National Natural Science\nFoundation of China (No. 62276182), and Tianjin Natural Science Foundation (Nos. 24JCYBJC01230, 24JCYBJC01460, 24JCZDJC01190 ).\n\ntransformer for medical image segmentation. IEEE Transactions on Medical Imaging, 42(9):2763–2775, 2023. 2\n[12] Haoyang He, Yuhu Bai, Jiangning Zhang, Qingdong He,\nHongxu Chen, Zhenye Gan, Chengjie Wang, Xiangtai Li,\nGuanzhong Tian, and Lei Xie. Mambaad: Exploring state\nspace models for multi-class unsupervised anomaly detection. Advances in Neural Information Processing Systems,\n37:71162–71187, 2024. 2, 7\n[13] Haoyang He, Jiangning Zhang, Hongxu Chen, Xuhai Chen,\nZhishan Li, Xu Chen, Yabiao Wang, Chengjie Wang, and Lei\nXie. A diffusion-based framework for multi-class anomaly\ndetection. In Proceedings of the AAAI conference on artificial intelligence, pages 8472–8480, 2024. 7\n[14] Chaoqin Huang, Aofan Jiang, Jinghao Feng, Ya Zhang, Xinchao Wang, and Yanfeng Wang. Adapting visual-language\nmodels for generalizable anomaly detection in medical images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11375–11385,\n2024. 2\n[15] Jiahao Huang, Liutao Yang, Fanwen Wang, Yinzhe Wu,\nYang Nan, Weiwen Wu, Chengyan Wang, Kuangyu Shi,\nAngelica I Aviles-Rivero, Carola-Bibiane Schoenlieb, et al.\nEnhancing global sensitivity and uncertainty quantification\nin medical image reconstruction with monte carlo arbitrarymasked mamba. Medical Image Analysis, 99:103334, 2025.\n2\n[16] Hasan Iqbal, Umar Khalid, Chen Chen, and Jing Hua. Unsupervised anomaly detection in medical images using masked\ndiffusion model. In International Workshop on Machine\nLearning in Medical Imaging, pages 372–381. Springer,\n2023. 2\n[17] Jeremy Irvin, Pranav Rajpurkar, Michael Ko, Yifan Yu, Silviana Ciurea-Ilcus, Chris Chute, Henrik Marklund, Behzad\nHaghgoo, Robyn Ball, Katie Shpanskaya, et al. Chexpert:\nA large chest radiograph dataset with uncertainty labels and\nexpert comparison. In Proceedings of the AAAI conference\non artificial intelligence, pages 590–597, 2019. 6\n[18] Daniel S Kermany, Michael Goldbaum, Wenjia Cai, Carolina CS Valentim, Huiying Liang, Sally L Baxter, Alex\nMcKeown, Ge Yang, Xiaokang Wu, Fangbing Yan, et al.\nIdentifying medical diagnoses and treatable diseases by\nimage-based deep learning. cell, 172(5):1122–1131, 2018.\n6\n[19] Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao,\nChloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. In Proceedings of the IEEE/CVF international conference on computer vision, pages 4015–4026, 2023. 2\n[20] Ioannis Lagogiannis, Felix Meissen, Georgios Kaissis, and\nDaniel Rueckert. Unsupervised pathology detection: a deep\ndive into the state of the art. IEEE transactions on medical\nimaging, 43(1):241–252, 2023. 1, 2\n[21] Ioannis Lagogiannis, Felix Meissen, Georgios Kaissis, and\nDaniel Rueckert. Unsupervised pathology detection: a deep\ndive into the state of the art. IEEE transactions on medical\nimaging, 43(1):241–252, 2023. 2\n[22] Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas\nPfister. Cutpaste: Self-supervised learning for anomaly de-\n\nReferences\n[1] Jinan Bao, Hanshi Sun, Hanqiu Deng, Yinsheng He, Zhaoxiang Zhang, and Xingyu Li. Bmad: Benchmarks for medical\nanomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages\n4042–4053, 2024. 6\n[2] Cosmin I Bercea, Benedikt Wiestler, Daniel Rueckert, and\nJulia A Schnabel. Evaluating normative representation learning in generative ai for robust anomaly detection in brain\nimaging. Nature Communications, 16(1):1624, 2025. 2\n[3] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. Uninformed students: Student-teacher\nanomaly detection with discriminative latent embeddings. In\nProceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4183–4192, 2020. 2\n[4] Yu Cai, Weiwen Zhang, Hao Chen, and Kwang-Ting Cheng.\nMedianomaly: A comparative study of anomaly detection in\nmedical images. Medical Image Analysis, 102:103500, 2025.\n1, 2\n[5] Jieneng Chen, Jieru Mei, Xianhang Li, Yongyi Lu, Qihang\nYu, Qingyue Wei, Xiangde Luo, Yutong Xie, Ehsan Adeli,\nYan Wang, et al. Transunet: Rethinking the u-net architecture design for medical image segmentation through the lens\nof transformers. Medical Image Analysis, 97:103280, 2024.\n2\n[6] Hanqiu Deng and Xingyu Li. Anomaly detection via reverse\ndistillation from one-class embedding. In Proceedings of\nthe IEEE/CVF conference on computer vision and pattern\nrecognition, pages 9737–9746, 2022. 2, 3, 6, 7\n[7] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First conference on language modeling, 2024. 2\n[8] Zhihao Gu, Liang Liu, Xu Chen, Ran Yi, Jiangning Zhang,\nYabiao Wang, Chengjie Wang, Annan Shu, Guannan Jiang,\nand Lizhuang Ma. Remembering normality: Memoryguided knowledge distillation for unsupervised anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 16401–16409, 2023. 2\n[9] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen,\nMing Tang, and Jinqiao Wang. Univad: A training-free unified model for few-shot visual anomaly detection. In Proceedings of the Computer Vision and Pattern Recognition\nConference, pages 15194–15203, 2025. 2\n[10] Jia Guo, Shuai Lu, Lize Jia, Weihang Zhang, and Huiqi\nLi. Recontrast: Domain-specific anomaly detection via contrastive reconstruction. Advances in Neural Information Processing Systems, 36:10721–10740, 2023. 2\n[11] Along He, Kai Wang, Tao Li, Chengkun Du, Shuang Xia,\nand Huazhu Fu. H2former: An efficient hierarchical hybrid\n\n28542\n\n\ftection and localization. In Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition,\npages 9664–9674, 2021. 2, 6, 7\n[23] Jiaxi Li, Di Lin, Hao Chen, Hongying Liu, Liang Wan, and\nWei Feng. Causal inference via style bias deconfounding\nfor domain generalization. IEEE Transactions on Pattern\nAnalysis and Machine Intelligence, 2026. 1\n[24] Baijiong Lin, Weisen Jiang, Pengguang Chen, Shu Liu,\nand Ying-Cong Chen. Mtmamba++: Enhancing multi-task\ndense scene understanding via mamba-based decoders. IEEE\nTransactions on Pattern Analysis and Machine Intelligence,\n2025. 2\n[25] Chengde Lin, Xijun Lu, and Guangxi Chen. Ratlip: generative adversarial clip text-to-image synthesis based on recurrent affine transformations. In 2024 IEEE International\nConference on Systems, Man, and Cybernetics (SMC), pages\n2346–2352. IEEE, 2024. 2\n[26] Chengde Lin, Xuezhu Gong, Shuxue Ding, Mingzhe Yang,\nXijun Lu, and Chengjun Mo. Stegot: Trade-offs in steganography via optimal transport. In 2025 IEEE International\nConference on Multimedia and Expo (ICME), pages 1–6,\n2025. 2\n[27] Junkang Liu, Fanhua Shang, Yuanyuan Liu, Hongying\nLiu, Yuangang Li, and YunXiang Gong.\nFedbcgd:\nCommunication-efficient accelerated block coordinate gradient descent for federated learning. In Proceedings of the\n32nd ACM International Conference on Multimedia, pages\n2955–2963, 2024. 2\n[28] Jiarun Liu, Hao Yang, Hong-Yu Zhou, Yan Xi, Lequan Yu,\nCheng Li, Yong Liang, Guangming Shi, Yizhou Yu, Shaoting Zhang, et al. Swin-umamba: Mamba-based unet with\nimagenet-based pretraining. In International conference on\nmedical image computing and computer-assisted intervention, pages 615–625. Springer, 2024. 2\n[29] Junkang Liu, Fanhua Shang, Yuxuan Tian, Hongying Liu,\nand Yuanyuan Liu. Consistency of local and global flatness for federated learning. In Proceedings of the 33rd ACM\nInternational Conference on Multimedia, pages 3875–3883,\n2025. 2\n[30] Mingxuan Liu, Yunrui Jiao, Jingqiao Lu, and Hong\nChen.\nAnomaly detection for medical images using\nteacher–student model with skip connections and multiscale\nanomaly consistency. IEEE Transactions on Instrumentation\nand Measurement, 73:1–15, 2024. 3, 6, 7, 8\n[31] Shilong Liu, Zhaoyang Zeng, Tianhe Ren, Feng Li, Hao\nZhang, Jie Yang, Qing Jiang, Chunyuan Li, Jianwei Yang,\nHang Su, et al. Grounding dino: Marrying dino with\ngrounded pre-training for open-set object detection. In European conference on computer vision, pages 38–55. Springer,\n2024. 2\n[32] 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. 7\n[33] Declan McIntosh and Alexandra Branzan Albu. Interrealization channels: Unsupervised anomaly detection beyond one-class classification.\nIn Proceedings of the\n\nIEEE/CVF International Conference on Computer Vision,\npages 6285–6295, 2023. 2\n[34] Sruti Rai, Siddhartha Chowdhury, Sampa Sarkar, Kinnar\nChowdhury, and Kundan Prasad Singh. A hybrid approach\nto brain tumor detection from mri images using computer\nvision. Journal of innovation in computer science and engineering, 8(2):8–12, 2019. 3, 6\n[35] T Schlegl, Philipp Seeböck, Sebastian M Waldstein, G\nLangs, and Ursula Schmidt-Erfurth. f-anogan: Fast unsupervised anomaly detection with generative adversarial networks [j]. Medical image analysis, 54:30–44, 2019. 2, 6,\n7\n[36] Hui Sun, Long Lv, Pingping Zhang, Tongdan Tang, Feng\nTian, Weibing Sun, and Huchuan Lu. Spatial-frequency enhanced mamba for multi-modal image fusion. IEEE Transactions on Image Processing, 34:7684–7696, 2025. 2\n[37] Tran Dinh Tien, Anh Tuan Nguyen, Nguyen Hoang Tran,\nTa Duc Huy, Soan Duong, Chanh D Tr Nguyen, and\nSteven QH Truong. Revisiting reverse distillation for\nanomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages\n24511–24520, 2023. 2\n[38] Mesut Toğaçar, Zafer Cömert, Burhan Ergen, and Ümit Budak. Brain hemorrhage detection based on heat maps, autoencoder and cnn architecture. In 2019 1st International Informatics and Software Engineering Conference (UBMYK),\npages 1–5. IEEE, 2019. 6\n[39] Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, and Ronald M Summers. Chestxray8: Hospital-scale chest x-ray database and benchmarks on\nweakly-supervised classification and localization of common\nthorax diseases. In Proceedings of the IEEE conference on\ncomputer vision and pattern recognition, pages 2097–2106,\n2017. 3\n[40] Ziyi Wu, Tao Lu, Yanduo Zhang, and Xiaoyu Chai. Cmanet:\nA cnn-mamba aggregation network for face super-resolution.\nPattern Recognition, 168:111859, 2025. 2\n[41] Tiange Xiang, Yixiao Zhang, Yongyi Lu, Alan L Yuille,\nChaoyi Zhang, Weidong Cai, and Zongwei Zhou. Squid:\nDeep feature in-painting for unsupervised anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 23890–23901,\n2023. 2, 6, 7\n[42] Tiange Xiang, Yixiao Zhang, Yongyi Lu, Alan Yuille,\nChaoyi Zhang, Weidong Cai, and Zongwei Zhou. Exploiting structural consistency of chest anatomy for unsupervised\nanomaly detection in radiography images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(9):\n6070–6081, 2024. 2, 6, 7\n[43] Enquan Yang, Peng Xing, Hanyang Sun, Wenbo Guo, Yuanwei Ma, Zechao Li, and Dan Zeng. 3cad: A large-scale realworld 3c product dataset for unsupervised anomaly detection. In Proceedings of the AAAI Conference on Artificial\nIntelligence, pages 9175–9183, 2025. 3\n[44] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu,\nYu Zheng, and Xinyi Le. A unified model for multi-class\nanomaly detection. Advances in Neural Information Processing Systems, 35:4571–4584, 2022. 2, 7\n\n28543\n\n\f[45] Jiangning Zhang, Xuhai Chen, Yabiao Wang, Chengjie\nWang, Yong Liu, Xiangtai Li, Ming-Hsuan Yang, and\nDacheng Tao. Exploring plain vit reconstruction for multiclass unsupervised anomaly detection.\narXiv preprint\narXiv:2312.07495, 2023. 6\n[46] Xuan Zhang, Shiyu Li, Xi Li, Ping Huang, Jiulong Shan,\nand Ting Chen. Destseg: Segmentation guided denoising\nstudent-teacher for anomaly detection. In Proceedings of\nthe IEEE/CVF conference on computer vision and pattern\nrecognition, pages 3914–3923, 2023. 2, 7\n[47] Wenbin Zuo, Hongying Liu, Huadeng Wang, Lingqi Zeng,\nNingning Tang, Fanhua Shang, Liang Wan, and Jingjing\nDeng. Enhancing the impact of model performance gains\nfor semi-supervised medical image segmentation. Pattern\nRecognition, 174:112889, 2026. 1\n\n28544\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"