"<!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>AgentIAD: Agentic Industrial Anomaly Detection\nvia Adaptive Memory Augmentation\nJunwen Miao1⋆ , Penghui Du1,2⋆ , Yingying Fan3⋆ , Yi Liu2 , Yu Wang4 ,\nRunze He2 , Lida Huang1 , and Yan Wang1†\n\narXiv:2512.13671v2 [cs.CV] 14 Apr 2026\n\n1\n\nAIR, Tsinghua University 2 Etude AI 3 Stony Brook University\n4\nTsinghua University\nmiaojunwen9@gmail.com\nwangyan@air.tsinghua.edu.cn\n\nAbstract. Industrial anomaly detection (IAD) is challenging due to\nthe subtle and highly localized nature of many defects, which singlepass vision–language models (VLMs) often fail to capture. Moreover,\nexisting approaches lack mechanisms to actively acquire complementary\nevidence during inference. We propose AgentIAD, an agentic vision–\nlanguage framework that enables iterative industrial inspection through a\nunified action space. The agent dynamically accesses two forms of memory during inspection: visual memory via the Perceptive Zoomer\n(PZ) for fine-grained local analysis, and retrieved memory via the\nWeb Searcher (WS) and Comparative Retriever (CR) for external knowledge acquisition and cross-instance verification. This design allows the model to progressively gather evidence through multiround perception–action reasoning. To effectively learn such policies under sparse supervision, AgentIAD adopts a two-stage training strategy: tool-aware supervised fine-tuning first initializes structured reasoning and memory-access behaviors, followed by agentic reinforcement\nlearning to refine long-horizon decision policies. Extensive experiments\nshow that, under the same backbone, AgentIAD improves classification accuracy by 5.92% over the previous state-of-the-art method on\nthe MMAD benchmark while providing more reliable and interpretable\nanomaly analysis.\n\n1\n\nIntroduction\n\nIndustrial anomaly detection (IAD) plays a vital role in automated manufacturing, ensuring product reliability, reducing waste, and preventing safety risks.\nTraditional embedding-based [4,10,32] and reconstruction-based methods [12,43]\nhave demonstrated strong performance in detecting structural and textural defects. However, industrial inspection inherently suffers from the scarcity of defective samples, requiring models to generalize reliably to previously unseen\nanomalies. Moreover, defects are often subtle and highly localized within complex industrial scenes, making fine-grained anomaly identification particularly\nchallenging.\n⋆\n\nEqual contribution. † Corresponding author\n\n\f2\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\nIs the Macaroni normal or abnormal?\n\nNon-Tool Conversation\n\nIs the breakfast box normal or abnormal?\nNon-Tool Conversation\n\nThe surface looks smooth at a distance.\nNo obvious defects found. It is normal.\n\nThere are no visible structural anomalies\nlike dents or breakage. It is normal.\n\nVisual Memory Deficiency\n\nRetrieved Memory Deficiency\n\nTool Conversation\n\nTool Conversation\n\nAn initial look reveals a\ntiny bright spot on the bottomright piece of macaroni. It‘s too\nsmall to be certain. I will call\nPerceptive Zoomer to look closer.\n\nWhile the items are physically\nintact, the spatial arrangement\nseems imbalanced. I will call\nComparative Retriever to get the\nnormal reference standard.\n\nAfter zooming in, it is clearly an area\nof discoloration.It is confirmed that this\nbright, discolored spot does not exist on a\nnormal product. It is abnormal.\n\nComparing with the retrieved sample, it's clear\nthat the current tray lacks the required nuts,\nwhich violates the norm. It is abnormal.\n\nIs the brain MRI normal or abnormal?\nNon-Tool Conversation\nThe brain structure appears symmetrical.\nNo defect is identified. It is normal.\nRetrieved Memory Deficiency\n\nTool Conversation\n\nGiven the visual cues, I have limited\nknowledge to distinguish tumor. I will call\nWeb Searcher to access open-world medical\nknowledge.\nSearch results: Gliomas present as irregular,\nheterogeneous masses with infiltrative edges.\nSearch results confirm irregular, heterogeneous\nmasses are typical for gliomas.\nIt is abnormal.\n\nFig. 1: Comparison with Non-tool MLLMs. Non-tool MLLMs rely on a single\nglobal pass and often miss subtle defects (left). In contrast, AgentIAD performs iterative inspection through dynamic memory access (middle &amp; right): the Perceptive\nZoomer retrieves fine-grained visual memory to reveal subtle anomalies, while the\nComparative Retriever and Web Searcher access retrieved memory to verify abnormal\ncues and obtain external knowledge for unfamiliar anomaly types.\n\nRecently, Multimodal Large Language Models (MLLMs) [6, 14, 24, 26, 44, 46]\nhave significantly advanced industrial anomaly detection (IAD) by enhancing\nsemantic understanding and reasoning capabilities. However, most existing approaches still rely on a static single-pass inference paradigm, where the model\nprocesses a fixed image once and produces a final prediction without iterative\nperception or interaction with external knowledge sources. This design implicitly\nassumes that all relevant information required for anomaly analysis is available\nfrom the initial visual input and the model’s internal knowledge. As illustrated\nin Fig. 1, this assumption leads to two fundamental memory limitations: 1) Visual Memory Deficiency, where subtle defects may remain unnoticed when\nonly coarse visual representations are processed, and 2) Retrieved Memory\nDeficiency, where models cannot access external references or domain knowledge needed to interpret unfamiliar anomalies. These limitations suggest that\neffective IAD requires models capable of dynamically accessing and integrating\nmultiple forms of memory during inference.\nWe argue that inspiration for addressing these memory deficiencies can be\ndrawn from human quality inspectors. In practice, expert inspectors rely on multiple forms of memory during inspection. They repeatedly examine suspicious\nregions to accumulate fine-grained visual memory of local details, and consult external references or historical samples when encountering unfamiliar\npatterns. These heterogeneous memories are accessed adaptively through an iterative Perception–Action Loop, where each observation enriches the inspector’s\nunderstanding and guides subsequent actions. This behavior suggests a key insight: high-precision IAD is fundamentally not a static classification problem,\nbut rather a sequential decision-making process that dynamically queries visual\nand retrieved memory.\n\n\fAgentIAD\n\n3\n\nBuilding on this insight, we introduce AgentIAD, an agentic framework that\nperforms industrial anomaly detection through iterative memory access within a\nperception–action loop. We formulate the detection process as a Markov Decision\nProcess in which an agent learns a policy πθ to coordinate perception and retrieval actions. To address the two memory deficiencies of static inference, AgentIAD enables two complementary forms of memory access: 1) Visual Memory, accessed via the Perceptive Zoomer (PZ), which performs high-resolution\ninspection of suspicious regions to recover fine-grained visual details and mitigate the Visual Memory Deficiency; and 2) Retrieved Memory, accessed via\nthe Web Searcher (WS) and Comparative Retriever (CR), which retrieve external knowledge and reference samples to overcome the Retrieved Memory Deficiency. Through iterative perception–action reasoning, the agent progressively\nlocalizes ambiguous regions, retrieves complementary evidence, and derives reliable and interpretable conclusions. However, effectively training such an agent\nremains challenging. Supervised fine-tuning on expert trajectories can provide\ninitial tool-use capabilities but often results in policies with limited generalization to unseen scenarios. Reinforcement learning, on the other hand, suffers\nfrom inefficient exploration in the large combinatorial action space induced by\nmulti-tool interactions, especially under sparse reward signals. To address this\nchallenge, we adopt a pragmatic two-stage training strategy: we first perform Tool-Aware Supervised Fine-Tuning to initialize the agent with structured\ntool-use behaviors, and then refine the policy through Agentic Reinforcement\nLearning. This formulation improves training stability and generalization while\nenhancing interpretability by externalizing the reasoning process into explicit\nperception and tool-invocation steps.\nOur main contributions are summarized as follows:\n\n– We propose AgentIAD, a unified agentic framework for industrial anomaly\ndetection that formulates the task as a Markov Decision Process and enables\niterative perception–action reasoning for adaptive visual inspection.\n– We introduce a memory-augmented inspection paradigm that addresses two\nkey limitations of static inference: 1) Visual Memory for fine-grained perception via the Perceptive Zoomer to mitigate the resolution bottleneck, and\n2) Retrieved Memory for external knowledge acquisition and reference\nverification via the Web Searcher and Comparative Retriever.\n– We propose a pragmatic two-stage training strategy that combines ToolAware Supervised Fine-Tuning with Agentic Reinforcement Learning, enabling stable training of tool-augmented agents while improving generalization to complex inspection scenarios.\n– Extensive experiments show that AgentIAD achieves state-of-the-art performance on multiple IAD benchmarks, and our ablation studies validate the\neffectiveness of the proposed framework and its components.\n\n\f4\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\n2\n\nRelated Work\n\n2.1\n\nIndustrial Anomaly Detection\n\nIndustrial anomaly detection (IAD) has traditionally been studied under two\ndominant paradigms: embedding-based and reconstruction-based methods. Embeddingbased approaches [4, 10, 32] detect anomalies by measuring feature deviations\nfrom prototypes of normal samples, whereas reconstruction-based models [12,\n21, 30, 43] learn the distribution of normal data and identify defects through\nreconstruction residuals. However, because they primarily rely on low-level visual discrepancies, their effectiveness often degrades when anomaly recognition\nrequires higher-level semantic reasoning, contextual understanding, or crossinstance comparison.\nTo address the scarcity of labeled defect samples, subsequent research explored more data-efficient paradigms, including few-shot anomaly detection (FSAD)\nand zero-shot anomaly detection (ZSAD). Meta-learning approaches [15,37] learn\ntransferable representations through large-scale meta-training, while featuredistribution methods such as PatchCore [32], SPADE [8], and PaDiM [10] construct compact representations of normal samples to improve data efficiency;\nmore recent works further leverage large-scale pre-trained models for zero-shot\nanomaly detection. Reconstruction-based approaches built upon masked autoencoders [34] model normal visual patterns to localize anomalies, while CLIP-based\nmethods [5, 17, 48] detect anomalies through cross-modal feature alignment. Despite improved generalization ability, these approaches still largely rely on mismatches in pre-trained representations rather than explicitly reasoning about\nanomaly causes or contextual evidence.\n2.2\n\nMLLM-Based Industrial anomaly detection\n\nRecent work [38,41] has begun to incorporate Multimodal Large Language Models (MLLMs) into industrial anomaly detection, introducing semantic understanding and reasoning capabilities. Early efforts explored hybrid frameworks\nthat combine language models with specialized vision modules. For example,\nMyriad [25] established a paradigm that couples language reasoning with vision\nexpert models, while AnomalyGPT [13] enables zero-shot anomaly detection by\ninterpreting feature representations from external detectors. Although effective,\nthese approaches often depend on carefully designed expert models, which may\nlimit scalability across diverse industrial scenarios.\nSubsequent studies focus on enhancing reasoning ability within MLLMs.\nMethods such as LogicAD [19] and LAD-Reasoner [22] introduce chain-of-thought\nreasoning to improve interpretability, while reinforcement learning–based frameworks, including AnomalyR1 [6], LR-IAD [44], and OmniAD [46] optimize multimodal reasoning policies for anomaly detection. However, most existing methods\nstill operate under a single-pass reasoning paradigm without mechanisms to actively acquire additional evidence or verify uncertain predictions. To address this\nlimitation, we propose AgentIAD, an agentic framework that formulates IAD\n\n\fAgentIAD\n\n5\n\nas a closed-loop perception–action process with a unified multi-tool action space\nfor multi-round inspection.\n2.3\n\nMemory-Augmented Agentic Reasoning\n\nAugmenting agents with external memory has emerged as a promising direction\nfor overcoming the limitations of static parametric knowledge. Prior work falls\ninto two lines: visual memory construction, where agents learn to adaptively\nrequest finer-grained visual information via reinforcement learning [11, 40, 47],\nand retrieved memory construction, where external knowledge is dynamically\nretrieved at inference time to supplement parametric representations [20, 39].\nWhile effective in their respective domains, these two directions have been pursued largely in isolation.\nUnlike general visual reasoning, IAD presents a dynamic memory challenge: the evidence required for reliable judgment varies substantially across\ncases, ranging from fine-grained visual details in spatially confined defect regions\nto domain-specific normality references beyond the reach of parametric knowledge [6,13]. Visual memory approaches improve perceptual granularity but offer\nno mechanism for external knowledge access; retrieval-augmented methods supply such information but are tailored to language-centric or video understanding\ntasks and do not account for the spatially localized nature of industrial defects.\nNeither line of work supports the adaptive, case-by-case memory construction\nthat IAD inherently demands.\n\n3\n\nMethod\n\n3.1\n\nOverview\n\nWe propose AgentIAD, an agentic vision–language framework for industrial\nanomaly detection that performs iterative inspection through dynamic memory\naccess. The agent operates in a closed-loop perception–action loop and interacts with the environment by invoking memory-access actions. Specifically, the\nPerceptive Zoomer (PZ) retrieves fine-grained visual memory through local inspection, while the Web Searcher (WS) and Comparative Retriever (CR) provide\nretrieved memory via external knowledge acquisition and reference comparison.\nThis design enables progressive evidence accumulation and multi-round reasoning for reliable anomaly analysis. The model is trained using a two-stage strategy\nthat combines Tool-Aware Supervised Fine-Tuning for trajectory initialization\nwith reinforcement learning for policy refinement.\n3.2\n\nAgentic Memory-Augmented Reasoning Framework\n\nTo enable active industrial inspection, we formulate AgentIAD as an agent that\nperforms structured multi-step reasoning through dynamic memory access. Unlike prior IAD methods that rely on passive visual encoding, our framework operates in a closed-loop perception–action manner, allowing the agent to acquire\n\n\f6\n\nJ. Miao, P. Du, Y. Fan Author et al.\nSearch Results\n\nNormal PCB Image\nCropped Image\n\n\"PCB solder bridge defect\ncharacteristics“\n① IPC-A-610: metallic\nconnection between adjacent pads;\nirregular fillet boundary.\n② AOI Guide: Bright uniform\nreflectivity across two leads; no\nvisible gap between pins.\n\nRetrieved Memory\n\nVisual Memory\nMulti-Round\nMCOT\n\nRound-1 CoT\n\nRound-2 CoT\n\nRound-3 CoT\n\nReward Manager\n𝑟 𝑎𝑐𝑐 + 𝑟 𝑖𝑜𝑢 + 𝑟 𝑡𝑦𝑝𝑒 + 𝑟 𝑏𝑒ℎ\n\nGT\n\nRetrieved Memory\n\nRound-4 CoT\n\nFinal\nAnswer\n\nVision Language Model\n\nDetermine if the\nPCB in the image\nis normal\nor abnormal.\n\nCropped Image\n\nQueried Image\n\nSearch Results\n\nPerceptive Zoomer\n\nComparative Retriever\n\nWeb Searcher\n\nFig. 2: Overview of AgentIAD. The agent performs iterative industrial inspection through a unified action space with dynamic memory access. At each step, it\nmay invoke the Perceptive Zoomer (PZ) to retrieve fine-grained visual evidence, the\nComparative Retriever (CR) for cross-instance verification, or the Web Searcher (WS)\nto access external knowledge, progressively refining its decisions through multi-round\nperception–action reasoning. Training follows a two-stage paradigm: Tool-Aware Supervised Fine-Tuning initializes structured reasoning and tool usage from curated trajectories, followed by Agentic Reinforcement Learning that optimizes long-horizon decision\npolicies under perception–behavior decoupled rewards.\n\nadditional evidence by accessing visual and retrieved memory when needed. In\npractice, memory access is implemented through three tools: the Perceptive\nZoomer (PZ), Web Searcher (WS), and Comparative Retriever (CR).\nTool selection is embedded directly into the policy space, enabling adaptive\nmulti-stage inspection rather than single-pass prediction.\nMulti-round reasoning trajectory We model the industrial inspection process as a Markov Decision Process (MDP). Under this formulation, AgentIAD\ninteracts with the environment in a closed-loop perception–action manner and\ngenerates a rollout trajectory through iterative reasoning and memory access.\nGiven an input image I, the agent maintains a state st that summarizes the\ninteraction history. At each step t, the policy selects an action\n  a_t \\sim \\pi _\\theta (\\cdot \\mid s_t), \nwhere πθ denotes the agent policy parameterized by θ. If at invokes a tool, the\nenvironment returns an observation\n  o_{t+1} = \\mathrm {Env}(a_t), \n\n\fAgentIAD\n\n7\n\nand the state is updated as\n  s_{t+1} = s_t \\circ (a_t, o_{t+1}). \nThe interaction continues until the agent emits the TERMINATE action. For interpretability, the policy additionally produces a textual rationale tt at each step\nto summarize the current hypothesis and motivate subsequent actions. These rationales serve as explicit reasoning traces while the agent progressively refines its\nbelief by coordinating visual memory access and retrieved memory acquisition.\nUnified memory-access actions Within the trajectory, memory access is\nmodeled as a discrete action. AgentIAD operates over a unified action space\nconsisting of:\n– Perceptive Zoomer (PZ): retrieves visual memory through fine-grained\nlocal inspection, enabling the model to recover subtle defect cues that may\nbe missed in a global view.\n– Web Searcher (WS): retrieves external knowledge for unfamiliar or\nrare anomaly types.\n– Comparative Retriever (CR): retrieves reference samples for crossinstance verification.\nTogether, WS and CR provide access to retrieved memory, while PZ provides\nvisual memory. Importantly, these memory-access actions are invoked adaptively\nby the policy rather than executed in a fixed pipeline. Depending on the inspection context, the agent may selectively access visual memory, retrieved memory,\nor both, allowing flexible evidence acquisition on a case-by-case basis. This unified action space enables the agent to dynamically compose inspection strategies\nwithin a single reasoning trajectory.\n3.3\n\nTwo-Stage Training Strategy\n\nTraining an agent capable of multi-round reasoning and memory access is challenging due to the large action space induced by tool interactions. To address\nthis issue, we adopt a pragmatic two-stage training strategy that combines supervised initialization with reinforcement learning.\nTool-Aware Supervised Fine-Tuning\nTrajectory construction. We construct structured reasoning trajectories on the\nMMAD [18] dataset with assistance from GPT-4o [16], ensuring coherent visual–\nlanguage supervision with controlled tool invocations. For each image, a region\nof interest is obtained from defect bboxes (anomalous samples) or predicted\ninspection areas (normal samples). The resulting trajectories interleave reasoning\ntraces with staged tool calls, exposing the model to diverse multi-tool interaction\npatterns.\n\n\f8\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\nSupervised fine-tuning. We fine-tune the base VLM on these trajectories using\nstandard supervised learning. At each step, the model autoregressively predicts\neither a reasoning token or the next tool action, aligning its internal reasoning\nstate with external tool feedback. Unlike conventional instruction tuning that\nsupervises only the final response, our training provides dense intermediate supervision over the perception–action sequence and encourages the model to learn\nprocedural inspection knowledge.\nTo stabilize training and prevent overfitting to exploratory reasoning noise,\nwe apply a selective loss mask that focuses supervision on decisive steps, reducing the impact of intermediate reasoning errors or incorrect tool invocations.\nFormally, given a trajectory token sequence\n  y = \\{y_1, \\ldots , y_T\\} \nwith mask\n  M = \\{m_1, \\ldots , m_T\\}, \\quad m_t \\in \\{0,1\\}, \nthe supervised objective is\n  \\mathcal {L}_{\\text {SFT}} = -\\sum _{t=1}^{T} m_t \\log p_\\theta (y_t \\mid y_{&lt;t}, x), \nwhere mt = 1 only for the final reasoning response and the last tool invocation.\nThis masking strategy focuses optimization on conclusive reasoning and stabilizes action–decision consistency, providing a strong initialization for subsequent\npolicy optimization.\nAgentic Reinforcement Learning While supervised fine-tuning learns structured perception–reasoning patterns, the resulting model remains largely passive.\nWe therefore introduce Agentic Reinforcement Learning, where the agent learns\nadaptive multi-round policies under an enlarged discrete action space and sparse\nterminal supervision. Built upon GRPO, this stage refines the perception–action\npolicy through interaction with the environment.\nGroup Relative Policy Optimization. We optimize the agent policy πθ (at | st )\nunder the GRPO framework. Each trajectory τ = {(st , at , rt )}Tt=1 consists of the\nstate st , the tool action at , and reward rt . The objective maximizes a clipped\nsurrogate while regularizing the policy toward the SFT reference policy πref :\n  \\mathcal {L}_{\\text {clip}} = \\mathbb {E}_{t}\\!\\left [\\min \\!\\big (\\rho _t A_t,\\; \\tilde {\\rho }_t A_t\\big )\\right ], \n\n(1)\n\n  \\mathcal {L}_{\\text {KL}} = D_{\\mathrm {KL}}\\!\\big (\\pi _{\\theta }\\,\\|\\,\\pi _{\\mathrm {ref}}\\big ), \n\n(2)\n\n  \\mathcal {L}_{\\text {GRPO}} = \\mathcal {L}_{\\text {clip}} - \\beta \\,\\mathcal {L}_{\\text {KL}}, \n\n(3)\n\n\fAgentIAD\n\n9\n\nwhere\n  \\rho _t=\\frac {\\pi _{\\theta }(a_t \\mid s_t)}{\\pi _{\\mathrm {ref}}(a_t \\mid s_t)}, \\quad \\tilde {\\rho }_t=\\operatorname {clip}(\\rho _t,1-\\epsilon ,1+\\epsilon ), \nand At denotes the advantage estimated via GAE. Expectations are taken over\nrollout steps and batch samples.\nReward Overview. To guide both perception quality and action strategy, we\ndesign a two-part reward:\n  R = \\alpha R_{\\text {perc}} + \\beta R_{\\text {beh}}, \\qquad \\alpha ,\\beta &gt; 0, \n\n(4)\n\nwhere Rperc evaluates what the agent perceives and understands, while Rbeh\nregulates how the agent acts. This decomposition follows the dual objectives of\nindustrial inspection: perceptual correctness and disciplined decision behavior.\nPerception Reward. The perception reward supervises factual, spatial, and semantic correctness:\n  R_{\\text {perc}} = R_{\\text {acc}} + R_{\\text {iou}} + R_{\\text {type}} . \n\n(5)\n\n  R_{\\text {acc}} = \\mathbb {I}\\!\\left [\\text {format}(\\hat {y}_{K})=\\text {valid}\\right ] \\cdot \\mathbb {I}\\!\\left [\\hat {y}_{K}=y_{\\text {gt}}\\right ]. \n\n(6)\n\nAccuracy Reward.\n\nIoU Reward.\n  R_{\\text {iou}}= \\begin {cases} 1, &amp; \\text {if }\\mathrm {IoU}(b_{\\text {pred}}, b_{\\text {gt}}) &gt; 0.5, \\\\ \\mathrm {IoU}(b_{\\text {pred}}, b_{\\text {gt}}), &amp; \\text {otherwise}. \\end {cases} \n\n(7)\n\nType Reward.\n  R_{\\text {type}} = \\lambda _{\\text {type}} \\mathbb {I}[y_{\\text {gt}}=1] \\mathbb {I}\\!\\left [\\hat {c}_{K}=c_{\\text {gt}}\\right ]. \n\n(8)\n\nBehavior Reward. While Rperc focuses on perceptual correctness, the behavior\nreward Rbeh regulates tool-use discipline and efficiency.\n\n  R_{\\text {beh}} =\\frac {1}{K}\\!\\sum _{t=1}^{K} \\!\\left [ \\lambda _1\\mathbb {I}(\\hat {y}_t=y_{\\text {gt}}) +\\lambda _2 q_t -\\lambda _3\\!\\max (0,n_t-\\bar {n}) \\right ], \n\n(9)\n\nwhere nt is the number of tool invocations at step t, and qt denotes the normalized frequency of using the tools within the rollout group. This formulation\nencourages accurate decisions with minimal yet purposeful tool use.\n\n\f10\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\n4\n\nExperiments\n\n4.1\n\nExperiment Settings\n\nDatasets. We evaluate our method on industrial anomaly detection benchmark\nand a medical imaging dataset. For industrial anomaly detection, we use MMAD [18]\nas the primary benchmark. MMAD evaluates multiple reasoning-based subtasks,\nincluding Anomaly Discrimination, Defect Classification, Defect Localization,\nDefect Description, Defect Analysis, Object Classification, and Object Analysis.\nThe benchmark integrates four industrial anomaly detection datasets: MVTecAD [4], VisA [49], MVTec-LOCO [3], and GoodsAD [45]. MVTec-AD and VisA\nmainly contain texture-level defects, while MVTec-LOCO and GoodsAD focus\non structural and logical anomalies. Following prior works such as OmniAD [46]\nand AD-FM [26], we adopt the same data split protocol of MMAD, where 1,936\nsamples are used for training and 6,400 samples are used for evaluation. For medical anomaly detection, we use the Brain Tumor MRI Dataset [31]. This dataset\ncontains brain MRI scans with tumor labels. Following the original dataset split,\nwe sample 1,900 images from the training set for training and the original test\nset is used for evaluation.\nEvaluation. To evaluate our model, we follow the MMAD benchmark protocol and report accuracy for MMAD question answering. For anomaly detection\non both industrial and medical datasets, we report classification accuracy, F1score and image-level AUROC. For MMAD reasoning evaluation, we follow the\noriginal question–answering format defined in the benchmark. For anomaly detection experiments and ablation studies, we adopt a prompt format similar to\nPromptAD [23].\nImplementation Details. AgentIAD is built upon Qwen2.5-VL-3B and trained\non 8 A100 (80GB) GPUs. During SFT, the vision encoder is frozen and the\nremaining components are optimized using AdamW with cosine learning rate\ndecay. The initial learning rate is set to 2 × 10−5 and training runs for 20 epochs.\nDuring reinforcement learning training, we adopt the OpenRLHF framework and\ngenerate 8 rollouts for each prompt to improve exploration during training. The\nlearning rate is set to 1 × 10−6 and training runs for 3 epochs.\n4.2\n\nMain Results\n\nResults on MMAD benchmark. Table 1 presents that AgentIAD achieves high\nscore on the MMAD benchmark particularly in defect-related reasoning tasks.\nThe improvement is most significant in Defect Localization, where AgentIAD\nsubstantially outperforms other MLLMs. AgentIAD also performs competitively\non object-level reasoning tasks and obtains the highest score on Object Analysis.\nThese results demonstrate that adaptive memory augmentation is critical\nfor anomaly understanding. Specifically, the Perceptive Zoomer (PZ) constructs\nfine-grained visual memory to mitigate the visual memory deficiency of static\n\n\fAgentIAD\n\n11\n\nTable 1: Performance comparison of both proprietary and open-source MLLMs in\nMMAD. All methods we compare are under the standard 1-shot in-context learning\nsetting. Anomaly Discrimination uses the average accuracy of normal and abnormal\ncategories.\nModel\n\nScale\n\nAnomaly\n\nDefect\n\nObject\n\nAverage\n\nDiscrimination Classification Localization Description Analysis Classification Analysis\nRandom Chance\nHuman (expert) [18]\nHuman (ordinary) [18]\n\n–\n–\n–\n\n50.00\n95.24\n86.90\n\n25.00\n75.00\n66.25\n\n25.00\n92.31\n85.58\n\n25.00\n83.33\n71.25\n\n25.00\n94.20\n81.52\n\n25.00\n86.11\n89.58\n\n25.00\n80.37\n69.72\n\n28.57\n86.65\n78.69\n\nClaude-3.5-sonnet\nGemini-1.5-flash [36]\nGemini-1.5-pro [36]\nGPT-4o-mini\nGPT-4o\n\n–\n–\n–\n–\n–\n\n60.14\n58.58\n68.63\n64.33\n68.63\n\n60.14\n54.70\n60.12\n48.58\n65.80\n\n48.81\n49.10\n58.56\n38.75\n55.62\n\n67.13\n66.53\n70.38\n63.68\n73.21\n\n79.11\n82.24\n82.46\n80.40\n83.41\n\n85.19\n91.47\n89.20\n88.56\n94.98\n\n79.83\n79.71\n82.25\n79.74\n82.80\n\n68.36\n68.90\n73.09\n66.29\n74.92\n\nAnomalyGPT [13]\nQwen-VL-Chat [1]\nLLaVA-1.5 [27]\nMiniCPM-V2.6 [42]\nInternVL2 [7]\nLLaVA-1.5 [29]\nLLaVA-NeXT [28]\nInternVL2 [7]\nQwen-2.5-VL [2]\nAnomalyR1 [6]\nAgentIAD (ours)\n\n7B\n7B\n7B\n8B\n8B\n13B\n34B\n76B\n3B\n3B\n3B\n\n65.57\n53.65\n51.33\n57.31\n59.97\n49.96\n57.92\n68.25\n51.10\n60.62\n69.49\n\n27.49\n31.33\n37.04\n49.22\n43.85\n38.78\n48.79\n54.22\n41.07\n63.56\n72.73\n\n27.97\n28.62\n36.62\n43.28\n47.91\n46.17\n52.87\n56.66\n44.87\n70.14\n80.94\n\n36.86\n41.66\n50.60\n65.86\n57.60\n58.17\n71.34\n66.30\n61.43\n80.47\n85.27\n\n32.11\n63.99\n69.79\n75.24\n78.10\n73.09\n80.28\n80.47\n75.99\n85.28\n87.84\n\n29.84\n74.46\n68.29\n92.02\n74.18\n73.62\n81.12\n86.40\n86.54\n92.48\n93.27\n\n35.82\n67.94\n69.53\n80.80\n80.37\n70.98\n77.80\n82.92\n79.58\n86.15\n90.59\n\n36.52\n51.66\n54.74\n66.25\n63.14\n58.68\n67.16\n70.75\n62.94\n76.96\n82.88\n\nTable 2: Performance comparison on the Brain Tumor MRI dataset [31]. We compare\nthe no-tool baseline GPT-4o with AgentIAD models trained with different reasoning\ntools.\nModel\nGPT-4o\nAgentIAD\nAgentIAD\n\nTool\n\nAccuracy\n\nF1-score\n\nAUROC\n\n–\nPZ\nPZ + WS\n\n79.31\n91.06\n95.50\n\n87.80\n94.14\n97.00\n\n59.38\n86.38\n93.83\n\nmodels, while the Comparative Retriever (CR) and Web Searcher (WS) provide\nretrieved memory to address retrieved memory deficiency in complex analysis.\nUnder our agentic reinforcement learning framework, these memory-augmentation\ntools are invoked adaptively, allowing the model to better align its perception\nand reasoning with the requirements of diverse subtasks.\nResults on Medical benchmark with Web Searcher. As shown in Table 2, we\nfurther study the impact of the WS tool with the Brain Tumor MRI dataset [31].\nDuring training, we only sample 1,900 images from the 5,600 training samples.\nWe train two variants of AgentIAD: one using only the PZ tool and another\nusing both PZ and WS. Compared to the model using only Visual Memory (via\nPZ), the model incorporating Retrieved Memory (via WS) improves accuracy\nby 4.44% and AUROC by 7.45%. These results demonstrate that while Visual\nMemory is essential for inspecting suspicious regions, Retrieved Memory provides\ncritical semantic knowledge to interpret complex visual patterns. The synergy\nbetween these two memory types enables the agent to overcome both visual and\nretrieved memory deficiencies, leading to more reliable anomaly analysis.\n\n\f12\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\nAnomaly Detection Results We evaluate the anomaly detection capability of\nAgentIAD after the GRPO training stage. Table 3 compares AgentIAD with\nseveral methods on the MVTec and VisA benchmarks . For training, we follow\nthe dataset split protocol introduced in OmniAD [46]. Following PromptAD [23],\nwe adopt a similar prompt formulation during inference and evaluate the imagelevel AUROC. To ensure a fair comparison, we remove from the PromptAD test\nset any samples that overlap with our training set. During inference, reference\nimages are only introduced when the agent invokes the Comparative Retriever\n(CR) tool to retrieve one normal example for comparison. Otherwise, the model\nperforms anomaly detection directly without a reference image. All other compared methods are evaluated under a strict 1-shot setting. As shown in Table 3,\nAgentIAD achieves strong performance on both datasets. These results indicate\nthat adaptive memory augmentation is highly effective for anomaly detection\nin few-shot settings. By dynamically building visual and retrieved memory, the\nagent can achieve more reliable and accurate detection.\n\nTable 3: Comparison of\nimage-level AUROC on\nMVTec and VisA datasets.\nMethod\n\nMVTec\n\nVisA\n\nSPADE [9]\nPaDiM [10]\nPatchCore [33]\nWinCLIP+ [17]\nRWDAT [35]\nPromptAD [23]\n\n81.0\n76.6\n83.4\n93.1\n93.3\n94.6\n\n79.5\n62.8\n79.9\n83.8\n83.4\n86.9\n\nAgentIAD\n\n95.3\n\n98.7\n\n4.3\n\nTable 4: Ablation on reasoning tools and training\nstrategies. All models are based on Qwen2.5-VL-3B,\nwhere the middle three variants(+PZ, +CR, and +PZ\n&amp; CR) are trained with Tool-Aware SFT.\nModel\n\nMVTec\n\nVisA\n\nLOCO\n\nGoodsAD\n\nAvg.\n\n54.93\n93.51\n98.85\n97.27\n98.54\n\n39.27\n89.86\n88.07\n92.50\n95.57\n\n46.56\n90.27\n97.94\n96.54\n97.90\n\n47.62\n92.20\n95.52\n95.81\n97.46\n\nQwen2.5-VL-3B-Instruct\n+ CoT\n+ PZ\n+ CR\n+ PZ &amp; CR\n+ AgentIAD\n\n49.73\n95.14\n97.22\n96.91\n97.84\n\nAblation Studies\n\nIn all ablation experiments, we adopt a prompt format similar to PromptAD [23],\nand the training and test splits follow the protocol introduced in OmniAD [46].\nEffect of tool usage and training strategies. Table 4 analyzes the contribution\nof the proposed memory modules and training stages. Starting from the CoTonly baseline, the model shows limited anomaly detection capability. Introducing\nVisual Memory (via Perceptive Zoomer) leads to a large improvement, confirming that inspecting localized regions is critical for identifying subtle anomalies.\nSimilarly, Retrieved Memory (via Comparison Retriever) significantly boosts\nperformance by allowing the model to verify samples against normal references.\nCombining both memory types under SFT yields further gains, suggesting that\nlocalized inspection and reference comparison provide complementary signals.\nFinally, applying GRPO to jointly optimize memory access results in the AgentIAD model, which achieves the best performance across all datasets.\n\n\fAgentIAD\n\n13\n\nTable 5: Ablation on reward components. Binary classification accuracy (%)\nacross four benchmarks and corresponding tool usage statistics.\nAccuracy\nModel\n\nTools\n\nMVTec VisA LOCO GoodsAD\n\nAgentIAD\nw/o Rbeh\nw/o Rperc + Rbeh\n\n97.84\n97.92\n96.91\n\n98.54\n97.76\n97.27\n\n95.57\n93.87\n92.50\n\n97.90\n97.54\n96.54\n\nAvg\n\n#PZ #CR Total\n\n97.46\n96.77\n95.81\n\n6400\n6401\n6397\n\n374\n298\n642\n\n6774\n6699\n7039\n\nEffect of reward components. Table 5 analyzes the influence of different reward\ncomponents on both task accuracy and tool usage behavior. Removing both the\nperception reward Rperc and the behavior reward Rbeh leads to a noticeable\ndecrease in overall performance. In addition, the number of tool invocations increases substantially, indicating that without reward guidance the agent tends\nto rely on tools more frequently without necessarily improving decision quality. When only the behavior reward Rbeh is removed, the overall accuracy also\ndecreases slightly. Compared with the full model, the usage of the CR tool becomes less balanced, suggesting that Rbeh helps regulate how the agent invokes\ndifferent tools during reasoning. The full reward formulation achieves the best\noverall accuracy while maintaining a more controlled tool usage pattern. These\nobservations suggest that Rperc mainly supports perceptual correctness, while\nRbeh helps shape more disciplined tool interaction during reasoning.\nEffect of tool design and training. We first analyze the distribution of anomaly\narea ratios in MMAD. As shown in Tab. 6, anomalies in MMAD are highly localized, with a median area ratio of only 0.58%. This observation motivates the\ndesign of the Perceptive Zoomer (PZ) tool, which enables the agent to construct\nfine-grained visual memory by zooming into small anomalous regions. We further evaluate the importance of training for tool usage. Tab. 7 compares GPT-4o\nequipped with the same PZ and CR tools with our AgentIAD. The result indicates that tool-aware training is crucial for enabling the agent to effectively\ncoordinate adaptive memory augmentation during anomaly reasoning.\nTable 6: Distribution of anomaly area\nratios in the MMAD. The statistics are\ncomputed from abnormal samples.\nMean\n\nMedian\n\nP75\n\nP90\n\nP95\n\nP99\n\nMax\n\n3.21%\n\n0.58%\n\n2.78%\n\n8.70%\n\n14.54%\n\n34.82%\n\n100%\n\n4.4\n\nVisualization Results\n\nTable 7: Accuracy comparison between\nGPT-4o with PZ/CR tools and AgentIAD.\nModel\n\nMVTec\n\nVisA\n\nLOCO\n\nGoodsAD\n\nAvg.\n\nGPT-4o w. tools\nAgentIAD\n\n85.57\n97.84\n\n77.20\n98.54\n\n45.91\n95.57\n\n72.56\n97.90\n\n70.31\n97.46\n\nFigure 3 presents three inference cases illustrating how AgentIAD adaptively\nmanages its memory during reasoning. The left example shows the construction\n\n\fJ. Miao, P. Du, Y. Fan Author et al.\nQuestion: Evaluate the following image from the\nclass \"leather\". Candidate anomaly types: Tear, Poke,\nScratch, Discoloration. Determine if the object is\nnormal or abnormal. Follow the instruction and we\ncan call tool functions: `crop_image_normalized`,\n`query_image` and `search` .\nThe area of interest is marked by a distinct change in texture and\ncolor, suggesting a potential anomaly. The surrounding leather\nsurface appears consistent and uniform, which further highlights this\nirregularity. Now I will zoom in to look clearer.\n&lt;tool_call&gt; {\"name\": \"crop_image_normalized\", \"arguments\":\n{\"bbox_2d\": [0.34, 0.2, 0.43, 0.27], \"target_image\": 1}}&lt;/tool_call&gt;\nHere is the cropped image:\n\n&lt;think&gt; Upon examining the original image, there is a noticeable\narea where the texture of the leather seems disrupted. This\ndisruption is characterized by a linear indentation that is lighter in\ncolor compared to the surrounding area, indicating a possible\npuncture or poke. The ROI image confirms this observation,\nshowing a clear indentation and surrounding discoloration, which\nare consistent with the characteristics of a poke. The anomaly is\nnot consistent with the other candidate types, such as tears,\nscratches, or discoloration, as it involves a penetrative action that\ndisrupts the surface integrity. &lt;/think&gt;\n&lt;answer&gt; {\"anomaly_present\": true, \"top_anomaly\": \"Poke\",\n\"visual_descriptions\": [\"linear indentation\", \"lighter color\nsurrounding area\", \"disruption in texture and color\"]} &lt;/answer&gt;\n\nQuestion: Evaluate the following image from the\nclass \"screw_bag\". Candidate anomaly types: Missing\ncomponent, Crack or breakage, Discoloration or\ncontamination, Incorrect size. Determine if the object\nis normal or abnormal. Follow the instruction and we\ncan call tool functions: `crop_image_normalized`,\n`query_image` and `search` .\nThe yellow component caught my attention due to its unusual color\nand shape, which suggests a potential issue with the contents of the\nbag. &lt;tool_call&gt; {\"name\": \"crop_image_normalized\",\n\"arguments\": {\"bbox_2d\": [0.57, 0.59, 0.61, 0.69],\n\"target_image\": 1}} &lt;/tool_call&gt;\nUpon examining the original image, the yellow\ncomponent appears to be an anomaly within the\nscrew bag. The ROI image further highlights this\nyellow component, confirming its presence and\ndiscoloration as anomaly. To make a confident\nNormal\ndecision, I would like to compare it with a normal\nreference image\nreference image of the same class.&lt;tool_call&gt;\n{\"name\": \"query_image\", \"arguments\": {} } &lt;/tool_call&gt;\n&lt;think&gt; The target image shows a screw bag with several\ncomponents inside.- In the cropped ROI, there is a distinct yellow\ncomponent visible among the metallic components typically\nexpected in a screw bag.- The normal reference image contains\nonly metallic components, with no yellow elements present.- The\nyellow component in the cropped image is an anomaly as it\ncontrasts sharply with the uniform metallic color of the other\ncomponents in the reference image.- The presence of the yellow\ncomponent indicates discoloration or contamination, which is not\npresent in the normal reference image.&lt;/think&gt; &lt;answer&gt;\n{\"anomaly_present\": true, \"top_anomaly\": \"Discoloration or\ncontamination\", \"visual_descriptions\": [\"linear indentation\",\n\"lighter color surrounding area\", \"disruption in texture and color\"]}\n&lt;/answer&gt;\n\ninputs\n\n14\n\nQuestion: Evaluate the following image from the\nclass \"brain mri\". Candidate anomaly types:\nglioma tumor, meningioma tumor, pituitary tumor.\nDetermine if the object is normal or abnormal.\nFollow the instruction and we can call tool\nfunctions: `crop_image_normalized`,\n`query_image` and `search` .\nThe image appears to show an abnormality in the brain, likely\nindicative of a tumor. The irregular shape and the presence of a\nmass suggest a glioma tumor. To confirm the specific characteristics\nof this potential glioma tumor, I will search for external knowledge\nregarding glioma tumors to better understand their typical MRI\nappearance. This will help in accurately identifying the anomaly\ntype.&lt;tool_call&gt; {“name”: “search”, “arguments”: {“description”:\n“characteristics of meningioma tumor in brain MRI” }} &lt;/tool_call&gt;\n\nHere is the search result for your query:\nGlioma tumors on MRI scans typically present as irregularly shaped\nmass lesions with heterogeneous characteristics. These tumors often\nexhibit varying sizes and display uneven or circular enhancement\npatterns following contrast administration. The surrounding tissue may\nshow significant edema, and cystic degeneration or necrosis can be\npresent within the tumor mass. The contours of gliomas are generally\nill-defined, contributing to their infiltrative nature, which complicates\nclear delineation from adjacent brain structures.\n&lt;think&gt; The search results confirm that glioma tumors typically\npresent as irregularly shaped mass lesions with heterogeneous\ncharacteristics, often showing surrounding edema and varying\nenhancement patterns. The description aligns with the observed\nirregular shape and potential edema in the image, suggesting it is\nindeed a glioma tumor. Given these characteristics, I will now finalize\nthe evaluation.&lt;/think&gt; &lt;answer&gt; {\"anomaly_present\": true,\n\"top_anomaly\": “glioma tumor\", \"visual_descriptions\": [\"irregularly\nshaped mass\", \"heterogeneous characteristics\", \"surrounding\nedema\",\"ill-defined contours\"]} &lt;/answer&gt;\n\nFig. 3: Visualize Inference Cases of AgentIAD.Three inference cases illustrating\nhow AgentIAD adaptively constructs Visual Memory (left) and Retrieved Memory (middle &amp; right) to support anomaly reasoning across various scenarios.\n\nof Visual Memory via the Perceptive Zoomer. The agent adaptively zooms into\na suspicious region to recover fine-grained details, effectively resolving the visual\nmemory deficiency of static models. The middle and right examples demonstrate\nthe acquisition of Retrieved Memory. In the middle case, the agent invokes the\nComparative Retriever to retrieve a normal reference, using episodic memory to\nverify ambiguous cues. In the right case, the agent utilizes the Web Searcher to\naccess semantic knowledge in the medical domain, helping it interpret complex\nvisual patterns. These examples highlight how AgentIAD overcomes retrieved\nmemory deficiency by flexibly querying external knowledge sources to support\nreliable anomaly analysis.\n\n5\n\nConclusion\n\nIn this work, we presented AgentIAD, an agentic framework for industrial\nanomaly detection that performs iterative inspection through a perception–\naction loop. By enabling dynamic access to both visual memory and retrieved\nmemory, AgentIAD progressively acquires complementary evidence and refines\nits decisions during inference. To train such an agent effectively, we adopt a twostage strategy that combines tool-aware supervised fine-tuning with agentic reinforcement learning, enabling stable learning of long-horizon perception–action\npolicies. Extensive experiments demonstrate that AgentIAD achieves state-ofthe-art performance on the MMAD benchmark while producing interpretable\ninspection traces that closely resemble human quality inspection procedures. We\nhope this work highlights the potential of memory-augmented agentic reasoning\nfor reliable and interpretable visual inspection.\n\n\fAgentIAD\n\n15\n\nLimitation. Despite these promising results, our current implementation is built\nupon Qwen2.5-VL-3B rather than the latest multimodal architectures such as\nQwen3.5. Future work could integrate more advanced vision–language models\nand expand the set of inspection tools to further improve generalization, robustness, and cross-domain adaptability.\n\nReferences\n1. Bai, J., Bai, S., Chu, Y., Cui, Z., Dang, K., Deng, X., Fan, Y., Ge, W., Han, Y.,\nHuang, F., et al.: Qwen technical report. arXiv preprint arXiv:2309.16609 (2023)\n2. Bai, S., Cai, Y., Chen, R., Chen, K., Chen, X., Cheng, Z., Deng, L., Ding, W.,\nGao, C., Ge, C., et al.: Qwen3-vl technical report. arXiv preprint arXiv:2511.21631\n(2025)\n3. Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., Steger, C.: Beyond dents and\nscratches: Logical constraints in unsupervised anomaly detection and localization.\nInternational Journal of Computer Vision 130(4), 947–969 (2022)\n4. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the\nIEEE/CVF conference on computer vision and pattern recognition. pp. 9592–9600\n(2019)\n5. Cao, Y., Zhang, J., Frittoli, L., Cheng, Y., Shen, W., Boracchi, G.: Adaclip: Adapting clip with hybrid learnable prompts for zero-shot anomaly detection. In: European Conference on Computer Vision. pp. 55–72. Springer (2024)\n6. Chao, Y., Liu, J., Tang, J., Wu, G.: Anomalyr1: A grpo-based end-to-end mllm\nfor industrial anomaly detection. arXiv preprint arXiv:2504.11914 (2025)\n7. Chen, Z., Wu, J., Wang, W., Su, W., Chen, G., Xing, S., Zhong, M., Zhang, Q.,\nZhu, X., Lu, L., et al.: Internvl: Scaling up vision foundation models and aligning\nfor generic visual-linguistic tasks. In: Proceedings of the IEEE/CVF conference on\ncomputer vision and pattern recognition. pp. 24185–24198 (2024)\n8. Cohen, N., Hoshen, Y.: Sub-image anomaly detection with deep pyramid correspondences. arXiv preprint arXiv:2005.02357 (2020)\n9. Cohen, N., Hoshen, Y.: Sub-image anomaly detection with deep pyramid correspondences. arXiv preprint arXiv:2005.02357 (2020)\n10. Defard, T., Setkov, A., Loesch, A., Audigier, R.: Padim: a patch distribution modeling framework for anomaly detection and localization. In: International conference\non pattern recognition. pp. 475–489. Springer (2021)\n11. Fan, Y., et al.: Videoagent: A memory-augmented multimodal agent for video\nunderstanding. In: European Conference on Computer Vision (ECCV) (2024)\n12. Gong, D., Liu, L., Le, V., Saha, B., Mansour, M.R., Venkatesh, S., Hengel, A.v.d.:\nMemorizing normality to detect anomaly: Memory-augmented deep autoencoder\nfor unsupervised anomaly detection. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 1705–1714 (2019)\n13. Gu, Z., Zhu, B., Zhu, G., Chen, Y., Tang, M., Wang, J.: Anomalygpt: Detecting\nindustrial anomalies using large vision-language models. In: Proceedings of the\nAAAI conference on artificial intelligence. vol. 38, pp. 1932–1940 (2024)\n14. Guan, W., Lan, J., Cao, J., Tan, H., Zhu, H., Wang, W.: Emit: Enhancing\nmllms for industrial anomaly detection via difficulty-aware grpo. arXiv preprint\narXiv:2507.21619 (2025)\n\n\f16\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\n15. Huang, C., Guan, H., Jiang, A., Zhang, Y., Spratling, M., Wang, Y.F.: Registration\nbased few-shot anomaly detection. In: European conference on computer vision.\nSpringer (2022)\n16. Hurst, A., Lerer, A., Goucher, A.P., Perelman, A., Ramesh, A., Clark, A., Ostrow, A., Welihinda, A., Hayes, A., Radford, A., et al.: Gpt-4o system card. arXiv\npreprint arXiv:2410.21276 (2024)\n17. Jeong, J., Zou, Y., Kim, T., Zhang, D., Ravichandran, A., Dabeer, O.: Winclip:\nZero-/few-shot anomaly classification and segmentation. In: Proceedings of the\nIEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 19606–\n19616 (2023)\n18. Jiang, X., Li, J., Deng, H., Liu, Y., Gao, B.B., Zhou, Y., Li, J., Wang, C., Zheng,\nF.: Mmad: A comprehensive benchmark for multimodal large language models in\nindustrial anomaly detection. arXiv preprint arXiv:2410.09453 (2024)\n19. Jin, E., Feng, Q., Mou, Y., Lakemeyer, G., Decker, S., Simons, O., Stegmaier, J.:\nLogicad: Explainable anomaly detection via vlm-based text feature extraction. In:\nProceedings of the AAAI Conference on Artificial Intelligence. vol. 39, pp. 4129–\n4137 (2025)\n20. Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H.,\nLewis, M., Yih, W.t., Rocktäschel, T., Riedel, S., Kiela, D.: Retrieval-augmented\ngeneration for knowledge-intensive nlp tasks. In: Advances in Neural Information\nProcessing Systems (2020)\n21. Li, C.L., Sohn, K., Yoon, J., Pfister, T.: Cutpaste: Self-supervised learning for\nanomaly detection and localization. In: Proceedings of the IEEE/CVF conference\non computer vision and pattern recognition. pp. 9664–9674 (2021)\n22. Li, W., Chu, G., Chen, J., Xie, G.S., Shan, C., Zhao, F.: Lad-reasoner: Tiny multimodal models are good reasoners for logical anomaly detection. arXiv preprint\narXiv:2504.12749 (2025)\n23. Li, X., Zhang, Z., Tan, X., Chen, C., Qu, Y., Xie, Y., Ma, L.: Promptad: Learning\nprompts with only normal samples for few-shot anomaly detection. In: Proceedings\nof the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp.\n16838–16848 (2024)\n24. Li, Y., Cao, Y., Liu, C., Xiong, Y., Dong, X., Huang, C.: Iad-r1: Reinforcing consistent reasoning in industrial anomaly detection. arXiv preprint arXiv:2508.09178\n(2025)\n25. Li, Y., Wang, H., Yuan, S., Liu, M., Zhao, D., Guo, Y., Xu, C., Shi, G., Zuo, W.:\nMyriad: Large multimodal model by applying vision experts for industrial anomaly\ndetection. arXiv preprint arXiv:2310.19070 (2023)\n26. Liao, J., Su, Y., Tu, R.C., Jin, Z., Sun, W., Li, Y., Tao, D., Xu, X., Yang, X.: Ad-fm:\nMultimodal llms for anomaly detection via multi-stage reasoning and fine-grained\nreward optimization. arXiv preprint arXiv:2508.04175 (2025)\n27. Liu, H., Li, C., Li, Y., Lee, Y.J.: Improved baselines with visual instruction tuning. In: Proceedings of the IEEE/CVF conference on computer vision and pattern\nrecognition. pp. 26296–26306 (2024)\n28. Liu, H., Li, C., Li, Y., Li, B., Zhang, Y., Shen, S., Lee, Y.J.: Llavanext: Improved\nreasoning, ocr, and world knowledge (2024)\n29. Liu, H., Li, C., Wu, Q., Lee, Y.J.: Visual instruction tuning. Advances in neural\ninformation processing systems 36, 34892–34916 (2023)\n30. Liznerski, P., Ruff, L., Vandermeulen, R.A., Franks, B.J., Kloft, M., Müller, K.R.:\nExplainable deep one-class classification. arXiv preprint arXiv:2007.01760 (2020)\n31. Nickparvar, M.: Brain tumor mri dataset (2026). https://doi.org/10.34740/\nKAGGLE/DSV/14832123, https://www.kaggle.com/dsv/14832123\n\n\fAgentIAD\n\n17\n\n32. Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., Gehler, P.: Towards\ntotal recall in industrial anomaly detection. In: Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition (2022)\n33. Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., Gehler, P.: Towards\ntotal recall in industrial anomaly detection. In: Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition. pp. 14318–14328 (2022)\n34. Schwartz, E., Arbelle, A., Karlinsky, L., Harary, S., Scheidegger, F., Doveh, S.,\nGiryes, R.: Maeday: Mae for few-and zero-shot anomaly-detection. Computer Vision and Image Understanding 241, 103958 (2024)\n35. Tamura, M.: Random word data augmentation with clip for zero-shot anomaly\ndetection. arXiv preprint arXiv:2308.11119 (2023)\n36. Team, G., Georgiev, P., Lei, V.I., Burnell, R., Bai, L., Gulati, A., Tanzer, G., Vincent, D., Pan, Z., Wang, S., et al.: Gemini 1.5: Unlocking multimodal understanding\nacross millions of tokens of context. arXiv preprint arXiv:2403.05530 (2024)\n37. Wu, J.C., Chen, D.J., Fuh, C.S., Liu, T.L.: Learning unsupervised metaformer for\nanomaly detection. In: Proceedings of the IEEE/CVF international conference on\ncomputer vision (2021)\n38. Wu, J., Gan, W., Chen, Z., Wan, S., Yu, P.S.: Multimodal large language models:\nA survey. In: 2023 IEEE International Conference on Big Data (BigData). pp.\n2247–2256. IEEE (2023)\n39. Xu, W., et al.: A-mem: Agentic memory for llm agents. arXiv preprint\narXiv:2502.12110 (2025)\n40. Yang, S., et al.: Visionthink: Smart and efficient vision language model via reinforcement learning. arXiv preprint arXiv:2507.13348 (2025)\n41. Yang, T., Chang, L., Yan, J., Li, J., Wang, Z., Zhang, K.: A survey on foundationmodel-based industrial defect detection. arXiv preprint arXiv:2502.19106 (2025)\n42. Yao, Y., Yu, T., Zhang, A., Wang, C., Cui, J., Zhu, H., Cai, T., Li, H., Zhao,\nW., He, Z., et al.: Minicpm-v: A gpt-4v level mllm on your phone. arXiv preprint\narXiv:2408.01800 (2024)\n43. Zavrtanik, V., Kristan, M., Skočaj, D.: Draem-a discriminatively trained reconstruction embedding for surface anomaly detection. In: Proceedings of the\nIEEE/CVF international conference on computer vision. pp. 8330–8339 (2021)\n44. Zeng, P., Pang, F., Wang, Z., Yang, A.: Lr-iad: Mask-free industrial anomaly detection with logical reasoning. arXiv preprint arXiv:2504.19524 (2025)\n45. Zhang, J., Ding, R., Ban, M., Dai, L.: Pku-goodsad: A supermarket goods dataset\nfor unsupervised anomaly detection and segmentation. IEEE Robotics and Automation Letters 9(3), 2008–2015 (2024)\n46. Zhao, S., Lin, Y., Han, L., Zhao, Y., Wei, Y.: Omniad: Detect and understand\nindustrial anomaly via multimodal reasoning. arXiv preprint arXiv:2505.22039\n(2025)\n47. Zheng, Z., Yang, M., Hong, J., Zhao, C., Xu, G., Yang, L., Shen, C., Yu, X.:\nDeepeyes: Incentivizing\" thinking with images\" via reinforcement learning. arXiv\npreprint arXiv:2505.14362 (2025)\n48. Zhou, Q., Pang, G., Tian, Y., He, S., Chen, J.: Anomalyclip: Object-agnostic\nprompt learning for zero-shot anomaly detection. arXiv preprint arXiv:2310.18961\n(2023)\n49. Zou, Y., Jeong, J., Pemula, L., Zhang, D., Dabeer, O.: Spot-the-difference selfsupervised pre-training for anomaly detection and segmentation. In: European\nconference on computer vision. pp. 392–408. Springer (2022)\n\n\f18\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\n6\n\nSupplementary Material\n\n6.1\n\nTool Implementation Details\n\nPerceptive Zoomer The Perceptive Zoomer (PZ) enables the agent to access\nvisual memory by inspecting local regions of the image.\nGiven a bounding box predicted by the agent in normalized coordinates\nbbox = (x1 , y1 , x2 , y2 ), the environment crops the corresponding region from\nthe original image and returns the cropped image as a new visual observation.\nBounding boxes are predicted by the model through the following structured\ntool call:\n&lt;tool_call&gt;{\n\"name\": \"crop_image_normalized\",\n\"arguments\": {\"bbox_2d\": [...], \"target_image\": 1}\n}&lt;/tool_call&gt;\nThe cropped image is appended to the interaction history, allowing the agent\nto refine its reasoning with finer visual details.\nComparative Retriever The Comparative Retriever (CR) enables the agent\nto access retrieved memory by comparing the current image with a normal reference instance during anomaly reasoning.\nFor samples from the MMAD benchmark, the dataset provides reference\nimages through the similar_templates field. When the CR tool is invoked, the\nsystem returns a single normal image from this field.\nFor the Brain Tumor MRI dataset, retrieved memory is constructed from\nnormal samples in the training split. Image similarity is measured using CLIP\nembeddings (ViT-B-32), and for each sample the most similar normal training\nimage is identified.\nDuring inference, the system directly returns this pre-identified normal reference image without performing additional similarity search.\nThe CR tool is invoked through the following structured function call:\n&lt;tool_call&gt;{\n\"name\":\"query_image\",\n\"arguments\":{}\n}&lt;/tool_call&gt;\nAfter execution, the environment appends the retrieved reference image to\nthe interaction history as an additional visual observation.\nWeb Searcher The Web Searcher (WS) enables the agent to access retrieved\nmemory in the form of external textual knowledge.\nWhen the WS tool is invoked, the agent provides a natural language description as the search query. The system retrieves relevant information using the\nweb search service provided by Zhipu AI.\n\n\fAgentIAD\n\n19\n\nThe resulting description is returned as textual context and appended to the\ninteraction history, allowing the agent to incorporate external knowledge during\nreasoning.\nThe WS tool is invoked through the following structured function call:\n&lt;tool_call&gt;{\n\"name\":\"search\",\n\"arguments\":{\"description\":\"...\"}\n}&lt;/tool_call&gt;\nWS is used only to retrieve general domain knowledge rather than datasetspecific information.\n6.2\n\nBounding Box Usage in Training\n\nBounding box annotations are used only during the trajectory construction stage\nof supervised fine-tuning (SFT).\nThese bounding boxes are used to construct demonstration trajectories that\nguide the Perceptive Zoomer toward plausible inspection regions.\nFor samples with pixel-level anomaly masks, bounding boxes are obtained\nby computing the bounding box of the mask region. For samples without mask\nannotations, approximate inspection regions are used during trajectory construction to simulate the region that a human inspector might examine.\nBounding boxes are not provided as inputs to the model. During reinforcement learning and inference, the agent predicts bounding boxes autonomously\nthrough tool calls. For the perception reward used in reinforcement learning, the\nreference bounding boxes used for IoU computation follow the same sources described above (i.e., mask-derived boxes or approximate inspection regions) and\nare used only for reward evaluation rather than as model inputs.\n6.3\n\nNotation Clarification\n\nFor completeness, we clarify several symbols used in the reinforcement learning\nformulation in Sec. 3.3 of the main paper.\nTrajectory length. The symbol K denotes the total number of reasoning\nsteps in a rollout trajectory. The final prediction is produced at step K, and ŷK\ntherefore represents the agent’s final anomaly prediction.\nPrediction variables. The variable ŷt denotes the prediction produced by\nthe agent at reasoning step t, while ygt denotes the corresponding ground-truth\nanomaly label. Similarly, ĉK and cgt denote the predicted and ground-truth\nanomaly categories at the final reasoning step.\n\n\f20\n\nJ. Miao, P. Du, Y. Fan Author et al.\n\nTable 8: Main hyperparameters used in\nGRPO training.\nHyperparameter\n\nValue\n\nTable 9: Reward coefficients used in\nGRPO training.\nParameter\n\nValue\n\nα (perception reward weight) 1.0\nβ (behavior reward weight)\n1.0\nλtype (type reward weight)\n0.1\nλ1 (correctness term)\n1.0\nλ2 (tool-usage term)\n0.5\nλ3 (efficiency penalty)\n0.05\nn̄ (reference tool budget)\n1.0\n\nOptimizer\nAdamW\nLearning rate\n1 × 10−6\nRollouts per prompt\n8\nTraining epochs\n3\nClipping ratio ϵ\n0.2\nTemperature\n1.0\nPrecision\nbfloat16\n\nTable 10: Inference latency of the AgentIAD (PZ+WS) model reported in Table 2 on\nthe Brain Tumor MRI test set. Latency is measured as the average wall-clock time per\nsample.\nSetting\nOverall\nNo WS invoked\nWS invoked\n\nSamples\n\nWS Usage (%)\n\nLatency (s/sample)\n\n1600\n1309\n291\n\n18.2\n0.0\n100.0\n\n2.90\n2.82\n3.26\n\nBehavior reward variables. In Eq. (9), nt denotes the number of tool invocations at reasoning step t. The quantity n̄ represents a reference tool-usage\nbudget used in the reward formulation. The variable qt denotes a normalized\nscore reflecting the frequency of tool usage at step t within the rollout group\nduring training.\nθ (at |st )\nPolicy optimization variables. In the GRPO objective, ρt = ππref\n(at |st ) denotes the policy ratio between the current policy and the reference policy. The\nclipped ratio ρ̃t = clip(ρt , 1 − ϵ, 1 + ϵ) uses ϵ as the clipping threshold, and At\ndenotes the advantage estimate used for policy optimization.\n\n6.4\n\nAdditional Training Details\n\nWe adopt the GRPO framework to the SFT reference policy in the reinforcement\nlearning stage. For completeness, the main optimization hyperparameters are\nsummarized in Table 8, and the reward coefficients are listed in Table 9.\n6.5\n\nInference Cost of the Web Searcher\n\nWe measure the inference cost introduced by the Web Searcher (WS) on the\nBrain Tumor MRI test set. The measurement is conducted using the same AgentIAD (PZ+WS) model reported in Table 2. Latency is measured as the average\n\n\fAgentIAD\n\n21\n\nwall-clock inference time per sample with batch size 1 under the same hardware\nand decoding settings.\nTable 10 reports the latency statistics. The average inference time is 2.90\nseconds per sample, and WS is invoked in 18.2% of the cases, indicating that\nthe agent performs web search only when additional information is needed.\nWhen WS is not invoked, the average inference time is 2.82 seconds per\nsample. When WS is triggered, the latency increases to 3.26 seconds per sample,\ncorresponding to an additional overhead of about 0.45 seconds. Overall, WS\nintroduces a small increase in inference time, while the overall latency remains\nmoderate because the search tool is used selectively.\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"