"<!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>InvAD: Inversion-based Reconstruction-Free Anomaly Detection with\nDiffusion Models\n\nAbstract\n\n100\n99.3\nDiAD\n\n90\n\nDespite the remarkable success, recent reconstructionbased anomaly detection (AD) methods via diffusion modeling still involve fine-grained noise-strength tuning and\ncomputationally expensive multi-step denoising, leading to\na fundamental tension between fidelity and efficiency. In\nthis paper, we propose InvAD, a novel Inversion-based\nAnomaly Detection approach – “detection via noising in\nlatent space” – which circumvents explicit reconstruction. Importantly, we contend that the limitations in prior\nreconstruction-based methods originate from the prevailing\n“detection via denoising in RGB space” paradigm. To address this, we model AD under a reconstruction-free formulation, which directly infers the final latent variable corresponding to the input image via DDIM inversion, and\nthen measures the deviation based on the known prior distribution for anomaly scoring. Specifically, in approximating the original probability flow ODE using the Euler method, we only enforce very few inversion steps to\nnoise the clean image to pursue inference efficiency. As\nthe added noise is adaptively derived with the learned diffusion model, the original features for the clean testing\nimage can still be leveraged to yield high detection accuracy. We perform extensive experiments and detailed analysis across four widely used AD benchmarks under the unsupervised unified setting to demonstrate the effectiveness of\nour model, achieving state-of-the-art AD performance, and\nabout 2× inference time speedup without diffusion distillation. Project page: https://invad-project.com\n\n1. Introduction\nImage anomaly detection (AD) focuses on identifying images that deviate from normal patterns, with critical applications in industrial defect detection and automated medical\ndiagnosis [1, 2]. In real-world scenarios, anomalous sam* Corresponding Author.\n\n99.2\nTransFusion\n\n80\n\nFrame Per Second (FPS)\n\narXiv:2504.05662v5 [cs.CV] 12 Mar 2026\n\nShunsuke Sakai1 Xiangteng He2,3 Chunzhi Gu1 * Leonid Sigal2,3 Tatsuhito Hasegawa1 *\n1\nUniversity of Fukui 2 University of British Columbia 3 Vector Institute for AI\nsshunsuke0102@gmail.com, xiangteng.he@ubc.ca,\nczgu@ieee.org, lsigal@cs.ubc.ca, t-hase@u-fukui.ac.jp\n\nOurs\n\n98.8\nOmiAD\n\n70\n\n95.7\nDeCoDiff\n\n60\n\n91.9\nMDM\n\n50\n\n99.1\nInvAD (Ours)\n\n40\n30\n20\n10\n0\n91\n\n92\n\n93\n\n94\n\n95\n\n96\n\n97\n\n98\n\n99\n\n100\n\nImage-level AU-ROC [%]\n\nFigure 1. Accuracy v.s. Speed relationship of diffusion-based\nAD methods [5–9] on MVTecAD. Our proposed InvAD achieves\nstate-of-the-art AD performance with a substantial speedup.\n\nples are often scarce and costly to acquire. Consequently,\nresearchers began focusing on unsupervised AD, where the\ndetection model was trained solely on normal images to\nidentify potential anomalies [3, 4].\nDue to the robust capabilities for approximating distributions, diffusion models [10–12] have emerged as powerful\ntools for AD by precisely modeling normal data distribution\n[5–8, 13–21]. The prevailing paradigm in these methods is\nto treat anomalies as noise: by adding noise of a certain intensity to an anomalous image and then denoising it with a\ndiffusion model trained solely on normal data, the anomalous regions can be effectively reconstructed as normal regions. The anomaly score is therefore measured with the\nmean squared error (MSE) between the original input and\nits reconstructed counterpart, as shown in Figure 2 (a).\nWe argue that the above “detection via denoising in\nRGB space” paradigm is less effective given the following fundamental limitations: (1) Noise-strength sensitiv-\n\n\fTable 1. Comparison of the properties of diffusion-based AD methods. Normal-only means whether the method involves pseudoanomalies in training, NFE stands for the number of function evaluations, and TS refers to the timestep.\n\nMethod\n\nNormal-only\n\nNFE\n\nFPS\n\nTS Tuning-free\n\nMulti-class\n\nScoring scheme\n\nDiffAD [ICCV’23]\nDiAD [AAAI’24]\nGLAD [ECCV’24]\nTransFusion [ECCV’24]\nMDM [ICML’25]\nOmiAD [ICML’25]\nDeCo-Diff [CVPR’25]\n\n✓\n✗\n✓\n✓\n✓\n✓\n✓\n\nN/A\n10\n750\n20\n40\n1\n10\n\nN/A\n1.5\n0.2\n1.6\n1.9\n39.4\n17.0\n\n✗\n✓\n✓\n✗\n✗\n✗\n✗\n\n✗\n✓\n✗\n✗\n✗\n✓\n✓\n\nMask prediction\nMSE(gϕ (x0 ), gϕ (x̂0 ))\nMSE(gϕ (x0 ), gϕ (x̂0 ))\nMask prediction\nMSE(gϕ (x0 ), gϕ (x̂0 ))\nMSE(gϕ (x0 ), gϕ (x̂0 ))\nMSE(gϕ (x0 ), gϕ (x̂0 ))\n\nInvAD (Ours)\n\n✓\n\n3\n\n88.1\n\n✓\n\n✓\n\nlog pθ (xT )\n\nity. The detection performance depends heavily on the selection of appropriate noise strengths. Stronger noise unnecessarily corrupts normal regions, increasing false positives, while weaker noise leads to overly well-recovered\nanomaly regions [14, 15]; (2) Computational expense in\nmulti-step denoising. Satisfactory reconstruction via diffusion models often requires iterative denoising, which is\ntime-consuming for real-world applications. As listed in\nTable 1, most reconstruction-based methods involve high\ninference latency.\nTherefore, we introduce the “detection via noising in latent space” paradigm, which bypasses the reconstruction\nprocess in prior AD approaches. Our core insight is that,\nsince the learned diffusion model is solely aware of the normal data, we can utilize such learned normal data distribution through latent inversion, rather than reconstruction,\nas shown in Figure 2 (b). Specifically, for a given image, we directly infer the corresponding latent variable at\nthe final diffusion step by tracing the probability flow ordinary differential equation (PF-ODE [22]) trajectory. Since\nPF-ODE is by nature deterministic, this constructs a oneto-one correspondence between the noise prior distribution\nand the distribution of normal images, ensuring that normal\nimages can be ideally mapped to focus on a high-density\nregion. Conversely, anomalous images will be mapped to\nlow-density regions. Hence, we can detect anomalies by\nevaluating the degree of deviation of the inferred latent variable under the prior distribution.\nWhile the above method detours noise strength tuning, it\ndoes not straightforwardly lead to a reduction of detection\nspeed. In particular, the high inference latency primarily\nstems from the high-order ODE solver introduced for accurate reconstruction from inverted latents. To address this,\nwe are inspired by [19, 23] to measure the norm of the score\nfunction as a proxy for typicality, which is robust to the step\nsize selection of the Euler method. This allows us to enforce very few inversion steps to diffuse the clean image\n\nto pursue inference efficiency. Moreover, it contributes to\na significantly more efficient inference paradigm compared\nto prior approaches. Importantly, because the learned diffusion model enables noise to be adaptively added during\ninversion, the key features of the original clean testing image can still be leveraged to harvest high detection accuracy. As plotted in Figure 1, our InvAD achieves state-ofthe-art detection performance with the inference efficiency\nsurpassing prior diffusion-based AD models by a large margin. Also, as our method is designed for the inference stage,\nit can be applied in a plug-and-play fashion to be incorporated into existing AD models. Experimental evaluations\ndemonstrate that our method substantially improves inference latency, yet still yields high AD performance, across\nfour widely-used AD benchmarks.\nOur core contributions include three folds:\n• Identifying the inherent limitations of existing\nreconstruction-based methods in achieving an optimal efficiency-accuracy balance, which we attribute\nfundamentally to the “detection via denoising in RGB\nspace” paradigm.\n• Proposing a novel paradigm, detection via noising in latent space, with an inversion-based AD framework InvAD that eliminates reconstruction requirements by directly estimating latent variables from inputs and quantifying anomaly scores through deviation measurements\nunder the prior distribution.\n• Demonstrating that our inversion-based approach, which\ninfers latent variables, is simpler, faster, and achieves\nstate-of-the-art detection performance compared to conventional reconstruction-based methods.\n\n2. Background\n2.1. Diffusion Models\nDiffusion modeling [10, 22] is a recently emerged generative modeling framework, which aims to reverse a Markov\n\n\fAnomaly Score\n\nAnomaly Score\n\nx\n\nStochastic path\n\nDeterministic path\n\nDDPM Trajectory\nNormal\nAnomalous\n\n(a) Conventional reconstruction-based AD paradigm\n\nPF-ODE Trajectory\n\nNormal\nAnomalous\n\n(b) Our inversion-based AD paradigm\n\nFigure 2. Conceptual comparison of conventional and our proposed AD paradigm. Conventional reconstruction-based paradigm (a) first\nperturbs an input sample \\protect \\mathbf  {x}_0 to a latent state \\protect \\mathbf  {x}_t at step t , and then denoises \\protect \\mathbf  {x}_t back to \\protect \\mathbf  {x}_0 . The anomaly score is computed as the mean\nsquared error (MSE) between the original input and its reconstructed sample. In contrast, our inversion-based paradigm (b) directly infers\nthe latent state at the final step, \\protect \\mathbf  {x}_T , by tracing the PF-ODE trajectories. The anomaly score is then determined based on the typicality of\n\\protect \\mathbf  {x}_T within the tractable latent distribution.\n\nperturbation process (forward process). In general, each\ntransition of the forward process is defined as:\n  q\\bigl (\\mathbf {x}_t \\mid \\mathbf {x}_{t-1}\\bigr ) &amp;:= \\mathcal {N}\\!\\Bigl ( \\sqrt {\\frac {\\alpha _t}{\\alpha _{t-1}}}\\,\\mathbf {x}_{t-1}, \\bigl (1 - \\frac {\\alpha _t}{\\alpha _{t-1}}\\bigr )\\mathbf {I} \\Bigr ), \\label {eq:forward_process}\n\n(DDIM), allowing for faster sampling by leveraging a subset of the original diffusion process [24]. Specifically, they\nreformulate the reverse process as follows:\n\n(1)\n\nwhere the monotonically decreasing sequence\n\\alpha _{1:T} \\in (0, 1]^T\nschedules the noise intensity. The sampling procedure can then be achieved with a reverse process, which\ndefines a Markov process with a Gaussian transition kernel:\n\n(4)\n\u0001 √\nwhere fθ (xτi ) = xτi −\nxτi / ατi and\nτS = [τ1 , τ2 , . . . , τS = T ] ⊂ {1, 2, . . . , T }. This deterministic sampling equation can be interpreted as the Euler\nintegration of the corresponding PF-ODE:\n√\n\n(τ )\n1 − ατi ϵθ i\n\n  \\mathrm {d}\\mathbf {y}_t = \\epsilon _\\theta ^{(t)} \\,\\mathrm {d}p_t, \\label {eq:ddim_ode} \n\n(5)\n\n  p_\\theta (\\mathbf {x}_{t-1} \\mid \\mathbf {x}_t) := \\mathcal {N}\\bigl (\\mathbf {x}_{t-1}; \\boldsymbol {\\mu }_\\theta ^{(t)}(\\mathbf {x}_t), \\bigl (1 - \\frac {\\alpha _t}{\\alpha _{t-1}}\\bigr )\\mathbf {I}\\bigr ), \\label {eq:generative_process2} (2)\nwhere θ denotes the learnable parameter of the DDPM. The\ntraining is realized by minimizing the ϵ-prediction loss:\n  \\mathcal {L}_\\gamma \\left (\\epsilon _\\theta \\right ) \\coloneqq \\sum _{t=1}^T \\gamma _t \\mathbb {E}_{\\mathbf {x}_0 \\sim q\\left (\\mathbf {x}_0\\right ), \\epsilon _t \\sim \\mathcal {N}(\\mathbf {0}, \\mathbf {I})}\\left [\\left \\|\\epsilon _\\theta ^{(t)}(\\mathbf {x}_t)-\\epsilon _t\\right \\|_2^2\\right ], \\label {eq:diffusion_objective2} \n(3)\nwhere xt is efficiently sampled from qt (xt | x0 ) =\n√\nN (xt ; αt x0 , (1 − αt )I), and γ := [γ1 , . . . , γT ]T denotes\nthe weighting vector. During sampling, one can first sample a pure noise from pθ (xT ) ≈ N (0, I), and then progressively trace Equation (2) for denoising.\n\n2.2. Denoising Diffusion Implicit Models\nThe Gaussian approximation in Equation (2) generally\nworks satisfactorily when the total number of diffusion\nsteps, T , is sufficiently large [10]. However, increasing T\nalso magnifies the number of function evaluations (NFE),\nwhich slows down the sampling procedure. To address this,\nSong et al. introduced denoising diffusion implicit models\n\nwhere \\protect \\mathbf  {y}_t \\coloneqq \\mathbf {x}_t/\\sqrt {\\alpha _t} and p_t \\coloneqq \\sqrt {1/{\\alpha _t} - 1}. The PF-ODE\ngradually transforms a noise distribution into a data distribution, and vice versa. This approach, known as inversion,\nmaps a given data sample back to its noise representation.\n\n2.3. Diffusion-Based Anomaly Detection\nThe above diffusion-based generative models have been recently employed to handle AD. Existing diffusion-based\nAD methods generally follow the reconstruction-based\nparadigm. In particular, to address the challenge of noise\nlevel selection inherent in this framework, these approaches\ncan be broadly classified into the following three categories:\n• Conditional information injection-based methods incorporate auxiliary information, such as class labels [5], semantic features [5, 17, 21], or unmasked regions [7, 9,\n25]. As pointed out in [17], conditioning the denosing\nprocess with such additional information contributes to\nreducing reconstruction error in the normal region and increasing it for anomalous regions. However, since this\nline of methods conditions the diffusion model at training\ntime, they can lead to increased training complexity.\n\n\f• Discriminator-based methods introduce an additional discriminator, typically trained to distinguish between normal and anomalous pixels [13, 16]. While this line\nof methods enables efficiency, they rely on pseudoanomalies, biasing AD towards specific anomaly types.\n• Adaptive timesteps-based methods attempt to adjust or\nidentify perturbation timesteps by comparing the reconstruction errors of denoised results across different time\nsteps [14]. As the above two types of methods do not\nincorporate an explicit mechanism for adjusting the perturbation time step, it is typically treated as a hyperparameter or addressed via ensembling over multiple time steps\n[15]. See the 5th column in Table 1 for more details.\nIn contrast to the state-of-the-art non-diffusion method\n[4] that achieves over 200 FPS, current diffusion-based\nmethods mostly reach 1 FPS on average. While a recent\ndiffusion-based approach [7] tackles this by introducing\nscore distillation to constrain the diffusion iteration to only\none step, the training for distillation can be complicated due\nto the instability of the adversarial learning. Table 1 summarizes the properties of current diffusion-based AD methods. Overall, a simple, efficient, yet effective paradigm for\ndiffusion-based AD remains unexplored to date.\n\n3. Methodology\nTo address the limitations of current diffusion-based methods, we introduce a novel diffusion-based AD framework\nwith latent inversion, where the sampling trajectory is recontrast to conventional\nformulated as \\protect \\mathbf  {x}_0 \\rightarrow \\mathbf {x}_T . In \\protect \\bigl  (\\mathbf {x}_0 \\rightarrow \\mathbf {x}_t \\rightarrow \\hat {\\mathbf {x}}_0\\bigr )\nreconstruction-based approaches\n, our\nmethod infers the final latent state \\protect \\mathbf  {x}_T directly from \\protect \\mathbf  {x}_0 by\nfollowing the learned PF-ODE trajectory. Figure 2(b) illustrates our reconstruction-free AD paradigm, which leverages latent inversion to achieve efficient yet accurate AD.\n\n3.1. Inversion-Based Anomaly Detection\nGiven an image \\protect \\mathbf  {x} and a score function \\epsilon _\\theta ^{(t)} trained using\nEquation (3), our goal is to infer the latent representation\n\\protect \\mathbf  {x}_T corresponding to \\protect \\mathbf  {x} by tracing the PF-ODE trajectory. In\nthis work, we employ the PF-ODE derived from the DDIM\nframework [24], as shown in Equation (5). By applying\nan Euler approximation to Equation (5) and integrating forward, we obtain the following discrete update equation for\nlatent inversion:\n  \\mathbf {x}_{t+1} &amp;= \\sqrt {\\alpha _{t+1}} f_\\theta (\\mathbf {x}_t) + \\sqrt {1-\\alpha _{t+1}}\\,\\epsilon _\\theta ^{(t)}\\bigl (\\mathbf {x}_t\\bigr ). \\label {eq:ddim_inversion1}\n\n(6)\n\nHowever, directly deriving xT with Equation (6) involves\n(t)\niterative computation of ϵθ for T times, leading to slower\ninference. Here, we propose to only use the partial process of the original diffusion process in Equation (1). Given\nthe discrete timestep set {1, 2, . . . , T }, we prepare a monotonically increasing subset τS = [τ1 , τ2 , . . . , τS = T ] ⊂\n\n{1, 2, . . . , T }, where S ∈ {1, 2, . . . , T } is the number of the\npartial process. The inversion modeling can thus be accelerated by simply noising the test image with fewer timesteps\nstored in τS , which is given by:\n  \\mathbf {x}_{\\tau _{i+1}} &amp;= \\sqrt {\\alpha _{\\tau _{i+1}}} f_\\theta (\\mathbf {x}_{\\tau _{i}}) + \\sqrt {1-\\alpha _{\\tau _{i+1}}}\\,\\epsilon _\\theta ^{(\\tau _{i})}\\bigl (\\mathbf {x}_{\\tau _{i}}\\bigr ). \\label {eq:ddim_inversion2}\n\n(7)\n\nIntuitively, Equation (7) leads to a considerable speed-up\nfor the inference stage when T ≫ S. Nevertheless, it also\ninevitably sacrifices approximation precision as the step interval for the Euler integration is extended. Recall here that\nour goal is to resolve AD rather than pursue accurate pixelwise reconstruction. As such, we argue that high AD performance does not necessarily require reconstruction precision. It should be noticed that, even with limited inversion\nsteps, the inversion mechanism in projecting an anomaly\npixel can nonetheless yield sufficiently low typicality. In\nthis regard, despite the poorly reconstructed samples, an\nanomaly pixel can still be expectedly mapped to a lowdensity region within the noise prior to achieve high detection performance. This insight suggests that our inversionbased AD method is free from the accuracy-efficiency\ntrade-off in conventional reconstruction-based methods. We\nnext need to find an ideal space that best suits our diffusionbased AD modeling. See Supp. Mat. for more detailed\nderivations of inversion.\n\n3.2. Diffusion Modeling in Feature Space\nCurrent image AD methods [3, 4, 17, 26] heavily rely on\npre-trained networks, referred to as backbones, that are\ntrained on large-scale datasets such as ImageNet [27]. In\ndiffusion-based AD, these backbones are used to compare\nthe original image with its reconstructed counterpart in feature space [5, 15, 17]. Because backbone features exhibit invariance to low-level variations (e.g., noise or lighting conditions), they can significantly enhance AD performance.\nHowever, in our inversion-based approach, the inferred\nlatent xT follows a standard Gaussian distribution, not the\ndata distribution. To nonetheless utilize backbone models,\nwe design our method to follow the latent-diffusion manner by extracting the feature z via z = gϕ (x) ∈ RC×h×w ,\nwhere gϕ (·) denotes the backbone model, and C, (h, w)\nmean the feature map dimension and resolutions, respectively. This feature-space diffusion modeling enables our\ninference stage to refer to high-level semantics, rather than\nlow-level pixel patterns. Also, such a latent-diffusion-based\nframework leads to further inference efficiency.\n\n3.3. Anomaly Score Calculation\nOnce we obtain the latent representation \\protect \\mathbf  {z}_T \\in \\mathbb {R}^{C \\times h \\times w} for\nfeatures of a given test sample \\protect \\mathbf  {x}, the most straightforward\nway to compute the anomaly score is via the log-likelihood\nunder the latent Gaussian distribution. However, it often\n\n\fAlgorithm 1 Inference with InvAD\n(t)\nϵθ , gϕ , x0 ∈ R3×H×W , τS = [τ1 , . . . , τS ], α1:T\nH×W\n\nEnsure:\nRequire: Anomaly score s, Anomaly map A ∈ R\n1: /* DDIM Inversion */\n2: Initialize z ← gϕ (x0 ) ∈ RC×h×w\n3: for i = 0 to S − 1 do\n4:\nUpdate z with Equation 7\n5:\nif i = S − 1 then\n6:\nbreak\n7:\nend if\n8: end for\n9: /* Anomaly scoring */\n10: Initialize A ← 0 ∈ Rh×w\n11: for u ∈ {0, . . . , h − 1}, v ∈ {0, . . . , w − 1} do\n12:\nUpdate A[u, v] with Equation 8\n13: end for\n14: Upsample A ∈ Rh×w to RH×W\nP\n15: s ← max(A) − min(A) +\nu,v A[u, v]\n16: return (s, A)\n\n4.2. Evaluation Metrics\nFollowing [7], we employ Area Under the Receiver Operating Characteristic Curve (AU-ROC), Average Precision\n(AP), F1-score max (F1 max) for both image- and pixellevel AD evaluation. We also adopt the Area Under the PerRegion-Overlap (AU-PRO) [28] metric to examine pixellevel anomaly localization. The Frames Per Second (FPS)\nmetric is further applied to study the efficiency of inference.\n\n4.3. Implementations\n\ntriggers the known reverse-scoring problem and fails to capture small anomalies (See Supp. Mat.). Given that anomalies are inherently sparse in images, we additionally propose a norm-based image-level anomaly scoring approach.\nSpecifically, we compute the Euclidean norm over all channels C for each pixel (i, j) in \\protect \\mathbf  {z}_T , which is written as:\n  \\mathbf {z}_T^{\\text {normed }}[i, j]=\\| \\mathbf {z}_T[:, i, j]\\|_2 \\quad . \\label {eq:scoring_norm} \n\nindustrial images. We also experiment on the BMAD [31]\nbenchmark (with six reorganized datasets) to study the effectiveness of InvAD on the medical AD domain. Since\neach benchmark provides both image- and pixel-level annotations, we can evaluate performance in terms of overall AD\n(image-level) as well as precise localization (pixel-level).\nSee Supp. Mat. for a detailed description of these datasets.\n\n(8)\n\nDifferent from [5], for the image-level anomaly score, we\ncompute the difference between the maximum and minimum values of \\protect \\mathbf  {z}_T^{\\text {normed}}\n. This is motivated by the observation\nthat, even if an image is anomalous, anomalies are often\nlocally and sparsely distributed within small regions, and\nthe majority of image regions remain normal. In essence,\nour scheme for image-level anomaly scoring examines the\ndifference between the highest- and the lowest-norm pixels\nto mitigate the influence of outliers, thereby alleviating the\nreverse-scoring issue. The pixel-level anomaly score A is\nsimply produced by extending \\protect \\mathbf  {z}_T^{\\text {normed}} \\in \\mathbb {R}^{h \\times w} to match the\ndesired output resolution (H, W) via bilinear interpolation.\nOur proposed InvAD paradigm is summarized in Algorithm 1. It is efficient yet effective, and can be applied\nin a plug-and-play manner for existing diffusion-based AD\nmodels, as it is devised only for the inference stage.\n\n4. Experiments\n4.1. Datasets\nWe use three widely-used unsupervised AD benchmarks—MVTecAD [28], VisA [29], MPDD [30]—all designed for measuring real-world AD performance on RGB\n\nTo assess the effectiveness of the proposed method, we begin by training a Diffusion Transformer (DiT)-based diffusion model [32] from scratch on each dataset with Equation (3), where we set \\gamma = \\mathbf {1} as DDPM [10]. To ensure\nfair comparisons, we employ the pre-trained EfficientNetB4 [33] model on ImageNet-1k [27] to encode the images\ninto feature space as OmiAD [7] and HVQ-Trans [34]. We\ntrain the diffusion model for 300 epochs across all datasets\nusing the AdamW optimizer [35]. The total diffusion step\nT is set to 1000 during training using a linear noise schedule. For all experiments, we uniformly set S = 3 to skip\nintermediate steps within the original T steps, and create\nthe subset \\tau _3 = [333, 666, 999] to acclerate inversion compuatation. We conduct all throughput measurements on an\nNVIDIA RTX 4090 (24GB) with batch size set to 64. See\nSupp. Mat. for more details.\n\n4.4. Comparison with SOTA AD Methods\nWe compare the quantitative results against prior\nmulti-class AD competitors, including (i) Transformerbased methods (HVQ-Trans [34], UniAD [36]), (ii)\nreconstruction-based methods (RD4AD [37], DeSTSeg\n[38], SimpleNet [39]), (iii) diffusion-based methods (DiAD\n[5], OmiAD [7], MDM [7]). The results are summarized\nin Table 2. It can be seen that our method generally yields\nthe best image-level and highly competitive pixel-level\ndetection performance on three datasets. Notably, our\nmethod consistently outperforms all the compared methods\nregarding inference efficiency by a large margin (i.e., FPS:\n88.1 v.s. 39.4 on MVTecAD). This can be attributed to the\nproperty of our proposed inversion-based AD paradigm,\nwhich enables high detection accuracy with fewer NFEs\nfor acceleration. By contrast, conventional diffusion-based\nmethods, such as DiAD [5], require VAE decoding for\nreconstruction in the pixel space, thus resulting in slower\n\n\fTable 2. Quantitative results on different AD datasets under the multi-class setting. The best and the second-best results are highlighted\nin bold and underlined, respectively. For each row, the mAD averages the evaluation over all image- and pixel-level metrics (i.e., the 3rd to\nthe 9th column). FPS measures the detection efficiency.\nDataset\n\nMethod\n\nImage-level\n\nPixel-level\n\nmAD\n\nFPS\n\nAU-ROC\n\nAP\n\nF1 max\n\nAU-ROC\n\nAP\n\nF1 max\n\nAU-PRO\n\nRD4AD [CVPR’22]\nUniAD [NeurIPS’22]\nSimpleNet [CVPR’23]\nDeSTSeg [CVPR’23]\nDiAD [AAAI’24]\nHVQ-Trans [NeurIPS’23]\nMDM [ICML’25]\nOmiAD [ICML’25]\nInvAD (Ours)\n\n94.6\n96.5\n95.3\n89.2\n97.2\n98.0\n87.2\n98.8\n99.0\n\n96.5\n98.8\n98.4\n95.5\n99.0\n99.5\n94.2\n99.7\n99.6\n\n95.2\n96.2\n95.8\n91.6\n96.5\n97.5\n91.0\n98.5\n98.5\n\n96.1\n96.8\n96.9\n93.1\n96.8\n97.3\n94.8\n97.7\n97.5\n\n48.6\n43.4\n45.9\n54.3\n52.6\n48.2\n39.5\n52.6\n46.5\n\n53.8\n49.5\n49.7\n50.9\n55.5\n53.3\n44.8\n56.7\n52.3\n\n91.1\n90.7\n86.5\n64.8\n90.7\n91.4\n88.0\n93.2\n92.7\n\n82.3\n81.7\n81.2\n77.1\n84.0\n83.6\n77.1\n85.3\n83.7\n\n4.8\n5.3\nN/A\nN/A\n0.1\n5.6\n1.9\n39.4\n88.1\n\nVisA\n\nRD4AD [CVPR’22]\nUniAD [NeurIPS’22]\nSimpleNet [CVPR’23]\nDeSTSeg [CVPR’23]\nDiAD [AAAI’24]\nHVQ-Trans [NeurIPS’23]\nOmiAD [ICML’25]\nInvAD (Ours)\n\n92.4\n88.8\n87.2\n88.9\n86.8\n93.2\n95.3\n96.9\n\n92.4\n90.8\n87.0\n89.0\n88.3\n92.8\n96.0\n97.2\n\n89.6\n85.8\n81.8\n85.2\n85.1\n87.6\n91.2\n93.7\n\n98.1\n98.3\n96.8\n96.1\n96.0\n98.7\n98.9\n99.1\n\n38.0\n33.7\n34.7\n39.6\n26.1\n35.0\n40.4\n39.2\n\n42.6\n39.0\n37.8\n43.4\n33.0\n39.6\n44.1\n43.1\n\n91.8\n85.5\n81.4\n67.4\n75.2\n86.3\n89.2\n92.9\n\n77.8\n74.6\n72.4\n72.8\n70.1\n76.2\n79.3\n80.3\n\n4.9\n4.6\nN/A\nN/A\n0.1\n5.0\n35.3\n74.1\n\nMPDD\n\nRD4AD [CVPR’22]\nUniAD [NeurIPS’22]\nSimpleNet [CVPR’23]\nDeSTSeg [CVPR’23]\nDiAD [AAAI’24]\nHVQ-Trans [NeurIPS’23]\nOmiAD [ICML’25]\nInvAD (Ours)\n\n84.1\n82.2\n90.6\n93.0\n74.6\n86.5\n93.7\n96.5\n\n83.2\n87.1\n94.1\n95.1\n82.1\n88.1\n95.5\n96.5\n\n84.1\n85.1\n89.7\n90.6\n82.5\n85.8\n90.9\n94.4\n\n98.1\n95.1\n97.1\n94.1\n93.0\n96.7\n98.6\n98.3\n\n35.2\n18.9\n33.6\n33.2\n15.9\n27.6\n37.6\n40.1\n\n38.7\n25.0\n35.7\n37.6\n21.2\n31.4\n42.3\n43.9\n\n93.4\n81.9\n90.0\n59.8\n78.4\n86.9\n94.0\n91.2\n\n73.8\n67.9\n75.8\n71.9\n64.0\n71.9\n78.9\n80.1\n\n4.7\n5.8\nN/A\nN/A\n0.1\n6.2\n49.8\n120\n\nMVTecAD\n\nTable 3. Quantitative results on BMAD under the single-class setting, where we report image-level AU-ROC (det.), pixel-level AU-ROC\n(loc.), and FPS. The best and the second-best results are highlighted in bold and underlined, respectively. For each row, the mAD averages\nthe evaluation over all image- and pixel-level metrics. FPS measures the detection efficiency on the RESC dataset.\nMethods\n\nBraTS2021\n\nBTCV + LiTS\n\nRESC\n\nOCT2017\n\nRSNA\n\nCamelyon16\n\ndet.\n\nloc.\n\ndet.\n\nloc.\n\ndet.\n\nPaDiM [ICPR’20]\nCFlow [CVPR’20]\nRD4AD [CVPR’22]\nPatchCore [CVPR’22]\nSimpleNet [CVPR’23]\n\n79.0\n74.8\n89.5\n91.7\n82.5\n\n94.4\n93.8\n96.5\n97.0\n94.8\n\n50.8\n50.8\n60.4\n60.3\n72.3\n\n90.9\n92.4\n96.0\n96.4\n97.5\n\nInvAD (Ours)\n\n90.3\n\n97.8\n\n60.6\n\n97.8\n\nloc.\n\ndet.\n\ndet.\n\ndet.\n\n75.9\n75.0\n87.8\n91.6\n76.2\n\n91.4\n93.8\n96.2\n96.5\n77.1\n\n91.8\n85.4\n97.3\n98.6\n94.7\n\n77.5\n71.5\n67.6\n76.1\n69.1\n\n93.6\n\n96.5\n\n99.0\n\n82.7\n\ninference. It is noteworthy that our method is also faster\nthan OmiAD whose NFE is 1, which is primarily due to\nthe heavy diffusion backbone and its modeling strategy in\nhigh-resolution feature space.\nThe results against diffusion-based AD models on\nsingle-class MVTecAD are displayed in Figure 1. Similarly\n\nmAD\n\nFPS\n\n67.3\n55.7\n66.8\n69.3\n62.4\n\n79.9\n77.0\n84.2\n86.4\n80.7\n\n20\n15\n20\n20\n10\n\n67.7\n\n87.2\n\n88\n\nto the multi-class setting, InvAD yields substantially reduced inference latency with state-of-the-art performance,\nindicating the effectiveness of inversion modeling for AD.\nWe next evaluate on BMAD to study the effectiveness\nof our InvAD on the medical domain. Here, we compare\nagainst PaDiM [40], CFlow [41], RD4AD [37], PatchCore\n\n\fTable 4. Comparison of reconstruction-based approach (Recon.) against our inversion-based AD paradigm, under different total diffusion steps S and perturbation ratios r, in multi-class\nMVTecAD with image-level AU-ROC.\n\nTable 6. Component ablation on multi-class MVTecAD. FDM\ndenotes feature space diffusion models. S-Inv and M-Inv denote\nsingle- and multi-step inversion, resepectively.\nSetting\n\nRatio r\n\nTotal Diffusion Steps S\n5\n\n10\n\n50\n\n100\n\n1000\n\n10 %\n20 %\n40 %\n60 %\n80 %\n\nN/A\nN/A\n64.9\n64.9\n67.8\n\nN/A\n64.7\n75.0\n68.4\n67.8\n\n66.6\n97.9\n89.4\n87.1\n74.1\n\n97.7\n91.3\n98.0\n97.3\n91.8\n\n97.9\n98.2\n98.2\n97.8\n92.1\n\n98.0\n98.2\n98.2\n98.1\n93.9\n\nInversion (Ours)\n\n99.0\n\n98.9\n\n98.4\n\n96.0\n\n95.7\n\n95.4\n\nRecon.\n\n3\n\nTable 5. Generalizability evaluation of our method when incorporated into other diffusion-based AD approaches on MVTecAD\nwith image- and pixel-level AU-ROC, number of total parameters\n(#Params) and FPS.\nMethod\n\nMVTecAD\ndet.\n\nDiAD [AAAI’24]\n97.2\nDiAD + InvAD 98.2 (+1.0)\n\nFPS\n\nloc.\n96.8\n97.5(+0.7)\n\n0.1\n88.1(+88)\n\nMDM [ICML’25]\n91.9\n94.8\n2.2\nMDM + InvAD 98.2 (+6.3) 97.5 (+2.7) 63 (+60.8)\n\n[3], and SimpleNet [39]. We report image-level AU-ROC\n(det.), and pixel-level AU-ROC (loc.), if the ground-truth\nanomaly maps are provided. The results are presented in\nTable 3. It can be confirmed that InvAD achieves state-ofthe-art performance across diverse BMAD medical datasets\nwith a substantially improved inference efficiency. This further evidences the capacity and robustness of our method in\nhandling medical AD, other than industrial inspection.\n\n4.5. Is Inversion Effective?\nOur approach builds on the inversion modeling to realize\nreconstruction-free AD. To investigate the validity of this\ndesign, we vary two key parameters in reconstruction-based\nmethods, total diffusion steps S and perturbation timesteps\nt, to gain a deeper insight into the effect. In particular, instead of inspecting t directly, we study the ratio of r = t/S\nas it better captures the perturbation strength across different S. The results are summarized in Table 4, where we\nonly modify the inference stage to examine the accuracy\n(i.e., image-level AU-ROC) change. It can be confirmed\nthat for reconstruction-based methods, the parameter tuning efforts can be highly burdensome to yield ideal performance. While a larger S tends to perform better, it induces\ncomputationally expensive denoising iterations.\nBy contrast, our inversion-based method can achieve the\n\nA1\nA2\nA3\nA4 (Ours)\n\nFDM\n\nS-Inv\n\nM-Inv\n\nmAD\n\n✓\n\n57.3\n44.9\n71.0\n83.7\n\n✓\n✓\n✓\n\n✓\n✓\n\nbest performance even with an extremely small inversion\nstep setting (e.g., S = 3, 5 in the bottom row of Table 4),\nwith no reliance on perturbation timesteps as it is not involved in our modeling. This further evidences the superiority of our InvAD for the task of image AD.\n\n4.6. Generalizability Evaluation\nAs our InvAD is designed for the inference stage, it can\nbe incorporated into existing diffusion-based AD models in\na plug-and-play manner. To evaluate the effectiveness, we\nincorporate InvAD into the inference stage for DiAD [5]\nand MDM [7], and report the image- and pixel-level AUROC and the FPS metrics on multi-class MVTecAD. It can\nbe seen from Table 5 that InvAD leads to an accuracy gain\nfor both methods with substantial inference acceleration. In\nparticular, since MDM learns to optimize the noise residual\nduring training, it suits better for our method, as reflected in\nthe remarkable improvement of accuracy. This suggests that\nInvAD is model-agnostic and can be inserted as a plug-andplay module into different diffusion-based AD techniques.\n\n4.7. Component Ablation\nOur framework consists of two components: (i) feature\nspace diffusion model (FDM), and (ii) multi-step inversion.\nTo individually validate the contribution, we evaluate the\nAD performance of each component as well as their combinations on the multi-class MVTecAD. Table 6 reports the\nresults of four scenarios (A1-A4). In the case of A1, we\nskip the inversion (lines 3-8 of Algorithm 1), then calculate the anomaly score as in [42]. This leads to a significantly degredation in AD performance compared with our\ncomplete framework (A4), highlighting the importance of\ninversion. Furthermore, for the FDM-free case of A2 (i.e.,\npixel-space diffusion), single-step inversion also degrades\naccuracy. Combining FDM and single-step inversion (A3)\nsubstantially improves AD accuracy, and multi-step inversion (A4) brings further accuracy gains.\n\n4.8. Backbone Design Ablation\nOur inversion-based method is considered in the pre-trained\nfeature space rather than pixel space. In general, the selection of feature extractors heavily impacts the performance of AD methods [5, 17, 46]. In Table 7, we evaluate\n\n\fViT-B [43]\nDINO-B [44]\nEfficientNet-B4 [33]\n\nMVTecAD\ndet.\n\nloc.\n\n94.2\n96.1\n99.0\n\n95.5\n97.7\n96.9\n\n# Params\n\nFPS\n\n1312M\n1312M\n1243M\n\n85.3\n85.3\n88.1\n\nGT\n\nMDM\n\nOurs\n\ncable\n\nAnomaly\n\npill\n\nModel\n\nNormal\n\nscrew\n\nTable 7. Design ablation of feature space encoding modules\non multi-class MVTecAD with image- and pixel-level AU-ROC,\nnumber of total parameters (#Params), and FPS.\n\nTable 8. Design ablation of diffusion architectures on multiclass MVTecAD with image- and pixel-level AU-ROC, and FPS.\nModel\n\nMLP [45]\nUNet [10]\nDiT-base [32]\nDiT-gigant [32]\n\nMVTecAD\ndet.\n\nloc.\n\n97.2\n98.0\n93.8\n99.0\n\n96.8\n97.3\n95.9\n97.5\n\n# Params\n\n351M\n1433M\n155M\n1223M\n\nFigure 3. Visualization of anomaly localization against MDM\n[7] on MVTecAD. GT displays the ground-truth anomaly map.\n\nFPS\n\n241\n288\n240\n88\n\nTable 9. Scoring scheme ablation under different total diffusion\nsteps S in multi-class MVTecAD with image-level AU-ROC.\nTotal Diffusion Steps S\n\n3\n\n5\n\n10\n\n50\n\n100\n\n1000\n\nNLL\nDiff\nNLL + Diff (Ours)\n\n96.1\n98.4\n99.0\n\n95.2\n98.1\n98.9\n\n93.0\n95.8\n98.4\n\n89.7\n83.2\n96.0\n\n89.4\n82.2\n95.7\n\n89.1\n82.0\n95.4\n\nthe performance with different backbones including ViT-B\n[43], DINO-B [44], and EfficientNet-B4 [33]. As expected,\nstronger backbones lead to better performance. It should be\nnoted that EfficientNet is a common backbone in diffusionbased AD [7, 8, 21]. We follow this standard choice for fair\ncomparisons, while contributing a novel inversion-based\nparadigm to jointly harvest accuracy and efficiency.\nAlso, we study the influence of the design of diffusion\nmodeling backbones on AD performance in Table 8. In particular, we compare four types of backbones: MLP, UNet,\nDiT-base, and DiT-gigant [32]. In contrast to the feature\nencoding modules, we observe that the performance is generally similar, even with the simple MLP implementation.\nThis suggests that our method is robust to diffusion architectures, but also relies on the quality of embeddings derived with feature extractors, as prior methods [3, 7]. See\nSupp. Mat. for a detailed description of backbones.\n\n4.9. Scoring Scheme Ablation\nAs explained in Section 3.3, our anomaly scoring scheme\nconsiders both negative-log-likelihood (NLL) in the noise\nprior and the spatial difference of Euclidean norm (Diff)\nto alleviate the reverse-scoring problem [47, 48]. To study\nthe advantage of this strategy, we compare the performance\n\nin Table 9 with the conventional NLL-based scoring on\nMVTecAD. It can be seen that our scoring scheme (i.e.,\nNLL + Diff) contributes to robustness to the diffusion step\nsetting S, while NLL or Diff solely do not achieve this. This\ndemonstrates that our scoring scheme plays a key role in\nthe proposed InvAD paradigm to realize reconstruction-free\nAD, where S can be set to be very small for efficiency.\n\n4.10. Visualization Analysis\nWe qualitatively evaluate in Figure 3 the pixel-level AD performance of InvAD against MDM [7]. Similar to the quantitative evaluation in Table 2, InvAD generally achieves more\nprecise anomaly localization with fewer false positives\nthan MDM, which again, demonstrates that our method\nimproves efficiency and accuracy while preserving interpretability for anomaly locations without reconstruction.\n\n5. Conclusion\nWe propose a simple yet effective diffusion-based AD\nparadigm, “detection via noising in latent space”, to address\nthe fundamental challenges within the conventional “detection via denoising in RGB space”. Our method, InvAD, is\nreconstruction-free and directly infers the final latent state\nwith the DDIM inversion mechanism. To pursue efficiency,\nwe simply enforce very few inversion steps to noise a test\nsample, yet manage to maintain high detection accuracy as\nthe typicality can still be accurately scored. Due to the\nreconstruction-free design, InvAD is inherently tuning-free\nfor the perturbation timestep. We experimentally demonstrate that InvAD achieves state-of-the-art detection performance, especially regarding inference efficiency.\nLimitation and Future Work. While our method can\nachieve satisfactory performance, it still needs more than\none NFE. To further improve efficiency (i.e., 1 NFE), we\nwill consider introducing diffusion distillation to compactly\ncompress the progressive inversion process into only one\nsingle step. Also, exploring improved or task-specific inversion mechanism is an interesting future direction.\n\n\f6. Acknowledgment\nThis work was supported by JSPS KAKENHI Grant\nNumber JP25H01110 and the TAKEUCHI research grant.\n\nReferences\n[1] J. Yang, S. Li, Z. Wang, H. Dong, J. Wang, and S. Tang. Using deep learning to detect defects in manufacturing: A comprehensive survey and current challenges. Materials (Basel),\n13(24):5755, December 2020. 1\n[2] Cosmin I. Bercea, Benedikt Wiestler, Daniel Rueckert, and\nJulia A. Schnabel. Generalizing unsupervised anomaly detection: Towards unbiased pathology screening. In MIDL,\n2023. 1\n[3] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard\nSchölkopf, Thomas Brox, and Peter Gehler. Towards total\nrecall in industrial anomaly detection. In CVPR, 2021. 1, 4,\n7, 8\n[4] Kilian Batzner, Lars Heckler, and Rebecca König. EfficientAD: Accurate visual anomaly detection at millisecond-level\nlatencies. In WACV, 2023. 1, 4\n[5] 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 AAAI, pages 8472–8480, March 2024. 1, 3, 4,\n5, 7, 2\n[6] Matic Fučka, Vitjan Zavrtanik, and Danijel Skočaj. TransFusion: A transparency-based diffusion model for anomaly\ndetection. In ECCV, pages 91–108, Cham, 2024. Springer\nNature Switzerland.\n[7] Yaoxuan Feng, Wenchao Chen, Yuxin Li, Bo Chen, Yubiao Wang, Zixuan Zhao, Hongwei Liu, and Mingyuan\nZhou. OmiAD: One-step adaptive masked diffusion model\nfor multi-class anomaly detection via adversarial distillation.\nIn ICML, 2025. To appear. 3, 4, 5, 7, 8, 1\n[8] Farzad Beizaee, Gregory A. Lodygensky, Christian\nDesrosiers, and Jose Dolz. Correcting deviations from\nnormality: A reformulated diffusion model for multiclass unsupervised anomaly detection. In CVPR, pages\n19088–19097, 2025. 1, 8\n[9] Farzad Beizaee, Gregory Lodygensky, Christian Desrosiers,\nand Jose Dolz. MAD-AD: Masked diffusion for unsupervised brain anomaly detection. In IPMI, pages 139–153.\nSpringer, 2025. 1, 3\n[10] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. 2020. 1, 2, 3, 5, 8\n[11] Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised\nlearning using nonequilibrium thermodynamics. In ICML,\n2015.\n[12] Prafulla Dhariwal and Alexander Quinn Nichol. Diffusion\nmodels beat GANs on image synthesis. 2021. 1\n[13] Xinyi Zhang, Naiqi Li, Jiawei Li, Tao Dai, Yong Jiang, and\nShu-Tao Xia. Unsupervised surface anomaly detection with\ndiffusion probabilistic model. In ICCV, pages 6759–6768,\n2023. 1, 4\n\n[14] Hang Yao, Ming Liu, Haolin Wang, Zhicun Yin, Zifei Yan,\nXiaopeng Hong, and Wangmeng Zuo. Glad: Towards better reconstruction with global and local adaptive diffusion\nmodels for unsupervised anomaly detection. arXiv preprint\narXiv:2406.07487, 2024. 2, 4\n[15] Fanbin Lu, Xufeng Yao, Chi-Wing Fu, and Jiaya Jia. Removing anomalies as noises for industrial defect localization. In\nICCV, pages 16120–16129, October 2023. 2, 4\n[16] Hui Zhang, Zheng Wang, Zuxuan Wu, and Yu-Gang Jiang.\nDiffusionad: Norm-guided one-step denoising diffusion for\nanomaly detection. arXiv preprint arXiv:2303.08730, 2023.\n4\n[17] Arian Mousakhan, Thomas Brox, and Jawad Tayyub.\nAnomaly detection with conditioned denoising diffusion\nmodels. arXiv preprint arXiv:2305.15956, 2023. 3, 4, 7\n[18] Julian Wyatt, Adam Leach, Sebastian M. Schmon, and\nChris G. Willcocks. AnoDDPM: Anomaly detection with denoising diffusion probabilistic models using simplex noise.\nIn CVPRW, pages 649–655, 2022.\n[19] Yapeng Teng, Haoyang Li, Fuzhen Cai, Ming Shao, and\nSiyu Xia. Unsupervised visual anomaly detection with scorebased generative model, 2023. 2\n[20] Victor Livernoche, Vineet Jain, Yashar Hezaveh, and Siamak\nRavanbakhsh. On diffusion modeling for anomaly detection.\nIn ICLR, 2024.\n[21] Yuxin Li, Yaoxuan Feng, Bo Chen, Wenchao Chen, Yubiao\nWang, Xinyue Hu, Baolin Sun, Chunhui Qu, and Mingyuan\nZhou. Vague prototype-oriented diffusion model for multiclass anomaly detection. In ICML, 2024. 1, 3, 8\n[22] Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based\ngenerative modeling through stochastic differential equations. In ICLR, 2021. 2\n[23] Alvin Heng, Alexandre H. Thiery, and Harold Soh. Out-ofdistribution detection with a single unconditional diffusion\nmodel. volume 37, pages 43952–43974, 2024. 2\n[24] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In ICLR, 2021. 3, 4\n[25] Rui Xu, Yunke Wang, and Bo Du. MAEDiff: Masked\nautoencoder-enhanced diffusion models for unsupervised\nanomaly detection in brain images.\narXiv preprint\narXiv:2401.10561, 2024. 3\n[26] Taegeon Um, Byungsoo Oh, Byeongchan Seo, Minhyeok\nKweun, Goeun Kim, and Woo-Yeon Lee. FastFlow: Accelerating deep learning model training with smart offloading\nof input data pipeline. PVLDB, 16(5):1086–1099, January\n2023. 4\n[27] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li,\nand Li Fei-Fei. ImageNet: A large-scale hierarchical image\ndatabase. In CVPR, pages 248–255, 2009. 4, 5\n[28] Paul Bergmann, Michael Fauser, David Sattlegger, and\nCarsten Steger. MVTec AD: A comprehensive real-world\ndataset for unsupervised anomaly detection. In CVPR, pages\n9584–9592, 2019. 5, 1, 2\n[29] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang,\nand Onkar Dabeer. SPot-the-Difference self-supervised pretraining for anomaly detection and segmentation. In ECCV,\n2022. 5, 1\n\n\f[30] Stepan Jezek, Martin Jonak, Radim Burget, Pavel Dvorak,\nand Milos Skotak. Deep learning-based defect detection of\nmetal parts: Evaluating current methods in complex conditions. In ICUMT, pages 66–71, 2021. 5, 1\n[31] Jinan Bao, Hanshi Sun, Hanqiu Deng, Yinsheng He, Zhaoxiang Zhang, and Xingyu Li. BMAD: Benchmarks for medical\nanomaly detection. In CVPRW, pages 4042–4053, 2024. 5,\n1\n[32] William Peebles and Saining Xie. Scalable diffusion models\nwith transformers. In ICCV, pages 4172–4182, 2023. 5, 8, 1\n[33] Mingxing Tan and Quoc V. Le. EfficientNet: Rethinking\nmodel scaling for convolutional neural networks. In ICML,\npages 6105–6114, 2019. 5, 8, 1\n[34] Ruiying Lu, YuJie Wu, Long Tian, Dongsheng Wang,\nBo Chen, Xiyang Liu, and Ruimin Hu. Hierarchical vector\nquantized transformer for multi-class unsupervised anomaly\ndetection. pages 8487–8500, December 2023. 5, 1\n[35] Ilya Loshchilov and Frank Hutter. Decoupled weight decay\nregularization. In ICLR, 2019. 5\n[36] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu,\nYu Zheng, and Xinyi Le. A unified model for multi-class\nanomaly detection. volume 35, 2022. 5\n[37] Hanqiu Deng and Xingyu Li. Anomaly detection via reverse distillation from one-class embedding. In CVPR, pages\n9727–9736, 2022. 5, 6\n[38] Xuan Zhang, Shiyu Li, Xi Li, Ping Huang, Jiulong Shan,\nand Ting Chen. DeSTSeg: Segmentation guided denoising student-teacher for anomaly detection. In CVPR, pages\n3914–3923, 2023. 5\n[39] Zhikang Liu, Yiming Zhou, Yuansheng Xu, and Zilei Wang.\nSimpleNet: A simple network for image anomaly detection\nand localization. In CVPR, pages 20402–20411, 2023. 5, 7\n[40] Thomas Defard, Aleksandr Setkov, Angelique Loesch, and\nRomaric Audigier. PaDiM: A patch distribution modeling\nframework for anomaly detection and localization. In Pattern Recognition. ICPR International Workshops and Challenges, pages 475–489, Cham, 2021. Springer International\nPublishing. 6\n[41] Albert Pumarola, Stefan Popov, Francesc Moreno-Noguer,\nand Vittorio Ferrari. C-Flow: Conditional generative flow\nmodels for images and 3D point clouds. In CVPR, pages\n7946–7955, 2020. 6\n[42] Oliver Rippel, Patrick Mertens, and Dorit Merhof. Modeling\nthe distribution of normal data in pre-trained deep features\nfor anomaly detection. In ICPR, pages 6726–6733, 2021. 7\n[43] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov,\nDirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner,\nMostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is\nworth 16x16 words: Transformers for image recognition at\nscale. In ICLR, 2021. 8, 1\n[44] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou,\nJulien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In\nICCV, pages 9630–9640, 2021. 8, 1\n[45] Tianhong Li, Yonglong Tian, He Li, Mingyang Deng, and\nKaiming He. Autoregressive image generation without vector quantization. 2024. 8, 1\n\n[46] Xincheng Yao, Yan Luo, Zefeng Qian, and Chongyang\nZhang. ADPretrain: Advancing industrial anomaly detection via anomaly representation pretraining. 2025. 7\n[47] Eric T. Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan\nGörür, and Balaji Lakshminarayanan. Do deep generative\nmodels know what they don’t know? In ICLR, 2019. 8, 4\n[48] Genki Osada, Takahashi Tsubasa, Budrul Ahsan, and\nTakashi Nishide. Out-of-distribution detection with reconstruction error and typicality-based penalty. In WACV, January 2023. 8, 4\n[49] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer,\nJames Bradbury, Gregory Chanan, Trevor Killeen, Zeming\nLin, Natalia Gimelshein, Luca Antiga, Alban Desmaison,\nAndreas Köpf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner,\nLu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An imperative style, high-performance deep learning library. pages\n8024–8035, 2019. 2\n\n\fInvAD: Inversion-based Reconstruction-Free Anomaly Detection with\nDiffusion Models\nSupplementary Material\nThis document supplements our main paper, “InvAD:\nInversion-based Reconstruction-Free Anomaly Detection\nwith Diffusion Models”. The reference indices are consistent with those used in the main paper.\n\n7. Dataset Details\nWe utilize four publicly available anomaly detection (AD)\nbenchmarks for evaluation: MVTecAD [28], VisA [29],\nMPDD [30], and BMAD [31]. Table 10 summarizes the key\nstatistics of the datasets used in our experiments, including\nthe number of classes, domain, image resolution, and sample counts for training and testing. All of these datasets follow an unsupervised AD setting. In other words, the training set only consists of defect-free normal images, and the\ntest set consists of both normal and anomalous images.\n\n8. Implementation Details\nOur implementation is available at: https://github.\ncom/SkyShunsuke/InversionAD.\n\n8.1. Data Preparation\nWe resize all training images to 256×256 pixels and do\nnot apply any data augmentation. Image normalization is\nperformed using the ImageNet dataset’s channel-wise mean\n([0.485, 0.456, 0.406]) and standard deviation ([0.229,\n0.224, 0.225]).\n\n8.2. Model Setup\nWe adopt the original DiT architecture [32] as the backbone\nof our diffusion modeling, but remove all class-conditioning\nso that our method does not depend on class labels. This\ndesign allows DiT to be applied in scenarios where groundtruth annotations are unavailable or impractical (e.g., inspection of diverse products on a manufacturing line). We\nset the number of transformer blocks and embedding dimensions to 16 and 2048 for DiT-gigant, and to 8 and 1024\nfor DiT-base, respectively. For the UNet-based diffusion\nmodels evaluated in Table 8 (in the main paper), we follow\nthe architectural specifications of the original DDPM implementation [10], consistent with prior work [5, 8]. For\nthe MLP-based diffusion models, we stack multiple MLP\nblocks and apply AdaLN-Zero conditioning [32], as in\n[45]. We summarize all major hyperparameters for diffusion modeling in Table 11.\n\nTable 10. Dataset statistics used in our experiments. ‘Res.’ represents image resolution, where H = W . ‘N’ and ‘A’ denote the\nnumbers of normal and anomalous samples, respectively.\n\nClasses\nDomain\nRes.\nTrain (N)\nTest (N)\nTest (A)\n\nMVTecAD\n\nVisA\n\nMPDD\n\nBMAD\n\n15\nIndustrial\n1024\n2,629\n467\n1,258\n\n12\nIndustrial\n256\n8,659\n962\n1,200\n\n6\nMetal\n1024\n888\n176\n282\n\n6\nMedical\n1024\n52742\n4540\n22632\n\n8.3. Backbone Setup\nFor fair comparisons with previous works [7, 34], we employ pre-trained EfficientNet-B4 [33] as our feature extractor. To capture anomalies at different scales, we\nfirst extract feature maps from the 1st to the 4th blocks\nfrom EfficientNet-B4, and then apply bilinear interpolation followed by channel-wise concatenation, creating z ∈\nR272×16×16 , as in [7, 34].\nWe evaluate in Table 7 in the main paper the robustness of our method to the different feature space encoding modules: ViT-B [43] and DINO-base [44]. Both modules employ the vision transformer-based architecture and\nuse ImageNet-1k as the pre-training dataset. The only difference comes from the pre-training scheme (i.e., supervised for ViT-B [43], and self-distillation for DINO-base\n[44]). For both models, we extract patch tokens of the last\nblock and reorder them to construct feature maps, creating\nz ∈ R768×16×16 .\n\n8.4. Evaluation Pipeline\nWe evaluate AD performance at both image- and pixellevels using the following metrics:\n• Area Under the Receiver Operating Characteristic\nCurve (AU-ROC) provides an intuition on how well the\nmodel takes a trade-off between recall and precision in a\nthreshold-independent manner.\n• Average Precision (AP) conducts a more practical evaluation than AU-ROC, where the test set contains far fewer\nanomalous samples compared to normal ones.\n• Maximum F1-score (F1max ) measures the F1 score on\nthe best-performed threshold, which reflects actual performance on the real problem.\nTo assess pixel-level anomaly localization, we employ:\n• Area Under the Per-Region-Overlap Curve (AU-PRO)\n\n\fTable 11. Hyperparameters of diffusion modeling.\nParameter\n\nTable 13. Inversion schedule ablation under different total diffusion steps S in multi-class MVTecAD with mAD.\n\nValue\n\nDiffusion Settings\nTraining diffusion steps (T )\nInference diffusion steps (S)\nNoise scheduler\nParameterization\nNoise scale (σ)\n\n1000\n3\nLinear, β1 = 1 × 10−4 , βT = 0.02\nϵ-prediction\nFixed\n\nTraining Settings\nBatch size\nOptimizer\nGradient clipping threshold\nInitial learning rate\nPeak learning rate\nFinal learning rate\nLearning rate scheduler\nWarmup epochs\nTotal number of epochs\nWeight decay\n\n8\nAdamW\n1.0\n1 × 10−6\n5 × 10−5\n5 × 10−6\nWarmup + cosine decay\n40\n300\n0\n\nTable 12. Computing environment in our experiments.\nComponent\n\nTraining\n\nEvaluation\n\nCPU\nGPU\nRAM\nOS\n\nXeon 8468 ×2\nNVIDIA H200 ×8\n1.0 TiB (≈1024GB)\nRHEL 9.4 (Plow)\n\ni9-14900KF\nRTX 4090 (24GB)\n31 GB\nUbuntu 24.04.2 LTS\n\ncalculates the IoU between prediction and anomalous region, which is more robust to the small anomalies [28].\n\n8.5. Experimental Environment\nOur implementations are based on Pytorch-2.7.1 [49] and\nPython-3.10. We show the machine specification for the\ntraining and evaluation in our experiments in Table 12.\nTo ensure reproducibility, we fixed random seeds for all\nlibraries (NumPy, PyTorch, etc.) and disabled nondeterministic GPU operations if possible.\nIt is important to understand that we do not train any extra conditioning modules nor perform reconstruction, just\ntrain unconditional diffusion models in the standard way.\nThis leads to significant training time reduction (e.g., for\nMVTecAD training time, InvAD: 2.5h on 8×H200 @28\nGB/GPU— 2 × faster than DiAD [5]’s 5h). The use of 8×\nH200 is optional, not required. Specifically, training can be\nperformed on GPUs with more than 32 GB of memory for\nour largest models.\n\ng(u), u = t/T\n\nS=3\n\nS = 10\n\nS = 100\n\nUniform g(u) = u\nQuad g(u) = u2\nCube g(u) = u3\n5u\n−1\nExp g(u) = ee5 −1\n\n83.35\n82.37\n81.68\n81.48\n\n82.11\n80.76\n80.84\n80.85\n\n79.35\n79.14\n79.18\n79.23\n\nTable 14. Feature resolution ablation under different anomaly\nsizes in multi-class MVTecAD with mAD.\nh×w\n\nTiny\n\nSmall\n\nMedium\n\nLarge\n\nAll\n\n8×8\n16×16\n24×24\n\n73.38\n78.54\n76.33\n\n76.38\n80.65\n78.76\n\n79.17\n81.76\n80.00\n\n83.57\n84.94\n81.97\n\n82.05\n83.70\n81.44\n\n9. Addtional ablations\nInversion schedule. To accelerate inversion computation,\nwe uniformly set S = 3 to skip intermediate steps within the\noriginal T = 1000 steps, and create the subset of timesteps\nτ3 = [333, 666, 999] (i.e., uniform scheduler). We include\nan ablation by varying the scheduling policy g(u) for examining the impact of alternative schedules. The numerical\nresults are shown in Table 13. We can see that the accuracy\nacross all schedules is mostly consistent, with the uniform\nschedule performing best for S=3. We thus adopt this commonly used uniform schedule in our implementation.\nFeature resolutions. To utilize the high-level semantic\nfeatures of backbones, we follow the latent diffusion manner by extracting the feature maps z ∈ RC×h×w and operating diffusion modeling on z. While this contributes to the\nimprovements in both accuracy and inference speed, backbones may overly compress the anomalous information, especially for small h × w. In Table 14, we conduct a design\nablation on feature resolution (h×w) and report MVTecAD\nmAD by different anomaly sizes (anomalous pixel ratio) for\ninspecting optimal feature resolution. The default 16×16 is\nbest overall (83.70) and on Tiny/Small (78.54/80.65), exceeding both 8×8 and 24×24 settings. This suggests performance is not simply limited by upsampling, and increasing resolution is not monotonically beneficial; there is an\noptimal resolution–efficiency balance.\n\n10. Extended Background of Diffusion Models\n10.1. Denoising Diffusion Probabilistic Models\nDenoising diffusion probabilistic models (DDPM) [10] are\na class of latent generative models which involve progressively collapsed T random variables x1 , x2 , . . . , xT . Let us\nassume we have i.i.d. data samples X = {x0 | x0 ∼ q0 (x)}\n\n\fwhere q0 (x) is an unknown data distribution. DDPM aims\nto approximate this data distribution by tracing the data collapsing process (forward process) in reverse\norder. In gen\u0001\neral, the forward process q x1:T | x0 is represented as a\nMarkov process with the Gaussian transition kernel:\n  q\\bigl (\\mathbf {x}_{1:T} \\mid \\mathbf {x}_0\\bigr ) &amp;:= \\prod _{t=1}^T q\\bigl (\\mathbf {x}_t \\mid \\mathbf {x}_{t-1}\\bigr ), \\label {eq:sup_forward_process1} \\\\ \\text {where}\\quad q\\bigl (\\mathbf {x}_t \\mid \\mathbf {x}_{t-1}\\bigr ) &amp;:= \\mathcal {N}\\!\\Bigl ( \\sqrt {\\frac {\\alpha _t}{\\alpha _{t-1}}}\\,\\mathbf {x}_{t-1}, \\bigl (1 - \\frac {\\alpha _t}{\\alpha _{t-1}}\\bigr )\\mathbf {I} \\Bigr ). \\label {eq:sup_forward_process2}\n\n(10)\nThe noise schedule is defined by the monotonically decreasing sequences {αt }Tt=1 in the above equation. Notably,\nfrom the reproducibility of the Gaussian distribution, we\nhave:\n  q\\left (\\mathbf {x}_t \\mid \\mathbf {x}_0\\right ) = \\mathcal {N}\\left (\\mathbf {x}_t ; \\sqrt {\\alpha _t} \\mathbf {x}_0, \\left (1-\\alpha _t\\right ) \\mathbf {I}\\right ). \\label {eq:sup_q_prop}\n\n(11)\n\nSince we can efficiently compute latent variables xt given\na clean sample x0 , it provides a GPU-friendly diffusion\nmodel training. Also, we define the generative process\npθ (x0:T ) as the Markov process with a learnable Gaussian\ntransition kernel:\n  p_\\theta \\left (\\mathbf {x}_{0: T}\\right ) := p_\\theta \\left (\\mathbf {x}_T\\right ) \\prod _{t=1}^T p_\\theta ^{(t)}\\left (\\mathbf {x}_{t-1} \\mid \\mathbf {x}_t\\right ), \\label {eq:sup_gen_process2} \\\\ \\text {where} \\quad p_\\theta ^{(t)}(\\mathbf {x}_{t-1} \\mid \\mathbf {x}_t) := \\mathcal {N}\\bigl (\\mathbf {x}_{t-1}; \\boldsymbol {\\mu }_\\theta ^{(t)}(\\mathbf {x}_t), \\sigma _t^2 \\mathbf {I}\\bigr ). \\label {eq:sup_gen_process2}\n(13)\nIn DDPM, the posterior mean is modeled using a noise pre(t)\ndiction neural network ϵθ (xt ):\n  \\boldsymbol {\\mu }_\\theta ^{(t)}(\\mathbf {x}_t) = \\frac {\\sqrt {\\alpha _{t-1}}}{\\sqrt {\\alpha _{t}}}\\bigl (\\mathbf {x}_t - \\frac {1 - (\\alpha _t/\\alpha _{t-1})}{\\sqrt {1 - \\alpha _t}}\\epsilon _\\theta ^{(t)}(\\mathbf {x}_t) \\bigr ). (14)\n\nwhere {σt }Tt=1 controls the uncertainly of the diffusion trajectories. Since this posterior is designed to match q(xt |\nx0 ) as DDPM, the generative process can be trained with\nthe same objective described in Equation (15), for any\n{σt }Tt=1 . When σt → 0, the generative process becomes\ndeterministic and can be represented as:\n  \\mathbf {x}_{t-1}=\\sqrt {\\alpha _{t-1}}\\boldsymbol {f}_\\theta \\left (\\mathbf {x}_t, t\\right )+\\sqrt {1-\\alpha _{t-1}} \\epsilon _\\theta ^{(t)}(\\mathbf {x}_t), \\label {eq:sup_ddim_gen} \n\n(17)\n\n√\n√\n(t)\nwhere fθ (xt , t) = (xt − 1 − αt ϵθ (xt ))/ αt . For more\ndetailed proof and derivation of DDIM, see [24].\n\n10.3. Derivation of DDIM Inversion\nFrom Equation (17), we have:\n  \\mathbf {y}_{t-1} - \\mathbf {y}_t = (p_{t-1} - p_t)\\epsilon _\\theta ^{(t)}(\\mathbf {x}_t), \\label {eq:sup_ddim_de} \n\n(18)\n\nwhere \\protect \\mathbf  {y}_t \\coloneqq \\mathbf {x}_t/\\sqrt {\\alpha _t} and p_t \\coloneqq \\sqrt {1/{\\alpha _t} - 1}. In the limit\nof T → ∞, the above differential equation converges to a\ncontinuous-time ODE:\n  \\mathrm {d}\\mathbf {y}_t = \\epsilon _\\theta ^{(t)} \\,\\mathrm {d}p_t. \\label {eq:sup_ddim_ode} \n\n(19)\n\nBased on the ODE formulation of DDIM, we can derive Equation (17) by applying Euler integration to Equation (19) with the step size ∆p+\nt := pt−1 − pt (&gt; 0). Similarly, by applying the forward Euler method to the Equation (19) within the range [t − 1, t], we have:\n  \\mathbf {y}_{t} = \\mathbf {y}_{t-1} + \\Delta p_t^- \\epsilon _\\theta ^{(t-1)}(\\mathbf {x}_{t-1}), \\label {eq:sup_ddim_inversion1} \n\n(20)\n√\nwhere ∆p−\nt := pt − pt−1 . Next, replacing yt with xt / αt\nin Equation (20) yields:\n\nThe diffusion objective is expressed as:\n  \\mathbf {x}_{t} = \\sqrt {\\alpha _{t}}\\bigl ( \\frac {\\mathbf {x}_{t-1}}{\\sqrt {\\alpha _{t-1}}} + \\Delta p_t^- \\epsilon _\\theta ^{(t-1)}(\\mathbf {x}_{t-1})\\bigr ). \\label {eq:sup_ddim_inversion2} \n\n(21)\n\n  \\mathcal {L}_\\gamma \\left (\\epsilon _\\theta \\right ) \\coloneqq \\sum _{t=1}^T \\gamma _t \\mathbb {E}_{\\mathbf {x}_0 \\sim q\\left (\\mathbf {x}_0\\right ), \\epsilon _t \\sim \\mathcal {N}(\\mathbf {0}, \\mathbf {I})}\\left [\\left \\|\\epsilon _\\theta ^{(t)}(\\mathbf {x}_t)-\\epsilon _t\\right \\|_2^2\\right ], \\label {eq:sup_diff_objective} \n(15)\nwhere xt is efficiently sampled by Equation (11), and γ :=\n[γ1 , . . . , γT ]T denotes the weighting vector.\n\n10.2. Denoising Diffusion Implicit Models\nThe forward process in Equation (9) is a Markov process\nwhere the current state xt solely depends on the previous\nstate xt−1 . Denoising diffusion implicit models (DDIM)\n[24] is a non-Markov diffusion model where each forward\nprocess is conditioned on both x0 and xt−1 . Specifically,\nthe forward posterior is defined as:\n q_\\sigma \\left (\\mathbf {x}_{t-1} \\mid \\mathbf {x}_t, \\mathbf {x}_0\\right ) \\\\= \\mathcal {N}\\Biggl ( \\sqrt {\\alpha _{t-1}} \\mathbf {x}_0 + \\sqrt {1 - \\alpha _{t-1} - \\sigma _t^2} \\cdot \\frac {\\mathbf {x}_t - \\sqrt {\\alpha _t} \\mathbf {x}_0}{\\sqrt {1 - \\alpha _t}}, \\sigma _t^2 \\boldsymbol {I} \\Biggr ), \\label {eq:sup_ddim_posterior}\n\n(16)\n\nIt can be easily noticed that Equation Equation (21) is\nessentially equivalent to Equation (6). A similar discussion\napplies to the subset of timesteps τS = [τ1 , τ2 , . . . , τS =\nT ] ⊂ {1, 2, . . . , T } by considering arbitray time interval\n[τs , τs+1 ].\n\n11. Reverse Scoring Problem\nAs shown in Tables 4 and 9 (in the main paper), we observe a performance drop when the number of diffusion\nsteps  S  increases in conjunction with NLL-based anomaly\nscoring. To investigate the underlying cause of this phenomenon, we visualize the NLL distribution across different values of  S  in Figure 4. Interestingly, the histogram\nof NLL exhibits counterintuitive results: as  S  increases by\n500, normal images are assigned lower likelihoods, suggesting that learned normal samples occupy lower-density\nregions than anomalous ones. This observation aligns with\n\n\f(a) Histogram of normal and anomalous samples with NLL scoring.\n\n(b) Histogram of normal and anomalous samples with our NLL+Diff scoring.\n\nFigure 4. Comparison of the histogram of normal and anomalous samples, with the conventional NLL scoring (a) and our proposed\nNLL+Diff scoring (b), on the test set of hazelnut in MVTecAD.\n\nfindings in flow-based out-of-distribution (OOD) detection\nliterature [47, 48], where a similar tendency arises due to\nthe nature of high-dimensional data distributions. This is\nknown as the reverse-scoring issue, which is widely acknowledged in dealing with high-dimensional space.\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"