"<!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>LogiCo: A Unified Framework for Logical and\nStructural Anomaly Detection\nXimiao Zhang1 , Min Xu2 , and Xiuzhuang Zhou1B\nSchool of Intelligent Engineering and Automation, Beijing University of Posts and\nTelecommunications, Beijing, China\nxiuzhuang.zhou@bupt.edu.cn\n2\nCollege of Information and Engineering, Capital Normal University, Beijing, China\n\narXiv:2606.28688v1 [cs.CV] 27 Jun 2026\n\n1\n\nAbstract. Current anomaly detection methods primarily focus on structural anomalies, while paying insufficient attention to anomalies that violate logical constraints. Conversely, top-performing logical anomaly detection approaches address this by modeling global semantic consistency,\nbut perform poorly on subtle structural anomalies due to inadequate detection granularity. In this paper, we propose LogiCo, a unified framework for Logical and structural anomaly detection via Component-level\nfeature reconstruction. Unlike existing methods that rely on explicit\nglobal semantic modeling, LogiCo employs a novel component-level feature reconstruction technique to capture inter-component logical constraints. Specifically, LogiCo maps pre-trained image features into a discrete component-level feature space and performs collaborative feature\nreconstruction at both component and patch levels, enabling it to effectively detect both logical and structural anomalies. Furthermore, to\naddress the specific challenge of count-related logical anomalies, we integrate a segmentation-map discriminator that extends the model’s capability to identify quantitative inconsistencies. LogiCo achieves state-ofthe-art performance on both logical and structural anomaly detection\nacross four benchmarks, including MVTec-LOCO, MVTec-AD, VisA,\nand Real-IAD, demonstrating its superiority and practical feasibility.\nThe code is available at https://github.com/cnulab/LogiCo.\nKeywords: Logical Anomaly Detection · Surface Anomaly Detection ·\nComponent-level Feature Reconstruction · Component Segmentation\n\n1\n\nIntroduction\n\nImage anomaly detection has emerged as a fundamental problem in industrial\nvision. Given the inherent scarcity of defective samples in real-world scenarios,\nthis task is typically formulated as an unsupervised learning paradigm [12,28,37].\nAnomalies are generally classified into two types: structural anomalies and logical anomalies. Structural anomalies are characterized by unseen local visual\npatterns, such as scratches, breakage, and stains. In contrast, logical anomalies\nrepresent invalid configurations that deviate from production flows or assembly requirements, such as missing components, incorrect locations, and count\n\n\fX. Zhang et al.\n\nScratch\n\nDamaged\n\nLogical Anomalies\n\nStructural Anomalies\n\n2\n\nGlobal Detection\nBranch\nMissing Component Component Type Error\n\nGlobal Semantic Modeling-based Method\nComponent\nType Error\n\nForeign Object\n\nStain\n\n(a)\n\nPosition Anomaly\n\nGlobal\nAnomaly\nScore\n\nQuantity Anomaly\n\nLocal\nDetection\nBranch\nAnomaly\nLocalization\n\nMismatched\n\nComponent\nType Error\n\n(c)\n\nAnomaly Localization\n\nAnomaly\nDetection\n\nmax\n\nLogiCo\n\nAnomaly Detection\n\nAnomaly\n\nmax Local\nAnomaly\nScore\n\nAnomaly\nLocalization\n\nMatched\n\nAnomaly\n\nAnomaly\nDetection\n\n(b)\n\nFig. 1: (a): Examples of structural and logical anomalies. (b): Comparison of the overall\npipelines between LogiCo and global semantic modeling-based methods. (c): Comparison of LogiCo with other methods on anomaly detection and localization performance.\n\nanomalies, as illustrated in Fig. 1(a). Prevalent unsupervised anomaly detection\napproaches [10, 11, 17, 33, 52, 53] typically model the feature distribution of image patches. While effective for structural defects, these methods are intrinsically\nconstrained by their local modeling schemes, failing to capture long-range logical\ndependencies. To mitigate this, recent state-of-the-art (SOTA) logical anomaly\ndetection methods [14,18,21,31,36] usually employ an additional global detection\nbranch to learn the global semantic consistency, forming a global-local architecture, as shown in Fig. 1(b). The global branch discards spatial structure, allowing\nit to effectively capture overall appearance patterns and thereby help identify\nlogical anomalies. Nevertheless, due to the lack of fine-grained discriminative\ninformation, the global branch struggles to detect subtle structural anomalies,\nwhich may impair the model’s capability for structural anomaly detection. Furthermore, the global branch is typically unable to predict pixel-level anomaly\nmaps, leading to mismatched anomaly detection and localization results. Currently, the performance of logical anomaly detection methods in detecting structural anomalies is still notably inferior to that of specialized structural detection\nmethods.\nTo address the above issues, we propose LogiCo, a unified framework for logical and structural anomaly detection. Unlike previous works limited by coarsegrained global consistency modeling, LogiCo consistently preserves the image’s\nspatial layout, thereby facilitating precise anomaly detection and localization, as\nillustrated in Fig. 1(b). LogiCo consists of three key components: a Componentlevel Reconstruction Network (CRN), a Structural Reconstruction Network (SRN),\nand a Segmentation Map Discriminator (SMD). Specifically, the CRN is trained\nto restore discretized component-level feature maps to their normal pre-trained\ncounterparts, thereby capturing inter-component logical inconsistencies. The\nSRN reconstructs fine-grained local features under cross-attention guidance, enabling precise detection of structural anomalies. The SMD models quantity con-\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n3\n\nstraints by learning the normal patterns of component segmentation maps, facilitating the identification of count-related anomalies. Compared with existing\nmethods, LogiCo significantly extends the scope of detectable anomalies while\npreserving high detection accuracy. As illustrated in Fig. 1(c), LogiCo surpasses\nexisting methods in logical anomaly detection, achieving SOTA performance in\nboth anomaly detection and localization. For structural anomalies, it achieves\nperformance comparable to or exceeding that of top-tier methods. Our main\ncontributions are summarized as follows:\n– We propose LogiCo, a unified framework for logical and structural anomaly\ndetection. LogiCo captures local structural consistency and global logical\nconstraints in a fine-grained discriminative space, effectively addressing the\nlimitations of existing methods regarding detection scope and granularity.\n– We introduce a novel component-level feature reconstruction technique, which\ntransforms the complex modeling of multiple logical constraints into a unified\nreconstruction paradigm. This allows for the precise detection and pixel-level\nlocalization of logical anomalies without compromising spatial structures.\n– LogiCo achieves SOTA logical and structural anomaly detection performance on four benchmarks: MVTec-LOCO, MVTec-AD, VisA, and RealIAD, demonstrating its effectiveness and potential for real-world applications.\n\n2\n\nRelated Work\n\nStructural Anomaly Detection. Structural anomalies are prevalent in fields\nsuch as industrial manufacturing [3,5,20,40,55] and medical imaging [7,42,43,51],\nprompting extensive research. Since such anomalies typically manifest as localized abnormal patterns, existing methods usually employ local feature modeling schemes. Among them, reconstruction-based methods [13, 45, 47–49] train\nmodels to learn the normal patterns of images, and identify anomalous regions\nvia pixel-wise or patch-wise reconstruction. Knowledge distillation-based methods [2,6,11,17,38] train a student network to learn the normal feature distribution\nof the teacher network. In the inference phase, they localize anomalous regions\nvia patch-level feature comparison. Deep feature embedding-based methods learn\nthe normal feature distribution during training, for instance, by constructing\nmemory banks [1, 8, 33] or utilizing normalizing flows [16, 24, 46]. Subsequently,\nanomaly detection is achieved by measuring the deviation between query features\nand the learned feature distribution. Despite these advances, the above methods lack global perception capabilities, and thus often fail in detecting logical\nanomalies. Anomaly synthesis-based methods [19, 25, 34, 52] train anomaly detection models using synthetic anomalous samples. These approaches emphasize\nthat synthetic anomalies can effectively simulate real-world anomalies. However,\nfor logical anomaly detection, synthesizing realistic logical anomalous samples\nin either the pixel space or the continuous feature space remains a significant\nchallenge [39, 54].\n\n\f4\n\nX. Zhang et al.\n\nLogical Anomaly Detection. Logical anomaly detection focuses on capturing global semantic constraints and long-range dependencies; it has broad\napplication prospects yet remains underexplored. Bergmann et al. [4] released\nMVTec-LOCO, the first dataset for logical anomaly detection, and proposed\nGCAD, a logical anomaly detection framework based on global-local knowledge\ndistillation. GCAD employs a global network branch with a low-dimensional bottleneck to learn global context and overall semantic constraints. EfficientAD [2]\ninherits the core idea of GCAD and identifies logical anomalies by comparing the\nreconstruction error between two reconstruction networks with different model\ncapacities. Sugawara et al. [36] observed that EfficientAD remains ineffective\nat detecting certain types of logical anomalies, such as missing components or\ncount-related anomalies. To address this, they introduced a global detection\nbranch that disregards inter-component spatial relationships and instead models global semantic consistency using a Gaussian probability model [32] to predict\nimage-level anomaly scores. Recent works such as CSAD [18], SALAD [14], and\nPSAD [21] have integrated global semantic modeling with component segmentation techniques, achieving SOTA performance in logical anomaly detection.\nHowever, due to the limited detection granularity of the global branch, these\nmethods struggle with subtle structural anomalies, thereby limiting their practical application.\n\n3\n\nMethod\n\nThe overall pipeline of the proposed LogiCo is illustrated in Fig. 2. Given an\ninput image, LogiCo first employs open-vocabulary semantic segmentation to\ngenerate component segmentation maps. Guided by these maps, pre-trained image features are discretized and mapped into a component-level feature space.\nDuring the training phase, LogiCo synthesizes pseudo-anomalous features by\nmanipulating the segmentation maps. A Component-level Reconstruction Network (CRN) is then trained to restore these features back to their normal, pretrained counterparts, thereby capturing underlying logical inconsistencies. For\nstructural anomalies, LogiCo employs cross-attention guided reconstruction to\ncompel the Structural Reconstruction Network (SRN) to restore the anomaly\nfeatures, ensuring comprehensive recall of the anomalous regions. Additionally,\na Segmentation Map Discriminator (SMD) is integrated to identify irregularities\nin segmentation maps, enhancing the detection of quantity-related anomalies.\n3.1\n\nComponent-level Feature Reconstruction\n\nWe employ DINOv3 [35] for feature extraction and open-vocabulary semantic segmentation, which aligns image and text embeddings into a joint embedding space. Specifically, for an input image I ∈ RH×W ×3 , we define a set of\ntext prompts {P1 , P2 , . . . , PK } to describe its component categories, such as\n{“Peach”, “Orange”,...}, where H and W represent the height and width of the\nimage, respectively, and K is the number of component types. We then extract\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\nC : Cosine Distance\n\nSegmentation Map\nAnomaly Mask\n\n(training only)\nSegmentation Map\n\nC\n\nPre-trained\nFeature\n\nConvolution\n\nCross-Attn\n\nCross-Attn\n\nConvolution\n\nReconstructed\nComponent Feature\n\nConvolution\n\nComponent-level\nFeature Map\n\nDINOv3\nExtractor\nImage\n\nComponent-level\nReconstruction\nNetwork\n\nD\n\nConvolution\n\nAnomaly\nSynthesis\n\nComponent\nSegmentation\n\nAnomaly Map\n\nC\n\nComponent-level\nFeature Map\n\nConvolution\n\nLookup\nSegmentation\nMap Lookup\n\nCross-Attn\n\nAVG\nComponent-level\nAverage Pooling\n\nConvolution\n\nPre-trained\nFeature\n\nAnomaly Score\nFusion\n\nSegmentation Map\nDiscriminator\n\nD : Discretization\n\n5\n\nStructural Reconstruction Network\n\nReconstructed\nStructural Feature\n\nPre-trained\nFeature\n\nFig. 2: Overview of the proposed LogiCo pipeline, which consists of a Componentlevel Reconstruction Network (CRN), a Structural Reconstruction Network (SRN), and\na Segmentation Map Discriminator (SMD). The CRN and SRN learn global logical\nconstraints and local structural consistency to detect logical and structural anomalies,\nrespectively, whereas the SMD learns quantity rules to identify count-related anomalies.\n\nthe pre-trained feature X = ϕv (I) ∈ Rh×w×c and project it into the joint embedding space, yielding Xp = ϕp (X) ∈ Rh×w×cp , where ϕv (·) and ϕp (·) denote\nthe DINOv3 vision encoder and the projection head, respectively, while c and cp\nrepresent the feature dimensions before and after projection. For text prompts,\nwe use the DINOv3 text encoder ϕt (·) to embed them into the embedding space\nto obtain {P1 , P2 , . . . , PK }, where Pk = ϕt (Pk ) ∈ Rcp denotes the embedding of\nthe k-th prompt. Utilizing the shared embedding space between text embeddings\nand projected image features, we compute their similarity at each spatial location and then generate the segmentation map G ∈ {1, 2, . . . , K}h×w by assigning\neach patch to the component category with the highest similarity:\n  \\label {eq:equ1} G(i,j)=\\mathop {\\arg \\max }_{k \\in \\{1,2,\\dots ,K \\}}\\cos (X_\\mathtt {p}(i,j),\\mathcal {P}_k), \n\n(1)\n\nwhere (i, j) denotes the spatial coordinates. Finally, we apply a simple postprocessing procedure to refine the segmentation maps, for example by filtering\nout very small connected components. In contrast to recent works [14, 18, 21,\n30], we do not rely on overly refined segmentation maps to avoid additional\ncomputational overhead.\nBased on the generated segmentation map, we transform the pre-trained feature into a discretized component-level representation Xc ∈ Rh×w×c . Specifically,\nwe first compute the component prototypes {f1 , f2 , · · · , fK } via component-level\naverage pooling:\n  \\label {eq:equ2} \\mathrm {f}_k= \\frac {1}{\\lvert \\Omega _k \\rvert }\\sum _{(i,j) \\in \\Omega _k}X(i,j), \n\n(2)\n\nwhere Ωk = {(i, j)|G(i, j) = k} denotes the spatial indices of the k-th component. Then, we construct the discretized feature map Xc via a lookup operation\n\n\f6\n\nX. Zhang et al.\n\nImage\n\nSegmentation Map\n\nDeletion\n\nReplacement\n\nAddition\n\nErasure\n\nFig. 3: Examples of segmentation maps generated by various anomaly synthesis methods.\n\nby assigning the corresponding component prototype to each spatial location:\n  \\label {eq:equ3} X_\\mathtt {c}(i,j) = \\mathrm {f}_{G(i,j)}. \n\n(3)\n\nIt offers two key advantages: (1) The component-level feature map preserves the\nimage’s spatial layout and essential information for logical anomaly detection\nwhile filtering out irrelevant textural details, thereby facilitating the modeling\nof logical consistency. (2) The discretized feature space facilitates anomaly synthesis; specifically, by manipulating the segmentation maps during the lookup\nphase, we can generate diverse logical anomalies to enhance model training.\nWe design four anomaly synthesis strategies for LogiCo: component deletion,\nreplacement, addition, and erasure, as shown in Fig. 3. Deletion: Replacing\nthe component with its neighboring background to remove it. Replacement:\nReplacing one component with another. Addition: Employing CutPaste [25] to\nduplicate a component at a different location, thereby increasing the component\ncount. Erasure: Distinct from Deletion, Erasure only removes partial regions of\na component. When a component consists of a single connected region, Erasure\nperforms an erosion operation to alter its shape. When it comprises multiple\nconnected regions, Erasure deletes parts of regions to reduce the component\ncount. By integrating these methods, we generate diverse anomalous segmentation maps, which are then used to construct the anomalous component-level feature maps Xc′ . Subsequently, a Component-level Reconstruction Network (CRN)\nψc is trained to restore these features into their normal pre-trained representations: XL = ψc (Xc′ ) ∈ Rh×w×c . To this end, we optimize ψc with the cosine\ndistance loss:\n  \\label {eq:equ4} \\mathcal {L}_{\\mathtt {Log}}= 1 - \\cos (X_{\\mathtt {L}},X). \n(4)\nThe logical anomaly map SL ∈ Rh×w is defined as the patch-wise cosine distance\nbetween the reconstructed features and the original pre-trained features. Our\nkey insight lies in reconstructing synthesized anomalous features back to pretrained features rather than their normal discretized counterparts. This provides\na continuous learning target that facilitates model convergence and prevents\ndegeneration into trivial solutions. Furthermore, this reconstruction paradigm\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n7\n\nenhances LogiCo’s robustness against segmentation noise; even in the presence\nof noisy segmentation maps, the CRN can still generate normal reconstructed\nfeatures to avoid false positive detections.\n\n3.2\n\nCross-attentive Structural Reconstruction\n\nComponent-level reconstruction preserves the components’ spatial layout, enhancing the granularity of logical anomaly detection. However, due to the lack\nof intra-component structural information, its capability for structural anomaly\ndetection remains limited. To this end, we introduce a Structural Reconstruction\nNetwork (SRN) to reconstruct the fine-grained pre-trained features for structural\nanomaly detection: Xs = ψs (X) ∈ Rh×w×c . Similar to the CRN, the loss function\nis defined as LStr = 1 − cos(Xs , X), and the structural anomaly map Ss ∈ Rh×w\nis computed as the patch-wise cosine distance. The key challenge in the above\nprocess is controlling the reconstruction capability of the SRN to prevent it from\npreserving anomaly cues, which would result in an “identical shortcut” [17,45,49].\nTo address this, we propose Cross-attentive Structural Reconstruction, a novel\nmethod bridging logical and structural anomaly detection. It utilizes the CRN\nto guide the structural reconstruction process, compelling the SRN to restore\nanomalous features to their normal representations. Recall that local structural\ninformation is discarded during the feature discretization; consequently, the feature space of CRN is free of structural anomalies. Meanwhile, it retains the\noverall spatial layout of the image, providing a valuable reference for structural\nreconstruction. Specifically, for the h-th intermediate-layer feature Xsh ∈ Rhw×c\nfrom the SRN, we extract the corresponding layer feature XLh ∈ Rhw×c from the\nCRN to refine the reconstruction process via a cross-attention mechanism:\n  \\label {eq:equ5} Q_h=X_{\\mathtt {s}}^h W_{Q}^h, \\;\\; &amp;K_h=X_{\\mathtt {L}}^h W_{K}^h, \\;\\; V_h=X_{\\mathtt {L}}^h W_{V}^h, \\notag \\\\ \\hat {X}_{\\mathtt {s}}^{h}=FFN&amp;(Attention(Q_h,K_h,V_h)),\n(5)\nwhere Qh , Kh , Vh ∈ Rhw×c denote the query, key, and value matrices, respech\ntively, and WQh , WK\n, WVh ∈ Rc×c are the learnable projection weights. Attention(·)\nand F F N (·) represent the attention operation and the feed-forward network,\nwhile X̂sh is the reconstructed feature map. The above cross-attention operation\nuses the anomaly-free XLh as the key-value pair, explicitly mapping Xsh to its\nnormal representation, thereby enhancing the reliability of reconstruction while\navoiding missed detections. In our implementation, the CRN and SRN adopt\nAutoencoder and U-Net architectures of the same depth, respectively. Specifically, we insert a self-attention layer into each CRN block to capture global\nsemantics and generate guiding features, and place a cross-attention layer at the\ncorresponding location in the SRN to enable cross-attentive reconstruction. We\nomit the residual connection in the standard cross-attention module to prevent\nthe leakage of anomalous information.\n\n\f8\n\n3.3\n\nX. Zhang et al.\n\nSegmentation Map Discriminator\n\nThe Segmentation Map Discriminator (SMD) is specifically designed to detect\nquantity-related logical anomalies. We find that learning constraints related\nto component quantity is challenging in the feature space, whereas segmentation maps offer a more intuitive representation. The SMD directly predicts\nthe anomaly mask based on the segmentation map: SD = ψD (G) ∈ [0, 1]h×w ,\nwhere 0 and 1 denote normal and anomalous pixels, respectively. We employ a\nlightweight fully convolutional U-Net model as our SMD, trained using synthetic\nsegmentation map-mask pairs (G′ , M), as illustrated in Fig. 3. We optimize the\nSMD using Binary Focal Loss [27], denoted as:\n  \\label {eq:equ6} \\mathcal {L}_{\\mathtt {Dis}}= \\mathrm {Focal}(\\psi _{\\mathtt {D}}(G'),\\mathcal {M}). \n3.4\n\n(6)\n\nTraining and Inference\n\nWe jointly train the different branches within LogiCo, with the overall loss function defined as:\n  \\label {eq:equ7} \\mathcal {L} = \\mathcal {L}_{\\mathtt {Log}} + \\mathcal {L}_{\\mathtt {Str}} + \\mathcal {L}_{\\mathtt {Dis}}. \n(7)\nIn the inference phase, we omit the anomaly synthesis and perform the same\nsegmentation and reconstruction steps to obtain anomaly maps SL , Ss , and SD\nfor the query image. Subsequently, we compute the means and standard deviations of these anomaly maps on the validation set, utilizing these statistics for\nnormalization and anomaly score fusion:\n  \\label {eq:equ8} \\mathcal {S} = \\max \\{\\frac {\\mathcal {S}_{\\mathtt {L}}-\\mu (\\mathcal {S}_{\\mathtt {L}})}{\\sigma (\\mathcal {S}_{\\mathtt {L}})}, \\frac {\\mathcal {S}_{\\mathtt {s}}-\\mu (\\mathcal {S}_{\\mathtt {s}})}{\\sigma (\\mathcal {S}_{\\mathtt {s}})}, \\frac {\\mathcal {S}_{\\mathtt {D}}-\\mu (\\mathcal {S}_{\\mathtt {D}})}{\\sigma (\\mathcal {S}_{\\mathtt {D}})}\\}. \n\n(8)\n\nTo comprehensively capture diverse types of anomalies, we derive the overall\nanomaly map S ∈ Rh×w by taking the element-wise maximum across these\nmaps. Finally, we upsample S to the image resolution to obtain the pixel-level\nanomaly score, while its maximum is used as the image-level anomaly score.\n\n4\n\nExperiments\n\n4.1\n\nExperimental Setup\n\nDatasets. We conduct extensive evaluations on four anomaly detection benchmarks: MVTec-LOCO [4], MVTec-AD [5], VisA [55], and Real-IAD [40]. MVTecLOCO [4] is a benchmark specifically designed for logical anomaly detection,\ncomprising 3,644 images across five categories, each featuring diverse logical\nand structural anomalies. The MVTec-AD benchmark [5] comprises 5,354 images across 15 industrial products, where certain categories such as “cable” and\n“transistor” contain logical anomalies like missing or misplaced components.\nThe VisA benchmark [55] comprises 10,821 images across 12 products. Certain\ncategories present significant challenges due to their intricate structures and the\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n9\n\nTable 1: Comparison of LogiCo with other anomaly detection methods. † denotes\nmethods specifically designed for logical anomaly detection.\nMVTec-AD\n\nVisA\n\nReal-IAD\n\nI-AUC\n\nsPRO\n\nI-AUC P-AUC P-AP PRO\n\nI-AUC P-AUC P-AP PRO\n\nI-AUC P-AUC P-AP PRO\n\n75.6\n83.0\nINP-Former [29]\n79.3\nDinomaly [17]\n83.4\n† GLCF [44]\n78.1\n† AnomalyMoE [15] 88.2\n† CSAD [18]\n92.9\n† SALAD [14]\n93.2\n† LogiCo\n96.3\n\n34.4\n65.5\n63.0\n64.8\n63.7\n63.6\n70.6\n63.3\n72.9\n\n99.1\n99.2\n99.5\n99.6\n93.9\n99.5\n95.8\n97.2\n99.6\n\n94.9\n97.9\n98.4\n98.9\n87.1\n98.1\n90.6\n97.4\n98.5\n\n91.7\n91.7\n93.2\n93.7\n85.4\n90.5\n83.4\n88.8\n93.8\n\nMethod\n\nMVTec-LOCO\n\nPatchCore [33]\nUniNet [41]\n\n98.4\n98.6\n98.4\n98.8\n96.4\n98.1\n97.7\n96.9\n98.7\n\n65.8\n64.3\n69.6\n71.2\n49.0\n67.0\n56.3\n52.6\n70.2\n\n94.4\n95.4\n95.5\n95.5\n80.5\n94.4\n86.6\n81.1\n95.0\n\n98.5\n98.7\n98.7\n99.3\n96.1\n99.0\n97.0\n97.4\n99.3\n\n48.0\n45.6\n49.2\n57.7\n28.5\n54.6\n31.1\n32.7\n60.1\n\n91.0\n93.0\n93.9\n94.8\n73.2\n94.9\n73.7\n75.7\n93.7\n\n98.9\n99.2\n99.3\n99.4\n95.1\n97.8\n96.3\n96.2\n99.4\n\n39.6\n40.9\n48.4\n48.1\n26.1\n35.8\n29.8\n30.2\n53.3\n\n92.8\n95.8\n95.6\n95.7\n75.3\n83.9\n78.9\n77.9\n95.3\n\nTable 2: Comparison between LogiCo and other logical anomaly detection methods\non the MVTec-LOCO dataset. † indicates that the results are taken from the original\npaper. LogiCo+ denotes LogiCo using SAM-refined [22] component segmentation maps.\nMethod\n\nFine-grained\n\nSegmentation\n\nDetection (I-AUC)\n\nLocalization (sPRO)\n\nLogical Structural\n\nAVG\n\nLogical Structural\n\nAVG\n\nGLCF [44]\n†GCAD [4]\n†EfficientAD [2]\nSALAD [14]\nLogiCo\n\n✗\n✗\n✗\n✗\n✗\n\n72.9\n86.0\n86.8\n91.7\n96.5\n\n83.2\n80.6\n94.7\n94.7\n96.0\n\n78.1\n83.3\n90.7\n93.2\n96.3\n\n58.7\n71.1\n57.4\n63.6\n\n68.6\n69.2\n69.2\n82.2\n\n63.7\n70.1\n63.3\n72.9\n\nPSAD [21]\nLogSAD [50]\nCSAD [18]\n†SAM-LAD [30]\nLogiCo+\n\n✓\n✓\n✓\n✓\n✓\n\n97.7\n89.3\n92.6\n95.8\n97.1\n\n91.3\n91.6\n93.1\n85.5\n96.2\n\n94.5\n90.4\n92.9\n90.7\n96.7\n\n58.3\n65.5\n85.6\n76.2\n\n78.8\n75.6\n80.7\n84.6\n\n68.6\n70.6\n83.2\n80.4\n\npresence of multiple target objects. The Real-IAD benchmark [40] comprises\n151,050 multi-view images across 30 different products, with some categories\nexhibiting subtle structural anomalies that are difficult to detect. We adopt the\nsingle-view experimental setting, following recent works [23, 26, 53].\nImplementation Details. We utilize DINOv3 ViT-B/16 [35] as our visual\nbackbone and extract feature maps from the final (12th) layer. All images are\nresized to a resolution of 512×512 for both semantic segmentation and anomaly\ndetection. For the texture classes in the MVTec-AD dataset [5], we treat them as\na single component and disable the anomaly synthesis and SMD. Otherwise, we\nuniformly sample from the four anomaly synthesis strategies and apply the same\nconfiguration across all other image classes. For the MVTec-AD [5], VisA [55],\nand Real-IAD [40] datasets, we hold out 20% of the training images to compute\nthe means and standard deviations of the anomaly maps for normalization.\nMetrics. For the MVTec-AD [5], VisA [55], and Real-IAD [40] datasets,\nwe evaluate anomaly detection performance using image-level AUROC (I-AUC)\nand anomaly localization performance using pixel-level AUROC (P-AUC), average precision (P-AP), and per-region overlap (PRO) [6]. For the MVTecLOCO dataset [4], we employ I-AUC and saturated PRO (sPRO) [4] to evaluate\n\n\f10\n\nX. Zhang et al.\n\nImage\n\nGT\n\nLogiCo\n\nUniNet\n\nDinomaly\n\nSALAD\n\nCSAD\n\nAnomalyMoE\n\nFig. 4: Qualitative comparison of LogiCo and other methods on logical anomaly detection.\n\nanomaly detection and localization performance, respectively, noting that sPRO\nis specifically designed for logical anomalies. Following previous work [4, 14, 18],\nmetrics for logical and structural anomalies are computed separately, and their\naverage is reported as the overall metric.\nBaselines. For structural anomaly detection, we use PatchCore [33], UniNet\n[41], INP-Former [29], and Dinomaly [17] as our baseline methods. For logical\nanomaly detection, we use GLCF [44], AnomalyMoE [15], CSAD [18], SALAD\n[14], GCAD [4], EfficientAD [2], PSAD [21], LogSAD [50], and SAM-LAD [30] as\nbaseline methods. For INP-Former [29], Dinomaly [17], and AnomalyMoE [15],\nwe use the same backbone and image size as LogiCo to ensure a fair comparison.\nTo enable a comprehensive and unified evaluation with consistent metrics and\nmore challenging datasets, we rigorously reproduce the baselines using their\nofficial code, with detailed reproduction protocols provided in the Appendix.\nUnless otherwise specified, all reported results are reproduced results.\n4.2\n\nExperimental Results\n\nTab. 1 presents the performance of LogiCo compared to other methods across different benchmarks. Current SOTA methods like Dinomaly [17] and INP-Former\n[29] excel on benchmarks focusing on structural anomalies, such as MVTecAD [5], VisA [55], and Real-IAD [40]. However, they struggle to generalize to\nthe logical anomalies present in the MVTec-LOCO dataset [4]. Conversely, methods explicitly designed for logical anomalies, such as CSAD [18], SALAD [14],\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\nImage\n\nGT\n\nLogiCo\n\nUniNet\n\nDinomaly\n\nSALAD\n\nCSAD\n\n11\n\nAnomalyMoE\n\nFig. 5: Qualitative comparison of LogiCo and other methods on structural anomaly\ndetection.\nBreakfast Box\n\nPeach\n\nOrange\n\nBanana Chips\n\nCereals\n\nLunch Box\n\nPushpins\n\nAlmonds\n\nBlack Background\n\nPushpins\n\nStorage Box\n\nBlack Background\n\nScrew Bag\n\nMetal Bolt\n\nMetal Hex Nut\n\nZip-lock Bag\n\nMetal Flat Washer\n\nBlack Background\n\nSplicing Connectors\n\nBlue Cable\n\nYellow Cable\n\nConnector\n\nRed Cable\nGrid\n\nJuice Bottle\n\nBanana Juice\nYellow Sticker\n\nOrange Juice\nGlass Bottle\n\nCherry Juice\nBlack Background\n\nFig. 6: Examples of component segmentation on the MVTec-LOCO dataset.\n\nand AnomalyMoE [15], detect logical defects more effectively but lag significantly behind on benchmarks characterized by subtle structural anomalies, particularly on the challenging VisA [55] and Real-IAD [40] datasets. In contrast,\nLogiCo demonstrates superior performance across all benchmarks. Specifically,\nit achieves an impressive 96.3% I-AUC and 72.9% sPRO on the MVTec-LOCO\nbenchmark [4], while performing on par with or even surpassing top-performing\nmethods on other structural anomaly detection benchmarks. Tab. 2 further reports the logical and structural anomaly detection and localization performance\nof different methods on the MVTec-LOCO dataset [4]. Among them, some approaches [14, 21] achieve strong anomaly detection performance due to their\nglobal semantic modeling capabilities, but perform poorly in anomaly localization. In contrast, some methods [18, 30] excel at anomaly localization by leveraging fine-grained segmentation maps, yet show limited performance in anomaly\ndetection. By comparison, LogiCo achieves a favorable trade-off between these\n\n\f12\n\nX. Zhang et al.\n\nTable 3: Comparison of computational efficiency between LogiCo and other methods.\nMethod\n\nTraining\nTime (h) ↓\n\nImages/s ↑\n\nDinomaly [17]\nAnomalyMoE [15]\nSALAD [14]\nLogSAD [50]\nLogiCo\n\n0.7\n18.0\n1.7\n0.2\n1.0\n\n30.2\n15.2\n37.6\n0.3\n17.4\n\nPerformance on MVTec-LOCO ↑\n(Log.-AUC/Str.-AUC/Log.-sPRO/Str.-sPRO)\n\n73.71 / 93.04 / 45.83 / 83.74\n82.79 / 93.57 / 58.36 / 68.78\n91.73 / 94.69 / 57.39 / 69.22\n89.29 / 91.58 / 58.31 / 78.81\n96.53 / 96.03 / 63.63 / 82.16\n\nTable 4: Ablation study results of LogiCo components on the MVTec-LOCO dataset.\nCRN SRN SMD Cross-Attn.\n\n✓\n✓\n✓\n✓\n✓\n✓\n\n✓\n✓\n✓\n✓\n✓\n✓\n\n✓\n✓\n✓\n✓\n✓\n\n✓\n✓\n\nDetection (I-AUC)\n\nLocalization (sPRO)\n\nLogical Structural\n\nLogical Structural\n\n90.88\n75.34\n85.63\n96.87\n86.85\n89.43\n90.05\n95.81\n96.53\n\n67.51\n53.00\n58.05\n64.22\n56.79\n67.71\n68.08\n63.04\n63.63\n\n84.59\n94.86\n61.20\n82.47\n93.84\n94.94\n95.95\n94.82\n96.03\n\n70.07\n81.55\n35.21\n62.84\n80.00\n81.98\n84.71\n81.05\n82.16\n\ntwo aspects. Moreover, when using finer segmentation maps, LogiCo obtains\na substantial performance improvement. Figs. 4 and 5 present the qualitative\nresults of LogiCo and other methods on logical and structural anomalies, respectively. The results demonstrate that LogiCo precisely localizes various types\nof anomaly regions, significantly extending the detectable range of existing methods and emphasizing its feasibility for real-world scenarios.\nFig. 6 displays the component segmentation results of LogiCo on the MVTecLOCO dataset. Unlike prior works that rely on elaborate segmentation pipelines\n[18, 21, 30, 50], LogiCo adopts a simple open-vocabulary segmentation scheme,\nsignificantly reducing computational overhead. Moreover, LogiCo demonstrates\nrobustness against segmentation noise. Specifically, in the Juice Bottle category, it yields an I-AUC of 98.93% and an sPRO of 82.67% (refer to the Appendix for per-category metrics), despite the segmentation module struggling\nto distinguish between specific juice types. We attribute this to LogiCo’s robust\nreconstruction capability, which effectively restores normal feature representations from noisy inputs, thereby mitigating false positives. More experimental\nresults and analysis on component segmentation are provided in the Appendix.\nTab. 3 compares the computational efficiency of different methods. The experiments are implemented in PyTorch and conducted on a single Nvidia RTX\n5090 GPU. At inference time, we set the batch size to 1 to mimic practical deployment scenarios. Benefiting from a simplified component segmentation\npipeline, LogiCo eliminates the need to train an additional component segmentation model [14,18,21], which shortens its training time and enables it to meet the\npractical demands of rapid product iteration and updates. Furthermore, LogiCo\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n13\n\nTable 5: Ablation study results of anomaly synthesis on the MVTec-LOCO dataset.\nAnomaly Synthesis\nMethod\n\nDetection (I-AUC)\n\nLocalization (sPRO)\n\nLogical Structural\n\nLogical\n\nStructural\n\n46.03\n53.08\n52.81\n61.45\n61.90\n62.68\n62.29\n62.84\n63.36\n63.65\n63.63\n\n81.13\n82.04\n82.37\n81.99\n82.12\n82.09\n82.39\n81.89\n82.08\n82.13\n82.16\n\nDeletion\n85.70\nReplacement\n88.47\nErasure\n90.29\nAddition\n93.41\nAddition+Deletion\n93.73\nAddition+Replacement\n94.58\nAddition+Erasure\n95.73\nAddition+Replacement+Deletion 94.88\nAddition+Erasure+Deletion\n95.99\nAddition+Erasure+Replacement 96.26\nAll\n96.53\n\n94.64\n95.44\n95.81\n95.01\n95.24\n95.35\n95.59\n95.55\n95.72\n95.91\n96.03\n\nTable 6: Ablation study results on different backbones and image sizes.\nBackbone\n\nImage Size\n\nMVTec-LOCO\n\nMVTec-AD\n\nI-AUC\n\nsPRO\n\nI-AUC\n\nP-AUC\n\nP-AP\n\nDINOv2-R [9]\n\n2242\n4482\n\n94.42\n95.67\n\n69.48\n71.85\n\n99.30\n99.55\n\n98.14\n98.58\n\n65.98 93.19\n68.09 94.27\n\nPRO\n\nDINOv3ViT-S [35]\n\n5122\n\n95.50\n\n70.20\n\n99.49\n\n98.43\n\n68.81 94.37\n\nDINOv3ViT-B [35]\n\n2562\n3842\n5122\n\n94.78\n95.59\n96.28\n\n69.65\n71.38\n72.90\n\n99.04\n99.40\n99.59\n\n98.33\n98.47\n98.68\n\n66.81 93.75\n68.30 94.26\n70.19 95.00\n\nDINOv3ViT-L [35]\n\n5122\n\n95.80\n\n73.88\n\n99.70\n\n98.73\n\n70.98 95.29\n\nachieves a high inference speed of 17.4 FPS at a resolution of 512 × 512, thereby\neffectively balancing anomaly detection performance and efficiency to meet the\nrequirements of real-world scenarios.\n4.3\n\nAblation Study\n\nAblation Study on LogiCo Components. Tab. 4 validates the effectiveness\nof each component within LogiCo. As a key module of LogiCo, the CRN provides\nthe primary capability for logical anomaly detection. When used independently,\nit achieves a logical-AUC of 90.88% and a logical-sPRO of 67.51%, which outperforms a wide range of logical anomaly detection methods [2,4,44,50]. In contrast,\nthe SRN is mainly responsible for detecting structural anomalies, compensating\nfor CRN’s limitations in this aspect. The introduction of the SRN improves the\nstructural anomaly detection scores by approximately 10%. Furthermore, by employing cross-attentive reconstruction, SRN’s anomaly detection and localization\nperformance is further enhanced, with structural AUC and sPRO increasing by\n1.01% and 2.73%, respectively, thereby demonstrating its indispensability. The\nSMD module is primarily designed to identify quantity-related logical anomalies, thereby expanding the detection scope of LogiCo. However, incorporating\nSMD may compromise anomaly localization performance. Since it operates on\nsegmentation maps devoid of appearance details, it can effectively identify the\n\n\f14\n\nX. Zhang et al.\nTable 7: Ablation study results on different intermediate layers.\nLayers\n\nMVTec-LOCO\nI-AUC\n\nEarly Layers{1,2,3,4,5,6}\n93.33\n93.51\nMiddle Layers{4,5,6,7,8,9}\nLate Layers{7,8,9,10,11,12}\n95.70\nEven-numbered Layers{2,4,6,8,10,12} 95.28\nFinal Layer{12}\n96.28\n\nMVTec-AD\n\nsPRO I-AUC P-AUC P-AP PRO\n67.15\n68.83\n71.24\n70.68\n72.90\n\n99.19\n99.40\n99.57\n99.56\n99.59\n\n98.00 65.18 94.14\n98.20 68.84 95.38\n98.36 69.03 95.26\n98.52 70.34 95.26\n98.68 70.19 95.00\n\nanomalous component but fails to pinpoint the precise location of the anomaly\nwithin it. Despite this limitation, we advocate using SMD for products subject\nto quantity constraints to improve overall detection performance.\nAblation Study on Anomaly Synthesis. Tab. 5 investigates the impact\nof different anomaly synthesis methods. Compared with using a single anomaly\nsynthesis method, using multiple strategies simultaneously leads to significant\nperformance improvements. Furthermore, for the MVTec-LOCO dataset, the\nAddition and Erasure operations demonstrate superior performance, which\nmay be attributed to their ability to generate diverse anomalies. Our anomaly\nsynthesis process operates within a discrete pixel space, facilitating straightforward customization tailored to the logical constraints of specific products. This\nflexibility significantly enhances LogiCo’s adaptability and scalability across diverse application scenarios.\nAblation Study on Feature Extraction. Tab. 6 reports the anomaly detection performance of LogiCo using different backbones and image sizes. When\nusing the popular DINOv2-R backbone [9], LogiCo consistently delivers excellent results, confirming its broad effectiveness across various pre-trained models.\nFurthermore, we observe that performance improves notably as the backbone\nsize and input image resolution increase; however, this incurs a higher computational overhead. In this paper, we employ DINOv3 ViT-B [35] with a resolution of\n512×512 as the default configuration to balance performance and computational\nefficiency. Tab. 7 investigates the impact of extracting pre-trained features from\ndifferent intermediate layers, using DINOv3 ViT-B as the backbone. For multilayer settings, we reconstruct the averaged feature representation. We observe\nthat LogiCo benefits from feature maps at deeper layers; specifically, utilizing late\nlayers improves anomaly detection performance by 2.37% on MVTec-LOCO and\n0.38% on MVTec-AD compared to early layers. It is worth noting that LogiCo\nachieves the best overall performance when using only the final layer. This can\nbe ascribed to the Gram Anchoring technique [35] employed by DINOv3, which\nimposes additional consistency constraints on the final layer during pre-training,\nenabling it to generate higher-quality feature maps.\n\n5\n\nConclusion\n\nIn this paper, we proposed LogiCo, a unified framework for logical and structural\nanomaly detection. LogiCo learns diverse logical constraints via component-level\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n15\n\nfeature reconstruction, and extends its detection capability by integrating crossattentive structural reconstruction with segmentation map discrimination, effectively addressing the limited detection scope and granularity of existing methods. Specifically, LogiCo comprises a component-level reconstruction network,\na structural reconstruction network, and a segmentation map discriminator, all\noperating in a fine-grained discriminative space, enabling effective detection of\ndiverse anomalies. Extensive experiments on multiple benchmarks demonstrate\nthat LogiCo achieves SOTA performance in both logical and structural anomaly\ndetection. In future work, we aim to further enhance LogiCo’s adaptability across\ndiverse application scenarios, specifically by developing learnable anomaly synthesis strategies and optimization mechanisms.\n\nReferences\n1. Bae, J., Lee, J.H., Kim, S.: Pni: industrial anomaly detection using position and\nneighborhood information. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 6373–6383 (2023)\n2. Batzner, K., Heckler, L., König, R.: Efficientad: Accurate visual anomaly detection\nat millisecond-level latencies. In: Proceedings of the IEEE/CVF winter conference\non applications of computer vision. pp. 128–138 (2024)\n3. Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., Steger, C.: The mvtec\nanomaly detection dataset: a comprehensive real-world dataset for unsupervised\nanomaly detection. International Journal of Computer Vision 129(4), 1038–1059\n(2021)\n4. Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., Steger, C.: Beyond dents and\nscratches: Logical constraints in unsupervised anomaly detection and localization.\nInternational Journal of Computer Vision 130(4), 947–969 (2022)\n5. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the\nIEEE/CVF conference on computer vision and pattern recognition. pp. 9592–9600\n(2019)\n6. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Uninformed students:\nStudent-teacher anomaly detection with discriminative latent embeddings. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition.\npp. 4183–4192 (2020)\n7. Cai, Y., Chen, H., Yang, X., Zhou, Y., Cheng, K.T.: Dual-distribution discrepancy\nfor anomaly detection in chest x-rays. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 584–593. Springer (2022)\n8. Damm, S., Laszkiewicz, M., Lederer, J., Fischer, A.: Anomalydino: Boosting patchbased few-shot anomaly detection with dinov2. In: 2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). pp. 1319–1329. IEEE (2025)\n9. Darcet, T., Oquab, M., Mairal, J., Bojanowski, P.: Vision transformers need registers. In: The Twelfth International Conference on Learning Representations (2024)\n10. Defard, T., Setkov, A., Loesch, A., Audigier, R.: Padim: a patch distribution modeling framework for anomaly detection and localization. In: International conference\non pattern recognition. pp. 475–489. Springer (2021)\n11. Deng, H., Li, X.: Anomaly detection via reverse distillation from one-class embedding. In: Proceedings of the IEEE/CVF conference on computer vision and pattern\nrecognition. pp. 9737–9746 (2022)\n\n\f16\n\nX. Zhang et al.\n\n12. Diers, J., Pigorsch, C.: A survey of methods for automated quality control based\non images. International Journal of Computer Vision 131(10), 2553–2581 (2023)\n13. Fučka, M., Zavrtanik, V., Skočaj, D.: Transfusion–a transparency-based diffusion\nmodel for anomaly detection. In: European conference on computer vision. pp.\n91–108. Springer (2024)\n14. Fučka, M., Zavrtanik, V., Skočaj, D.: Salad–semantics-aware logical anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer\nVision. pp. 21843–21852 (2025)\n15. Gu, Z., Zhu, B., Zhu, G., Chen, Y., Ge, W., Tang, M., Wang, J.: Anomalymoe:\nTowards a language-free generalist model for unified visual anomaly detection. In:\nProceedings of the AAAI Conference on Artificial Intelligence. vol. 40, pp. 4348–\n4356 (2026)\n16. Gudovskiy, D., Ishizaka, S., Kozuka, K.: Cflow-ad: Real-time unsupervised anomaly\ndetection with localization via conditional normalizing flows. In: Proceedings of\nthe IEEE/CVF winter conference on applications of computer vision. pp. 98–107\n(2022)\n17. Guo, J., Lu, S., Zhang, W., Chen, F., Li, H., Liao, H.: Dinomaly: The less is more\nphilosophy in multi-class unsupervised anomaly detection. In: Proceedings of the\nComputer Vision and Pattern Recognition Conference. pp. 20405–20415 (2025)\n18. Hsieh, Y.H., Lai, S.H.: Csad: Unsupervised component segmentation for logical\nanomaly detection. In: 35th British Machine Vision Conference 2024, BMVC 2024,\nGlasgow, UK, November 25-28, 2024. BMVA (2024)\n19. Hu, T., Zhang, J., Yi, R., Du, Y., Chen, X., Liu, L., Wang, Y., Wang, C.: Anomalydiffusion: Few-shot anomaly image generation with diffusion model. In: Proceedings\nof the AAAI conference on artificial intelligence. vol. 38, pp. 8526–8534 (2024)\n20. Huang, Y., Qiu, C., Yuan, K.: Surface defect saliency of magnetic tile. The Visual\nComputer 36(1), 85–96 (2020)\n21. Kim, S., An, S., Chikontwe, P., Kang, M., Adeli, E., Pohl, K.M., Park, S.H.: Few\nshot part segmentation reveals compositional logic for industrial anomaly detection. In: Proceedings of the AAAI conference on artificial intelligence. vol. 38, pp.\n8591–8599 (2024)\n22. Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T.,\nWhitehead, S., Berg, A.C., Lo, W.Y., et al.: Segment anything. In: Proceedings of\nthe IEEE/CVF international conference on computer vision. pp. 4015–4026 (2023)\n23. Lee, J.C., Kim, T., Park, E., Woo, S.S., Ko, J.H.: Continuous memory representation for anomaly detection. In: European Conference on Computer Vision. pp.\n438–454. Springer (2024)\n24. Lei, J., Hu, X., Wang, Y., Liu, D.: Pyramidflow: High-resolution defect contrastive\nlocalization using pyramid normalizing flow. In: Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition. pp. 14143–14152 (2023)\n25. Li, C.L., Sohn, K., Yoon, J., Pfister, T.: Cutpaste: Self-supervised learning for\nanomaly detection and localization. In: Proceedings of the IEEE/CVF conference\non computer vision and pattern recognition. pp. 9664–9674 (2021)\n26. Liao, J., Xu, X., Su, Y., Tu, R.C., Liu, Y., Tao, D., Yang, X.: Robust distribution\nalignment for industrial anomaly detection under distribution shift. arXiv preprint\narXiv:2503.14910 (2025)\n27. Lin, T.Y., Goyal, P., Girshick, R., He, K., Dollár, P.: Focal loss for dense object\ndetection. In: Proceedings of the IEEE international conference on computer vision.\npp. 2980–2988 (2017)\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n17\n\n28. Liu, J., Xie, G., Wang, J., Li, S., Wang, C., Zheng, F., Jin, Y.: Deep industrial\nimage anomaly detection: A survey. Machine Intelligence Research 21(1), 104–135\n(2024)\n29. Luo, W., Cao, Y., Yao, H., Zhang, X., Lou, J., Cheng, Y., Shen, W., Yu, W.:\nExploring intrinsic normal prototypes within a single image for universal anomaly\ndetection. In: Proceedings of the Computer Vision and Pattern Recognition Conference. pp. 9974–9983 (2025)\n30. Peng, Y., Lin, X., Ma, N., Du, J., Liu, C., Liu, C., Chen, Q.: Sam-lad: Segment anything model meets zero-shot logic anomaly detection. Knowledge-Based Systems\n314, 113176 (2025)\n31. Peng, Y., Lin, X., Ma, N., Liu, C., Chen, Q.: Vllm-lad: Visual large language\nmodel for zero-shot logical anomaly detection. IEEE Transactions on Circuits and\nSystems for Video Technology (2026)\n32. Rippel, O., Mertens, P., Merhof, D.: Modeling the distribution of normal data\nin pre-trained deep features for anomaly detection. In: 2020 25th International\nConference on Pattern Recognition (ICPR). pp. 6726–6733. IEEE (2021)\n33. Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., Gehler, P.: Towards\ntotal recall in industrial anomaly detection. In: Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition. pp. 14318–14328 (2022)\n34. Schlüter, H.M., Tan, J., Hou, B., Kainz, B.: Natural synthetic anomalies for selfsupervised anomaly detection and localization. In: European Conference on Computer Vision. pp. 474–489. Springer (2022)\n35. Siméoni, O., Vo, H.V., Seitzer, M., Baldassarre, F., Oquab, M., Jose, C., Khalidov, V., Szafraniec, M., Yi, S., Ramamonjisoa, M., et al.: Dinov3. arXiv preprint\narXiv:2508.10104 (2025)\n36. Sugawara, S., Imamura, R.: Puad: Frustratingly simple method for robust anomaly\ndetection. In: 2024 IEEE International Conference on Image Processing (ICIP). pp.\n842–848. IEEE (2024)\n37. Tao, X., Gong, X., Zhang, X., Yan, S., Adak, C.: Deep learning for unsupervised\nanomaly localization in industrial images: A survey. IEEE Transactions on Instrumentation and Measurement 71, 1–21 (2022)\n38. Tien, T.D., Nguyen, A.T., Tran, N.H., Huy, T.D., Duong, S., Nguyen, C.D.T.,\nTruong, S.Q.: Revisiting reverse distillation for anomaly detection. In: Proceedings\nof the IEEE/CVF conference on computer vision and pattern recognition. pp.\n24511–24520 (2023)\n39. Tong, X., Chang, Y., Zhao, Q., Yu, J., Wang, B., Lin, J., Lin, Y., Mai, X., Wang,\nH., Tao, Z., et al.: Component-aware unsupervised logical anomaly generation for\nindustrial anomaly detection. In: 2025 IEEE International Conference on Robotics\nand Automation (ICRA). pp. 16722–16729. IEEE (2025)\n40. Wang, C., Zhu, W., Gao, B.B., Gan, Z., Zhang, J., Gu, Z., Qian, S., Chen, M., Ma,\nL.: Real-iad: A real-world multi-view dataset for benchmarking versatile industrial\nanomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer\nVision and Pattern Recognition. pp. 22883–22892 (2024)\n41. Wei, S., Jiang, J., Xu, X.: Uninet: A contrastive learning-guided unified framework\nwith feature selection for anomaly detection. In: Proceedings of the Computer\nVision and Pattern Recognition Conference. pp. 9994–10003 (2025)\n42. Wyatt, J., Leach, A., Schmon, S.M., Willcocks, C.G.: Anoddpm: Anomaly detection with denoising diffusion probabilistic models using simplex noise. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp.\n650–656 (2022)\n\n\f18\n\nX. Zhang et al.\n\n43. Xiang, T., Zhang, Y., Lu, Y., Yuille, A.L., Zhang, C., Cai, W., Zhou, Z.: Squid:\nDeep feature in-painting for unsupervised anomaly detection. In: Proceedings of the\nIEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 23890–\n23901 (2023)\n44. Yao, H., Yu, W., Luo, W., Qiang, Z., Luo, D., Zhang, X.: Learning global-local correspondence with semantic bottleneck for logical anomaly detection. IEEE Transactions on Circuits and Systems for Video Technology 34(5), 3589–3605 (2023)\n45. You, Z., Cui, L., Shen, Y., Yang, K., Lu, X., Zheng, Y., Le, X.: A unified model for\nmulti-class anomaly detection. Advances in Neural Information Processing Systems\n35, 4571–4584 (2022)\n46. Yu, J., Zheng, Y., Wang, X., Li, W., Wu, Y., Zhao, R., Wu, L.: Fastflow: Unsupervised anomaly detection and localization via 2d normalizing flows. arXiv preprint\narXiv:2111.07677 (2021)\n47. Zavrtanik, V., Kristan, M., Skočaj, D.: Draem-a discriminatively trained reconstruction embedding for surface anomaly detection. In: Proceedings of the\nIEEE/CVF international conference on computer vision. pp. 8330–8339 (2021)\n48. Zavrtanik, V., Kristan, M., Skočaj, D.: Dsr–a dual subspace re-projection network\nfor surface anomaly detection. In: European conference on computer vision. pp.\n539–554. Springer (2022)\n49. Zhang, J., Chen, X., Wang, Y., Wang, C., Liu, Y., Li, X., Yang, M.H., Tao, D.:\nExploring plain vit features for multi-class unsupervised visual anomaly detection.\nComputer Vision and Image Understanding 253, 104308 (2025)\n50. Zhang, J., Wang, G., Jin, Y., Huang, D.: Towards training-free anomaly detection\nwith vision and language foundation models. In: Proceedings of the Computer\nVision and Pattern Recognition Conference. pp. 15204–15213 (2025)\n51. Zhang, X., Xu, M., Qiu, D., Yan, R., Lang, N., Zhou, X.: Mediclip: Adapting\nclip for few-shot medical image anomaly detection. In: International Conference\non Medical Image Computing and Computer-Assisted Intervention. pp. 458–468.\nSpringer (2024)\n52. Zhang, X., Xu, M., Zhou, X.: Realnet: A feature selection network with realistic synthetic anomaly for anomaly detection. In: Proceedings of the IEEE/CVF\nconference on computer vision and pattern recognition. pp. 16699–16708 (2024)\n53. Zhang, X., Xu, M., Zhou, X.: Towards high-resolution industrial image anomaly\ndetection. arXiv preprint arXiv:2508.12931 (2025)\n54. Zhao, Y.: Logical: Towards logical anomaly synthesis for unsupervised anomaly\nlocalization. In: Proceedings of the IEEE/CVF Conference on Computer Vision\nand Pattern Recognition. pp. 4022–4031 (2024)\n55. Zou, Y., Jeong, J., Pemula, L., Zhang, D., Dabeer, O.: Spot-the-difference selfsupervised pre-training for anomaly detection and segmentation. In: European\nconference on computer vision. pp. 392–408. Springer (2022)\n\n\fLogiCo: A Unified Framework for Logical and\nStructural Anomaly Detection\nSupplementary Material\nXimiao Zhang1 , Min Xu2 , and Xiuzhuang Zhou1B\n1\n\nA\n\nSchool of Intelligent Engineering and Automation, Beijing University of Posts and\nTelecommunications\nxiuzhuang.zhou@bupt.edu.cn\n2\nCollege of Information and Engineering, Capital Normal University\n\nReproduction Protocols\n\nThis section introduces our reproduction protocols. It should be noted that,\nfor all ViT-based methods, we set the input resolution to 512 × 512 to ensure\nconsistency with LogiCo. For CNN-based methods, we keep their default input\nresolutions unchanged, since we observe that increasing the resolution for such\nmethods can instead lead to performance degradation, as also reported in prior\nworks [17, 29].\nPatchCore [33]: We use the official implementation of Roth et al.1 , with WRN50 as the backbone, extracting features from the second and third intermediate\nlayers. All images are resized to a resolution of 256 × 256, and the subsampling\nratio is set to 0.1.\nUniNet [41]: We use the official implementation of Wei et al.2 , with WRN-50\nas the backbone, and reconstruct the first three intermediate layers. All images\nare resized to a resolution of 256 × 256.\nGLCF [44]: We use the official implementation of Yao et al.3 , and all experimental settings follow the original paper.\nINP-Former [29]: We use the official implementation of Luo et al.4 under the\nsingle-class experimental setting. We employ DINOv3-ViT-B/16 as the backbone\nand set the input image resolution to 512 × 512, while keeping all other settings\nconsistent with the original paper.\nDinomaly [17]: We use the official implementation of Guo et al.5 under the\nsingle-class experimental setting. We employ DINOv3-ViT-B/16 as the backbone\nand set the input image resolution to 512 × 512, while keeping all other settings\nconsistent with the original paper.\n1\n\nhttps://github.com/amazon-science/patchcore-inspection\nhttps://github.com/pangdatangtt/UniNet\n3\nhttps://github.com/hmyao22/GLCF\n4\nhttps://github.com/luow23/INP-Former\n5\nhttps://github.com/guojiajeremy/Dinomaly\n2\n\n\f20\n\nX. Zhang et al.\n\nAnomalyMoE [15]: We use the official implementation of Gu et al.6 under the\nsingle-class experimental setting. We employ DINOv3-ViT-B/16 as the backbone\nfor feature extraction and component segmentation clustering, with the number\nof clusters set to 5.\nCSAD [18]: We use the official implementation of Hsieh et al.7 This method\nadopts a multi-stage pipeline. Specifically, we first generate pseudo-labels using\nthe component segmentation pipeline from CSAD, and then train the Component Segmentation Network with these pseudo-labels. The trained Component\nSegmentation Network is then used to predict global anomaly detection results,\nwhich are further aggregated with the outputs of the reconstruction branch to\nobtain the final anomaly map.\nSALAD [14]: We use the official implementation of Fučka et al.8 The overall\nreproduction procedure is consistent with CSAD, and we use the same parameter\nsettings as reported in the original paper.\nPSAD [21]: We use the official implementation of Kim et al.9 We use the fewshot annotated segmentation masks provided by the authors to train the component segmentation model. Following the original experimental setup, we employ\nPatchCore [33] with a WRN-101 backbone to predict multi-scale anomaly scores.\nLogSAD [50]: We use the official implementation of Zhang et al.10 and adopt\nthe full-data protocol, with all experimental settings following the original paper.\nFor the other baselines, such as GCAD [4], EfficientAD [2], and SAMLAD [30], since no official implementations are available, we directly adopt the\nresults reported in their original papers.\nTable S1: Ablation study results on component-level reconstruction targets.\n\nB\n\nReconstruction\nTarget\n\nDetection (I-AUC)\n\nLocalization (sPRO)\n\nLogical\n\nStructural\n\nLogical\n\nStructural\n\nψc (Xc′ ) → Xc\nψc (Xc′ ) → X\n\n82.26\n90.88\n\n66.27\n84.59\n\n56.53\n67.51\n\n24.51\n70.07\n\nMore Results\n\nThis section presents additional experimental results, including ablation studies\non component-level reconstruction targets and count-related anomalies, further\nexperiments and analysis on robustness to segmentation noise, supplementary\nqualitative results, and per-category metrics.\n6\n\nhttps://github.com/CASIA-LMC-Lab/AnomalyMoE\nhttps://github.com/Tokichan/CSAD\n8\nhttps://github.com/MaticFuc/SALAD\n9\nhttps://github.com/oopil/PSAD_logical_anomaly_detection\n10\nhttps://github.com/zhang0jhon/LogSAD\n7\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n21\n\nTable S2: Comparison of I-AUC with and without SMD.\nSetting\n\nCount\n\nw/o SMD\n90.08\nw/ SMD 99.46(9.38 ↑)\n\nMisplacement Missing\n98.63\n98.96(0.33 ↑)\n\nClean Segmentation Clean Reconstruction\nDetection with\n(Decoded)\nClean Segmentation\n\n99.33\n99.98(0.65 ↑)\n\nClean Segmentation Clean Reconstruction\n(Decoded)\n\nDetection with\nClean Segmentation\n\nNoisy Segmentation Noisy Reconstruction\n(Decoded)\n\nDetection with\nNoisy Segmentation\n\nImage\n\nImage\n\n(a)\n\n(b)\nNoisy Segmentation\n\nNoisy Reconstruction\n(Decoded)\n\nDetection with\nNoisy Segmentation\n\nFig. S1: Component-level reconstruction and anomaly detection results of LogiCo under clean and noisy segmentation maps.\n\nAblation Study on Component-level Reconstruction Targets. Tab. S1\ninvestigates the impact of different reconstruction targets on the performance of\nthe Component-level Reconstruction Network (CRN). We observe a significant\nperformance degradation when the CRN is trained to reconstruct the original\ndiscretized representations (Xc ) from synthesized anomalous features. This reconstruction objective risks collapsing to a trivial identity mapping, where the\nnetwork simply retains input features to minimize the loss rather than learning selective reconstruction, thereby hindering generalization. Furthermore, this\nstrategy is highly sensitive to the quality of component segmentation, leading to\nan increased false-positive rate when the segmentation maps are noisy.\nAblation Study on Count-Related Anomalies. Tab. S2 validates the\neffectiveness of the Segmentation Map Discriminator (SMD) in detecting countrelated anomalies. We independently evaluate three types of anomalies in the\n“Breakfast Box” category of the MVTec-LOCO dataset [4]. The experimental\nresults demonstrate that SMD is effective in identifying count-related anomalies.\nRobustness to Segmentation Noise. Fig. S1 shows the component-level\nreconstruction and anomaly detection results of LogiCo under both clean and\nnoisy segmentation settings. In Fig. S1(a), the segmentation module incorrectly\nclassifies the bottom region of the juice bottle as “cherry juice”. However, despite\nthe mismatch between the segmentation map and the input image, our reconstruction network still successfully restores the noisy discretized feature maps to\ntheir normal pre-trained representations, thereby avoiding false positive detections. Fig. S1(b) presents a more extreme example where the “metal pins” are\nmisidentified as the body part of the transistor. Nevertheless, the reconstruction\nnetwork yields reconstruction results identical to those obtained with clean seg-\n\n\f22\n\nX. Zhang et al.\n\nmentation. This confirms that our approach effectively mitigates the dependency\non precise segmentation, validating its robustness even in non-ideal conditions.\nSupplementary Qualitative Results and Per-Category Metrics. Figs.\nS2–S4 respectively display the component segmentation results on the MVTecAD [5], VisA [55], and Real-IAD [40] datasets. For most categories, we only use\nthe image category name and a simple background description as prompts, without requiring complex prompt tuning, which highlights LogiCo’s strong generalization and transferability. Figs. S5–S8 provide supplementary qualitative results\nfor LogiCo, while Tabs. S3–S7 report per-category metrics for LogiCo and other\nmethods. Extensive experiments across four benchmarks [4,5,40,55] demonstrate\nLogiCo’s broad applicability across diverse anomaly detection tasks.\n\nC\n\nLimitations\n\nLogiCo integrates the SMD module to detect count-related anomalies. However, since SMD lacks fine-grained intra-component information, it may lead to\ndegraded anomaly localization performance. In addition, as LogiCo involves a\ncomponent segmentation process, it may incur higher computational cost than\nsome efficient structural anomaly detection methods. Nevertheless, LogiCo still\nachieves fast inference at 17.4 FPS under a resolution of 512 × 512, which satisfies the real-time detection requirements of real-world application scenarios.\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\nBottle\n\nBottle\n\nCable\n\nWhite Background\n\nCables\n\nInsulation Layer\n\nBlue Background\n\nBlack Background\n\nMetal Screw\n\nHazelnut\n\nBlack Capsule\nRed Capsule\nWhite Background\n\nScrew\n\nPill\n\nPill\n\nCapsule\n\nHazelnut\n\nToothbrush\n\nLight Gray Background\n\nToothbrush\n\nBlack Background\n\nMetal Nut\n\nBlack Background\n\nMetal Pins\n\nBlack Background\n\nMetal Nut\n\nTransistor\n\nBlack Transistor\n\n23\n\nZipper\n\nBackground\n\nZipper Teeth\n\nFabric\n\nWhite Background\n\nFig. S2: Examples of component segmentation on the MVTec-AD dataset. Texture\nclasses are not displayed as they contain only a single component.\nCandle\n\nCandles\n\nCapsules\n\nBlack Background\n\nGreen Capsule\n\nGreen Background\n\nShadow\n\nFried Food\n\nUSB Port\n\nChips\n\nCashew\n\nBlack Background\n\nMetal Chips\n\nPipe Fryum\n\nChewinggum\n\nFryum\n\nBlack Background\n\nGreen Background\n\nFried Food\n\nPCB2\n\nMetal Leads\n\nMetal Grid\n\nMetal Leads\n\nGray Background\n\nPCB\n\nPipe Fryum\n\nBlack Background\n\nChewinggum\n\nPCB1\n\nGreen Background\n\nShadow\n\nPCB4\n\nPCB\n\nGray Background\n\nMacaroni2\n\nMacaroni1\n\nFried Food\n\nCashew\n\nMetal Chips\n\nPCB3\n\nPCB\n\nBulb\n\nGreen Background\n\nShadow\n\nGray Background\n\nPCB\n\nBlack Background\n\nFig. S3: Examples of component segmentation on the VisA dataset.\nAudio Jack\n\nElectronic Component\n\nWhite Background\n\nBottle Cap\n\nBottle Cap\n\nBlack Background\n\nBlack Background\n\nPlastic Nut\n\nBlack Plastic Nut\n\nShadow\n\nWhite Background\n\nMint\n\nWhite Background\n\nBlack Background\n\nRed Plastic Plug\n\nMetal Contacts\n\nVegetable Toy\n\nWood Brick\n\nBlack Background\n\nWhite Background\n\nRed Button\n\nTape\n\nBlack Background\n\nBlack Background\n\nTransistor1\n\nLeads\n\nBlack Transistor\n\nEraser\n\nPhone Battery\n\nBlack Microchip\nUSB Port\nWhite Background\n\nPCB\n\nRegulator\n\nRegulator\n\nWhite Background\n\nConnector\n\nBlack Background\n\nScrew\n\nGold-colored Contacts\nWhite Text\n\nBlack Background\n\nBlack Background\n\nWhite Square-shaped Object\n\nBlack Background\n\nToothbrush\n\nToothbrush\n\nBlack Bristles\n\nSmall Hole\nBlack Background\n\nUSB\n\nMetal Contact\n\nBlack Background\n\nUSB Adaptor\n\nBlack Phone Battery\nBlue Background\n\nRolled Strip Base\n\nU-Block\n\nWhite Ring-shaped Object\n\nBlack Background\n\nEraser\n\nPCB\n\nTerminal Block\n\nTape\n\nToy Brick\n\nBlue Plastic Part\n\nWhite Background\n\nUSB Adaptor\n\nGold Metal Plug\n\nPink Ring-shaped Object\n\nWhite Background\n\nSesame toy\n\nYellow Cheese Toy\n\nEnd Cap\n\nPorcelain Doll\n\nBlack Background\n\nBlack Switch\n\nWhite Background\n\nWhite Plastic Piece\nTransparent Plastic Piece\nBlack Background\n\nSwitch\n\nToy\n\nBread Toy\n\nWhite Text\n\nEnd Cap\n\nMounts\n\nPlastic Plug\n\nSim Card Set\n\nGold SIM Card\n\nButton Battery\n\nMint\n\nFire Hood\n\nFabric\n\nButton Battery\n\nVC Pill\n\nVC Pill\n\nBlack Background\n\nWooden Beads\n\nWooden Beads\n\nBlack Background\n\nZipper\n\nWood Stick\n\nWooden Stick\n\nWhite Background\n\nZipper Teeth\n\nBlack Fabric\n\nBlack Background\n\nWhite Background\n\nFig. S4: Examples of component segmentation on the Real-IAD dataset.\n\n\fX. Zhang et al.\nBreakfast Box (Logical)\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nBreakfast Box (Structural)\n\nJuice Bottle (Logical)\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nJuice Bottle (Structural)\n\nPushpins (Logical)\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nPushpins (Structural)\n\nScrew Bag (Logical)\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nScrew Bag (Structural)\n\nGT\nAnomaly Map\n\nImage\n\nSplicing Connectors (Structural)\n\nGT\n\nImage\n\nSplicing Connectors (Logical)\n\nAnomaly Map\n\n24\n\nFig. S5: Qualitative results of LogiCo on the MVTec-LOCO dataset.\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\nBottle\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nCable\n\nCarpet\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nCapsule\n\nMetal Nut\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nHazelnut\n\nScrew\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nPill\n\nTransistor\nImage\nGT\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nImage\n\nTile\n\nFig. S6: Qualitative results of LogiCo on the MVTec-AD dataset.\n\n25\n\n\fAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\n26\nX. Zhang et al.\nCandle\nCapsules\n\nCashew\nChewinggum\n\nFryum\nMacaroni1\n\nPCB1\nPCB2\n\nPCB3\nPCB4\n\nFig. S7: Qualitative results of LogiCo on the VisA dataset.\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\nAudio Jack\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nBottle Cap\n\nMounts\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nButton Battery\n\nSim Card Set\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nPhone Battery\n\nTape\n\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nGT\n\nImage\n\nImage\n\nSwitch\n\nUSB Adaptor\nImage\nGT\nAnomaly Map\n\nAnomaly Map\n\nGT\n\nImage\n\nTransistor1\n\nFig. S8: Qualitative results of LogiCo on the Real-IAD dataset.\n\n27\n\n\f28\n\nX. Zhang et al.\n\nTable S3: Comparison of anomaly detection performance between LogiCo and other\nmethods on the MVTec-LOCO dataset, employing Logical-AUC (%), Structural-AUC\n(%), and Mean-AUC (%) as metrics.\nCategory\n\nPatchCore [33]\n\nINP-Former [29]\n\nDinomaly [17]\n\nBreakfast Box\nJuice Bottle\nPushpins\nScrew Bag\nSplicing Connectors\n\n84.12/73.75/78.94\n83.10/88.92/86.01\n64.48/77.49/70.99\n54.77/89.52/72.15\n61.28/78.21/69.75\n\n84.08/93.22/88.65\n87.83/95.02/91.43\n54.47/76.44/65.45\n47.56/83.48/65.52\n77.09/93.70/85.39\n\n88.19/97.32/92.75\n89.03/98.92/93.98\n58.19/77.46/67.82\n50.39/92.51/71.45\n82.73/98.97/90.85\n\n96.91/91.52/94.22\n88.59/85.38/86.99\n91.11/92.96/92.04 99.93/99.58/99.75\n87.74/97.18/92.46\n86.06/98.17/92.12\n97.42/92.68/95.05 88.39/93.49/90.94\n89.95/91.36/90.66 95.70/96.84/96.27\n\nCSAD [18]\n\nSALAD [14]\n\n99.02/98.65/98.83\n99.71/98.14/98.93\n99.63/90.73/95.18\n91.18/93.63/92.41\n93.09/99.02/96.06\n\nAVG\n\n69.55/81.58/75.57\n\n70.21/88.37/79.29\n\n73.71/93.04/83.37\n\n92.63/93.14/92.89\n\n96.53/96.03/96.28\n\n91.73/94.69/93.21\n\nLogiCo\n\nTable S4: Comparison of anomaly localization performance between LogiCo and other\nmethods on the MVTec-LOCO dataset, employing Logical-sPRO (%), Structural-sPRO\n(%), and Mean-sPRO (%) as metrics.\nCategory\n\nPatchCore [33]\n\nINP-Former [29]\n\nDinomaly [17]\n\nCSAD [18]\n\nSALAD [14]\n\nLogiCo\n\nBreakfast Box\nJuice Bottle\nPushpins\nScrew Bag\nSplicing Connectors\n\n39.55/36.87/38.21\n33.02/45.75/39.38\n27.51/17.57/22.54\n40.96/50.22/45.59\n29.72/22.85/26.29\n\n52.27/84.68/68.47\n60.40/74.72/67.56\n43.40/63.79/53.59\n40.74/73.66/57.20\n51.34/84.94/68.14\n\n40.37/91.36/65.87\n72.54/88.97/80.76\n57.13/69.97/63.55\n32.13/75.90/54.02\n26.98/92.49/59.74\n\n43.30/75.25/59.28\n80.44/86.91/83.68\n96.49/61.67/79.08\n43.14/73.55/58.35\n64.33/80.48/72.41\n\n45.04/75.29/60.17\n70.14/78.43/74.29\n58.11/49.65/53.88\n52.60/70.81/61.71\n61.06/71.90/66.48\n\n42.72/92.58/67.65\n77.41/87.93/82.67\n93.70/71.42/82.56\n64.24/71.50/67.87\n40.10/87.38/63.74\n\nAVG\n\n34.15/34.65/34.40\n\n49.63/76.36/62.99\n\n45.83/83.74/64.79\n\n65.54/75.57/70.56\n\n57.39/69.22/63.31\n\n63.63/82.16/72.90\n\nTable S5: Comparison of anomaly detection and localization performance between\nLogiCo and other methods on the MVTec-AD dataset, employing I-AUC (%), P-AUC\n(%), P-AP (%), and PRO (%) as metrics.\nCategory\nBottle\nCable\nCapsule\nCarpet\nGrid\nHazelnut\nLeather\nMetal Nut\nPill\nScrew\nTile\nToothbrush\nTransistor\nWood\nZipper\nAVG\n\nPatchCore [33]\n\nINP-Former [29]\n\nDinomaly [17]\n\nCSAD [18]\n\nSALAD [14]\n\nLogiCo\n\n100.0/98.97/82.87/95.94 99.84/99.15/85.85/94.97 100.0/99.24/86.25/97.47 99.37/98.66/80.97/92.77 99.60/97.29/60.65/87.42 100.0/98.99/84.01/94.74\n99.66/98.90/74.20/94.77\n99.14/97.55/75.61/91.91 99.79/98.91/75.88/95.62 94.96/98.57/71.65/90.05 96.61/98.02/65.60/85.09 99.36/97.78/71.73/92.91\n98.84/99.03/51.79/95.16 98.17/98.46/60.96/97.19\n98.96/99.10/60.68/95.73\n94.89/98.26/43.64/89.83 96.42/98.00/52.15/83.53 99.40/99.29/63.19/96.80\n98.61/99.06/70.14/94.94 100.0/99.54/79.54/98.18 100.0/99.64/78.10/98.79\n92.70/98.13/46.48/93.23 99.04/96.41/66.28/89.88 99.88/99.31/69.77/97.45\n98.66/98.89/49.05/94.21 100.0/99.50/60.96/97.26 100.0/99.54/56.51/97.65\n99.08/98.10/37.37/91.07 98.58/97.81/33.40/92.37 100.0/98.65/48.02/94.83\n100.0/99.64/81.56/97.77\n99.82/98.82/63.27/92.00 99.54/97.93/54.11/93.16 100.0/99.67/90.11/95.25\n100.0/99.00/68.52/96.18 100.0/99.62/81.31/97.56\n100.0/99.45/56.08/97.48 100.0/99.64/61.72/99.19 100.0/99.59/58.24/97.20\n99.69/99.42/48.77/93.55 100.0/98.47/58.21/88.13 100.0/99.40/54.08/98.89\n99.90/98.81/90.45/95.75 100.0/97.71/76.95/95.69\n100.0/98.37/82.57/96.65\n99.02/98.44/85.73/93.16 97.07/94.61/54.49/75.17 100.0/99.37/94.21/94.40\n96.84/98.05/79.80/95.20 99.20/96.35/58.01/97.05\n99.51/98.54/75.54/98.38\n91.23/95.20/53.29/80.44 95.11/96.51/50.82/73.59 99.40/98.88/78.76/97.30\n97.01/99.43/47.21/96.72 97.96/99.30/60.51/96.56\n98.32/99.64/59.15/96.33\n79.30/96.66/15.45/86.26 83.91/98.12/25.82/88.70 97.32/99.21/53.99/93.89\n100.0/96.86/63.89/90.54 100.0/98.07/74.47/94.40\n100.0/98.48/78.56/94.27\n93.97/96.20/71.94/43.53 99.82/96.87/76.42/72.88 100.0/97.77/81.03/94.48\n100.0/99.01/63.51/91.56 100.0/99.38/61.32/95.83 100.0/99.51/67.22/97.08\n98.06/97.65/40.71/78.17 98.33/96.60/25.60/58.92 99.17/99.47/74.82/92.97\n99.62/96.32/65.33/90.16\n98.67/94.96/62.40/84.56\n99.29/94.63/60.79/76.55 100.0/98.52/83.09/96.27 99.29/97.65/70.59/92.06 99.71/97.55/61.53/92.98\n98.86/95.33/56.41/91.23 99.12/98.36/73.80/96.54\n98.51/97.59/75.83/96.45\n99.39/94.54/47.52/86.03 98.42/94.92/56.03/77.50 99.82/95.88/60.75/93.12\n99.16/99.04/67.88/96.65\n99.82/98.51/70.16/95.69 100.0/99.30/70.33/97.02 95.41/97.91/55.26/92.15 95.91/94.00/38.76/57.82 99.76/98.94/66.88/94.98\n99.14/98.41/65.81/94.43\n\n99.46/98.41/69.57/95.51\n\n99.63/98.78/71.15/95.53\n\n95.79/97.67/56.34/86.57\n\n97.18/96.88/52.60/81.08\n\n99.59/98.68/70.19/95.00\n\n\fLogiCo: A Unified Framework for Logical and Structural Anomaly Detection\n\n29\n\nTable S6: Comparison of anomaly detection and localization performance between\nLogiCo and other methods on the VisA dataset, employing I-AUC (%), P-AUC (%),\nP-AP (%), and PRO (%) as metrics.\nCategory\n\nPatchCore [33]\n\nINP-Former [29]\n\nDinomaly [17]\n\nCSAD [18]\n\nSALAD [14]\n\nLogiCo\n\nCandle\n98.61/99.24/33.12/94.35 98.76/99.63/43.33/97.05 98.48/99.66/51.83/94.51 94.71/97.81/16.36/91.89 97.22/92.43/25.53/63.68 98.24/99.68/47.84/97.84\nCapsules\n79.35/99.18/70.88/89.87 97.87/98.36/61.44/93.83 99.28/99.69/64.67/95.59 90.90/97.86/27.94/73.46 92.28/93.43/28.39/67.90 99.25/99.49/69.53/96.50\nCashew\n97.46/98.62/62.65/93.02 97.86/96.16/56.53/93.82 98.90/99.34/70.85/97.93 91.50/98.58/64.13/76.72 97.82/99.22/59.78/82.15 98.78/99.85/97.63/96.14\nChewinggum 99.12/98.38/47.03/83.67 99.26/99.66/75.72/94.27 99.24/99.58/65.91/94.18 95.70/98.15/18.53/69.74 99.72/98.50/25.07/72.48 99.46/99.57/82.04/91.83\nFryum\n95.38/93.87/45.33/83.66 99.62/96.66/41.78/94.48 99.34/97.37/54.38/95.94 99.66/92.32/29.63/70.15 98.48/96.11/36.15/88.87 98.80/97.06/54.85/90.39\nMacaroni1 97.47/99.40/31.95/95.96 97.46/99.82/31.74/97.91 98.59/99.88/43.97/96.77 85.35/97.03/13.35/79.44 99.31/99.18/25.50/93.54 98.67/99.88/37.87/98.52\nMacaroni2 79.45/98.49/15.36/94.83 95.61/99.76/24.98/97.72 98.09/99.88/36.25/93.47 80.53/97.05/14.71/82.94 90.52/96.88/22.89/83.02 94.49/99.84/29.88/98.20\nPCB1\n98.34/99.64/86.92/94.47 97.88/99.25/85.37/91.52 98.98/99.72/88.14/95.08 93.80/99.45/59.54/84.70 98.94/99.31/51.51/75.88 97.50/99.84/88.08/92.77\nPCB2\n96.97/98.75/27.17/87.16 97.87/98.77/32.16/81.19 98.12/98.67/50.86/89.19 93.21/95.96/20.28/65.57 99.30/98.07/29.94/76.94 98.22/98.60/25.94/85.36\nPCB3\n97.81/98.91/40.99/90.49 99.30/99.15/40.07/94.87 99.43/99.32/47.41/95.34 85.17/97.61/25.86/62.77 97.01/99.10/22.36/90.17 98.98/99.34/47.77/89.75\nPCB4\n99.58/98.00/48.55/88.86 99.80/98.23/44.66/92.52 99.53/99.10/50.43/95.45 85.66/94.69/30.10/56.12 99.20/98.33/27.45/64.90\n99.56/98.14/45.27/92.28\nPipe Fryum 99.74/99.15/65.98/95.56 99.26/99.18/52.88/97.96 99.40/99.43/67.72/94.28 90.56/97.91/52.29/71.02 99.38/98.52/37.45/49.20 99.78/99.86/94.09/95.12\nAVG\n\n94.94/98.47/47.99/90.99\n\n98.38/98.72/49.22/93.93\n\n98.95/99.30/57.70/94.81 90.56/97.04/31.06/73.71\n\n97.43/97.42/32.67/75.73\n\n98.48/99.26/60.07/93.73\n\nTable S7: Comparison of anomaly detection and localization performance between\nLogiCo and other methods on the Real-IAD dataset under the single-view setting,\nemploying I-AUC (%), P-AUC (%), P-AP (%), and PRO (%) as metrics.\nCategory\n\nPatchCore [33]\n\nINP-Former [29]\n\nAudio Jack\n84.45/98.93/49.52/91.73\n93.43/99.72/58.15/94.71\nBottle Cap\n95.65/99.41/21.46/95.44 96.06/99.37/31.30/94.30\nButton Battery 87.14/99.43/69.65/91.59 90.47/99.23/71.44/92.32\nEnd Cap\n84.40/97.04/9.36/89.89\n82.44/98.79/16.24/92.30\nEraser\n91.87/99.37/36.11/93.50 95.68/99.89/54.05/95.08\nFire Hood\n94.14/98.95/37.65/93.61\n93.89/99.82/55.83/97.18\nMint\n67.86/96.71/30.37/67.81 80.51/99.16/36.52/85.34\nMounts\n95.08/99.62/38.26/98.16 96.75/99.86/51.69/99.35\nPCB\n93.84/99.47/53.10/95.92 92.09/99.13/48.61/96.12\nPhone Battery 92.27/98.74/39.87/92.16 95.60/99.90/63.47/98.75\nPlastic Nut\n88.81/99.24/30.84/94.74\n92.26/99.81/46.37/97.27\nPlastic Plug\n95.85/99.50/39.67/97.05 96.10/99.71/36.45/99.09\nPorcelain Doll\n88.81/98.84/20.62/93.71 93.36/99.62/29.11/98.97\nRegulator\n95.86/99.90/48.16/99.37\n95.71/99.87/57.96/97.29\nRolled Strip Base 99.42/99.63/29.94/98.40 99.57/99.88/48.40/99.55\nSim Card Set\n98.36/99.61/55.15/97.25 98.75/99.84/67.16/98.75\nSwitch\n97.08/99.35/60.64/95.50 97.40/97.50/56.05/96.55\nTape\n98.92/99.78/41.51/99.06\n99.26/99.91/49.07/99.60\nTerminal Block 98.45/99.79/37.13/98.69 98.82/99.61/56.05/98.91\nToothbrush\n89.38/99.22/56.98/93.92 91.82/99.40/42.61/97.27\nToy\n92.41/97.99/16.59/92.91 86.94/93.74/18.43/85.24\nToy Brick\n84.23/98.15/39.82/86.77 85.07/99.29/55.20/92.79\nTransistor1\n96.34/99.48/38.43/97.54\n90.76/98.30/37.60/92.55\nU-block\n93.50/99.67/27.07/97.26\n91.30/99.79/44.71/95.96\nUSB\n97.06/99.72/44.06/98.06 95.19/99.70/46.63/95.98\nUSB Adaptor\n89.20/98.52/20.95/90.23 92.18/99.74/27.66/97.14\nVC Pill\n92.96/98.45/62.33/86.89 95.18/99.70/77.24/97.23\nWooden Beads 84.88/97.19/31.47/81.54 90.40/99.18/47.28/90.16\nWood Stick\n82.12/96.33/36.76/80.29 91.35/99.47/69.51/95.55\nZipper\n99.74/99.15/65.98/95.56 98.41/98.96/50.91/96.24\nAVG\n\n91.67/98.91/39.65/92.82\n\n93.23/99.26/48.39/95.58\n\nDinomaly [17]\n\nCSAD [18]\n\nSALAD [14]\n\nLogiCo\n\n93.97/99.88/55.53/98.75\n95.70/99.71/30.93/95.04\n89.58/99.70/70.25/96.06\n85.51/99.53/14.06/97.70\n93.18/99.87/49.20/97.72\n94.66/99.85/60.24/98.02\n79.38/99.61/35.28/87.88\n97.27/99.87/49.98/99.35\n96.26/99.88/57.20/95.59\n95.53/99.91/60.16/96.89\n95.30/99.86/45.41/97.48\n96.21/99.83/36.26/97.26\n95.38/99.84/28.60/92.31\n94.04/99.97/60.86/99.67\n99.52/99.84/39.66/99.07\n99.05/99.87/65.90/98.51\n98.92/98.86/56.48/95.82\n99.57/99.93/51.03/99.16\n98.97/99.89/51.45/95.50\n91.22/99.42/42.61/96.76\n89.93/91.10/21.49/84.22\n83.34/99.04/54.26/87.12\n94.88/99.58/44.46/97.72\n95.02/99.92/41.54/99.01\n97.20/99.88/47.91/96.38\n92.63/99.82/25.34/95.86\n94.83/99.51/76.76/95.02\n86.43/99.37/48.49/90.10\n89.22/99.74/62.51/96.54\n99.32/99.42/60.14/95.41\n\n84.94/96.26/29.24/72.11 86.16/95.62/26.43/71.70 92.09/99.73/62.16/96.85\n83.67/94.64/27.43/73.10 90.51/94.14/35.47/74.12 96.71/99.57/45.40/95.25\n82.33/96.82/27.96/69.80 88.52/94.51/30.09/72.56 90.81/99.44/46.69/94.31\n62.03/91.83/21.79/77.33 69.63/89.62/20.45/59.87 84.91/98.41/20.77/95.97\n84.89/96.77/36.44/67.36 83.33/98.79/23.93/83.03 96.35/99.72/51.94/98.20\n91.52/98.23/35.69/88.13 85.56/97.22/20.73/78.33 95.78/99.79/65.27/95.87\n69.50/95.04/18.22/63.84 67.45/96.01/19.25/65.18 73.54/98.50/36.58/85.72\n81.33/94.89/23.85/79.58 89.71/97.88/28.50/72.17 97.34/99.88/66.98/98.52\n82.06/97.16/37.33/78.80 95.90/98.19/29.20/85.42 93.89/99.60/68.54/92.90\n92.01/98.11/26.09/88.07 88.77/97.00/23.63/77.41 97.47/99.82/63.32/97.64\n79.17/95.27/23.42/77.25 85.21/94.93/24.73/71.47 94.60/99.62/55.62/94.68\n89.88/98.81/27.59/94.63 92.39/98.36/28.27/89.64 95.57/99.53/46.24/97.83\n80.81/95.28/27.36/67.09 88.05/97.62/23.69/80.59 92.70/99.07/34.89/96.96\n80.11/85.53/25.12/62.04 93.78/92.42/36.50/82.37 97.14/99.94/71.01/98.68\n99.28/98.66/24.91/95.19 99.38/95.39/37.62/90.72 99.50/99.80/57.87/98.84\n97.97/99.57/48.76/93.83 98.18/97.69/37.01/83.70 97.83/99.77/71.11/97.37\n80.92/98.22/57.07/78.22 96.07/97.86/40.89/78.86 96.53/99.34/60.65/94.43\n66.14/95.02/15.45/85.63 97.97/97.63/23.54/75.21 99.49/99.92/61.59/99.62\n72.32/97.32/19.64/85.29 98.59/98.68/28.38/85.63 98.29/99.93/68.44/98.90\n94.73/97.88/29.58/88.03 89.09/96.45/32.17/84.99 92.96/99.08/49.22/94.40\n78.55/94.51/24.60/72.61 86.61/90.09/33.68/74.07 92.32/97.34/26.84/90.78\n81.66/97.74/32.90/80.74 75.19/93.24/30.92/65.22 88.26/98.66/50.53/88.81\n86.93/97.80/22.38/79.62 95.71/97.94/35.39/88.66 96.57/99.35/40.13/95.63\n81.95/97.44/32.39/72.49 88.38/97.96/33.10/81.31 94.67/99.67/54.94/94.71\n83.89/97.96/25.69/84.44 85.80/98.66/24.67/76.75 95.22/99.73/51.89/97.90\n88.41/97.68/29.90/86.24 86.03/94.52/25.06/65.93 90.37/99.65/37.24/95.04\n85.62/95.42/37.83/69.39 94.16/98.76/47.29/83.56 94.03/99.23/64.78/90.78\n78.39/95.76/21.93/66.97 84.03/94.31/26.97/71.95 90.27/99.38/53.83/92.43\n87.88/97.55/46.19/87.20 86.37/94.60/29.79/70.87 89.59/98.88/54.43/94.33\n92.48/96.52/37.19/80.60 98.37/98.89/48.35/95.28 99.49/98.94/59.14/96.34\n\n93.73/99.42/48.13/95.73\n\n83.38/96.32/29.80/78.85\n\n88.83/96.17/30.19/77.89\n\n93.81/99.38/53.27/95.32\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"