"<!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>PANDA: Towards Generalist Video Anomaly\nDetection via Agentic AI Engineer\n\narXiv:2509.26386v2 [cs.CV] 28 Oct 2025\n\n1\n\nZhiwei Yang1,2\nXidian University\n\n2\n\nChen Gao2†\nMike Zheng Shou2†\nShow Lab, National University of Singapore\n\nAbstract\nVideo anomaly detection (VAD) is a critical yet challenging task due to the complex and diverse nature of real-world scenarios. Previous methods typically rely\non domain-specific training data and manual adjustments when applying to new\nscenarios and unseen anomaly types, suffering from high labor costs and limited\ngeneralization. Therefore, we aim to achieve generalist VAD, i.e., automatically\nhandle any scene and any anomaly types without training data or human involvement. In this work, we propose PANDA, an agentic AI engineer based on MLLMs.\nSpecifically, we achieve PANDA by comprehensively devising four key capabilities:\n(1) self-adaptive scene-aware strategy planning, (2) goal-driven heuristic reasoning,\n(3) tool-augmented self-reflection, and (4) self-improving chain-of-memory. Concretely, we develop a self-adaptive scene-aware RAG mechanism, enabling PANDA\nto retrieve anomaly-specific knowledge for anomaly detection strategy planning.\nNext, we introduce a latent anomaly-guided heuristic prompt strategy to enhance\nreasoning precision. Furthermore, PANDA employs a progressive reflection mechanism alongside a suite of context-aware tools to iteratively refine decision-making\nin complex scenarios. Finally, a chain-of-memory mechanism enables PANDA to\nleverage historical experiences for continual performance improvement. Extensive experiments demonstrate that PANDA achieves state-of-the-art performance\nin multi-scenario, open-set, and complex scenario settings without training and\nmanual involvement, validating its generalizable and robust anomaly detection\ncapability. Code is released at https://github.com/showlab/PANDA.\n\n1\n\nIntroduction\n\nVideo anomaly detection (VAD) [1, 2, 3, 4] aims to identify abnormal or suspicious events in\nvideo streams, playing a vital role in a wide range of real-world applications such as intelligent\nsurveillance [5], traffic monitoring [6], autonomous driving [7], and industrial safety [2].\nExisting VAD methods follow a specialist-oriented paradigm and require manual participation when\ndeploying for new scenarios and anomalies. Broadly, they can be categorized into: training-dependent\nand training-free (Fig. 1(a)). Specifically, training-dependent methods rely on newly annotated data\nto train models for each target scenario. The manual and training costs make such methods lack\ngeneralization and versatility. Besides, training-free methods typically employ pre-trained large\nlanguage models (LLMs) or vision-language models (VLMs) as the backbone, thereby eliminating the\nneed for model training. However, they still depend heavily on manual engineering when deploying\nfor new scenarios and anomalies, such as scenario-specific preprocessing steps, handcrafted prompt\ntemplates, rule curation, and post-processing. These static pipelines still lack adaptivity, making them\nbrittle when confronted with uncertainty, long-term temporal dependencies, or complex, dynamic\nscenarios. Moreover, the hand-crafted nature restricts them from towarding generalist VAD.\n†Corresponding authors.\n39th Conference on Neural Information Processing Systems (NeurIPS 2025).\n\n\fAny Scenarios\n\nAny Anomaly Categories\n...\n\n...\nUser query\n\nManual Data Engineering\nSelection\nVideo\n\nLabeling\n\nTraining dataset\n\nVAD Model\n\n�\n\nTraining domain\nNon-training\nscenarios\ndomain scenarios\n\nRetraining\n\nTraining-dependent VAD\n\nTask-oriented\nManual Engineering\nPre-processing\n\nLLM or VLM\n\nAnomaly\nknowledge base\n\nAgentic\nAI Engineer\nSelf-adaptive\nscene-aware planning\n\n(a) Existing specialized methods\n\nSelf-improving\nchain-of-memory\n\nGoal-driven\nheuristic reasoning\n\nTask-oriented\nManual Engineering\nPost-processing\n\nTraining-free VAD\n\nTool-augmented\nself-reflection\n\nGeneralist\n\nManual-free\n\nTraining-free\n\n(b) Our generalist PANDA\n\nFigure 1: PANDA vs. Existing specialized methods. When facing arbitrary scenes and anomalies,\nPANDA can automatically adapt without the need for training refinements and manual adjustments,\nstill achieving superior performance.\nTo overcome the limitations of existing methods and free ourselves from the burden of domain-specific\ntraining and handcrafted pipeline design, our vision is to develop a general-purpose video anomaly\ndetection method that can be self-adaptive to new scenarios and novel anomaly types without requiring\nany training data or manual pipeline assembly. The recent success of Multimodal Large Language\nModels (MLLMs) in a wide range of visual understanding tasks offers a promising foundation\nfor realizing this vision. Therefore, we introduce PANDA, an agentic AI engineer for generalized\nVAD (Fig. 1(b)). Drawing inspiration from how human engineers systematically analyze problems,\nadapt to complex environments, and iteratively improve through tool use and experience, PANDA\nadaptively perceives the enviroment based on user-defined requirements, formulates detecion plans,\nperform goal-driven reasoning, invokes external tools to enhance decsion making, and continuously\naccumulates expeirence in memory for self-improvement.\nTechnically, the proposed PANDA is distinguished by the following aspects. (1) self-adaptive sceneaware strategy planning. Faced with a new scene or user-defined anomaly detection requirements,\nPANDA first conducts environment perception and understanding, then retrieves relevant anomaly\nrules from an anomaly knowledge database. Based on the environment context information, a\nscene-adaptive Retrieval Augmented Generation (RAG) mechanism is designed to construct tailored\nanomaly detection plans. (2) Goal-driven heuristic reasoning. PANDA injects task-specific prompts\nguided by latent anomaly cues, which steer the reasoning process toward more accurate and focused\ndecision-making. (3) Tool-augmented self-reflection. PANDA iteratively assesses uncertainty and\nactivates a suite of curated tools, such as object detection, image retrieve, or web search, to acquire\nadditional information and resolve ambiguous decision-making. (4) Self-improving chain-of-memory.\nPANDA integrates historical experiences to justify current reasoning decisions or self-reflection. By\nprogressively accumulating contextual cues across temporal spans, it enhances both the stability and\naccuracy of its decisions over time. Taken together, PANDA embodies an agentic AI engineer that\nproactively perceives diverse environments, formulates adaptive strategies, performs goal-driven\nreasoning, and progressively improves through tool-augmented reflection and a chain-of-memory\nmechanism, enabling generalizable video anomaly detection across complex real-world scenarios.\nExtensive experiments across multiple challenging benchmarks show that PANDA achieves stateof-the-art performance in multi-scenario, open-set, and complex scenario settings, without training\nand manual involvement. These results highlight PANDA’s strong potential as an autonomous and\ngeneral-purpose solution for real-world VAD.\n\n2\n\nRelated Work\n\nVideo anomaly detection (VAD) [8, 9, 10, 11], has long been a critical research topic in the computer\nvision field due to its wide range of real-world applications. Existing VAD methods are specialistoriented and can be broadly categorized into training-dependent and training-free approaches.\n2\n\n\fTraining-dependent VAD. These approaches rely on varying levels of annotated data and typically\nfall into three categories: semi-supervised VAD [2, 5, 10, 12, 13], weakly-supervised VAD [14, 15, 16,\n17, 18, 19], and instruction-tuned VAD [20, 21, 22, 23, 24]. For example, Ristea et al. [25] proposed\nan efficient anomaly detection model based on a lightweight masked autoencoder. Yang et al. [14]\nintroduced a text prompt-driven pseudo-labeling and self-training framework for weakly-supervised\nVAD. Zhang et al. [23] presented a model combining an anomaly-focused temporal sampler with an\ninstruction-tuned MLLM to detect anomalies. While these training-dependent methods often perform\nwell within the domain of the training data, they typically suffer from sharp performance degradation\nwhen deployed in out-of-distribution environments or faced with novel anomaly types. This limits\ntheir applicability in the open-world scenarios where anomalies are diverse, and context-sensitive.\nTraining-free VAD. Inspired by the recent success of LLMs [26, 27] and VLMs [28, 29, 30],\ntraining-free VAD methods [31, 32] have gained increasing attention. These approaches aim to\nleverage the powerful prior knowledge embedded in foundation models without requiring domainspecific training. For instance, Zanella et al. [31] proposed the first language-model-based trainingfree VAD framework, which improves anomaly scoring by aligning cross-modal features between\nLLMs and VLMs while suppressing noisy captions. Yang et al. [32] developed a rule-based anomaly\ninference framework by prompting LLMs to perform inductive and deductive reasoning over anomaly\nrules. Despite removing the need for training, these methods often rely on static prompting patterns\nand require substantial manual engineering (e.g., handcrafted pre/post-processing), which limits their\nadaptivity and robustness in complex, real-world scenarios.\nDistinct from both paradigms above, PANDA is an agent-based framework that embodies the\ncharacteristics of an agentic AI engineer, which is capable of autonomously performing VAD without\ntraining and manual engineering when faced with various real-world scenarios. By incorporating a\nprogressive reflection mechanism and a suite of perception-enhancing tools, PANDA can adaptively\nrefine its predictions through self-reflection and tool invocation. This enables PANDA to dynamically\nhandle diverse and challenging scenarios in the real world.\n\n3\n\nMethod\n\nIn this section, we present the core architecture and reasoning process of PANDA, an agentic AI\nengineer for generalized VAD. PANDA is designed to dynamically perceive diverse environments and\nperform progressive, tool-enhanced reasoning and self-refinement, as shown in Fig. 2. It achieves this\nthrough four synergistic modules: (1) self-adaptive scene-aware strategy planning, (2) goal-driven\nheuristic reasoning, (3) tool-augmented self-reflection, and (4) self-improving chain-of-memory.\n3.1\n\nSelf-adaptive Scene-aware Strategy Planning\n\nTo achieve VAD in general and unconstrained environments, it is essential to dynamically perceive the\ncurrent video context and construct targeted detection strategies. Given the scene-dependence of many\nreal-world anomalies and the variability in visual conditions, PANDA first performs self-adaptive\nperception of the input video to extract high-level environment contextual information.\nEnvironmental Perception. Given a user-defined detection query Userquery and an input video\nsequence V = {f1 , f2 , . . . , fN } containing N frames, PANDA uniformly samples M keyframes\nF = {f1 , f2 , . . . , fM } and constructs a perception prompt Promptperception combining F with the\nUserquery . This prompt is fed to a VLM, which returns structured environmental information:\nEnvInfo = VLM(F, Promptperception )\n= {Scene Overview, Potential Anomalies,\nWeather Condition, Video Quality}\n\n(1)\n\nHere, Scene Overview provides a high-level summary of the scene, including location type (e.g.,\nstreet, shop, parking lot) and observed activities. Potential Anomalies refers to types of suspicious behaviors that may plausibly occur in the current scene context. Weather Condition\ncaptures attributes such as time of day (day/night) and weather (e.g., sunny, rainy). Video Quality\nsummarizes resolution and clarity (e.g., low-resolution, blurred, noisy).\n3\n\n\fPlease help me detect the following types of abnormal events: Abuse, Arrest, Arson, Assault, Burglary, Explosion, Fighting, Road Accidents,\nRobbery, Shooting, Shoplifting, Stealing, Vandalism.\n\n...\n\nVLM Perception\n\nAnomaly Knowledge\n\nEnvironmental Information\n\nEvent Type\nAnomaly Rules\n\nRAG\n\nApplicable Scenes\n\nScene Overview\nPotential Anomalies\n• The video depicts a store with... • Burglary\nWeather Condition\n• Shoplifting\n• Daytime, bright light\n• Stealing\nVideo Quality\n• The overall quality of the video is low and blurry.\nRecalling past\nexperience ...\n\nToolkit\nImage Denoise\nBrightness Enhance\nImage Super-resolution\nObject Detection\n\nMLLM Reflection\n\nImage Zoom\nWeb Search\n...\n\nVLM Reasoning\nReasoning Results\n\nPreprocessing\n• Image Deblur\nAnomaly Rules\n• Companion distracts clerk while theft ...\nHeuristic Prompt\n• Observe customer interactions with ...\n\nTool Invoke\n\nReason Analysis\n• Need for further enhancement\nof image details and semantic\ninformation.\nTools to use\n• Image Super-resolution\n• Object Detection\nRecalling past\nexperience ...\n\nImage Super-resolution\n\nObject Detection\n\nMLLM Replanning\n\nVLM Reasoning\n\nDetection Strategy Update\n\nRefined Reasoning Results\n\nNew Anomaly Rules\n• Customers repeatedly pick\nup items and look around...\nNew Heuristic Prompt\n• Focusing on customer\nbehavior in the store...\n\nStatus: Normal / Abnormal / Insufficient\nScore: 0.6\nReason: The woman is browsing the\nitems with suspicious behavior, but\nbased on the current clip it is not clear if\nthere is a shoplifting anomaly.\n\nLong\nCoM\n\nSecond round of reflection\n\nMLLM Reflection\n\nTool Invoke\n\nSelf-Reflection\n\nImage Retrive\n\nReason Analysis\n• More information is needed\nto determine if the woman's\nbehavior...\nTools to use\n• Image Retrive\n• Web Search\n\nStatus: Normal / Abnormal / Insufficient\nScore: 0.5\nReason: The video shows two individuals\nbrowsing items in a store. The scene\nlacks sufficient detail to confidently\nclassify it as normal or abnormal.\n\nShort\nCoM\n\nFirst round of reflection\n\nSelf-Reflection\n\nImage Retrive\nImage Deblur\n\nMLLM Planning\nDetection Strategy Planning\n\nRetrive query: A woman is suspiciously\nbrowsing items in the store.\n\nWeb Search\nSearch query: What are\ntypical shoplifting\nbehaviors in a store?\n\n1. Customers put\nunpaid items in\ntheir bags...\n2. Customers...\n\nMLLM Replanning\n\nVLM Reasoning\n\nDetection Strategy Update\n\nRefined Reasoning Results\n\nNew Anomaly Rules\n• Customers taking items\nwithout paying...\nNew Heuristic Prompt\n• Focusing on the woman's\ninteraction behavior with the\nitems...\n\nStatus: Normal / Abnormal / Insufficient\nScore: 0.9\nReason: The woman carrying the bag on\nher back without paying, which is a\ntypical shoplifting event.\n\nFigure 2: Overview of the proposed PANDA. As shown in the figure, upon receiving a userdefined query, PANDA first performs environment perception and plans a scene-adaptive detection\nstrategy. PANDA then executes the plan with goal-driven heuristic reasoning. When encountering\nambiguous cases, PANDA enters a reflection phase, revising its plan and invoking external tools\nto refine the decision. Throughout the process, PANDA maintains both short-term and long-term\nChain-of-Memory (CoM), enabling it to accumulate experience and continually improve over time.\nRAG-Based Strategy Planning. With the structured environment context in hand, PANDA proceeds to plan its detection strategy. To avoid hallucinations and improve reliability, this planning is\nperformed via retrieval-augmented generation (RAG) [33], driven by a multimodal large language\nmodel (MLLM). First, based on Userquery , PANDA constructs a knowledge base prompt Promptknow\nand then generates a structured general anomaly knowledge base using the MLLM:\nκa = MLLM(Userquery , Promptknow ) = {Event Type, Anomaly Rules, Application Scenes}.\n(2)\nHere, Event Type indicates anomaly categories specified by the user. Anomaly Rules are detection\nrules associated with each anomaly type. Application Scenes are contextual environments where\nanomalies are likely to occur.\nFor each anomaly type, we predefine H rule-scene pairs to form the knowledge base. PANDA then\nuses the perceived EnvInfo as a query to retrieve the top-k most relevant anomaly rules:\nRulesa = RetrieveTopK(EnvInfo, κa ).\n\n(3)\n\nFinally, PANDA integrates the Userquery , EnvInfo, and Rulesa to construct a planning prompt\nPromptplan , which is passed to the MLLM to generate the detection strategy plan:\nPlanstrategy = MLLM(Promptplan )\n(4)\n= {Preprocessing, Potential Anomalies,\nHeuristic Prompt}.\nHere, Preprocessing specifies optional visual enhancement steps (e.g., brightness adjustment, denoising, super-resolution). Potential Anomalies refines the anomaly list based on rule relevance\nand scene understanding. Heuristic Prompt includes step-by-step reasoning instructions for each\npotential anomaly, enabling the downstream inference module to perform structured, chain-of-thought\nanalysis.\n4\n\n\fBy integrating self-adaptive environment perception and RAG-enhanced strategy planning, PANDA\nensures that subsequent anomaly reasoning is goal-driven and context-aware, significantly improving\nrobustness in open-world settings.\n3.2\n\nGoal-Driven Heuristic Reasoning\n\nThe reasoning module serves as the core component of PANDA for analyzing video anomaly events.\nPANDA supports both offline and online inference modes. In this section, we focus on the offline\nsetting, while the implementation details section will describes the online mode settings.\nUnder the guidance of the detection strategy plan constructed in subsection 3.1, PANDA performs\ngoal-driven heuristic reasoning using a VLM. Given the Userquery , a clip-level video segment\nVclip = {c1 , c2 , . . . , cT } (each video clip ct contains s video frames), and the Planstrategy , PANDA\nfirst applies the preprocessing tools specified in Planstrategy to obtain an enhanced video clip:\nVeclip = Preprocessing(Vclip ) = {e\nc1 , e\nc2 , . . . , e\ncT }.\n\n(5)\n\nNext, PANDA constructs a reasoning prompt based on the Planstrategy :\nPromptreasoning = {Memoryl-steps\n, Potential Anomalies, Rulesa , Heuristic Prompt,\ntext\nEnhancement and Reflection Info}.\nThe fields Potential Anomalies, Rulesa , and Heuristic Prompt are directly inherited from\nthe planning stage. The Enhancement and Reflection Info field incorporates information\nproduced during the self-reflection stage (To be described in subsection 3.3), including tool-based\nrefinements and updated anomaly rules and heuristic prompts. To enhance temporal awareness,\nPANDA equips a short-term memory component Memoryl-steps\ntext , which records the past l reasoning\nsteps as textual memory. In addition to textual memory, PANDA also maintains a corresponding visual\nmemory stream Memoryl-steps\nvisual , which stores visual frames aligned with the latest l steps, allowing the\nmodel to access fine-grained visual cues during inference.\nFinally, driven by the potential anomaly targets and enriched contextual knowledge, PANDA performs\nheuristic reasoning with the following formulation:\nResultreasoning = VLM(e\nct , Memoryl-steps\nvisual , Promptreasoning )\n= {Status : Normal/Abnormal/Insufficient,\nScore ∈ [0, 1], Reason : ⟨·⟩}.\n\n(6)\n\nHere, Status indicates the result of the VLM judgment: Normal indicates the clip is confidently\nclassified as non-anomalous, Abnormal denotes strong evidence of anomaly, and Insufficient\nsuggests the current information is inadequate to make a definitive judgment. Score is the probability\nof the existence of an abnormal event for the clip corresponding to each status. Reason is the reason\nfor the status judgment given by the VLM. When the result is Insufficient, PANDA will trigger\nthe reflection mechanism to gather additional context or observations before re-entering the reasoning\nloop.\n3.3\n\nTool-Augmented Self-Reflection\n\nIn complex scenarios, PANDA may not be able to make a clear decision on whether a video segment\nis normal or abnormal. In such ambiguous cases, it returns an Insufficient status, which triggers\nthe reflection module. PANDA adopts a tool-augmented self-reflection mechanism enhanced by\na specialized set of tools τ = {tool1 , tool2 , . . . , tooln } for visual content enhancement and\nauxiliary analysis, including image deblurring, denoising, brightness enhancement, image retrieval,\nobject detection, and web search, etc. These tools assist in gathering additional evidence to support\nthe decision-making process.\nExperience-Driven Reflection. Given an Insufficient Reason from the current reasoning step,\nPANDA first queries its long chain-of-memory (Long CoM, will be introduced in 3.4) to retrieve the\nmost similar history reflection cases:\nExperiencereflection = RetrieveTop1(Insufficient Reason, Long CoM).\n5\n\n(7)\n\n\fPANDA then constructs a reflection prompt using video context information, including the Userquery ,\nEnvInfo, Planstrategy , Rulesa , short chain-of-memory (short CoM), Insufficient Reason, and\nExperiencereflection : Promptreflection = {Userquery , EnvInfo, Planstrategy , Rulesa , short CoM,\nInsufficient Reason, Experiencereflection }. This prompt is fed into the MLLM to analyze the\ncause of uncertainty and recommend an appropriate reflection plan:\nResultreflection = MLLM(Promptreflection )\n= {\"Insufficient Reason\" : ⟨·⟩,\n\"Tools to Use\" : [{tool1 , params}, . . . , {tooln , params}],\n\"New Anomaly Rule\" : ⟨·⟩,\n\"New Heuristic Prompt\" : ⟨·⟩}.\n\n(8)\n\nHere, Insufficient Reason refers to the underlying cause of decision uncertainty, inferred by the\nMLLM in conjunction with VLM output and contextual information such as environmental cues and\nanomaly rules. Tools to Use specifies the names of tools used for information enhancement and\ntheir corresponding parameters. New Anomaly Rule and New Heuristic Prompt represent the\nupdated anomaly rule and the reformulated heuristic prompt, respectively.\nTool Invocation. PANDA executes the tool functions suggested in the reflection result to enhance\nboth visual and semantic information. The tool invocation process is formulated as:\nResulttool_augmented = ToolInvoke(tool1 , . . . , tooln )\n= {Text Enhancement Info,\nVisual Enhancement Info = b\nct ∪ cs }.\n\n(9)\n\nHere, Text Enhancement Info includes summaries from tool outputs (e.g., detected objects, web\nsearch results), while Visual Enhancement Info includes processed video clip b\nct and retrieved\nhistorical keyframe set cs = {f1 , f2 , ..., fs }.\nRefined Reasoning.\n\nPANDA updates the reasoning prompt with the newly acquired textual cues:\n\nPromptrefined\nreasoning = Promptreasoning ∪ {\nText Enhancement Info, New Anomaly Rule,\nNew Heuristic Prompt}\n\n(10)\n\nand re-reasoning the enhanced video clip input:\nrefined\nResultreflection\nct ∪ cs , Memoryl-steps\nreasoning = VLM(b\nvisual , Promptreasoning ).\n\n(11)\n\nIf the returned status is Normal or Abnormal, PANDA resumes reasoning at the next timestep. If\nthe status remains Insufficient, reflection is re-triggered. To prevent infinite loops, we limit the\nnumber of reflection rounds to r. If after r rounds the result is still Insufficient, PANDA assigns\na default anomaly score corresponding to the Insufficient status and skips the current segment\nand continues next timestep.\n3.4\n\nSelf-Improving Chain-of-Memory\n\nTo enable PANDA to become increasingly \"smarter\" over time by accumulating experience through\nthe iterative cycle of reasoning, reflection, and refined reasoning, PANDA equips a self-improving\nchain-of-memory (CoM) mechanism as shown in Fig. 3. This mechanism enhances both long-term\ncontext awareness and consistency in decision-making across video sequences. The CoM comprises\ntwo components: short chain-of-memory (short CoM) and long chain-of-memory (long CoM).\nShort CoM. In the reasoning stage, short CoM includes both the textual reasoning trace\nMemoryl-steps\nand its visual counterpart Memoryl-steps\ntext\nvisual , as described in subsection 3.2. In the reflection stage, short CoM is represented by the set of past reflection outputs: Resulthistory\nreflection =\n1\n2\nl\n{Resultreflection , Resultreflection , . . . , Resultreflection }.\n6\n\n\f...\n\n...\n\nStep 1: Reasoning Results\n• Status / Score / Reason\nStep 2: Reflection Results\n• insufficient reason\n• Reflection Plan\n\n...\n\nStep t-1: Visual/Status/Score/Reason\nStep t-2: Visual/Status/Score/Reason\nLong CoM\n\n Tools Used\n New Anomaly Rule\n New Heuristic Prompt\n\nStep t-3: Visual/Status/Score/Reason\n...\n\nupdate\n\nNormal or Abnormal\n\nInsufficient\n\nHistory Experience\n\nRetrieve\n\nStep 3: Re-reasoning Results\n• Status / Score / Reason\n...\n\nShort CoM\n\nNew Detection\nStrategy Planning\n...\n\nSelf-Reflection\nNew Experience\n\nFigure 3: Illustration of Self-Improving Chain-of-Memory.\n\nLong CoM. PANDA also maintains a temporally evolving long CoM: Long-CoM =\n{M1 , M2 , . . . , MT }, where each memory unit Mt at time step t encapsulates three key outputs:\nMt = {Resultreasoning , Resultreflection , Resultrefined\nreasoning }. This structure ensures that PANDA retains\na complete trace of all decision stages—initial reasoning, reflective analysis, and post-reflection\ndecisions. At the start of a video, LongCoM is empty by design, and PANDA relies on ShortCoM’s\nlocal window memory for initial reasoning and reflection. As more clips are processed, LongCoM\ngradually accumulates traces, supporting memory-consistent reasoning and reflection planning. With\nthis self-improving chain-of-memory, PANDA leverages accumulated historical experience to inform\nboth reasoning and reflection, leading to progressively more stable and accurate anomaly detection\nover time.\n\n4\n\nExperiments\n\n4.1\n\nExperiment Setup\n\nDatasets. We evaluate PANDA on four benchmarks: UCF-Crime [17], XD-Violence [16], UBnormal [34], and CSAD, which represent three distinct settings—multi-scenario (UCF-Crime and\nXD-Violence), open-set (UBnormal), and complex scenario (CSAD). UCF-Crime is a large-scale\ndataset comprising 1,900 long, untrimmed real-world surveillance videos. It covers 13 types of\nabnormal events such as fighting, abuse, stealing, arson, robbery, and traffic accidents. The training\nset includes 800 normal and 810 abnormal videos, while the test set consists of 150 normal and\n140 abnormal videos. XD-Violence is another large-scale dataset focused on violence detection. It\ncontains 4,754 videos collected from surveillance video, movies, and CCTV sources, encompassing\n6 categories of anomaly events. The training and test sets include 3,954 and 800 videos, respectively.\nUBnormal is a synthetic open-set video anomaly detection dataset with a total of 543 videos. It\ndefines 7 categories of normal events and 22 types of anomalies. Notably, 12 anomaly categories\nin the test set are unseen during training, making it a challenging benchmark for evaluating generalization under open-set conditions. CSAD is a complex-scene anomaly detection benchmark\nconstructed in this work. It consists of 100 videos (50 normal and 50 abnormal), sampled from\nUCF-Crime, XD-Violence, and UBnormal. CSAD includes videos with challenging conditions such\nas low resolution, poor illumination, high noise levels, and long-range temporal anomalies. It is\ndesigned to assess model robustness in complex and degraded environments.\nEvaluation Metrics. Following the previous methods [16, 17], we report the Area Under the Curve\n(AUC) of the frame-level receiver operating characteristic for UCF-Crime, UBnormal, and CSAD.\nFor XD-Violence, we follow the evaluation criterion of average precision (AP) suggested by the\nwork [16] to measure the effectiveness of our method.\nImplementation Details. We adopt Langgraph [35] to build the whole agent framework and all\nexperiments are implemented using PyTorch [36] on the A6000 GPU. We use Qwen2.5VL-7B [28] as\nthe VLM for perception and reasoning stages, and Gemini 2.0 Flash [27] as the MLLM for planning\nand reflection. During the RAG process, the anomaly knowledge base and environment information\n7\n\n\fTable 1: Comparisons with previous state-of-the-art methods on different datasets. \"Expl.\" stands for\n\"Explanation\", indicating whether the output results include interpretations of the detected anomalies.\nMethods categorized as \"Semi\", \"Weak\", or \"Instru-Tuned\" require training data to adapt to specific\nscenarios or anomaly types.\nMulti-Scenario\nUCF (AUC%) XD (AP%)\n\nMethods\n\nSupervision\n\nExpl.\n\nManual-free\n\nMode\n\nSpecialized methods\nAED-MAE[25] [CVPR2024]\nSTPAG[38] [CVPR2024]\nHL-Net[16] [ECCV2020]\nRTFM[39] [ICCV2021]\nUR-DMU[40] [AAAI2023]\nVadCLIP[15] [AAAI2024]\nTPWNG[14] [CVPR2024]\nVERA[41] [CVPR2025]\nHolmes-VAU[23] [CVPR2025]\nZS CLIP[28] [ICML2021]\nLLAVA-1.5[28] [CVPR2024]\nLAVAD [31] [CVPR2024]\nAnomalyRuler [32] [ECCV2024]\n\nSemi\nSemi\nWeak\nWeak\nWeak\nWeak\nWeak\nWeak\nInstru-Tuned\nTraining-free\nTraining-free\nTraining-free\nTraining-free\n\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✓\n✓\n✓\n✓\n✓\n✓\n\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n✗\n\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\nOffline\n\n82.44\n84.30\n86.97\n88.02\n87.79\n86.55\n88.96\n53.16\n72.84\n80.28\n-\n\nTraining-free\n\n✓\n\n✓\n\nOffline\nOnline\n\n84.89\n82.57\n\nOpen-Set\nUB (AUC%)\n\nComplex Scenario\nCSAD (AUC%)\n\n73.67\n77.81\n81.66\n84.51\n83.68\n70.11\n87.68\n17.83\n50.26\n62.01\n-\n\n58.50\n57.98\n64.94\n59.91\n56.77\n46.2\n53.71\n64.23\n71.90\n\n64.52\n72.47\n32.45\n47.78\n57.26\n-\n\n70.16\n63.57\n\n75.78\n72.41\n\n73.12\n71.25\n\nGeneralized method\nPANDA\n\n(ours)\n\nare encoded via the all-MiniLM-L6-v2 model [37], with the knowledge base indexed using FAISS\nfor efficient similarity retrieval. To improve the inference efficiency, the input video is sampled at 1\nFPS, and a video clip of s = 5 frames is inferred at each time step. PANDA supports both offline\nand online reasoning modes. In offline reasoning mode, the perception phase is sampling M = 300\nframes uniformly for the whole video, while only the initial M = 10 frames are sampled in online\nmode. The number of knowledge entries for each type of anomalous event in the anomaly knowledge\nbase is H = 20. The maximum number of reflection rounds r is set to 3. The short CoM length l = 5\nduring the reasoning stage. We retrieve the top k = 5 anomaly rules from the anomaly knowledge\nbase for each user query. More implementation details, including prompt templates and tool usage,\nare provided in the supplementary material.\n4.2\n\nComparison with State-of-the-Art Methods\n\nTable 1 compares the performance of PANDA against state-of-the-art specialized VAD methods,\nincluding both training-dependent and training-free methods. As shown, PANDA significantly\noutperforms all existing training-free baselines across all four datasets, even under online settings.\nOn the UBnormal dataset, which adopts an open-set evaluation protocol where test-time anomalies\nare unseen during training, PANDA surpasses both training-dependent and training-free approaches.\nThis highlights PANDA’s strong generalization capabilities.\nPANDA also exhibits notable advantages on CSAD, the complex-scene benchmark introduced in this\nwork, where traditional methods tend to fail under low-quality or temporally extended anomalies.\nPANDA’s superior performance across diverse datasets and conditions demonstrates its robustness\nand effectiveness as a general-purpose solution for real-world video anomaly detection.\n4.3\n\nAnalytic Results\n\nAnalysis of reflection round r. Table 2(a) shows the effect of varying the number of reflection\nrounds r on PANDA’s performance. We observe that performance improves gradually when increasing\nr from 1 to 5. Although r = 5 yields a slight additional improvement compared to r = 3, it\nintroduces more computational overhead due to repeated tool invocation and reasoning steps. To\nbalance efficiency and effectiveness, we adopt r = 3 as the default setting in all experiments.\nAnalysis of rules number k. Table 2(b) analyses the influence of the number of retrieved rules k\nused during RAG-based anomaly strategy planning. When too few rules are retrieved (e.g., k = 1), the\nsystem lacks diverse contextual cues to support robust reasoning, resulting in performance degradation.\n8\n\n\fTable 2: Key hyperparameter analyses on the UCF-Crime dataset.\n(a) Analysis of reflection round r.\n\n(b) Analysis of rules number k.\n\n(c) Analysis of short CoM length l.\n\nReflection\nRound r\n1\n3\n5\n\nRules\nNumber k\n1\n5\n9\n\nShort CoM\nlength l\n1\n5\n9\n\nUCF-Crime\n(AUC%)\n83.83\n84.89\n84.91\n\nUCF-Crime\n(AUC%)\n82.79\n84.89\n83.92\n\nUCF-Crime\n(AUC%)\n82.92\n84.89\n84.03\n\nTable 3: Ablation study on the capability of PANDA. Planning refers to the self-adaptive scene-aware\ndetection strategy planning, which contains detection planning, adaptive environment perception, and\nRAG with anomaly knowledge. Reflection denotes the tool-augmented self-reflection mechanism.\nMemory corresponds to the chain-of-memory module, encompassing both short-term and long-term\ncomponents.\nKey Capabilities of PANDA\n\nUCF-Crime (AUC%)\n\nPlanning\n\nReflection\n\nMemory\n\nPerformance\n\n✗\n✓\n\n✗\n✗\n\n✗\n✗\n\n75.25\n80.37 (+5.12%)\n\n✓\n\n✓\n\n✗\n\n82.63 (+2.26%)\n\n✓\n\n✓\n\n✓\n\n84.89 (+2.26%)\n\nConversely, setting k too high may introduce noisy or irrelevant rules that dilute reasoning quality.\nFinally, PANDA achieves optimal performance when setting k = 5.\nAnalysis of short CoM length l. Table 2(c) analyzes the impact of varying the short CoM length\nl during the reasoning phase. The best performance is achieved when l = 5. When the memory\nlength is reduced to l = 1, performance drops noticeably due to insufficient temporal information,\nwhich limits the model’s ability to leverage recent reasoning traces. On the other hand, increasing the\nmemory length to l = 9 also leads to performance degradation, likely because excessive memory\nintroduces historical noise that distracts from the current decision-making process.\nAblation Study. Table 3 presents an ablation study examining the contribution of each core capability in PANDA, including self-adaptive scene-aware strategy planning (Planning), tool-augmented\nself-reflection (Reflection), and chain-of-memory (Memory). The third row serves as the baseline,\nwhere PANDA performs direct reasoning solely based on the user-defined query, without planning,\nreflection, and memory modules. As shown, the performance is relatively poor, with an AUC of\n75.25%. Equipping PANDA with the planning capability yields a substantial improvement of +5.12%\nin AUC. This demonstrates the effectiveness of scene perception, rule retrieval via RAG, and contextaware strategy plans in inspiring the potential of PANDA. Adding the reflection module further\nimproves performance by +2.26%, suggesting that the self-reflection mechanism, enhanced by the\nintegration of external tools, expands PANDA’s capability to resolve challenging and ambiguous\ncases. Finally, incorporating the memory mechanism results in another +2.26% gain, validating the\neffectiveness of the chain-of-memory design. This module enables PANDA to accumulate experience\nacross time and use it to refine decisions. In summary, each of PANDA’s capabilities plays a vital role\nin enabling generalizable and reliable anomaly detection. The synergistic integration of all modules\nempowers PANDA as a highly capable agentic AI engineer for generalized VAD. For the ablation\nstudy on the key components corresponding to each capability, please refer to the Subsection C.1 in\nthe supplementary material.\n4.4\n\nQualitative Results\n\nFigure 4 shows a visualized example from the UCF-Crime test set to illustrate PANDA’s reasoningreflection process. The left side of the figure shows the anomaly score curve over time. On the\nright, we visualize PANDA’s internal reasoning and reflection process. When the model encounters\n9\n\n\fVideo Time 00:05 Reasoning Results: {''score'': 0.0, ''status'': ''normal'', ''reason'': ''The scene shows a quiet\nstore counter with no visible signs of abnormal activity. There are no people present, and the environment appears\nundisturbed.''}\n\n...\n\nVideo Time 02:25 Reasoning Results: {''score'': 0.2, ''status'': ''insufficient'', ''reason'': ''The video shows a\nstatic view of a store counter with no significant actions or interactions occurring. There is no clear indication of\nabnormal behavior based on the provided rules and prompts.''}\nReflection Round 1\nReflection Results: {\"reason\": \"The primary reason for insufficient information is the lack of activity in the video.\nThe VLM is observing a static scene with no discernible events. While the timestamp might suggest early morning\nand low activity, it doesn't definitively rule out potential subtle anomalies that the low video quality might obscure.\nThe VLM also appears to be overly reliant on immediate action, potentially missing precursory behavior that could\nindicate an impending anomaly. Also, the current rules do not account for pre-crime action analysis.\",\n\"tools_to_use\": [{\"tool_name\": \"Image Retrieve\", \"query\": \"Similar time of day, static view of store counter,\nidentify any instances of suspicious behavior before an anomaly occurs.\"}],\n\"new_anomaly_rule\": \"Security camera shows a still scene in a normally operating business during off-peak\nhours. Requires a check of entrance to the store for loitering for longer than five minutes.\",\n\"new_heuristic_prompt\": \"Analyze the current scene in the context of past instances with similar conditions.\nSpecifically, look for subtle changes in the environment (e.g., an object slightly out of place) or any person\nentering or loitering outside the storefront within the last hour, and determine if these subtle changes are\nsuspicious based on existing rules.\"}\nRe-reasoning Results: {\"score\": 0.2, \"status\": \"insufficient\", \"reason\": \"The scene appears to be a typical store\ninterior with no significant activity or changes observed. There are no clear indications of abnormal events such as\nforced entry, suspicious behavior, or physical altercations.\"}\nReflection Round 2\nReflection Results: {\"reason\": \"The primary reason for the insufficient information is the lack of activity and low\nvideo quality. The VLM is struggling to identify subtle cues that might indicate early stages of potential anomalies\nlike shoplifting, burglary, or robbery, especially given the grainy and low-resolution video feed. The historical data\nalso indicates a pattern of ''insufficient'' results due to the static nature of the scene in multiple clips. The current\nrules also focus on slightly different scene specifics.\",\n\"tools_to_use\": [{\"tool_name\": \"Image Super-Resolution\", \"query\": \"\"}],\n\"new_anomaly_rule\": \"Lack of customer activity combined with repeated glances towards merchandise near\nthe entrance in a convenience store setting during non-peak hours may indicate potential shoplifting or precrime surveillance.\",\n\"new_heuristic_prompt\": \"Focus on identifying subtle changes in the environment, such as items being moved\nor individuals displaying nervous behavior, even if the video quality is low. Pay close attention to hands and\npockets for potential signs of shoplifting. Consider if the lack of activity is unusual for the time of day (early\nmorning, according to historical data).\"}\nRe-reasoning Results: {\"score\": 0.7, \"status\": \"abnormal\", \"reason\": \"A person enters the store and quickly\nmoves behind the counter, which is inconsistent with normal customer behavior. This sudden movement and\npositioning near the cash register raises suspicion for a potential robbery.\"}\n\n...\n\nVideo Time 05:00 Reasoning Results: {''score'': 0.0, ''status'': ''normal'', ''reason'': ''The scene shows a static\nview of a store counter with no visible movement or interaction that would suggest an abnormal event. The\nenvironment appears calm and undisturbed.''}\n\nFigure 4: Visualization of qualitative results on UCF-Crime. On the left is a visualization of the\nanomaly score curve. The right side shows the specific reasoning and reflection process of PANDA.\nuncertainty and cannot confidently determine whether an anomaly is present, it transitions into the\nreflection phase. PANDA first analyzes the reason behind the insufficient status from the reasoning\nstage, and then invokes external tools to acquire complementary information to support decisionmaking. This case highlights PANDA’s capacity for progressive self-refinement and dynamic tool\ninvocation, demonstrating its effectiveness in tackling complex, real-world video anomaly detection\nscenarios. For more visualization samples, please refer to the Supplementary Material.\n\n5\n\nConclusion\n\nIn this work, we presented PANDA, an agentic AI engineer for generalized VAD that eliminates the\nneed for training data or manually crafted pipelines when faced with various real-world scenarios.\nPANDA integrates four core capabilities: self-adaptive scene-aware strategy planning, goal-driven\nheuristic reasoning, tool-augmented self-reflection, and the self-improving chain-of-memory. These\ncapabilities work in concert to enable PANDA to adaptively detect anomalies across diverse, dynamic,\nand previously unseen environments. Our extensive experiments across multiple benchmarks, including multi-scene, open-set, and complex scenarios, validate PANDA’s strong generalization ability and\nrobust performance without any training. These findings highlight PANDA’s potential as a generalist\nVAD solution for real-world scenes.\n\nAcknowledgement\nThis research is supported by the National Research Foundation, Singapore under its AI Singapore\nProgramme (AISG Award No: AISG3-RP-2022-030).\n10\n\n\fReferences\n[1] Peng Wu, Chengyu Pan, Yuting Yan, Guansong Pang, Peng Wang, and Yanning Zhang. Deep learning for\nvideo anomaly detection: A review. arXiv preprint arXiv:2409.05383, 2024.\n[2] Mahmudul Hasan, Jonghyun Choi, Jan Neumann, Amit K Roy-Chowdhury, and Larry S Davis. Learning\ntemporal regularity in video sequences. In CVPR, pages 733–742, 2016.\n[3] Yannick Benezeth, P-M Jodoin, Venkatesh Saligrama, and Christophe Rosenberger. Abnormal events\ndetection based on spatio-temporal co-occurences. In CVPR, pages 2458–2465, 2009.\n[4] Yang Cong, Junsong Yuan, and Ji Liu. Sparse reconstruction cost for abnormal event detection. In CVPR,\npages 3449–3456, 2011.\n[5] Cewu Lu, Jianping Shi, and Jiaya Jia. Abnormal event detection at 150 fps in matlab. In CVPR, pages\n2720–2727, 2013.\n[6] Vijay Mahadevan, Weixin Li, Viral Bhalodia, and Nuno Vasconcelos. Anomaly detection in crowded\nscenes. In CVPR, pages 1975–1981, 2010.\n[7] Yu Yao, Xizi Wang, Mingze Xu, Zelin Pu, Yuchen Wang, Ella Atkins, and David J Crandall. Dota:\nUnsupervised detection of traffic anomaly in driving videos. IEEE TPAMI, 45(1):444–459, 2022.\n[8] Guansong Pang, Cheng Yan, Chunhua Shen, Anton van den Hengel, and Xiao Bai. Self-trained deep\nordinal regression for end-to-end video anomaly detection. In CVPR, pages 12173–12182, 2020.\n[9] Weixin Luo, Wen Liu, and Shenghua Gao. Remembering history with convolutional lstm for anomaly\ndetection. In ICME, pages 439–444, 2017.\n[10] Wen Liu, Weixin Luo, Dongze Lian, and Shenghua Gao. Future frame prediction for anomaly detection–a\nnew baseline. In CVPR, pages 6536–6545, 2018.\n[11] Dong Gong, Lingqiao Liu, Vuong Le, Budhaditya Saha, Moussa Reda Mansour, Svetha Venkatesh, and\nAnton van den Hengel. Memorizing normality to detect anomaly: Memory-augmented deep autoencoder\nfor unsupervised anomaly detection. In CVPR, pages 1705–1714, 2019.\n[12] Zhiwei Yang, Jing Liu, Zhaoyang Wu, Peng Wu, and Xiaotao Liu. Video event restoration based on\nkeyframes for video anomaly detection. In CVPR, pages 14592–14601, 2023.\n[13] Zhiwei Yang, Peng Wu, Jing Liu, and Xiaotao Liu. Dynamic local aggregation network with adaptive\nclusterer for anomaly detection. In ECCV, pages 404–421, 2022.\n[14] Zhiwei Yang, Jing Liu, and Peng Wu. Text prompt with normality guidance for weakly supervised video\nanomaly detection. In CVPR, pages 18899–18908, 2024.\n[15] Peng Wu, Xuerong Zhou, Guansong Pang, Lingru Zhou, Qingsen Yan, Peng Wang, and Yanning Zhang.\nVadclip: Adapting vision-language models for weakly supervised video anomaly detection. In AAAI,\nvolume 38, pages 6074–6082, 2024.\n[16] Peng Wu, Jing Liu, Yujia Shi, Yujia Sun, Fangtao Shao, Zhaoyang Wu, and Zhiwei Yang. Not only look,\nbut also listen: Learning multimodal violence detection under weak supervision. In ECCV, pages 322–339,\n2020.\n[17] Waqas Sultani, Chen Chen, and Mubarak Shah. Real-world anomaly detection in surveillance videos. In\nCVPR, pages 6479–6488, 2018.\n[18] Peng Wu, Xuerong Zhou, Guansong Pang, Zhiwei Yang, Qingsen Yan, Peng Wang, and Yanning Zhang.\nWeakly supervised video anomaly detection and localization with spatio-temporal prompts. In ACMMM,\npages 9301–9310, 2024.\n[19] Heng Lian, Zhiwei Yang, Zhaoyang Wu, Bo Lin, Tianqiang Huang, and Qiaoru Miao. Vlial: Visionlanguage instance awareness learning via vlms for weakly supervised video anomaly detection. In RoboSoft,\npages 23–30, 2025.\n[20] Hang Du, Sicheng Zhang, Binzhu Xie, Guoshun Nan, Jiayang Zhang, Junrui Xu, Hangyu Liu, Sicong\nLeng, Jiangming Liu, Hehe Fan, et al. Uncovering what why and how: A comprehensive benchmark for\ncausation understanding of video anomaly. In CVPR, pages 18793–18803, 2024.\n\n11\n\n\f[21] Jiaqi Tang, Hao Lu, Ruizheng Wu, Xiaogang Xu, Ke Ma, Cheng Fang, Bin Guo, Jiangbo Lu, Qifeng\nChen, and Yingcong Chen. Hawk: Learning to understand open-world video anomalies. NeurIPS,\n37:139751–139785, 2024.\n[22] Huaxin Zhang, Xiaohao Xu, Xiang Wang, Jialong Zuo, Chuchu Han, Xiaonan Huang, Changxin Gao,\nYuehuan Wang, and Nong Sang. Holmes-vad: Towards unbiased and explainable video anomaly detection\nvia multi-modal llm. arXiv preprint arXiv:2406.12235, 2024.\n[23] Huaxin Zhang, Xiaohao Xu, Xiang Wang, Jialong Zuo, Xiaonan Huang, Changxin Gao, Shanjun Zhang,\nLi Yu, and Nong Sang. Holmes-vau: Towards long-term video anomaly understanding at any granularity.\narXiv preprint arXiv:2412.06171, 2024.\n[24] Zhiwei Yang, Chen Gao, Jing Liu, Peng Wu, Guansong Pang, and Mike Zheng Shou. Assistpda: An\nonline video surveillance assistant for video anomaly prediction, detection, and analysis. arXiv preprint\narXiv:2503.21904, 2025.\n[25] Nicolae-C Ristea, Florinel-Alin Croitoru, Radu Tudor Ionescu, Marius Popescu, Fahad Shahbaz Khan,\nMubarak Shah, et al. Self-distilled masked auto-encoders are efficient video anomaly detectors. In CVPR,\npages 15984–15995, 2024.\n[26] Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman,\nDiogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv\npreprint arXiv:2303.08774, 2023.\n[27] Gemini Team, Rohan Anil, Sebastian Borgeaud, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan\nSchalkwyk, Andrew M Dai, Anja Hauth, Katie Millican, et al. Gemini: a family of highly capable\nmultimodal models. arXiv preprint arXiv:2312.11805, 2023.\n[28] Shuai Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Sibo Song, Kai Dang, Peng Wang, Shijie\nWang, Jun Tang, et al. Qwen2. 5-vl technical report. arXiv preprint arXiv:2502.13923, 2025.\n[29] OpenGVLab Team. Internvl2: Better than the best—expanding performance boundaries of open-source\nmultimodal models with the progressive scaling strategy, 2024.\n[30] Bin Lin, Yang Ye, Bin Zhu, Jiaxi Cui, Munan Ning, Peng Jin, and Li Yuan. Video-llava: Learning united\nvisual representation by alignment before projection. arXiv preprint arXiv:2311.10122, 2023.\n[31] Luca Zanella, Willi Menapace, Massimiliano Mancini, Yiming Wang, and Elisa Ricci. Harnessing large\nlanguage models for training-free video anomaly detection. In CVPR, pages 18527–18536, 2024.\n[32] Yuchen Yang, Kwonjoon Lee, Behzad Dariush, Yinzhi Cao, and Shao-Yuan Lo. Follow the rules: reasoning\nfor video anomaly detection with large language models. In ECCV, pages 304–322. Springer, 2024.\n[33] Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich\nKüttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. Retrieval-augmented generation for knowledgeintensive nlp tasks. NeurIPS, 33:9459–9474, 2020.\n[34] Andra Acsintoae, Andrei Florescu, Mariana-Iuliana Georgescu, Tudor Mare, Paul Sumedrea, Radu Tudor\nIonescu, Fahad Shahbaz Khan, and Mubarak Shah. Ubnormal: New benchmark for supervised open-set\nvideo anomaly detection. In CVPR, pages 20143–20153, 2022.\n[35] AI LANGCHAIN. Langgraph: Multi-agent framework for llms. 2025. URL https://github. com/langchainai/langgraph. Accessed, pages 01–24, 2025.\n[36] Sagar Imambi, Kolla Bhanu Prakash, and GR Kanagachidambaresan. Pytorch. Programming with\nTensorFlow: solution for edge computing applications, pages 87–104, 2021.\n[37] Nils Reimers and Iryna Gurevych. Making monolingual sentence embeddings multilingual using knowledge\ndistillation. In EMNLP, 2020.\n[38] Ayush K Rai, Tarun Krishna, Feiyan Hu, Alexandru Drimbarean, Kevin McGuinness, Alan F Smeaton,\nand Noel E O’connor. Video anomaly detection via spatio-temporal pseudo-anomaly generation: A unified\napproach. In CVPR, pages 3887–3899, 2024.\n[39] Yu Tian, Guansong Pang, Yuanhong Chen, Rajvinder Singh, Johan W Verjans, and Gustavo Carneiro.\nWeakly-supervised video anomaly detection with robust temporal feature magnitude learning. In ICCV,\npages 4975–4986, 2021.\n\n12\n\n\f[40] Hang Zhou, Junqing Yu, and Wei Yang. Dual memory units with uncertainty regulation for weakly\nsupervised video anomaly detection. In AAAI, volume 37, pages 3769–3777, 2023.\n[41] Muchao Ye, Weiyang Liu, and Pan He. Vera: Explainable video anomaly detection via verbalized learning\nof vision-language models. In CVPR, pages 8679–8688, June 2025.\n[42] Tianheng Cheng, Lin Song, Yixiao Ge, Wenyu Liu, Xinggang Wang, and Ying Shan. Yolo-world: Real-time\nopen-vocabulary object detection. In CVPR, pages 16901–16911, 2024.\n[43] Xintao Wang, Liangbin Xie, Chao Dong, and Ying Shan. Real-esrgan: Training real-world blind superresolution with pure synthetic data. In ICCV, pages 1905–1914, 2021.\n[44] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish\nSastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from\nnatural language supervision. In ICML, pages 8748–8763, 2021.\n[45] Tavily. Tavily search api. https://www.tavily.com.\n\n13\n\n\fTechnical Appendices and Supplementary Material\nA\n\nOverview of Technical Appendices and Supplementary Material\n\nThis technical appendices and supplementary material provide additional information not included in the main\npaper. Specifically:\n• Section B offers further clarification on methodological and experimental details.\n• Section C presents additional ablation studies and parameter analysis experiments.\n• Section D details the toolset employed by PANDA.\n• Section E shows the prompts used at each stage of the PANDA framework.\n• Section F provides additional visualizations of qualitative results across various datasets.\n• Section G discusses the current limitations, broader impacts, and future work directions.\n\nB\n\nAdditional Methodological and Experimental Details\n\nB.1\n\nVisualization of the PANDA Detailed Pipeline\n\nFigure 5 presents a visualized case study on a test example from the UCF-Crime dataset, illustrating the\ndetailed execution process of PANDA across its core components: anomaly knowledge base construction,\nself-adaptive scene-aware strategy planning, goal-driven heuristic reasoning, tool-augmented self-reflection, and\nthe self-improving chain-of-memory mechanism.\n\nB.2\n\nClarification on Evaluation Modes and SOTA Comparison\n\nIn Table 1 of the main paper, we distinguish between offline and online settings based on whether future\ninformation is utilized when reasoning over a given frame or clip. If future information is accessed, the method\nis considered offline; otherwise, it falls under the online setting. For offline evaluation, we follow the SOTA\nmethods AED-MAE, LAVAD, and AnomalyRuler, which are compared in Table 1 of the main paper, and apply\ntemporal smoothing (mean filtering, window size=10) on the final anomaly scores.\nAmong the compared methods, Holmes-VAU is a fine-tuned VLM-based approach that leverages detailed\nanomaly annotations via instruction tuning. It was originally evaluated only on UCF-Crime and XD-Violence.\nIts results on UBnormal and CSAD are reproduced by us, without any re-training, using its publicly released\nmodel. As seen in Table 1 of the main paper, PANDA significantly outperforms Holmes-VAU on UBnormal, an\nopen-set dataset that includes unseen anomaly types. While Holmes-VAU slightly surpasses PANDA in online\nmode on CSAD, this is primarily due to CSAD including a large number of videos derived from UCF-Crime and\nXD-Violence—the original training sets of Holmes-VAU. Notably, PANDA still achieves superior performance\nunder the offline setting, underscoring its strong generalization capability. These results demonstrate the\nlimitations of relying solely on fine-tuned VLMs when facing domain shift and complex real-world conditions.\nAdditionally, we report new evaluation results for three prominent training-free baselines: ZS-CLIP, LLaVA-1.5,\nand LAVAD, on UBnormal and CSAD. PANDA consistently and substantially outperforms all of them across\nboth datasets. Together, these experimental results reinforce the strength of PANDA as a generalist, fully\nautomated VAD agent, capable of adapting its reasoning to scene-specific conditions without supervision or\nhand-crafted engineering.\n\nC\n\nAdditional Experiments\n\nC.1\n\nAblation of Key Component\n\nTable 4 presents the results of an ablation study evaluating the contribution of PANDA’s six core components.\nThe third row in the table corresponds to a baseline that directly queries the VLM using only the user-defined\nanomaly description without leveraging any PANDA modules. This baseline yields notably poor performance,\nconfirming that naive prompting alone is insufficient. As more modules are incrementally added—namely,\ndetection strategy planning, adaptive scene perception, RAG with anomaly knowledge, self-reflection, short\nCoM, long CoM—the performance steadily improves. When all six components are combined, PANDA achieves\nits best overall performance. These results demonstrate that each individual module contributes positively to the\nfinal performance and validates the effectiveness of our whole PANDA framework design.\n\n14\n\n\fTable 4: Ablation results of PANDA component.\nKey Components of PANDA\n\nDataset\n\nDetection Strategy Planning\n\nSelf-Adaption Scene-Aware\n\nRAG with Anomaly Knowledge\n\nSelf-Reflection\n\nShort CoM\n\nLong CoM\n\nUCF-Crime(AUC%)\n\n✗\n✓\n✓\n✓\n✓\n✓\n✓\n\n✗\n✗\n✓\n✓\n✓\n✓\n✓\n\n✗\n✗\n✗\n✓\n✓\n✓\n✓\n\n✗\n✗\n✗\n✗\n✓\n✓\n✓\n\n✗\n✗\n✗\n✗\n✗\n✓\n✓\n\n✗\n✗\n✗\n✗\n✗\n✗\n✓\n\n75.25\n77.01\n78.92\n80.37\n82.63\n83.94\n84.89\n\nTable 5: Additional Experiments.\n(a) Impact of different MLLMs.\n\nDifferent\nMLLMs\nQwen2.5-72B\nDeepseekV3\nGPT4o\nGemini 2 Flash\n\nC.2\n\nUCF-Crime\n(AUC%)\n84.03\n84.72\n84.97\n84.89\n\n(b) Effect of input clip length s.\n\nInput Clip Length s\n(Number of frames)\n1\n3\n5\n7\n\nUCF-Crime\n(AUC%)\n84.25\n84.56\n84.89\n83.15\n\n(c) Analysis of Inference speed.\n\nDatasets\nName\nUCF-Crime\nXD-Violence\nUBnormal\nCSAD\n\nAverage speed of inference\n(FPS)\n0.82\n0.86\n0.79\n0.53\n\nImpact of Different MLLMs\n\nTable 5a compares the performance of PANDA when integrated with different multi-modal large language models\n(MLLMs). GPT-4o and Gemini 2 Flash represent proprietary models, while DeepSeek-V3 and Qwen2.5-72B\nare open-source alternatives. As shown, GPT-4o achieves the highest performance. However, we adopt Gemini\n2 Flash in our main pipeline due to its strong trade-off between performance and cost-effectiveness.\nNotably, although Qwen2.5-72B yields the lowest performance among the compared models, it remains\nsignificantly superior to prior training-free baselines. Given its open-source nature and ease of local deployment,\nit serves as a practical and scalable option for resource-constrained scenarios.\n\nC.3\n\nEffect of Input Clip Length\n\nTable 5b analyzes how varying the number of frames in each input video clip affects PANDA’s performance.\nAs the input length increases from 1 to 5 frames, detection accuracy steadily improves, suggesting that shortrange temporal cues are beneficial to the reasoning process. However, when the clip length is extended to 7\nframes, performance noticeably drops. We hypothesize that this is due to the binary labeling strategy used\nduring evaluation—if a clip is anomalous, all frames of the clip are scored as anomalous. For longer clips that\nmay contain both normal and abnormal frames, this scoring scheme introduces noise, leading to performance\ndegradation.\n\nC.4\n\nAnalysis of Inference Speed\n\nTable 5c reports the average inference speed of PANDA across different datasets. As observed, PANDA achieves\nsimilar inference times on UCF-Crime, XD-Violence, and UBnormal. However, a noticeable slowdown is\nobserved on the CSAD dataset. This is primarily because CSAD contains videos with complex conditions and\nscenarios, leading PANDA to more frequently enter the reflection stage. Since the reflection stage involves\ninvoking additional tools, it introduces greater computational overhead. Despite this, the overall average\ninference speed of PANDA remains acceptable for non-time-sensitive applications, demonstrating its practical\nfeasibility in real-world deployments where latency is not a critical constraint.\n\nD\n\nToolset Details\n\nPANDA is equipped with a modular and extensible set of tools designed to enhance video content analysis,\nmitigate visual degradation, and provide external contextual information. These tools are automatically selected\nand invoked during the self-reflection stage based on the detection context. Below, we provide a detailed\nsummary of each tool integrated into the PANDA framework.\n\nObject Detection. PANDA employs the YOLOWorld [42] model pretrained on a wide set of open-world concepts. It supports fine-grained category-specific detection including actions like “person hitting another”, “person\nsetting something on fire”, and “person stealing”. This enables robust anomaly-related scene understanding\nthrough bounding-box localization and category labels.\n\n15\n\n\fImage Denoising. PANDA uses OpenCV’s fast non-local means filter for image denoising. It reduces color\nand spatial noise in frames using adaptive filtering, helping enhance clarity in low-light or noisy environments.\n\nImage Deblurring. PANDA applies unsharp masking with Gaussian blur subtraction to sharpen edge details\nfor motion blur or out-of-focus issues. This lightweight enhancement improves perceptual clarity without the\nneed for retraining.\n\nImage Brightness Enhancement. PANDA uses OpenCV’s CLAHE (Contrast Limited Adaptive Histogram\nEqualization) on the L-channel in LAB color space. This ensures localized brightness normalization for dimly\nlit or overexposed frames.\n\nImage Super-Resolution. PANDA integrates the Real-ESRGAN [43] model for resolution enhancement.\nIt improves detail preservation and restores textures in low-resolution videos using a deep RRDBNet-based\nsuper-resolution pipeline.\n\nImage Retrieval. PANDA uses CLIP-based [44] visual-textual retrieval to match current queries (e.g.,\n“robbery incident”) with previously seen keyframes. Cosine similarity between CLIP embeddings is used for\nscoring relevance.\nWeb Search. PANDA leverages the Tavily Search API [45] for querying web content related to unknown or\nuncertain anomalies. Search results are parsed into structured summaries that can be referenced in the reasoning\nprocess.\n\nImage Zooming. PANDA leverages a bicubic interpolation-based zooming tool to magnify regions that\nrequire enhanced spatial detail using a specified zoom factor. This is useful when detecting small-scale\ninteractions or distant activities.\nAll tools are dynamically invoked during the reflection stage via the MLLM-generated reflection plan. Each\ntool outputs enhanced frame sets and structured summaries that are used to augment the reasoning prompt for\nfollow-up reasoning steps.\n\nE\n\nSystem Prompts\n\nIn this section, we present the detailed prompts used by PANDA across its core stages. Figure 6 illustrates the\nprompt used during anomaly knowledge base construction. Figure 7 shows the self-adaptive environmental\nperception prompt. Figure 8 presents the prompt for anomaly detection strategy planning. Figure 9 demonstrates\nthe goal-driven heuristic reasoning prompt. Figure 10 displays the prompt used during the tool-augmented\nself-reflection phase.\n\nF\n\nAdditional Visualization Results\n\nFigures 11 and 12 further show the qualitative results of the samples on the XD-Violence and UBnormal test\nsets.\n\nG\n\nDiscussions\n\nG.1\n\nLimitations\n\nPANDA currently integrates a curated set of commonly used tools for enhancement and reasoning. While these\ntools suffice for most general scenarios, expanding the toolkit to accommodate domain-specific modalities (e.g.,\nthermal imaging) could broaden PANDA’s applicability.\n\nG.2\n\nBroader Impacts\n\nPANDA advances the paradigm of automated video anomaly detection by integrating vision-language models\nand decision-time tool augmentation into a unified AI agent framework. This work has the potential to improve\nthe robustness and interpretability of security monitoring systems, enabling adaptive deployment across diverse\nenvironments without training. Moreover, We also recognize the importance of ethical considerations: systems\nlike PANDA must be deployed responsibly, with attention to privacy protection, fairness, and minimizing\nunintended surveillance harms.\n\nG.3\n\nFuture Work\n\nEnhancing Real-Time Adaptability. To make PANDA more suitable for practical deployments, future work\ncould focus on reducing inference latency and optimizing tool invocation paths.\n\n16\n\n\fImproving Spatial Reasoning and Localization. Currently, PANDA focuses on frame-level or clip-level\nanomaly identification. Incorporating spatial anomaly localization, such as identifying the precise region or\nobject involved in an abnormal event, could significantly expand its utility in surveillance systems.\n\n17\n\n\fAnomaly Knowledge Base Construction\nPlease help me detect the following types of abnormal\nevents: Abuse, Arrest, Arson, Assault, Burglary,\nExplosion, Fighting, Road Accidents, Robbery,\nShooting, Shoplifting, Stealing, Vandalism.\n\nSelf-adaption Scene-aware Strategy Planning\nPerception\nPrompt\n\nQwen2.5-VL\n\nReasoning\nPrompt\n\nAnomaly\nKnowledge\nBase Prompt\n\n\"Rule ID\": \"SHO-X001\",\n\"Event Type\": \"Shoplifting\",\n\"Rule Description\": \"Customer puts merchandise inside clothing or\npersonal bag.\",\n\"Applicable Scenes\": \"Clothing store, Supermarket, Pharmacy\".\n...\n\nAnomaly Knowledge Base\nEvent Type\nAnomaly Rules\nApplicable Scenes\n\nGemini2.0 Flash\n\nRetrieve\nRAG\n\nEnvironmental Information\n\"Scene Overview\": \"The video depicts a convenience store with shelves\nstocked with various products. The store appears well-lit, with a mix of canned\ngoods, snacks, and other items visible. A customer is seen browsing the shelves\nwhile another person, possibly an employee, is seated at the counter. The\nenvironment suggests a typical retail setting.\",\n\"Weather Condition\": \"The video is shot indoors under artificial lighting,\nwhich is consistent throughout the frames. There are no indications of weather\nconditions as the scene is entirely inside the store.\",\n\"Video Quality\": \"The video quality appears to be that of a standard security\ncamera recording, with low clarity and some graininess. The image is blurry, and\nthere are no significant distortions or artifacts affecting the overall view.\",\n\"Potential Anomalies\": \"Robbery, shoplifting, and stealing are high probability\nanomalies in retail store scenarios.\"\n\nGemini2.0 Flash\n\nPlanning\nPrompt\n\nDetection Strategy Plan\n\"Preprocessing\": \"Image Denoise -&gt; Image Deblur\",\n\"Potential Anomalies\": \"Shoplifting, Stealing, Robbery\",\n\"Heuristic Prompts\": {\n\"Shoplifting\": \"Analyze customer interactions with products. Does the customer\nconceal an item without paying? Is the customer acting suspiciously near valuable\nitems? Check if the customer leaves the store without the item having been\nscanned.\",\n\"Stealing\": \"Observe interactions between customers and items. Is someone\ndiscreetly taking items from shelves or other customers without permission? Pay\nattention to quick movements and attempts to hide objects.\",\n\"Robbery\": \"Detect sudden aggressive behavior directed at the cashier or other\ncustomers. Look for weapons, threats, or demands for money. Analyze if someone\nforcefully takes money or valuable items from the cashier or customers.\",\n\nGoal-Driven Heuristic Reasoning\nVideo Time 00:05 Reasoning Results: {\"score\": 0.0, \"status\": \"normal\", \"reason\": \"There are no visible signs of abnormal events such as shoplifting, stealing, or robbery in this video clip. The\nscene appears to be a typical retail environment with customers browsing and shopping.\"}\n\n...\n\nQwen2.5-VL\n\nTool-Augmented Self-Reflection\n\nQwen2.5-VL\n\nVideo Time 00:30 Reasoning Results: {\"score\": 0.2, \"status\": \"insufficient\", \"reason\": \"The video frames show a general view of a store with people walking around, but no specific actions that\nclearly indicate shoplifting, stealing, or robbery. Due to the lower video quality, the lack of clarity and distinct action makes it difficult to make accurate judgments.\"}\n\nHistory Experience\n\nReflection\nPrompt\n\nRAG\nGemini 2.0 Flash\n\n\"Insufficient Reason\": \"The video frames show a general view of a store with no clear indication of specific abnormal\nevents such as shoplifting or stealing. The lack of detailed actions or interactions makes it difficult ...\"\n\"Reflection Result\": { \"reason\": \"The VLM is struggling due to the low video quality and the subtlety of actions associated\nwith potential shoplifting or stealing in a busy retail environment. The lack of clear details makes ...\",\n\"tools_to_use\": [{\"tool_name\": \"Image Super-Resolution\", \"query\": \"\"}],\n\"new_anomaly_rule\": \"Improve image clarity through super-resolution to meticulously analyze hand movements, object\ninteractions, and body language in retail environments, focusing on identifying indicators of shoplifting, such as concealing\nitems or suspicious bag handling near shelves and checkout areas. \",\n\"new_heuristic_prompt\": \"After super-resolution enhancement, focus on individuals near the checkout counter and shelves,\npaying close attention to their hand movements, body language, and interactions with merchandise.\".}\n\nRetrieve\n\nHistory\nExperience\nLong CoM\n\nReflection Round 1\nReflection Results: {\"reason\": \"The VLM reports 'insufficient information' because the low video\nquality obscure the subtle actions and interactions that might indicate shoplifting or other\nsuspicious behavior in a convenience store. With reference to similar historical experiences, the\nfocus should be on improving the video quality to better analyze these subtle actions.\",\n\"tools_to_use\": [{\"tool_name\": \"Image Super-Resolution\",\"query\": \"\"}],\n\"new_anomaly_rule\": \"Enhance image clarity through super-resolution to meticulously analyze\nhand movements and object interactions in retail environments, focusing on identifying\nconcealment of items in pockets or bags without payment near shelves and checkout areas.\",\n\"new_heuristic_prompt\": \"After super-resolving the images, analyze the video with a focus on\nthe customer's hand movements, interactions with products on the shelves, and any attempts to\nconceal items. Pay close attention to whether the customer places any items into their pockets or\nbags without visible signs of payment or interaction with the cashier. Consider the customer's\nproximity to the cashier and their overall demeanor. If there's evidence of concealment, classify the\nscene as potentially abnormal; otherwise, classify it as normal.\".}\n\nQwen2.5-VL\n\nTool Code\n\nTool Invoke\n\nimage_super_resolution_results =\nimage_super_resolution(frames: list)\n\nTool Name:\n\"Image Super-Resolution\"\nParama: \"\"\n\nRefined Reasoning\nPrompt\n\nRe-reasoning Results: {\"score\": 0.2, \"status\": \"insufficient\", \"reason\": \"The scene appears to be a typical store interior with no significant activity or changes observed. The person in the\nforeground is picking up merchandise with no obvious shoplifting or suspicious behavior.\"}\nHistory Experience\n\nReflection\nPrompt\n\nRAG\nGemini 2.0 Flash\n\n\"Insufficient Reason\": \"The video frames show a general view of a store with minimal activity. There are no clear\nindications of abnormal events such as shoplifting, stealing, or other listed anomalies...\"\n\"Reflection Result\": {\"reason\": \"The VLM is reporting 'insufficient information' due to the subtlety of actions associated\nwith potential shoplifting in a typical convenience store setting and low video quality. The VLM needs to focus on specific\nactions that, while seemingly innocuous on their own, might indicate shoplifting when combined.\",\n\"tools_to_use\": [{\"tool_name\": \"Object Detection\", \"query\": \"\"}],\n\"new_anomaly_rule\": \"Detect and track actions such as concealing items, placing items in bags/pockets, nervous\nbehavior, and interactions with store personnel to identify potential shoplifting incidents. \",\n\"new_heuristic_prompt\": \"Analyze the video, focusing on the actions of the customer browsing the shelves. Specifically,\ndetect and track if they are concealing any items, placing them in a bag or pocket without paying... \".}\n\nRetrieve\n\nHistory\nExperience\nLong CoM\n\nReflection Round 2\nReflection Results: {\"reason\": \"The VLM is reporting insufficient information due to the low\nvideo quality, which obscures subtle actions that might indicate shoplifting or other anomalies.\nWhile image super-resolution has been used previously, and there's an overall calm scene, the\nVLM isn't focusing on the *context* of actions. For instance, a person picking up an item and\nplacing it in a bag might be normal, but doing so furtively, while looking around suspiciously, is\nnot. The system needs to be more sensitive to body language and subtle cues associated with\npotential theft.\",\n\"tools_to_use\": [{\"tool_name\": \"Web Search\", \"query\": \"body language cues for shoplifting\"}],\n\"new_anomaly_rule\": \"Analyze individuals' body language and interaction patterns within the\nstore, focusing on subtle cues such as furtive glances, nervous movements, concealment attempts,\nand inconsistencies in behavior around merchandise. Consider proximity to checkout and\ninteractions with staff to determine the likelihood of shoplifting. \",\n\"new_heuristic_prompt\": \"Analyze the video, focusing on subtle cues in body language that\nmight indicate shoplifting. Look for furtive glances, nervous movements, attempts to conceal\nitems, and inconsistent or hurried actions around merchandise. Consider the context of these\nactions. Are they near the checkout, or further away? Are they interacting with employees, or\navoiding interaction? If several of these cues are present, classify the scene as potentially\nabnormal; otherwise, classify it as normal.\".}\n\nQwen2.5-VL\n\nQwen2.5-VL\n\nTool Code\nweb_search_results = web_search(query=\"body\nlanguage cues for shoplifting\")\nTool Invoke\nTool Name: \"Web Search\"\nParama:\n{\"query\": \"body language\ncues for shoplifting\"}\n\nweb_search_results =\n\"1. 7 Signs Of A Potential Shoplifter - Off Duty Officers\nDisplaying Avoidance Behaviors\nOne of the keys to identifying a shoplifter is to have a\nthorough knowledge of body language. ...\nhttps://offdutyofficers.com/7-signs-of-a-potentialshoplifter/\"\n2. ... \"\n\nRefined Reasoning\nPrompt\n\nRe-reasoning Results: {\"score\": 0.8, \"status\": \"abnormal\", \"reason\": \"The person in the foreground appears to be concealing something under their arm, which is a common indicator of shoplifting.\nThe individual's body language, including their avoidance of eye contact and nervous movements, aligns with the heuristic prompts for shoplifting.\"}\n\nVideo Time 00:35 Reasoning Results: {''score'': 0.0, ''status'': ''normal'', ''reason'': ''The scene shows a static view of a store counter with no visible movement or interaction that would suggest an\nabnormal event. The environment appears calm and undisturbed.''}\n\n...\n\nFigure 5: Visualization of the PANDA detailed pipeline. We show a more detailed pipeline for\nPANDA by visualizing the results of a test sample on UCF-Crime.\n18\n\n\fAnomaly Knowledge Base Construction Prompt\nYou are an expert in designing detection rules for video anomaly detection. Based\non the user's specified types of abnormal events, your task is to generate 20\ncomprehensive and diverse detection rules for each event type.\nUser Requirement:\n{user_query}\nEach rule must include the following four fields:\n1. Rule ID: A unique identifier for the rule (e.g., \"FIG-X001\").\n2. Event Type: The corresponding abnormal event category (e.g., \"Fighting\").\n3. Rule Description: A concise and clear description of the behavioral pattern\nthat defines this event.\n4. Applicable Scenes: A list of real-world scenarios where this rule may be\napplicable (e.g., \"Street, Shopping mall, School playground\").\nThe rules should cover a wide range of realistic situations for each event type.\nPlease output your response in the following structured JSON format:\n[{\n\"Rule ID\": \"FIG-X001\",\n\"Event Type\": \"Fighting\",\n\"Rule Description\": \"Pulling hair or grabbing clothes during struggle\",\n\"Applicable Scenes\": \"Shopping mall, Playground, Street corner\"\n},\n...\n]\n\nFigure 6: System prompt for anomaly knowledge base construction.\n\nSelf-Adaption Environmental Perception Prompt\nYou are an expert in video anomaly perception. Your task is to perform an initial\nunderstanding and analysis of the provided video frames based on the user's\nspecified requirements.\nUser Requirement:\n{user_query}\nPlease respond by completing the following four aspects:\n1. Scene Overview: Describe the environment shown in the video (e.g., shopping\nmall, office, street, surveillance corridor) and briefly summarize the main\nactivities or events observed.\n2. Weather Condition: Describe the visual lighting conditions (e.g.,\ndaytime/nighttime, sunny/overcast, bright/dim).\n3. Video Quality: Comment on the overall quality of the video (e.g., clear,\nblurry, noisy, low frame rate, low light.etc.).\n4. Potential Anomalies: Based on the visual content, what types of abnormal events\nare likely to occur in this video (e.g., Fighting, Stealing).\nPlease return your output strictly in the following JSON format:\n{\n\"Scene Overview\": \"...\",\n\"Weather Condition\": \"...\",\n\"Video Quality\": \"...\",\n\"Potential Anomalies\": \"...\"\n}\n\nFigure 7: System prompt for self-adaptive environmental perception.\n\n19\n\n\fAnomaly Detection Strategy Planning Prompt\nYou are a strategic expert in video anomaly detection, specializing in planning\neffective detection strategies based on user-defined requirements, video\nenvironment information, and scene-specific anomaly rules. Your role is to\ngenerate an optimal plan that guides the analysis module in accurately detecting\nanomalies in the current video scene.\nUser Requirement:\n{user_query}\nVideo Environment Information:\n1. Scene Overview: {env_info.get(\"Scene Overview\", \"Unknown\")}\n2. Weather Condition: {env_info.get(\"Weather Condition\", \"Unknown\")}\n3. Video Quality: {env_info.get(\"Video Quality\", \"Unknown\")}\n4. Potential Anomalies: {env_info.get(\"Potential Anomalies\", \"Unknown\")}\nAnomaly Detection Rules:\n{anomaly_rules}\nBased on the user’s requirement, the preliminary video environment information,\nand the provided anomaly rules, please design a strategy tailored for this video\nscenario. Your response must include the following three components:\n1. Preprocessing Recommendations and Pipeline\nSuggest a sequence of preprocessing steps (e.g., Image Deblurring, Brightness\nEnhancement, Image Denoising) that can help improve video quality and support\nbetter anomaly detection, especially if the video is of poor quality.\n2. Potential Anomaly Types\nBased on the preliminary video environment information and the given scenerelated anomaly rules, further infer and list the most possible types of anomalies\nin this scenario.\n3. Heuristic Prompts for VLM\nUsing the anomaly rules as guidance, craft chain-of-thought–style heuristic\nprompts for each potential anomaly type. These prompts are intended to assist\nVisual Language Model in performing accurate anomaly judgments.\nPlease return your output strictly in the following JSON format:\n{\n\"Preprocessing\": \"Step1 -&gt; Step2 -&gt; ...\",\n\"Potential Anomalies\": \"Fighting, Stealing, ...\",\n\"Heuristic Prompts\": {\n\"Fighting\": \"Heuristic prompt with reasoning steps...\",\n\"Stealing\": \"Heuristic prompt with reasoning steps...\",\n...\n}\n}\nExample Output:\n{\n\"Preprocessing\": \"Image Brightness Enhancement -&gt; Image Denoising\",\n\"Potential Anomalies\": \"Fighting, Stealing\",\n\"Heuristic Prompts\": {\n\"Fighting\": \"Observe the number of people, their movements, and interactions.\nIf two individuals are repeatedly making aggressive contact, consider it a\npotential fight.\",\n\"Stealing\": \"Identify solitary individuals interacting with objects,\nespecially if they conceal items or leave quickly without paying.\"\n}\n}\n\nFigure 8: System prompt for anomaly detection strategy planning.\n\n20\n\n\fGoal-Driven Heuristic Reasoning Prompt\nYou are a highly skilled expert in video anomaly detection, specializing in\nidentifying abnormal events through temporal and spatial analysis of visual\nevidence.\nGiven a sequence of video frames, user requirements, potential anomalies, anomaly\ndetection rules, heuristic prompts, and enhancement/reflection information, your\ntask is to assess the likelihood of abnormal events in the current video clip.\nYou must output:\n- A soft anomaly score between **0.0 (clearly normal)** and **1.0 (clearly\nabnormal)**.\n- A status label from: **\"normal\"**, **\"abnormal\"**, or **\"insufficient\"**.\n- A reason justifying your decision.\nUser Requirement:\n{user_query}\nHistorical Detection Info:\n{history_result_prompt if history_result_prompt.strip() else \"No reliable\nhistorical detection information available.\"}\nCurrent Video Clip Index:\nClip {index}\nPotential Anomalies:\n{planning_info.get('potential_anomalies', '')}\nAnomaly Detection Rules:\n{anomaly_rules}\nHeuristic Prompt:\n{planning_info.get('heuristic_prompts', '')}\nEnhancement and Reflection Information:\n{formatted_enhancement_prompt}\nYour analysis should follow three steps:\n1. Describe the main visible actions and interactions between people or objects in\nthe scene.\n2. Assess how strongly these actions match any known abnormal event patterns using\nthe provided rules and prompts. The provided anomaly rules may not be\ncomprehensive, so you also apply your own expert reasoning.\n3. Based on your assessment, assign a score and label, and explain your reasoning\nclearly.\n4. If the [Enhancement and Reflection Information] section provides additional\ninformation, you should refer to it emphatically.\nScoring Guidelines:\n- A score close to **1.0** indicates clear and confident abnormal behavior.\n- A score close to **0.0** indicates clearly normal behavior.\n- A score near **0.5** means uncertain, ambiguous behavior or mixed signals.\nExamples of valid reasons for \"insufficient\":\n- \"The entire scene is too blurry or dark, making it difficult to distinguish any\nactions.\"\n- \"All persons are either occluded or out of frame.\"\n- \"Only partial limbs are visible and motion cues are unclear.\"\nPlease strictly output your response in the following JSON format:\n{\n\"score\": float, //anomaly score in [0.0, 1.0]\n\"status\": \"normal/abnormal/insufficient\",\n\"reason\": \"A detailed explanation of your reasoning...\"\n}\n\nFigure 9: System prompt for goal-driven heuristic reasoning.\n\n21\n\n\fTool-Augmented Self-Reflection Prompt\nYou are a reflection assistant within a video anomaly detection system.\nThe current VLM analysis module has returned \"insufficient statu\" for determining\nwhether an abnormal event occurred in the given video clip.\nYour task is to critically analyze the situation based on the provided context and\nrecommend solutions.\nHere is the contextual information:\n- User Requirement: {user_query}\n- Video Environment Information:\n**Scene Overview: {env_info.get(\"Scene Overview\", \"Unknown\")}\n**Weather Condition: {env_info.get(\"Weather Condition\", \"Unknown\")}\n**Video Quality: {env_info.get(\"Video Quality\", \"Unknown\")}\n- Anomaly Detection Rules:\n{anomaly_rules}\n- Potential Anomalies: {planning_info.get('Potential Anomalies', '')}\n- Historical Detection Results:\n{historical_results}\n- Current VLM Output Reason: {reason}\n- Information Enhancement tools Already Used: {tools_already_used}\n- History Experience: {memory_context}\nBased on this information, your tasks are:\n1. Analyze and determine the primary reasons for the insufficient information.\n2. Recommend which tools from the available options should be used to enhance the\ninformation for better anomaly detection.\n{tool_description_text}\n3. For any selected tool that requires a 'query' input (e.g., image_retrieve,\nweb_search), generate an appropriate query based on the context; otherwise leave\nthe 'query' field empty.\n4. Propose a new representative anomaly detection rule derived from the current\nsituation to better support future VLM analysis.\n5. Propose an additional heuristic prompt based on the context and your analysis\nto better guide the VLM toward an accurate judgment.\nPlease output your response in the following structured JSON format:\n{\n\"reason\": \"...your analysis of why the information is insufficient...\",\n\"tools_to_use\": [\n{\n\"tool_name\": \"One of the most critical tools.\",\n\"query\": \"generated query if needed, otherwise leave empty\"\n}\n],\n},\n\"new_anomaly_rule\": \"...a new representative anomaly rule derived from your\nanalysis and context...\",\n\"new_heuristic_prompt\": \"...additional guidance to help the VLM make a more\naccurate judgment...\"\n}\nImportant Notes:\n- When calling tools, make sure you don't duplicate any of the information\nenhancement tools that have already been applied, and use only one of the most\ncritical tools at a time.\n- If all available information enhancement tools have been exhausted, you should\ndirectly suggest in the 'new_heuristic_prompt' how to guide the VLM analysis\nmodule to make the most reasonable judgment based on incomplete evidence.\n- If the current context provides enough information to make a clear judgment,\nplease directly guide the VLM analysis module in the 'new_heuristic_prompt' to\nconclude whether the event is abnormal or normal.\n\nFigure 10: System prompt for tool-augmented self-reflection.\n\n22\n\n\fVideo Time 00:05 Reasoning Results: {''score'': 0.0, ''status'': ''normal'', ''reason'': ''The video shows a news anchor reporting live from a studio.\nThere are no visible signs of abnormal events such as fighting, shooting, riot, abuse, car accidents, or explosions in the frames provided.''}\n\n...\n\nVideo Time 00:15 Reasoning Results: {score'': 0.2, ''status'': ''insufficient'', ''reason'': ''The video shows a news anchor reporting on an Indonesia\nprotest, but the frames do not provide enough visual detail to assess the presence of abnormal events like fighting, shooting, riot, abuse, car accident,\nor explosion. The crowd appears to be gathered, but specific actions or behaviors that would indicate these anomalies are not discernible.''}\nReflection Round 1\nReflection Results: reflection: {\"reason\": \"The VLM output indicates that while the video shows a protest, it lacks the visual detail necessary to\nconfirm the presence of specific abnormal events. This suggests that the initial VLM analysis couldn't identify actions or behaviors indicative of\nfighting, shooting, riot, abuse, car accidents, or explosions. The core issue is the granularity of the analysis; it needs to delve deeper into the actions\nof individuals within the crowd to identify potential anomalies based on the provided rules.\",\n\"tools_to_use\": [{\"tool_name\": \"Object Detection\",\"query\": \"\"}],\n\"new_anomaly_rule\": \"Isolated acts of violence or aggression within a protest crowd, such as pushing, shoving, or physical altercations between\nindividuals.\"，\n\"new_heuristic_prompt\": \"Analyze the crowd dynamics, focusing on identifying individuals exhibiting aggressive behavior, wielding weapons, or\ncausing disturbances. Check for rapid and chaotic movements indicative of rioting or fleeing from a potential explosion. Also, pay close attention to\ninteractions between protesters and authorities to determine if abuse or clashes are occurring.\"}\nRe-reasoning Results: {\"score\": 0.2, \"status\": \"insufficient\", \"reason\": \"The video frames show a news anchor reporting on an Indonesia protest and\na crowd of people, but no specific actions or behaviors indicating fighting, shooting, riot, abuse, car accident, or explosion are observed. The crowd\nappears to be gathered peacefully, and there is no visible evidence of abnormal events.\"}\nReflection Round 2\nReflection Results: {\"reason\": \"The primary reason for the insufficient information is the VLM's inability to discern specific actions or behaviors\nwithin the crowd that would indicate the presence of anomalies like fighting, rioting, abuse, car accidents, or explosions. While the scene context is\nknown (protest in Jakarta), the VLM lacks detailed analysis of individual and group activities to confirm or deny the occurrence of abnormal events.\nThe 'object_detection' tool was already used, suggesting that basic object recognition didn't provide enough insights. The VLM can only determine\nthat there is a crowd but can't figure out any potential fighting or dangerous activity.\",\n\"tools_to_use\": [{\"tool_name\": \"Image Retrieve\", \"query\": \"riots or protests involving violence or clashes in Jakarta\"}],\n\"new_anomaly_rule\": \" Sudden, rapid crowd dispersal or localized outbreaks of aggressive behavior (shoving, pushing, object throwing) within a\nprotest environment. \"，\n\"new_heuristic_prompt\": \"Analyze the crowd's movements and interactions closely. Focus on identifying signs of aggression, such as pushing,\nshoving, or individuals being targeted. Look for objects being thrown, signs of property damage, or any indications of conflict with authorities.\nConsider the speed and direction of crowd movement - are they dispersing rapidly, suggesting a potential threat or explosion? Also, search for\nobjects being brandished such as sticks, weapons or other harmful objects.\"}\nRe-reasoning Results: {\"score\": 0.7,\"status\": \"abnormal\",\"reason\": \"The crowd appears to be engaged in a protest, with some individuals wearing\nmasks and holding flags. There was a sense of urgency and movement at the scene, which is typical of a riot.\"}\nVideo Time 00:20 Reasoning Results: {\"score\": 0.8, \"status\": \"abnormal\", \"reason\": \"The crowd appears to be engaged in a protest, with some\nindividuals raising their hands and others holding flags. The presence of a large number of people and the context of election results suggest\npotential unrest. \"}\n\n...\n\nFigure 11: Visualization of qualitative results for a sample on the XD-Violence test set.\n\nVideo Time 00:05 Reasoning Results: {\"score\": 0.1, \"status\": \"normal\", \"reason\": \"The scene shows a quiet street at night with a few pedestrians\nstanding around. There are no visible signs of abnormal behavior such as jaywalking, walking drunk, accidents, or running. The pedestrians appear\nto be stationary or moving slowly, which does not match the criteria for any of the listed abnormal events.\"}\nVideo Time 00:10 Reasoning Results: {\"score\": 0.2, \"status\": \"insufficient\", \"reason\": \"The video frames show a pedestrian crossing a zebra\ncrossing, but the low lighting make it difficult to discern specific details about the pedestrian's actions or the surrounding environment. There is no\nclear indication of abnormal behavior based on the provided rules and prompts.\"}\nReflection Round 1\nReflection Results: {\"reason\": \"The primary reasons for insufficient information are low lighting, moderate video quality, and the pedestrian's\nactions being difficult to discern. This makes it hard to determine if the pedestrian is exhibiting abnormal behavior such as walking drunk or\njaywalking. The presence of snow and the nighttime setting further complicate the analysis.\",\n\"tools_to_use\": [{\"tool_name\": \"Image Brightness Enhancement\", \"query\": \"\"}],\n\"new_anomaly_rule\": \"Pedestrian exhibits unstable gait or balance while crossing a street, especially under adverse conditions such as low lighting\nor slippery surfaces, indicating possible intoxication or medical issue. \",\n\"new_heuristic_prompt\": \"Focus on identifying any indicators of erratic movement, such as swaying, stumbling, or sudden changes in direction.\nAlso, check if the pedestrian deviated from the designated crosswalk area. If the pedestrian's movement appears stable and they remain within the\ncrosswalk, consider the event normal, despite the low lighting.\"}\nRe-reasoning Results: {\"score\": 0.2, \"status\": \"insufficient\",\"reason\": \"The video frames show a pedestrian crossing a street at night, but the foggy\nconditions make it difficult to discern specific actions or behaviors that could indicate abnormal events. There are no clear indications of jaywalking,\nwalking drunk, accidents, or other anomalies based on the visible information.\"}\nReflection Round 2\nReflection Results: {\"reason\": \"The primary reasons for insufficient information are the foggy conditions, and potentially low resolution which\nhinder the VLM's ability to discern specific actions and behaviors. While 'Brightness Enhancement' was already applied, the fog and resolution may\nstill be limiting factors. We need to try and improve clarity.\",\n\"tools_to_use\": [{\"tool_name\": \"Image Denoising\",\"query\": \"\"}],\n\"new_anomaly_rule\": \"Reduced visibility obscures pedestrian activity, making it difficult to identify normal behavior or detect pedestrian-related\nanomalies in nighttime or adverse weather conditions.\",\n\"new_heuristic_prompt\": \"Focus on identifying changes in pedestrian speed and direction, even if the details are not perfectly clear. Look for\nsudden stops, erratic movements, or collisions, however subtle they might appear. Prioritize detecting deviations from normal walking patterns\nconsidering the environment of the scene.\"}\n\nRe-reasoning Results: {\"score\": 0.7, \"status\": \"abnormal\", \"reason\": \"The pedestrian in the center of the frame appears to be walking erratically,\nwith a lack of coordination and balance, which matches the description of 'Walking Drunk'. The low visibility due to foggy conditions adds\nuncertainty but does not negate the observed erratic behavior.\"}\nVideo Time 00:15 Reasoning Results: {\"score\": 0.7, \"status\": \"abnormal\", \"reason\": \"A pedestrian is crossing the street outside of the designated\ncrosswalk area, which matches the rule JAY-X001 for jaywalking. The pedestrian appears to be crossing at a point where there is no marked\ncrosswalk nearby, indicating a potential safety risk.\"}\n\nFigure 12: Visualization of qualitative results for a sample on the UBnormal test set.\n\n23\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"