"<!DOCTYPE html>\n<html lang=\"zh\" data-theme=\"light\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>fulltext.txt — Vercel Design System</title>\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css\">\n<style>\n\n:root {\n  /* Vercel Palette */\n  --geist-foreground: #171717;\n  --geist-background: #ffffff;\n  --geist-secondary: #4d4d4d;\n  --geist-tertiary: #666666;\n  --geist-quaternary: #808080;\n  --geist-border: #ebebeb;\n  --geist-surface-tint: #fafafa;\n  \n  /* Workflow Accents */\n  --develop-blue: #0a72ef;\n  --preview-pink: #de1d8d;\n  --ship-red: #ff5b4f;\n  \n  /* Interactive & Status */\n  --link-blue: #0072f5;\n  --ds-focus-color: hsla(212, 100%, 48%, 1);\n  --badge-blue-bg: #ebf5ff;\n  --badge-blue-text: #0068d6;\n  \n  /* Shadow-as-Border Philosophy */\n  --shadow-border: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(0, 0, 0, 0.16) 0px 0px 0px 1px;\n  --shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(0, 0, 0, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.06) 0px 4px 6px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-full: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, rgba(0, 0, 0, 0.04) 0px 8px 8px -8px, #fafafa 0px 0px 0px 1px;\n  --shadow-ring: rgb(235, 235, 235) 0px 0px 0px 1px;\n  \n  /* Radius Scale */\n  --radius-xs: 2px;\n  --radius-sm: 4px;\n  --radius-md: 6px;\n  --radius-lg: 8px;\n  --radius-xl: 12px;\n  --radius-pill: 9999px;\n}\n\n[data-theme=\"dark\"] {\n  --geist-foreground: #ededed;\n  --geist-background: #000000;\n  --geist-secondary: #a1a1a1;\n  --geist-tertiary: #888888;\n  --geist-quaternary: #666666;\n  --geist-border: #222222;\n  --geist-surface-tint: #0a0a0a;\n  \n  --shadow-border: rgba(255, 255, 255, 0.14) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(255, 255, 255, 0.28) 0px 0px 0px 1px;\n  --shadow-card: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.4) 0px 2px 4px, #111111 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 6px 12px, #111111 0px 0px 0px 1px;\n  --shadow-card-full: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 8px 16px -4px, #111111 0px 0px 0px 1px;\n  --shadow-ring: rgb(40, 40, 40) 0px 0px 0px 1px;\n  \n  --badge-blue-bg: rgba(10, 114, 239, 0.15);\n  --badge-blue-text: #70b5ff;\n}\n\n* { box-sizing: border-box; }\nhtml { scroll-behavior: smooth; }\nbody {\n  margin: 0;\n  font-family: \"Geist\", Arial, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n  background-color: var(--geist-background);\n  color: var(--geist-foreground);\n  font-feature-settings: \"liga\" 1;\n  -webkit-font-smoothing: antialiased;\n  min-height: 100vh;\n}\n\na {\n  color: inherit;\n  text-decoration: none;\n  transition: color 0.15s ease;\n}\n\n/* 导航栏 (Vercel Clean Sticky Nav) */\n.vercel-nav {\n  position: sticky;\n  top: 0;\n  background-color: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  z-index: 100;\n  padding: 0 24px;\n  height: 64px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n.nav-brand {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n.vercel-triangle {\n  width: 22px;\n  height: 19px;\n  fill: var(--geist-foreground);\n}\n.nav-title {\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: -0.32px;\n  color: var(--geist-foreground);\n}\n.nav-badge-pill {\n  font-family: \"Geist Mono\", ui-monospace, monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  background: var(--badge-blue-bg);\n  color: var(--badge-blue-text);\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n}\n\n.nav-links {\n  display: flex;\n  align-items: center;\n  gap: 24px;\n}\n.nav-link {\n  font-size: 14px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.nav-link:hover, .nav-link.active {\n  color: var(--geist-foreground);\n}\n.nav-link.active {\n  font-weight: 600;\n}\n\n.nav-actions {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n/* 按钮规范 */\n.btn-primary-dark {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: opacity 0.15s;\n}\n.btn-primary-dark:hover {\n  opacity: 0.9;\n}\n.btn-secondary-white {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: background 0.15s, box-shadow 0.15s;\n}\n.btn-secondary-white:hover {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border-hover);\n}\n.theme-toggle-btn {\n  background: transparent;\n  border: none;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  width: 36px;\n  height: 36px;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--geist-foreground);\n}\n\n/* 核心容器 */\n.vercel-container {\n  max-width: 1200px;\n  margin: 0 auto;\n  padding: 56px 24px 100px;\n}\n\n/* Hero Section (Gallery Emptiness + Negative Letter-spacing) */\n.vercel-hero {\n  text-align: center;\n  max-width: 860px;\n  margin: 0 auto 56px;\n}\n.hero-stage-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 4px 14px;\n  border-radius: var(--radius-pill);\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  margin-bottom: 24px;\n}\n.stage-dot {\n  width: 7px;\n  height: 7px;\n  border-radius: 50%;\n}\n.vercel-hero h1 {\n  font-size: 48px;\n  font-weight: 600;\n  line-height: 1.05;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 16px;\n}\n.vercel-hero p {\n  font-size: 20px;\n  font-weight: 400;\n  line-height: 1.80;\n  color: var(--geist-secondary);\n  margin: 0 auto 28px;\n}\n\n/* Workflow Pipeline (Develop -> Preview -> Ship) */\n.workflow-pipeline {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 768px) {\n  .workflow-pipeline { grid-template-columns: 1fr; }\n}\n.workflow-step {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px 22px;\n  transition: box-shadow 0.2s;\n}\n.workflow-step:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n.step-mono-label {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  margin-bottom: 8px;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n.step-title {\n  font-size: 20px;\n  font-weight: 600;\n  letter-spacing: -0.96px;\n  color: var(--geist-foreground);\n  margin-bottom: 6px;\n}\n.step-desc {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n\n/* Metric Cards (Section 4 Spec) */\n.metric-grid {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 900px) {\n  .metric-grid { grid-template-columns: repeat(2, 1fr); }\n}\n.metric-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n}\n.metric-number {\n  font-size: 40px;\n  font-weight: 600;\n  line-height: 1.0;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin-bottom: 8px;\n  font-feature-settings: \"tnum\" 1;\n}\n.metric-label {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.4;\n}\n\n/* VAD 专栏 Banner (Ship Red & Vercel Clean) */\n.vad-showcase {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-xl);\n  padding: 32px;\n  margin-bottom: 48px;\n  position: relative;\n}\n.vad-header-row {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 12px;\n  margin-bottom: 12px;\n}\n.vad-header-row h2 {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  color: var(--geist-foreground);\n  margin: 0;\n}\n.vad-pillars-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n  gap: 14px;\n  margin-top: 24px;\n}\n.vad-pillar-item {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 14px 16px;\n}\n.vad-pillar-title {\n  font-size: 14px;\n  font-weight: 600;\n  color: var(--ship-red);\n  margin-bottom: 4px;\n}\n.vad-pillar-text {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n.vad-filter-bar {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  margin: 24px 0 16px;\n  padding: 12px 16px;\n  background: var(--geist-surface-tint);\n  border-radius: var(--radius-md);\n  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);\n}\n.vad-filter-btn {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  font-weight: 500;\n  padding: 6px 14px;\n  border-radius: 9999px;\n  border: none;\n  background: transparent;\n  color: var(--geist-secondary);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.vad-filter-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0,0,0,0.05);\n}\n.vad-filter-btn.active {\n  background: #171717;\n  color: #ffffff;\n}\n.vad-search-input {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  padding: 7px 12px;\n  border-radius: 6px;\n  border: 1px solid var(--geist-border);\n  background: #ffffff;\n  color: var(--geist-foreground);\n  width: 280px;\n  outline: none;\n  transition: border-color 0.15s, box-shadow 0.15s;\n}\n.vad-search-input:focus {\n  border-color: #0a72ef;\n  box-shadow: 0 0 0 2px rgba(10, 114, 239, 0.2);\n}\n\n/* 控制栏：搜索、视图、筛选 */\n.control-bar {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  margin-bottom: 24px;\n  flex-wrap: wrap;\n}\n.search-input-wrap {\n  position: relative;\n  flex: 1;\n  max-width: 480px;\n}\n.search-input {\n  width: 100%;\n  height: 40px;\n  padding: 0 38px 0 14px;\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  color: var(--geist-foreground);\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  outline: none;\n  transition: box-shadow 0.15s;\n}\n.search-input:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n.search-kbd {\n  position: absolute;\n  right: 12px;\n  top: 50%;\n  transform: translateY(-50%);\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  color: var(--geist-quaternary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n\n.view-switcher {\n  display: flex;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  background: var(--geist-background);\n  padding: 2px;\n}\n.view-btn {\n  background: transparent;\n  border: none;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-tertiary);\n  padding: 6px 12px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n  transition: color 0.15s, background 0.15s;\n}\n.view-btn.active {\n  background: var(--geist-surface-tint);\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 筛选芯片行 (Filter Pill Strip) */\n.filter-group-strip {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  margin-bottom: 28px;\n  padding: 16px 20px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-lg);\n}\n.filter-row {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  flex-wrap: wrap;\n}\n.filter-label-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  min-width: 68px;\n}\n.pill-badge {\n  background: var(--geist-background);\n  color: var(--geist-secondary);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 3px 12px;\n  border-radius: var(--radius-pill);\n  font-size: 12px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 0.15s;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n}\n.pill-badge:hover {\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border-hover);\n}\n.pill-badge.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  font-weight: 600;\n  box-shadow: none;\n}\n.pill-badge.active-blue {\n  background: var(--develop-blue);\n  color: #ffffff;\n  box-shadow: none;\n}\n.pill-badge.active-red {\n  background: var(--ship-red);\n  color: #ffffff;\n  box-shadow: none;\n}\n\n/* Bento Grid Cards (Section 4 & 6 Spec) */\n.card-grid-bento {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n  gap: 16px;\n}\n.vercel-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  transition: box-shadow 0.2s, transform 0.2s;\n  text-decoration: none;\n  color: inherit;\n  overflow: hidden;\n  min-width: 0;\n  word-break: break-word;\n}\n.vercel-card:hover {\n  box-shadow: var(--shadow-card-hover);\n  transform: translateY(-2px);\n}\n.card-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 12px;\n  gap: 8px;\n}\n.card-tag-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  letter-spacing: 0.5px;\n}\n.status-pill-badge {\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 500;\n  flex-shrink: 0;\n}\n.pub-accepted { background: #ebfdf2; color: #027a48; }\n.pub-workshop { background: #eff8ff; color: #175cd3; }\n.pub-submitted { background: #fff8e6; color: #b54708; }\n.pub-preprint { background: #f2f4f7; color: #475467; }\n.pub-other { background: #f9f5ff; color: #6941c6; }\n\n[data-theme=\"dark\"] .pub-accepted { background: rgba(2, 122, 72, 0.2); color: #32d583; }\n[data-theme=\"dark\"] .pub-workshop { background: rgba(23, 92, 211, 0.2); color: #84caff; }\n[data-theme=\"dark\"] .pub-submitted { background: rgba(181, 71, 8, 0.2); color: #fec84b; }\n[data-theme=\"dark\"] .pub-preprint { background: rgba(71, 84, 103, 0.2); color: #98a2b3; }\n[data-theme=\"dark\"] .pub-other { background: rgba(105, 65, 198, 0.2); color: #d6bbfb; }\n\n/* 必读标杆徽章 (Vercel Amber Accent) */\n.milestone-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  padding: 2px 7px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 600;\n  white-space: nowrap;\n  flex-shrink: 0;\n  transition: all 0.15s ease;\n}\n.milestone-badge.ms-idea, .milestone-badge:not([class*=\"ms-\"]) {\n  color: #b54708;\n  background: #fff8e6;\n  border: 1px solid rgba(247, 144, 9, 0.35);\n  box-shadow: 0 1px 2px rgba(181, 71, 8, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-idea, [data-theme=\"dark\"] .milestone-badge:not([class*=\"ms-\"]) {\n  color: #fec84b;\n  background: rgba(181, 71, 8, 0.22);\n  border-color: rgba(254, 200, 75, 0.35);\n}\n.milestone-badge.ms-writing {\n  color: #6941c6;\n  background: #f9f5ff;\n  border: 1px solid rgba(105, 65, 198, 0.3);\n  box-shadow: 0 1px 2px rgba(105, 65, 198, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-writing {\n  color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.22);\n  border-color: rgba(214, 187, 251, 0.35);\n}\n.milestone-badge.ms-value {\n  color: #027a48;\n  background: #ebfdf2;\n  border: 1px solid rgba(2, 122, 72, 0.3);\n  box-shadow: 0 1px 2px rgba(2, 122, 72, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-value {\n  color: #32d583;\n  background: rgba(2, 122, 72, 0.22);\n  border-color: rgba(50, 213, 131, 0.35);\n}\n\n/* 论文正文图表与插图卡片样式 (Geist Design) */\n.paper-figure, .article-body figure {\n  margin: 32px auto;\n  text-align: center;\n  max-width: 100%;\n}\n.paper-figure img, .article-body img {\n  max-width: 96%;\n  height: auto;\n  border-radius: var(--radius-md);\n  border: 1px solid var(--geist-border);\n  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);\n  background: #ffffff;\n  transition: transform 0.2s ease, box-shadow 0.2s ease;\n  display: block;\n  margin: 0 auto;\n}\n.paper-figure img:hover, .article-body img:hover {\n  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);\n}\n.paper-figure figcaption, .article-body figcaption {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  margin-top: 10px;\n  line-height: 1.6;\n  font-style: italic;\n  max-width: 850px;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n/* VAD 视图切换器 View Switcher */\n.vad-view-switcher {\n  display: inline-flex;\n  padding: 3px;\n  background: var(--geist-secondary-bg);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  margin-bottom: 20px;\n  gap: 2px;\n}\n.view-switch-btn {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 6px 14px;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  border-radius: 6px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.view-switch-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0, 0, 0, 0.04);\n}\n[data-theme=\"dark\"] .view-switch-btn:hover {\n  background: rgba(255, 255, 255, 0.06);\n}\n.view-switch-btn.active {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  font-weight: 600;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* 关系图谱 Graph View Styles */\n.graph-container {\n  position: relative;\n  width: 100%;\n  height: 720px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: var(--radius-lg);\n  overflow: hidden;\n  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);\n  margin-bottom: 40px;\n}\n.graph-toolbar {\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  right: 14px;\n  z-index: 10;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  padding: 8px 14px;\n  border-radius: 8px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  flex-wrap: wrap;\n  gap: 8px;\n}\n.graph-tool-title {\n  font-size: 13px;\n  font-weight: 700;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--geist-foreground);\n}\n.graph-filter-group {\n  display: flex;\n  gap: 6px;\n  align-items: center;\n  flex-wrap: wrap;\n}\n.graph-chip {\n  font-size: 11px;\n  padding: 3px 8px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.graph-chip:hover { background: var(--geist-secondary-bg); }\n.graph-chip.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-color: var(--geist-foreground);\n}\n.graph-search-input {\n  padding: 3px 8px;\n  font-size: 11px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  outline: none;\n  width: 150px;\n}\n#vad-graph-svg {\n  width: 100%;\n  height: 100%;\n  cursor: grab;\n}\n#vad-graph-svg:active { cursor: grabbing; }\n.graph-legend {\n  position: absolute;\n  bottom: 14px;\n  left: 14px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  padding: 10px 14px;\n  font-size: 11px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  z-index: 10;\n  line-height: 1.6;\n  pointer-events: none;\n}\n.graph-legend-row { display: flex; align-items: center; gap: 8px; }\n.graph-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }\n.graph-info-drawer {\n  position: absolute;\n  top: 66px;\n  right: 14px;\n  width: 310px;\n  max-height: 620px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  box-shadow: 0 8px 30px rgba(0,0,0,0.12);\n  z-index: 10;\n  padding: 16px;\n  overflow-y: auto;\n  display: none;\n  backdrop-filter: blur(10px);\n  transition: transform 0.2s ease, opacity 0.2s ease;\n}\n.graph-drawer-close {\n  position: absolute;\n  top: 10px;\n  right: 12px;\n  cursor: pointer;\n  font-size: 16px;\n  color: var(--geist-tertiary);\n}\n.graph-drawer-badge {\n  display: inline-block;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 10px;\n  font-weight: 600;\n  margin-bottom: 6px;\n}\n.graph-drawer-title {\n  font-size: 13px;\n  font-weight: 700;\n  line-height: 1.4;\n  margin-bottom: 8px;\n  color: var(--geist-foreground);\n}\n.graph-drawer-meta {\n  font-size: 11px;\n  color: var(--geist-secondary);\n  margin-bottom: 12px;\n}\n.graph-drawer-core {\n  font-size: 12px;\n  line-height: 1.6;\n  color: var(--geist-foreground);\n  background: var(--geist-secondary-bg);\n  padding: 8px 10px;\n  border-radius: 6px;\n  margin-bottom: 12px;\n  border: 1px solid var(--geist-border);\n}\n.graph-drawer-link {\n  display: block;\n  text-align: center;\n  padding: 7px 12px;\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-radius: 6px;\n  font-size: 12px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: opacity 0.15s ease;\n  margin-bottom: 6px;\n}\n.graph-drawer-link:hover { opacity: 0.85; }\n.graph-drawer-pdf-link {\n  display: block;\n  text-align: center;\n  padding: 6px 12px;\n  background: var(--geist-secondary-bg);\n  color: var(--geist-foreground);\n  border: 1px solid var(--geist-border);\n  border-radius: 6px;\n  font-size: 11px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.graph-drawer-pdf-link:hover { background: var(--geist-border); }\n.node-circle {\n  cursor: pointer;\n  transition: r 0.2s, stroke-width 0.2s;\n}\n.node-label {\n  font-size: 10px;\n  font-weight: 600;\n  fill: var(--geist-foreground);\n  pointer-events: none;\n  text-shadow: 0 1px 2px var(--geist-background);\n}\n.link-line {\n  stroke: var(--geist-border);\n  stroke-opacity: 0.6;\n  stroke-width: 1.2;\n  transition: stroke 0.2s, stroke-width 0.2s, stroke-opacity 0.2s;\n}\n.link-label {\n  font-size: 9px;\n  fill: var(--geist-tertiary);\n  pointer-events: none;\n  text-anchor: middle;\n}\n\n/* 引用框与警示框 Alerts */\n.callout-alert {\n  margin: 20px 0;\n  padding: 14px 18px;\n  border-radius: var(--radius-md);\n  transition: all 0.15s ease;\n}\n.callout-important, .callout-idea {\n  border-left: 4px solid #b54708;\n  background: rgba(181, 71, 8, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(247, 144, 9, 0.3);\n}\n[data-theme=\"dark\"] .callout-important, [data-theme=\"dark\"] .callout-idea {\n  border-left-color: #fec84b;\n  background: rgba(181, 71, 8, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(254, 200, 75, 0.25);\n}\n.callout-writing {\n  border-left: 4px solid #6941c6;\n  background: rgba(105, 65, 198, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(105, 65, 198, 0.3);\n}\n[data-theme=\"dark\"] .callout-writing {\n  border-left-color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(214, 187, 251, 0.25);\n}\n.callout-value {\n  border-left: 4px solid #027a48;\n  background: rgba(2, 122, 72, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(2, 122, 72, 0.3);\n}\n[data-theme=\"dark\"] .callout-value {\n  border-left-color: #32d583;\n  background: rgba(2, 122, 72, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(50, 213, 131, 0.25);\n}\n\n.card-title {\n  font-size: 16.5px;\n  font-weight: 600;\n  line-height: 1.42;\n  letter-spacing: -0.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 10px;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n  hyphens: auto;\n}\n.card-title a {\n  color: var(--geist-foreground);\n  text-decoration: none;\n  display: inline;\n  transition: color 0.15s ease;\n}\n.card-title a:hover {\n  color: var(--develop-blue);\n  text-decoration: none;\n}\n.card-id-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-quaternary);\n  margin-right: 5px;\n}\n.card-meta-row {\n  display: flex;\n  gap: 6px;\n  flex-wrap: wrap;\n  margin-bottom: 12px;\n}\n.meta-token {\n  font-size: 12px;\n  color: var(--geist-tertiary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-ring);\n  padding: 2px 7px;\n  border-radius: var(--radius-sm);\n  white-space: nowrap;\n}\n.card-body-text {\n  font-size: 13.5px;\n  color: var(--geist-secondary);\n  line-height: 1.6;\n  margin-bottom: 16px;\n  flex-grow: 1;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n}\n.card-body-text strong {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n.card-footer {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 14px;\n}\n.card-link-action {\n  font-size: 13.5px;\n  font-weight: 500;\n  color: var(--link-blue);\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.card-link-action:hover {\n  opacity: 0.85;\n  transform: translateX(2px);\n}\na.meta-token {\n  transition: all 0.15s ease;\n  cursor: pointer;\n  text-decoration: none;\n}\na.meta-token:hover {\n  background: var(--geist-selection);\n  color: var(--geist-foreground);\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);\n}\n\n/* 紧凑列表视图 (List View) */\n.card-list-view {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n.list-row-item {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-md);\n  padding: 12px 18px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  transition: box-shadow 0.15s;\n}\n.list-row-item:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n\n/* 阅读详情页 (Report Detail) */\n.reading-container {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) 260px;\n  gap: 40px;\n  align-items: start;\n}\n@media (max-width: 960px) {\n  .reading-container { grid-template-columns: 1fr; }\n  .reading-sidebar { display: none; }\n}\n\n.report-header-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 28px 32px;\n  margin-bottom: 28px;\n}\n.crumb-bar {\n  font-size: 13px;\n  color: var(--geist-tertiary);\n  margin-bottom: 10px;\n}\n.report-title {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  margin: 0 0 16px;\n  color: var(--geist-foreground);\n}\n.report-action-buttons {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  flex-wrap: wrap;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 16px;\n  margin-top: 16px;\n}\n\n.article-body {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 36px 42px 80px;\n  font-size: 16px;\n  line-height: 1.75;\n  color: var(--geist-foreground);\n}\n.article-body h1, .article-body h2, .article-body h3 {\n  color: var(--geist-foreground);\n  scroll-margin-top: 80px;\n}\n.article-body h1 { font-size: 28px; font-weight: 600; letter-spacing: -1.28px; border-bottom: 1px solid var(--geist-border); padding-bottom: 8px; margin-top: 32px; }\n.article-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.96px; border-bottom: 1px solid var(--geist-border); padding-bottom: 6px; margin-top: 36px; }\n.article-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.32px; margin-top: 26px; }\n.article-body table {\n  width: 100%;\n  border-collapse: collapse;\n  margin: 24px 0;\n  font-size: 14px;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  overflow: hidden;\n}\n.article-body th, .article-body td {\n  padding: 10px 14px;\n  text-align: left;\n  border-bottom: 1px solid var(--geist-border);\n}\n.article-body th {\n  background: var(--geist-surface-tint);\n  font-weight: 600;\n  color: var(--geist-foreground);\n}\n.article-body blockquote {\n  border-left: 2px solid var(--geist-foreground);\n  margin: 20px 0;\n  padding: 8px 18px;\n  color: var(--geist-secondary);\n  font-style: normal;\n}\n.article-body code {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13.5px;\n  box-shadow: var(--shadow-ring);\n  background: var(--geist-surface-tint);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n.article-body pre {\n  position: relative;\n  background: #000000;\n  color: #ededed;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 18px;\n  margin: 24px 0;\n  overflow-x: auto;\n}\n.article-body pre code {\n  background: transparent;\n  box-shadow: none;\n  padding: 0;\n  color: inherit;\n  font-size: 13px;\n}\n.copy-code-btn {\n  position: absolute;\n  top: 8px;\n  right: 10px;\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  background: #171717;\n  color: #ffffff;\n  border: 1px solid #333333;\n  padding: 3px 8px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n}\n\n/* 侧边大纲 (TOC) */\n.reading-sidebar {\n  position: sticky;\n  top: 80px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  max-height: calc(100vh - 100px);\n  overflow-y: auto;\n}\n.sidebar-toc-title {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: var(--geist-quaternary);\n  margin-bottom: 12px;\n}\n.reading-sidebar ul {\n  list-style: none;\n  padding-left: 0;\n  margin: 0;\n  font-size: 13px;\n}\n.reading-sidebar li {\n  margin: 6px 0;\n}\n.reading-sidebar ul ul {\n  padding-left: 14px;\n}\n.reading-sidebar a {\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.reading-sidebar a:hover, .reading-sidebar a.active {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 后台管理 (/admin) */\n.admin-card-container {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 32px;\n  margin-bottom: 32px;\n}\n.form-row-2 {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 16px;\n  margin-bottom: 16px;\n}\n@media (max-width: 600px) {\n  .form-row-2 { grid-template-columns: 1fr; }\n}\n.form-field {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  margin-bottom: 16px;\n}\n.form-field label {\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-foreground);\n}\n.form-field input, .form-field select, .form-field textarea {\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  padding: 9px 12px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  color: var(--geist-foreground);\n  outline: none;\n}\n.form-field input:focus, .form-field select:focus, .form-field textarea:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n\n/* 语法高亮 (Console Blue / Purple / Pink) */\n.codehilite .k, .codehilite .kd, .codehilite .kn { color: #eb367f; font-weight: 500; }\n.codehilite .s, .codehilite .s1, .codehilite .s2 { color: #0070f3; }\n.codehilite .nf, .codehilite .na { color: #7928ca; font-weight: 500; }\n.codehilite .c, .codehilite .c1 { color: #666666; font-style: italic; }\n.codehilite .mi, .codehilite .mf { color: #ff5b4f; }\n\n</style>\n\n</head>\n<body>\n\n    <nav class=\"vercel-nav\">\n      <div class=\"nav-brand\">\n        <a href=\"/\" style=\"display:flex;align-items:center;gap:10px;text-decoration:none\">\n          <svg class=\"vercel-triangle\" viewBox=\"0 0 76 65\" fill=\"none\">\n            <path d=\"M37.5274 0L75.0548 65H0L37.5274 0Z\" fill=\"currentColor\"/>\n          </svg>\n          <span class=\"nav-title\">Agent Harness KB</span>\n        </a>\n        <span class=\"nav-badge-pill\">Geist 2.0</span>\n      </div>\n\n      <div class=\"nav-links\">\n        <a class=\"nav-link \" href=\"/\">全景总览</a>\n        <a class=\"nav-link \" href=\"/vad\" style=\"color:var(--ship-red)\">🎯 VAD 专栏 (144)</a>\n        <a class=\"nav-link\" href=\"https://m0rtzz.github.io/paper-notes/\" target=\"_blank\" rel=\"noopener\">顶会 669 篇 ↗</a>\n        <a class=\"nav-link\" href=\"/download/all\">整库打包</a>\n        \n      </div>\n\n      <div class=\"nav-actions\">\n        \n        <button class=\"theme-toggle-btn\" id=\"theme-toggle-btn\" onclick=\"toggleTheme()\" title=\"切换亮暗主题\">🌙</button>\n      </div>\n    </nav>\n    \n<main class=\"vercel-container\">\n\n        <div class=\"report-header-card\">\n          <div class=\"crumb-bar\"><a href=\"/\">Home</a> / <b>fulltext.txt</b></div>\n          <h1 class=\"report-title\">fulltext.txt</h1>\n          <div class=\"report-action-buttons\">\n            <a class=\"btn-primary-dark\" href=\"?dl=1\">Download Text</a>\n          </div>\n        </div>\n        <article class=\"article-body\"><pre><code>This CVPR paper is the Open Access version, provided by the Computer Vision Foundation.\nExcept for this watermark, it is identical to the accepted version;\nthe final published version of the proceedings is available on IEEE Xplore.\n\nAlert-CLIP: Abnormality-aware Latent-Enhanced Representation Tuning of\nCLIP for Video Anomaly Detection\nYiyan Zhu1 , Menghao Zhang1 , Haifeng Sun1 , Pengfei Ren1 , Xianao Chu1 ,\nChenye Xu1 , Hong Tan1 , Jinghan Wang1 , Qi Qi1,2,∗ , Jingyu Wang1,3, *\n1\n\nState Key Laboratory of Networking and Switching Technology,\nBeijing University of Posts and Telecommunications, Beijing, China\n2\nE-Byte.com, Beijing, China\n3\nPengcheng Laboratory, Shenzhen, China\n{zhuyiyan,zhangmenghao,hfsun,rpf,redamancy,xuchenye}@bupt.edu.cn\ntanh275774@163.com; {wangjhbh,qiqi8266,wangjingyu}@bupt.edu.cn\n\nVideo\n\nAbstract\nWith the rise of pre-trained vision–language models such as\nCLIP, performing video anomaly detection (VAD) through\ncross-modal reasoning has become an emerging trend.\nHowever, we observe that CLIP still suffers from weak abnormality awareness: normal and abnormal descriptions\nare highly entangled in the text embedding space, causing video features to assign nearly indistinguishable similarity scores to both types of prompts. To address this issue, we propose Alert-CLIP, an abnormality-aware latent–\nenhanced tuning framework that tailors CLIP for VAD.\nAlert-CLIP introduces a multi-level alignment strategy:\n(1) video–label alignment, which reshapes the semantic\nspace to establish a coarse-level foundation for abnormality\nawareness; (2) region–text alignment, which explicitly associates anomaly-related regions with detailed descriptions\nto strengthen fine-grained perception; (3) region–semantic\nalignment, which contrasts anomalous regions against multiple hard negative samples to enhance abnormality-aware\ndiscrimination. To support this training, we construct\nVAGTA. Extensive experiments show that Alert-CLIP consistently surpasses CLIP across weakly supervised, zeroshot, and open-vocabulary settings. VAGTA is publicly\navailable at https://github.com/ClarkZhu216/\nAlert-CLIP_dataset.\n\nText\n\nCLIP\n\nAlert-CLIP\n\nA normal office\nscene video\n\n0.2026\n\n0. 5771 ✅\n\n∆ &lt; 0.16\n\n∆ &gt; 0.38\n\nscene video\n\n0.2182 ❌\n\n0. 1936\n\nA normal street\nscene video\n\n0.3077 ❌\n\n0. 2568\n\n∆ &lt; 0.04\n\n∆ &gt; 0.36\n\n0. 2653\n\n0. 6226 ✅\n\n0.2386\n\n0. 1813\n\nAn anomalous office\nNormal\nRoadAccident\nVideo\n\nFighting\n\nAn anomalous\nfighting video\n\nA normal gas\nstation scene video\nExplosion\n\nAn anomalous\nexplosion video\n\n∆ &lt; 0.06 ❌ ∆ &gt; 0.32 ✅\n0.2893\n\n0. 5064 ✅\n\nFigure 1. Qualitative comparison between CLIP and Alert-CLIP.\n\n1. Introduction\n\nIn real-world scenarios, anomalous events are extremely\nrare, making it infeasible to collect sufficient anomalous\nsamples for training. As a result, most prior works adopt\nsemi-supervised methods [7, 21, 29, 49] that learn normal\npatterns from normal videos or weakly supervised methods [25, 30, 36, 43] trained with video-level labels. With the\ndemonstrated effectiveness of pre-trained vision–language\nmodels (VLMs), such as CLIP [27], across a wide range of\ndownstream tasks [13, 20, 27], leveraging CLIP for VAD\nhas attracted increasing attention.\nRecent CLIP-based VAD studies [10, 38–40, 46] exploit text embeddings to provide semantic guidance for visual modeling. In practice, these methods typically keep\nthe CLIP frozen and introduce task-specific designs to\nmodel anomalies on top of the extracted embeddings. VadCLIP [39] and AnomalyCLIP [46] represent early attempts\nthat combine visual classification and vision–language\n\nVideo anomaly detection (VAD) aims to automatically identify events that deviate from normal behavioral patterns.\n* Corresponding authors.\n\n35545\n\n\falignment to enable both coarse- and fine-grained anomaly\ndetection. Subsequent works further improve CLIP-based\nVAD by enriching prompts with additional cues. For instance, STPrompt [38] incorporates spatio-temporal cues\nto facilitate anomaly localization, Ex-VAD [10] leverages\nLLM-generated anomaly explanations to enhance interpretability, and VarCMP [40] introduces audio cues to support cross-modal anomaly retrieval.\nDespite their encouraging progress, existing CLIP-based\napproaches largely rely on representations with limited\nanomaly awareness, which restricts their potential for further performance improvement in VAD. Anomaly is inherently defined as a deviation from the norm, rather than a\nstandalone semantic category or object attribute. Such a\nproperty requires models to have the ability to perceive context semantics. Nevertheless, CLIP’s pretraining aligns full\nimages with textual descriptions through contrastive learning, which hinders its ability to capture contextual semantics and fine-grained information. As shown in Figure 1,\nCLIP produces nearly indistinguishable similarities for normal and anomalous prompts, and even favors the normal\ndescription for certain anomalous videos. In Section 3, we\nprovide a more comprehensive analysis along with extensive experimental evidence.\nTo overcome CLIP’s limitations in anomaly awareness,\nwe propose Alert-CLIP, a multi-level vision–language\nalignment training framework tailored for VAD. AlertCLIP preserves CLIP’s semantic priors while progressively\nstrengthening abnormality awareness through three complementary alignment levels. At the video-label level, we restructure the semantic space to establish a coarse semantic foundation for separating normal and anomalous. At\nthe region-text level, we align anomaly-related visual regions with their detailed textual descriptions, enabling finegrained correspondence between localized visual changes\nand the contextual semantics. At the region-semantic level,\nwe strengthen the understanding of normal and anomalous\nconcepts by contrasting the groundtruth and hard-negative\ncaptions. Together, these multi-level alignment mechanisms substantially enhance CLIP’s abnormality awareness\nand enable Alert-CLIP to serve as a stronger and more reliable foundation for VAD.\nTo support the training of Alert-CLIP, we construct the\nVideo Anomaly Dataset with Grounded Text Annotations\n(VAGTA) by re-annotating videos from UCF-Crime [30]\nand MSAD [51]. Due to the inconsistent quality of existing\ndatasets and the lack of region-level annotations, our data\npreparation process contains three steps. First, we standardize video quality by filtering out videos that do not meet\nthe standards, and annotate each remaining video with a\nglobal video caption, providing coarse-grained information\nfor video-label level. Second, we annotate precise bounding\nboxes for anomalous regions and provide region-level cap-\n\ntions that describe the corresponding events. This provides\ncrucial fine-grained visual-textual supervision for grounding anomaly-related regions at the region-text level. Third,\nwe enhance semantic contrast by generating hard-negative\ncaptions. This offers fine-grained semantic negatives for the\nregion–semantic level, facilitating more discriminative separation between normal and abnormal concepts. This procedure yields 4,212 high-quality clips with consistent spatial\nand semantic annotations, which form VAGTA and support\nthe multi-level alignment training of Alert-CLIP.\nWe conduct extensive experiments with Alert-CLIP on\nwidely used VAD benchmarks, including weakly supervised detection, zero-shot anomaly detection, and openvocabulary anomaly detection settings. The results show\nthat Alert-CLIP consistently outperforms CLIP and existing methods. Alert-CLIP can be seamlessly integrated into\nexisting VAD pipelines as a drop-in backbone.\nIn summary, our contributions are threefold:\n• We provide a analysis of CLIP’s limitations in VAD, revealing its weak abnormality awareness. We offer both\nqualitative and quantitative evidence through text-space\nprobing and video–text similarity studies.\n• We propose a multi-level vision–language alignment\nframework, Alert-CLIP, which significantly improves\nanomaly awareness and can seamlessly serve as a backbone for existing VAD pipelines.\n• We construct VAGTA, a video anomaly dataset consisting\nof 4,212 curated clips with region annotations and multilevel captions to support Alert-CLIP training.\n\n2. Related Work\n2.1. Video Anomaly Detection\n\n35546\n\nExisting VAD approaches can be broadly divided into\nsemi-supervised and weakly supervised methods. Semisupervised VAD [3, 12, 22, 24] usually models the normal patterns using only normal data and treats deviations as\nanomalies. Typical methods include approaches based on\nframe reconstruction [9, 26], frame prediction [4, 22, 33],\nand multi-task learning [29, 49]. Weakly supervised methods typically rely on video-level annotations and are predominantly formulated under the Multiple Instance Learning paradigm [6, 30, 32, 35, 45].\nWith the rapid development of pre-trained visionlanguage models (VLMs), such as CLIP [27], recent VAD\nstudies [38, 39] increasingly leverage textual semantics to\nguide visual feature modeling. For instance, VadCLIP [39]\nis an early attempt to introduce CLIP into VAD, where\nvideo labels are encoded as textual prompts to guide the\ntraining of a dual-branch model. Building upon VadCLIP,\nVadCLIP++ [19] extends the framework by introducing\ndynamic text prompts to enhance performance. AVadCLIP [41] further incorporates audio information to im-\n\n\fprove robustness in complex environments. STPrompt [38]\nintroduces spatio-temporal prompt embeddings to localize abnormal regions in the video frames. OVVAD [37]\nexplores VAD under an open-vocabulary supervision setting, leveraging semantic guidance to enable generalization to unseen novel anomaly categories. Although these\nCLIP-based methods demonstrate promising performance,\nthey typically rely on a frozen backbone and utilize CLIPextracted features for anomaly detection, without addressing CLIP’s limited anomaly awareness. In this work, we\nsystematically analyze the limitations of CLIP in anomaly\nawareness and propose a training framework to enhance its\nability to recognize anomalies across diverse scenarios.\n\nAlert-CLIP（Ours）\n\nCLIP\n\nSafe\n\n0.71 1.00 0.62 0.74 0.71 0.65 0.71 0.68\n\n0.87 1.00 0.84 0.91 0.71 0.85 0.88 0.86\n\nAnomaly\n\n0.79 0.62 1.00 0.69 0.61 0.70 0.65 0.69\n\n0.92 0.84 1.00 0.84 0.67 0.83 0.83 0.88\n\nAbuse\n\n0.77 0.74 0.69 1.00 0.75 0.74 0.78 0.85\n\n0.87 0.91 0.84 1.00 0.72 0.85 0.88 0.89\n\nBurglary\n\n0.65 0.71 0.61 0.75 1.00 0.64 0.88 0.71\n\n0.69 0.71 0.67 0.72 1.00 0.68 0.75 0.71\n\nExplosion\n\n0.70 0.65 0.70 0.74 0.64 1.00 0.67 0.74\n\n0.83 0.85 0.83 0.85 0.68 1.00 0.82 0.85\n\nRobbery\n\n0.69 0.71 0.65 0.78 0.88 0.67 1.00 0.75\n\n0.85 0.88 0.83 0.88 0.75 0.82 1.00 0.85\n\nAssault\n\n0.72 0.68 0.69 0.85 0.71 0.74 0.75 1.00\n\n0.86 0.86 0.88 0.89 0.71 0.85 0.85 1.00\nNo\nrm\nal\nSa\nf\nAn e\nom\nal\ny\nAb\nus\ne\nBu\nrg\nla\nry\nEx\npl\nos\nio\nn\nRo\nbb\ner\ny\nAs\nsa\nul\nt\n\n1.00 0.87 0.92 0.87 0.69 0.83 0.85 0.86\n\nNo\nrm\nal\nSa\nf\nAn e\nom\nal\ny\nAb\nus\ne\nBu\nrg\nla\nry\nEx\npl\nos\nio\nn\nRo\nbb\ner\ny\nAs\nsa\nul\nt\n\nNormal 1.00 0.71 0.79 0.77 0.65 0.70 0.69 0.72\n\n2.2. Vision–Language Models and CLIP\n\nFigure 2. Pairwise cosine similarities among normal- and\nabnormal-related prompts in the text space. CLIP exhibits substantial semantic overlap between normal and abnormal concepts,\nwhile Alert-CLIP shows a clearer separation.\n\nLarge-scale pre-trained VLMs [11, 15, 47], such as\nCLIP [27], achieve outstanding results in downstream tasks\nlike image classification [23], segmentation [34], and detection [39]. Despite its success, CLIP still faces limitations\nin fine-grained perception due to its pretraining approach.\nSpecifically, CLIP is pretrained with contrastive learning\nthat aligns entire images with coarse text prompts. For example, it uses prompts like ’a photo of [category]’, without\nincorporating pixel-level visual information or detailed textual descriptions.\nRecent works try to enhance CLIP’s fine-grained perception of object attributes by extending the token length of the\ntext encoder [48] or introducing grounding data [16, 50].\nHowever, these methods still fail to fit VAD, as they do not\naddress the limitation in anomaly awareness. This is because anomalies are not conventional semantic categories or\nobject attributes, but rather deviations from the norm that require the ability to understand context semantics. To bridge\nthis gap, our work proposes a multi-level framework that\nenhances CLIP’s anomaly awareness by aligning visual information of varying granularities with textual descriptions\nat different levels.\n\n3.1. Unified Similarity-Based Diagnosis\n\n3. Preliminary\n\nWe first examine the semantic boundary between normal\nand abnormal from both the text and video perspectives.\nOn the text side, we select representative descriptions from\nUCF-Crime [30] and compute pairwise cosine similarities\nbetween their text embeddings to examine whether CLIP\nforms a clear semantic boundary between the two groups.\nFigure 2 shows that CLIP exhibits substantial semantic entanglement between normal and abnormal concepts.\nNormal-related descriptions remain highly similar to many\nanomaly descriptions, indicating that the boundary between\nthe two semantics is highly blurred in CLIP’s text space.\nBy contrast, Alert-CLIP produces a clearer separation while\npreserving the consistency among anomaly prompts, suggesting that this ambiguity is rooted in CLIP’s representation space and can be alleviated through targeted adaptation.\nWe next examine whether this ambiguity propagates to\nvideo–text alignment. Figure 1 presents several representative normal and anomalous videos from UCF-Crime. For\neach video, we report its cosine similarity to a normal\nprompt and a matched anomaly prompt, together with the\nmargin between the correct prompt and the alternative one.\nCLIP often assigns very similar scores to the two prompts,\nand in some cases even favors the wrong description, resulting in weak and unstable margins. In contrast, AlertCLIP shows a more consistent preference for the semantically correct prompt and yields substantially larger margins.\nTaken together, these results reveal a consistent failure\nmode of CLIP: it does not establish a clear semantic boundary between normal and abnormal concepts. This deficiency appears in the text space and further manifests itself\nin video–text alignment, leading to unreliable discrimination on real videos. The comparison with Alert-CLIP further verifies that this failure mode stems from the learned\nrepresentation itself rather than incidental prompt variation.\n\nTo validate our hypothesis that CLIP suffers from an inherent deficiency in distinguishing the semantics of normal\nand abnormal events, we conduct a qualitative analysis and\na quantitative analysis. Specifically, the qualitative analysis\nexamines the geometry of normal/abnormal prompts in the\ntext space and their alignment with real videos, while the\nquantitative analysis measures this phenomenon using the\nproposed MeanSignScore (MSS). We also include AlertCLIP as a reference model to verify whether the observed\ndeficiency can be alleviated after adaptation. The qualitative results are shown in Figure 2 and Figure 1, while the\nquantitative results are summarized in Table 1.\n\n35547\n\n\fTable 1. Video-level MeanSignScore (MSS) of different models\non XD and UCF-Crime. Higher is better.\nModel\n\nXD\n\nUCF-Crime\n\nAvg.\n\nCLIP\nLongCLIP\nSigLIP\nBLIP\n\n-0.0572\n-0.0586\n-0.0804\n-0.0482\n\n-0.0556\n-0.0508\n-0.0620\n-0.0620\n\n-0.0564\n-0.0547\n-0.0712\n-0.0551\n\nAlert-CLIP (Stage 1)\nAlert-CLIP (Stage 2)\nAlert-CLIP (Final)\n\n0.0541\n0.1634\n0.1648\n\n0.1733\n0.1726\n0.1763\n\n0.1137\n0.1680\n0.1706\n\nTherefore, the proposed preliminary analysis provides\na consistent diagnosis from three complementary perspectives: text-space geometry, video–text alignment, and\ndataset-level quantitative separability. All of them point to\nthe same conclusion: CLIP lacks a reliable semantic boundary between normal and abnormal concepts, and this deficiency directly limits its effectiveness for VAD.\n\n4. Dataset Preparation\n\n3.2. MeanSignScore: Quantifying Separability\n\nIn this section, we describe the construction of VAGTA\nfor Alert-CLIP, built from two benchmark datasets, UCFCrime [30] and MSAD [51]. UCF-Crime covers diverse real-world anomaly categories, while MSAD provides\nscene-specific videos with consistent viewpoints and annotated anomaly segments. Combining them preserves both\ndata scale and complementary supervision for fine-grained\nanomaly modeling. We strictly follow the official splits of\nboth datasets: all curated training samples are constructed\nonly from the original training splits, while the official test\nsplits are reserved exclusively for evaluation, ensuring no\noverlap or data leakage.\nTo support multi-granularity cross-modal alignment,\nVAGTA provides two levels of textual annotations. Each\nclip is assigned a global caption and a region-level caption.\nFor abnormal clips, regional features are extracted from annotated bounding boxes; for normal clips, the whole segment is treated as a single region and paired with a finegrained region caption distinct from the global one. We also\nuse Qwen-VL [31] to generate three hard-negative captions\nfor each region caption that remain visually similar to the\noriginal caption while reversing its normal or abnormal semantics. In addition, long normal videos are divided into\nsemantically coherent sub-clips, each inheriting the normal\nlabel and receiving its own global and region-level captions.\nDuring data curation, candidate videos are first assigned\nan initial score by ChatGPT and then verified by human\nannotators, who evaluate label consistency, anomaly clarity, duplication, and obvious artifacts or corrupted frames.\nLow-quality abnormal videos are removed, while normal\nvideos that pass the review are retained. For the filtered\nvideos, we then perform the subsequent annotation and\ncuration steps. We first segment each normal video into\nthree temporal parts and treat them as independent normal\nclips, while keeping abnormal videos unchanged. We then\nannotate bounding boxes for abnormal regions and write\ncaptions for each clip and key abnormal regions, enabling\nthe model to align both global scene semantics and local\nanomaly semantics.\nAfter this process, we obtain VAGTA, which contains\n4,212 curated clips in total, including 3,726 training clips\nand 486 test clips under the official splits. The training split\ncontains 2,585 segmented normal clips and 1,141 abnormal\nclips. Most removed abnormal videos fall into four cate-\n\nTo complement the qualitative analyses above, we further\nintroduce a simple diagnostic metric, termed MeanSignScore (MSS), to quantify how clearly a model separates\nnormal and abnormal semantics. Let PN and PA denote\nthe sets of normal and abnormal prompts, respectively. For\na video x, we compute its average cosine similarity to the\ntwo prompt sets as\nSN (x) =\n\n1 X\ncos(f (x), g(p)),\n|PN |\n\n(1)\n\n1 X\ncos(f (x), g(p)),\n|PA |\n\n(2)\n\np∈PN\n\nSA (x) =\n\np∈PA\n\nwhere f (·) and g(·) denote the video and text encoders, respectively. We then define the signed score of each sample\nas\n(\nSA (x) − SN (x), if x is anomalous,\nSS(x) =\n(3)\nSN (x) − SA (x), if x is normal.\nFinally, MSS is computed by averaging the signed scores\nover the dataset:\n1 X\nMSS =\nSS(x).\n(4)\n|D|\nx∈D\n\nA larger MSS indicates that the model more consistently\nassigns higher similarity to the semantically correct prompt\nset. Values near zero indicate weak separability, whereas\nnegative values suggest that the model frequently favors the\nwrong semantic direction.\nAs shown in Table 1, the baseline models and vision–\nlanguage backbones consistently yield negative MSS values. This indicates that their video-level similarities do\nnot consistently favor the semantically correct prompt sets,\nwhich quantitatively confirms the ambiguity observed in\nboth the text-space geometry and the video–text case studies. In contrast, Alert-CLIP turns MSS positive and substantially improves it across training stages.\n\n35548\n\n\fCLIP Visual\nEncoder\n\nGlobal visual\nRegion visual\nGlobal text\nRegion text\n\nInput Features\nT×512×7×7\n\nROI Alignment\n\nHard-Negative\ntext\n\nOrigin\nVideos\n\nHigh-resolution Bounding Box Region visual\nFeatures\nFeatures\nROI\nExtractor\n\nTemporal Transformer\nT * C * 224 * 224\n\nGlobal\nContrastive\n\nwith T sampled frames, the CLIP visual encoder produces\nframe-wise features, which are aggregated by a lightweight\ntemporal transformer to obtain an ℓ2 -normalized clip-level\nembedding v ∈ RD . For annotated abnormal regions,\nROI Align is applied to frame-level visual features, and the\nresulting region features are temporally aggregated in the\nsame way to obtain region embeddings v r . Cosine similarity is denoted by ⟨·, ·⟩. Our objective is to reshape the\ndecision geometry of CLIP through three complementary\nalignment signals that introduce global scene semantics,\nspatially grounded anomaly semantics, and fine-grained semantic distinctions.\nGlobal alignment. Given a batch of B videos with\nglobal descriptions {(vi , ti )}B\ni=1 , we compute similarity\nscores sij = ⟨vi , tj ⟩ and optimize an InfoNCE loss:\n\nBoundingBox Info\nT×4\n\nRegion\nContrastive\n\nT*C *7*7\n\nHard-Negative\nCLIP Text\nEncoder\n\nGlobal Caption :\n\nRegion Caption :\n\nRoadAccidents abnormal video:\nCar crashes into multiple\nvehicles consecutively.\n\nA white car collided with a\nblack car, then struck\nparked blue and black cars.\n\nHard Negative Caption :\n1、A white car carefully reversed into a\nparking spot beside other vehicles.\n2、A white car carefully and smoothly\nmoved between closely parked cars in a lot.\n3、A white car calmly drove past several\nparked vehicles without any incident.\n\nFigure 3. Training framework of Alert-CLIP.\n\nB\n\nLglobal = −\ngories: category mismatch, weak anomaly semantics, duplicated content, and severely corrupted signals. All clips\nin VAGTA are equipped with consistent bounding-box and\ncaption annotations, providing a stable and reproducible\nfoundation for training Alert-CLIP.\n\nexp(sii /τ )\n1 X\n,\nlog PB\nB i=1\nj=1 exp(sij /τ )\n\n(5)\n\n5. Method\n\nwhere τ is a temperature parameter. This objective establishes a global semantic separation between normal and\nanomalous descriptions.\nRegion alignment. For each video, we associate regionlevel visual features extracted from annotated bounding\nboxes with their corresponding region descriptions, producing R positive pairs {(vnr , trn )}R\nn=1 . With similarities\nsrnm = ⟨vnr , trm ⟩, we optimize:\n\n5.1. Overview\nVideo anomaly understanding fundamentally requires distinguishing normal and abnormal behaviors at the semantic\nlevel. However, existing CLIP models exhibit highly entangled normal/anomaly representations, making them insensitive to fine-grained deviations. Alert-CLIP keeps the CLIP\nvisual and text encoders intact, and introduces a lightweight\ntemporal transformer to aggregate frame-wise visual features into clip-level representations. On top of this temporal\naggregation, we learn a better alignment geometry through\nthree complementary signals: global video descriptions, region descriptions tied to annotated boxes, and semantically\nclose hard negatives that challenge the decision margins.\nThis training framework produces a checkpoint that remains\nfully compatible with standard CLIP-style inference, while\nimproving anomaly awareness without relying on any localization at test time.\nWe adopt a two-stage training schedule. Stage I performs global video–text alignment to build a stable separation between normal and anomaly semantics at the description level. Stage II starts from the Stage I weights\nand jointly optimizes the global, region, and hard-negative\nbranches, injecting fine-grained cues into the shared space.\n\nR\n\nLregion = −\n\n1 X\nexp(srnn /τ )\nlog PR\n.\nr\nR n=1\nm=1 exp(snm /τ )\n\n(6)\n\nThis objective injects spatially grounded, fine-grained\nanomaly semantics into the shared embedding space.\nSemantic hard-negative alignment. For each region,\nwe further refine the semantic boundary by pairing the true\nK\nwith K hard negatives {tr,−\nregion description tr,+\nn\nn,k }k=1\nthat remain visually similar but reverse the normal or abnor−\nr r,+\nr r,−\nmal semantics. Let s+\nn = ⟨vn , tn ⟩ and sn,k = ⟨vn , tn,k ⟩.\nWe optimize:\nR\n\n1 X\nexp(s+\nn /τh )\nlog\n,\nPK\n+\nR n=1\nexp(sn /τh ) + k=1 exp(s−\nn,k /τh )\n(7)\nwhere τh controls the strength of semantic discrimination.\nUnlike region alignment, which focuses on matching visually grounded regions and their descriptions, this branch explicitly sharpens the normal–abnormal boundary by introducing semantically confusable negatives. It therefore improves robustness when normal and abnormal patterns are\nvisually similar but semantically opposite.\n\n5.2. Multi-Level Contrastive Learning\n\nLhard = −\n\n5.3. Two-Stage Optimization\n\nWe employ the CLIP visual encoder and text encoder,\nboth kept intact during inference, to encode sampled video\nframes and all accompanying descriptions. Given a video\n\n35549\n\nStage I: global pre-alignment. We optimize only Lglobal\nto construct a stable video–text separation between normal\n\n\fand anomaly descriptions.\nStage II: joint refinement.\nweights, we jointly minimize\n\nStarting from the Stage I\n\nTable 2. Weakly supervised results on UCF-Crime and MSAD\nusing Alert-CLIP. Best results are in bold.\n\nLtotal = Lglobal + λ Lregion + γ Lhard ,\n\nUCF-Crime\n\nFeature\n\n(8)\n\nwhere λ and γ balance the region and hard-negative\nbranches. This stage injects fine-grained cues into the\nshared space while preserving CLIP’s global recognition\nability. Bounding boxes and region texts are used only as\nsupervision during training.\n\n6. Experiments\n6.1. Experimental Settings\n\nMSAD\n\nAUC\n\nAP\n\nAUC\n\nAP\n\nCLIP [27]\nTimeSformer [2]\nVideoCLIP [42]\n\n88.02\n86.54\n86.41\n\n32.72\n28.72\n30.99\n\n87.45\n86.22\n84.66\n\n71.09\n72.18\n71.34\n\nAlert-CLIP (Stage 1)\nAlert-CLIP (Full)\n\n88.67\n89.32\n\n32.16\n33.57\n\n88.59\n89.63\n\n75.10\n78.24\n\nDatasets. We evaluate Alert-CLIP on four widely used\nbenchmarks. UCF-Crime [30] contains 1,900 surveillance\nvideos from 13 scenes, covering 13 anomaly categories\nand normal events. XD-Violence [36] consists of 4,754\nuntrimmed videos from diverse sources, focusing on six\nviolence-related anomaly categories. MSAD [51] is designed to assess scene generalization in VAD, covering 14\ndiverse real-world scenes with about 500 different camera\nviewpoints. Ubnormal [1] is a synthetic-to-real benchmark\nfor evaluating generalization.\nSupervision settings. We evaluate Alert-CLIP under\nthree complementary VAD settings: (i) weakly supervised\nVAD, where the backbone is fine-tuned within the VadCLIP [39] framework using video-level labels and our\nmulti-granularity annotations; (ii) zero-shot VAD, where\nno training or adaptation is performed and anomaly scores\nare derived purely from CLIP-style visual–textual similarity margins; (iii) open-vocabulary VAD, following OVVAD [37], where the model must understand free-form\nuser-defined anomaly descriptions unseen during training.\nThese settings jointly evaluate fine-tuning performance,\ncross-domain transfer, and semantic generalization.\nEvaluation metrics. We report two standard metrics, AUC\nand AP, for measuring discriminability, ranking quality, and\nanomaly recall.\nImplementation details. Unless specified otherwise, we\nadopt OpenCLIP ViT-L/32 as the backbone and train AlertCLIP with the two-stage paradigm described in Section 5.\nWe use AdamW with cosine decay, mixed precision, and\ngradient clipping. All experiments are conducted on a single NVIDIA A800 GPU (80 GB). Detailed hyperparameters\nare provided in the supplementary material.\n\nTable 3. Zero-shot comparisons on multiple benchmarks and metrics. Best results are in bold.\nFeature\n\nUCF-AUC XD-AP UB-AUC UB-AP\n\nCLIP [27]\nTimeSformer [2]\nVideoCLIP [42]\nSigLIP [47]\nLLaVA-1.5-7B [18]\n\n61.91\n58.61\n72.13\n69.73\n72.84\n\n34.35\n39.55\n54.36\n52.25\n50.26\n\n72.08\n56.73\n72.34\n–\n–\n\n57.43\n45.01\n55.07\n–\n–\n\nAlert-CLIP (Full)\n\n75.75\n\n55.18\n\n75.39\n\n60.11\n\nTable 4. Open-vocabulary comparisons on UCF-Crime. Best results are in bold.\nMethod\n\nAP\n\nAPb\n\nAPn\n\nAUC\n\nAUCb\n\nAUCn\n\nAnomize [14]\nOVVAD [37]\nAlert-CLIP (Full)\n\n69.31\n66.53\n70.12\n\n57.37\n57.10\n57.91\n\n84.24\n76.03\n84.92\n\n84.49\n86.40\n86.14\n\n93.00\n93.84\n94.04\n\n87.05\n88.20\n86.21\n\nTable 5. Open-vocabulary VAD results on XD-Violence. All numbers are percentages. Best results are in bold.\n\nFeature\n\nOverall\n\nBase\n\nNovel\n\nCLIP [27]\nAlert-CLIP (Full)\n\n90.01\n91.83\n\n88.85\n89.74\n\n94.23\n96.01\n\n6.2. Main Experiments\n\nUCF-Crime and MSAD. Stage 1 already improves over\nCLIP, showing that global alignment is sufficient to establish a cleaner normal–abnormal separation. Stage 2 further\nimproves both AUC and AP, indicating that region alignment and semantic hard negatives provide complementary\nfine-grained supervision.\nZero-shot generalization. We evaluate zero-shot VAD on\nUCF-Crime, XD-Violence, and UBnormal, where anomaly\nscores are computed directly from the similarity margin between normal and abnormal prompts (Table 3). Alert-CLIP\nconsistently achieves the best performance, surpassing conventional backbones, as well as stronger vision–language\nmodels including SigLIP and LLaVA-1.5-7B. The gains are\nespecially notable on UBnormal, suggesting that the learned\n\nWe compare Alert-CLIP with representative feature backbones. To ensure a fair comparison, all feature types are\nevaluated under the same experimental setting.\nWeakly supervised VAD. Table 2 reports the results of replacing the backbone in VadCLIP with different feature extractors. Alert-CLIP achieves the best performance on both\n\n35550\n\n\fTable 6. Training strategy comparison on UCF-Crime. A checkmark indicates that the corresponding loss is activated.\n\nLglobal\n\nLregion\n\nLhard\n\nAUC\n\nJoint training\n\n✓\n\n✓\n\n✓\n\n88.61\n\nTwo-stage (ours)\n\n✓\n✓\n\n–\n✓\n\n–\n✓\n\n89.32\n\nStrategy\n\nTable 9. Generalization beyond VAD on general benchmarks.\n\nTable 7. Ablation on each alignment branch.\n\nConfiguration\n\nLosses\n\nAUC\n\n–\nLglobal\nLglobal + Lregion\nLglobal + Lregion + Lhard\n\n88.02\n88.53\n88.85\n89.32\n\nBenchmark\n\nCLIP\n\nAlert-CLIP\n\nGain\n\nImageNet-1K Top-1 [5]\nImageNet-v2 Top-1 [28]\nFlickr30k I2T R@1 [44]\nFlickr30k T2I R@1 [44]\nCOCO I2T R@1 [17]\nCOCO T2I R@1 [17]\nBBox COCO Top-1 [17]\nBBox LVIS Top-1 [8]\n\n68.34\n0.83\n82.20\n62.12\n51.68\n32.71\n44.85\n13.76\n\n68.58\n0.89\n89.90\n74.46\n62.58\n43.81\n45.74\n15.05\n\n+0.24\n+0.06\n+7.70\n+12.34\n+10.90\n+11.10\n+0.89\n+1.29\n\nsemantic boundary remains robust under synthetic-to-real\ndomain shifts.\nOpen-vocabulary anomaly detection. We further evaluate open-vocabulary VAD, where the model must interpret\nfree-form anomaly descriptions beyond predefined labels\n(Tables 4 and 5). On UCF-Crime, Alert-CLIP achieves\nstrong performance across overall, base, and novel categories, and remains competitive or superior to recent openvocabulary VAD methods. While UCF-Crime is included\nin our training sources, XD-Violence remains entirely unseen during training and therefore provides a cleaner test of\nopen-vocabulary generalization. The gains on XD-Violence\nindicate that Alert-CLIP learns a more transferable anomaly\nrepresentation rather than relying only on seen concepts.\nDiscussion. Across weakly supervised, zero-shot, and\nopen-vocabulary settings, Alert-CLIP consistently improves over CLIP and other backbones, showing that reshaping CLIP’s embedding space through multi-level alignment leads to stronger anomaly understanding.\n\nloss Lhard . As shown in Table 7, adding only Lglobal already improves over the frozen CLIP baseline, indicating\nthat coarse-grained language supervision helps establish a\nclearer normal–abnormal separation. Incorporating Lregion\nfurther boosts performance, highlighting the importance of\nspatially grounded supervision. The full model achieves\nthe best result, showing that semantic hard negatives provide complementary fine-grained guidance beyond global\nand region alignment.\nHard negatives vs. standard negatives. We further compare the proposed hard-negative captions with standard inbatch negatives. As shown in Table 8, hard negatives consistently outperform standard contrastive negatives under the\nzero-shot setting, confirming that visually similar but semantically reversed captions are more effective for sharpening the normal–abnormal boundary. This explains why the\nsemantic branch yields additional gains even after global\nand region alignment.\nTwo-stage vs. joint training. We also compare our twostage training schedule with one-stage joint optimization\nthat activates all losses from the beginning. As shown in\nTable 6, the two-stage curriculum achieves higher AUC, indicating that stabilizing the global semantic space before\nintroducing fine-grained objectives leads to easier optimization and better generalization.\nGeneralization Beyond VAD. To assess whether the improvements on VAD compromise CLIP’s original generalization ability, we further evaluate Alert-CLIP on several\ngeneral benchmarks. As shown in Table 9, Alert-CLIP\nconsistently matches or outperforms CLIP, indicating that\nthe proposed training strategy enhances VAD performance\nwithout sacrificing general transferability. This observation\nsuggests that multi-level alignment training helps the model\ncapture finer-grained semantic cues in videos, which may\nalso contribute to improved generalization.\n\n6.3. Ablation Studies\n\n6.4. Qualitative Analysis\n\nEffect of each alignment branch. To isolate the contribution of each learning signal, we ablate the three losses\non UCF-Crime: the global alignment loss Lglobal , the region alignment loss Lregion , and the semantic hard-negative\n\nSpatio-temporal behavior. Figure 4 compares CLIP and\nAlert-CLIP on representative UCF-Crime videos. On normal clips, CLIP often produces fluctuating anomaly scores,\nwhereas Alert-CLIP remains low and stable. On abnormal\n\nCLIP baseline\nGlobal only\nGlobal + Region\nGlobal + Region + Hard\n\nTable 8. Hard negatives versus standard in-batch negatives under\nthe zero-shot setting. Best results are in bold.\n\nMethod\nCLIP [27]\nStandard (in-batch neg.)\nHard neg.\n\nXD-Violence\n\nUCF-Crime\n\nAUC\n\nAP\n\nAUC\n\nAP\n\n63.33\n73.96\n77.54\n\n34.35\n46.44\n55.18\n\n61.91\n72.71\n75.75\n\n11.16\n15.88\n17.90\n\n35551\n\n\fNormal\n\nFighting\n\nRoadaccident\n\nNormal\n\nExplosion\n\nVandalism\n\nFigure 4. Temporal behavior of CLIP and Alert-CLIP on representative videos. Each case shows several keyframes and the corresponding\nanomaly-score curves over time, where the shaded region denotes the ground-truth abnormal interval. Compared with CLIP, Alert-CLIP\nproduces more stable low scores on normal videos and clearer, better-aligned peaks on abnormal ones.\nCLIP\n\nAlert-CLIP(Ours)\n\nThe anomalous region is not noticed.\n\nThe anomalous region is noticed.\n\nFigure 5. Spatial attention comparison between CLIP and AlertCLIP on a road-accident example. CLIP mainly attends to surrounding context, whereas Alert-CLIP focuses on the collided vehicles and the true anomalous region.\n\nment, Alert-CLIP reshapes the underlying semantic space\nto better capture subtle abnormal cues. Experiments across\nweakly supervised, zero-shot, and open-vocabulary settings consistently show enhanced discriminative power and\nstronger cross-domain generalization.\nLimitations and future work. Despite the clear improvements of Alert-CLIP, two limitations remain. First,\ndataset construction still relies on manual segmentation and\nbounding-box annotation, which is costly and limits scalability; future work may explore semi-automatic or automatic annotation pipelines assisted by pretrained vision–\nlanguage models. Second, to satisfy CLIP’s 77-token constraint, we shorten all captions, which reduces the richness\nof semantic supervision; a promising direction is to extend Alert-CLIP to longer-caption settings with multimodal\nmodels that support longer context windows.\n\nclips, CLIP responses are weak and poorly aligned with the\nground-truth interval, while Alert-CLIP yields clear peaks\nconcentrated around the abnormal event. This shows that\nthe proposed training improves both temporal discrimination and localization.\n\nAcknowledgments\nThis work was supported in part by the National Key R&amp;D\nProgram of China under Grant 2024YFE0200800, the National Natural Science Foundation of China under Grants\n62406039, 62321001, 62471055, U23B2001, 62101064,\n62171057, and 62201072, the Fundamental and Interdisciplinary Disciplines Breakthrough Plan of the Ministry\nof Education of China under Grant JYB2025XDXM107,\nthe High-Quality Development Project of MIIT under\nGrant 2440STCZB2584, the Ministry of Education and\nChina Mobile Joint Fund under Grants MCM20200202 and\nMCM20180101, the Fundamental Research Funds for the\nCentral Universities under Grant 2024PTB-004, and the\n2025 Education and Teaching Reform Project Funding at\nBeijing University of Posts and Telecommunications under\nGrant 2025YZ005.\n\nAttention to anomalous regions. Figure 5 visualizes spatial attention on a road-accident example. CLIP tends to emphasize large background regions and misses the actual collision area, whereas Alert-CLIP concentrates on the anomalous vehicles and suppresses irrelevant context. This behavior is consistent with the proposed region-level supervision\nand indicates stronger grounding of anomaly semantics in\nlocal visual cues.\n\n7. Conclusion\nWe presented Alert-CLIP, a multi-granularity alignment\nframework that remedies CLIP’s lack of fine-grained spatial sensitivity in video anomaly detection. By integrating global, region-level, and semantic hard-negative align-\n\n35552\n\n\fReferences\n[1] Andra Acsintoae, Andrei Florescu, Mariana-Iuliana\nGeorgescu, Tudor Mare, Paul Sumedrea, Radu Tudor\nIonescu, Fahad Shahbaz Khan, and Mubarak Shah. Ubnormal: New benchmark for supervised open-set video\nanomaly detection. In CVPR, pages 20111–20121, 2022. 6\n[2] Gedas Bertasius, Heng Wang, and Lorenzo Torresani. Is\nspace-time attention all you need for video understanding?\nIn Proceedings of the International Conference on Machine\nLearning (ICML), 2021. 6\n[3] Congqi Cao, Yue Lu, Peng Wang, and Yanning Zhang. A\nnew comprehensive benchmark for semi-supervised video\nanomaly detection and anticipation. In CVPR, pages 20392–\n20401. IEEE, 2023. 2\n[4] Congqi Cao, Yue Lu, Peng Wang, and Yanning Zhang. A\nnew comprehensive benchmark for semi-supervised video\nanomaly detection and anticipation. In CVPR, pages 20392–\n20401, 2023. 2\n[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li,\nand Li Fei-Fei. Imagenet: A large-scale hierarchical image\ndatabase. In CVPR, pages 248–255, 2009. 7\n[6] Mariana-Iuliana Georgescu, Antonio Barbalau, Radu Tudor Ionescu, Fahad Shahbaz Khan, Marius Popescu, and\nMubarak Shah. Anomaly detection in video via selfsupervised and multi-task learning. In CVPR, pages 12742–\n12752. Computer Vision Foundation / IEEE, 2021. 2\n[7] Mariana-Iuliana Georgescu, Antonio Barbalau, Radu Tudor Ionescu, Fahad Shahbaz Khan, Marius Popescu, and\nMubarak Shah. Anomaly detection in video via selfsupervised and multi-task learning. In CVPR, pages 12742–\n12752, 2021. 1\n[8] Agrim Gupta, Piotr Dollár, and Ross B. Girshick. LVIS:\nA dataset for large vocabulary instance segmentation. In\nCVPR, pages 5356–5364. Computer Vision Foundation /\nIEEE, 2019. 7\n[9] Mahmudul Hasan, Jonghyun Choi, Jan Neumann, Amit K.\nRoy-Chowdhury, and Larry S. Davis. Learning temporal regularity in video sequences. In CVPR, pages 733–742, 2016.\n2\n[10] Chao Huang, Yushu Shi, Jie Wen, Wei Wang, Yong Xu,\nand Xiaochun Cao. Ex-vad: Explainable fine-grained video\nanomaly detection based on visual-language models. In\nICML, 2025. 1, 2\n[11] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh,\nHieu Pham, Quoc V. Le, Yun-Hsuan Sung, Zhen Li, and Tom\nDuerig. Scaling up visual and vision-language representation\nlearning with noisy text supervision. In ICML, pages 4904–\n4916. PMLR, 2021. 3\n[12] B. Ravi Kiran, Dilip Mathew Thomas, and Ranjith Parakkal.\nAn overview of deep learning based methods for unsupervised and semi-supervised anomaly detection in videos. J.\nImaging, 4(2):36, 2018. 2\n[13] Boyi Li, Kilian Q. Weinberger, Serge J. Belongie, Vladlen\nKoltun, and René Ranftl. Language-driven semantic segmentation. In ICLR. OpenReview.net, 2022. 1\n[14] Fei Li, Wenxuan Liu, Jingjing Chen, Ruixu Zhang, Yuran\nWang, Xian Zhong, and Zheng Wang. Anomize: Better\n\nopen vocabulary video anomaly detection. In CVPR, pages\n29203–29212. Computer Vision Foundation / IEEE, 2025. 6\n[15] Junnan Li, Ramprasaath R. Selvaraju, Akhilesh Gotmare,\nShafiq R. Joty, Caiming Xiong, and Steven Chu-Hong Hoi.\nAlign before fuse: Vision and language representation learning with momentum distillation. In NeurIPS, pages 9694–\n9705, 2021. 3\n[16] Liunian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu\nYuan, Lei Zhang, Jenq-Neng Hwang, et al. Grounded\nlanguage-image pre-training.\nIn Proceedings of the\nIEEE/CVF conference on computer vision and pattern\nrecognition, pages 10965–10975, 2022. 3\n[17] Tsung-Yi Lin, Michael Maire, Serge J. Belongie, James\nHays, Pietro Perona, Deva Ramanan, Piotr Dollár, and\nC. Lawrence Zitnick. Microsoft COCO: common objects in\ncontext. In ECCV (5), pages 740–755. Springer, 2014. 7\n[18] Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee.\nImproved baselines with visual instruction tuning. In CVPR,\npages 26286–26296, 2024. 6\n[19] Long Liu, Jianjun Li, Guang Li, Yunfeng Zhai, and Ming\nZhang. Vadclip++: Dynamic vision-language model for\nweakly supervised video anomaly detection. Digit. Signal\nProcess., 168:105560, 2026. 2\n[20] Shilong Liu, Zhaoyang Zeng, Tianhe Ren, Feng Li, Hao\nZhang, Jie Yang, Qing Jiang, Chunyuan Li, Jianwei Yang,\nHang Su, Jun Zhu, and Lei Zhang. Grounding DINO: marrying DINO with grounded pre-training for open-set object\ndetection. In ECCV (47). Springer, 2024. 1\n[21] Wen Liu, Weixin Luo, Dongze Lian, and Shenghua Gao. Future frame prediction for anomaly detection - A new baseline. In CVPR, pages 6536–6545. Computer Vision Foundation / IEEE Computer Society, 2018. 1\n[22] Wen Liu, Weixin Luo, Dongze Lian, and Shenghua Gao. Future frame prediction for anomaly detection - A new baseline. In CVPR, pages 6536–6545, 2018. 2\n[23] Timo Lüddecke and Alexander S. Ecker. Image segmentation using text and image prompts. In CVPR, pages 7076–\n7086. IEEE, 2022. 3\n[24] Trong-Nguyen Nguyen and Jean Meunier. Anomaly detection in video sequence with appearance-motion correspondence. In ICCV, pages 1273–1283, 2019. 2\n[25] Guansong Pang, Cheng Yan, Chunhua Shen, Anton van den\nHengel, and Xiao Bai. Self-trained deep ordinal regression\nfor end-to-end video anomaly detection. In CVPR, pages\n12170–12179, 2020. 1\n[26] Hyunjong Park, Jongyoun Noh, and Bumsub Ham. Learning\nmemory-guided normality for anomaly detection. In CVPR,\npages 14360–14369, 2020. 2\n[27] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya\nRamesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,\nAmanda Askell, Pamela Mishkin, Jack Clark, Gretchen\nKrueger, and Ilya Sutskever. Learning transferable visual\nmodels from natural language supervision. In ICML, pages\n8748–8763. PMLR, 2021. 1, 2, 3, 6, 7\n[28] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and\nVaishaal Shankar. Do imagenet classifiers generalize to imagenet? In ICML, pages 5389–5400. PMLR, 2019. 7\n\n35553\n\n\fpages 6787–6800. Association for Computational Linguistics, 2021. 6\n[43] Zhiwei Yang, Jing Liu, and Peng Wu. Text prompt with normality guidance for weakly supervised video anomaly detection. In CVPR, pages 18899–18908, 2024. 1\n[44] Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. From image descriptions to visual denotations: New\nsimilarity metrics for semantic inference over event descriptions. Trans. Assoc. Comput. Linguistics, 2:67–78, 2014. 7\n[45] Muhammad Zaigham Zaheer, Arif Mahmood, Marcella\nAstrid, and Seung-Ik Lee. CLAWS: clustering assisted\nweakly supervised learning with normalcy suppression for\nanomalous event detection. In ECCV, pages 358–376.\nSpringer, 2020. 2\n[46] Luca Zanella, Benedetta Liberatori, Willi Menapace, Fabio\nPoiesi, Yiming Wang, and Elisa Ricci. Delving into CLIP\nlatent space for video anomaly recognition. Comput. Vis.\nImage Underst., 249:104163, 2024. 1\n[47] Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and\nLucas Beyer. Sigmoid loss for language image pre-training.\nIn ICCV, pages 11941–11952. IEEE, 2023. 3, 6\n[48] Beichen Zhang, Pan Zhang, Xiaoyi Dong, Yuhang Zang, and\nJiaqi Wang. Long-clip: Unlocking the long-text capability\nof clip. In European conference on computer vision, pages\n310–325. Springer, 2024. 3\n[49] Menghao Zhang, Jingyu Wang, Qi Qi, Haifeng Sun, Zirui\nZhuang, Pengfei Ren, Ruilong Ma, and Jianxin Liao. Multiscale video anomaly detection by multi-grained spatiotemporal representation learning. In CVPR, pages 17385–\n17394, 2024. 1, 2\n[50] Yiwu Zhong, Jianwei Yang, Pengchuan Zhang, Chunyuan Li, Noel Codella, Liunian Harold Li, Luowei Zhou,\nXiyang Dai, Lu Yuan, Yin Li, et al. Regionclip: Regionbased language-image pretraining. In Proceedings of the\nIEEE/CVF conference on computer vision and pattern\nrecognition, pages 16793–16803, 2022. 3\n[51] Liyun Zhu, Lei Wang, Arjun Raj, Tom Gedeon, and Chen\nChen. Advancing video anomaly detection: A concise review and a new dataset. In NeurIPS, 2024. 2, 4, 6\n\n[29] Nicolae-Catalin Ristea, Florinel-Alin Croitoru, Radu Tudor Ionescu, Marius Popescu, Fahad Shahbaz Khan, and\nMubarak Shah. Self-distilled masked auto-encoders are efficient video anomaly detectors. In CVPR, pages 15984–\n15995, 2024. 1, 2\n[30] Waqas Sultani, Chen Chen, and Mubarak Shah. Real-world\nanomaly detection in surveillance videos. In CVPR, pages\n6479–6488, 2018. 1, 2, 3, 4, 6\n[31] Qwen Team.\nQwen3-vl technical report.\nCoRR,\nabs/2511.21631, 2025. 4\n[32] Yu Tian, Guansong Pang, Yuanhong Chen, Rajvinder Singh,\nJohan W. Verjans, and Gustavo Carneiro. Weakly-supervised\nvideo anomaly detection with robust temporal feature magnitude learning. In ICCV, pages 4955–4966, 2021. 2\n[33] Xuanzhao Wang, Zhengping Che, Bo Jiang, Ning Xiao, Ke\nYang, Jian Tang, Jieping Ye, Jingyu Wang, and Qi Qi. Robust\nunsupervised video anomaly detection by multipath frame\nprediction. IEEE Trans. Neural Networks Learn. Syst., 33\n(6):2301–2312, 2022. 2\n[34] Zhaoqing Wang, Yu Lu, Qiang Li, Xunqiang Tao, Yandong Guo, Mingming Gong, and Tongliang Liu. CRIS:\nclip-driven referring image segmentation. In CVPR, pages\n11676–11685. IEEE, 2022. 3\n[35] Jie Wu, Wei Zhang, Guanbin Li, Wenhao Wu, Xiao Tan,\nYingying Li, Errui Ding, and Liang Lin. Weakly-supervised\nspatio-temporal anomaly detection in surveillance video. In\nIJCAI, pages 1172–1178, 2021. 2\n[36] Peng Wu, Jing Liu, Yujia Shi, Yujia Sun, Fangtao Shao,\nZhaoyang Wu, and Zhiwei Yang. Not only look, but also\nlisten: Learning multimodal violence detection under weak\nsupervision. In ECCV, pages 322–339, 2020. 1, 6\n[37] Peng Wu, Xuerong Zhou, Guansong Pang, Yujia Sun, Jing\nLiu, Peng Wang, and Yanning Zhang. Open-vocabulary\nvideo anomaly detection. In CVPR, pages 18297–18307,\n2024. 3, 6\n[38] Peng Wu, Xuerong Zhou, Guansong Pang, Zhiwei Yang,\nQingsen Yan, Peng Wang, and Yanning Zhang. Weakly\nsupervised video anomaly detection and localization with\nspatio-temporal prompts. In ACM Multimedia, pages 9301–\n9310, 2024. 1, 2, 3\n[39] Peng Wu, Xuerong Zhou, Guansong Pang, Lingru Zhou,\nQingsen Yan, Peng Wang, and Yanning Zhang. Vadclip:\nAdapting vision-language models for weakly supervised\nvideo anomaly detection. In AAAI, pages 6074–6082, 2024.\n1, 2, 3, 6\n[40] Peng Wu, Wanshun Su, Xiangteng He, Peng Wang, and Yanning Zhang. Varcmp: Adapting cross-modal pre-training\nmodels for video anomaly retrieval. In AAAI, pages 8423–\n8431, 2025. 1, 2\n[41] Peng Wu, Wanshun Su, Guansong Pang, Yujia Sun, Qingsen\nYan, Peng Wang, and Yanning Zhang. Avadclip: Audiovisual collaboration for robust video anomaly detection.\nCoRR, abs/2504.04495, 2025. 2\n[42] Hu Xu, Gargi Ghosh, Po-Yao Huang, Dmytro Okhonko,\nArmen Aghajanyan, Florian Metze, Luke Zettlemoyer, and\nChristoph Feichtenhofer. Videoclip: Contrastive pre-training\nfor zero-shot video-text understanding. In EMNLP (1),\n\n35554\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"