"<!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>Root Cause Analysis of Outliers with Missing\nStructural Knowledge\n\narXiv:2406.05014v4 [stat.ML] 4 Feb 2026\n\nWilliam Roy Orchard∗\nUniversity of Cambridge\nCambridge, UK\nwo223@cam.ac.uk\n\nNastaran Okati∗\nMax Planck Institute for Software Systems\nKaiserslautern, Germany\n\nSergio Hernan Garrido Mejia\nMax Planck Institute for Intelligent Systems\nAmazon\nTübingen, Germany\nPatrick Blöbaum\nAmazon\nTübingen, Germany\n\nDominik Janzing\nAmazon\nTübingen, Germany\n\nAbstract\nThe goal of Root Cause Analysis (RCA) is to explain why an anomaly occurred by\nidentifying where the fault originated. Several recent works model the anomalous\nevent as resulting from a change in the causal mechanism at the root cause, i.e., as\na soft intervention. RCA is then the task of identifying which causal mechanism\nchanged. In real-world applications, one often has either few or only a single sample\nfrom the post-intervention distribution: a severe limitation for most methods, which\nassume one knows or can estimate the distribution. However, even those that do\nnot are statistically ill-posed due to the need to probe regression models in regions\nof low probability density. In this paper, we propose simple, efficient methods to\novercome both difficulties in the case where there is a single root cause and the\ncausal graph is a polytree. When one knows the causal graph, we give guarantees\nfor a traversal algorithm that requires only marginal anomaly scores and does\nnot depend on specifying an arbitrary anomaly score cut-off. When one does not\nknow the causal graph, we show that the heuristic of identifying root causes as\nthe variables with the highest marginal anomaly scores is causally justified. To\nthis end, we prove that anomalies with small scores are unlikely to cause those\nwith larger scores in polytrees and give upper bounds for the likelihood of causal\npathways with non-monotonic anomaly scores.\n\n1\n\nIntroduction\n\nWhen an anomaly occurs, it is essential to identify its root cause so that action can be taken to\nresolve it. As such, Root Cause Analysis (RCA), has become a rich and rapidly developing area of\nresearch, with wide ranging applications from meteorology [1], monitoring health [2, 3], industrial\nfabrication [4], fraud detection [5], credit scoring [6], cloud applications [7, 8, 9, 10, 11, 12] and\nmore [13, 14, 15, 16, 17]. Although many previous works have adopted a purely statistical approach to\nRCA [18, 19, 20, 21, 22], relying on correlations, the fact that the goal is to take action distinguishes\n∗\n\nAuthors contributed equally.\n\n39th Conference on Neural Information Processing Systems (NeurIPS 2025).\n\n\fit as a necessarily causal problem. The predominant choice in causal literature is to model the\nobserved anomaly as being the result of a change in the causal mechanism at the root cause, i.e., as a\nsoft intervention. RCA can then be broadly understood as the task of identifying the variable whose\nmechanism changed. Budhathoki et al. [23] give a formalisation of RCA as a quantitative contribution\nanalysis based on counterfactuals – asking, “would the observed anomaly still be anomalous had this\nmechanism been as normal?” – but its dependence on knowing the full structural causal model is\na severe bottleneck to its practical application. As such, from a causal perspective, work on RCA\nis broadly categorised into two groups: those that require the causal DAG, and those that do not or\ntry to infer it from data. With the causal DAG, a widely used class of methods is traversal-based, as\nin [24, 25, 9, 26], wherein a variable is identified as a root cause if it is anomalous, none of its parents\nare anomalous, and it is linked to the target variable through a path of anomalous variables. For\nexample, Hardt et al. [27] apply such a traversal algorithm to data from cloud computing to identify\nthe root cause of performance drops in a microservice-based application [12, 28, 29]. When the causal\nDAG is unknown, the main idea behind the second line of work is that the anomalies themselves can\nsupport causal discovery. For example, Ikram et al. [10] treat RCA as a causal discovery problem\nwhere the goal is to find the target(s) of a soft intervention [30]. Likewise, [31, 32] describe how to\nuse heavy-tailed distributions to infer the causal DAG for linear models. In a sense, this also amounts\nto using anomalies for causal discovery – if one counts points in the tail as anomalies.\n1.1\n\nOur contributions\n\nMost methods assume one knows or can estimate the post-intervention, “anomalous”, distribution,\nbut in real-world scenarios, it is not uncommon to have only a single sample from the distribution. In\nbusiness applications, faults must be resolved rapidly, leaving no time to collect further samples. In\npersonalised medicine, the goal is to treat each individual patient according to the unique root causes\nof their disease, and so while one has many samples of the healthy population, one assumes a priori\nthat each diseased patient is unique. Even those methods that do not assume access to more than one\nsample from the anomalous distribution are often statistically ill-posed due to the need to estimate\ncausal conditional probabilities or else to probe regression models in regions with low probability\ndensity. In this paper, we argue that these challenges can be overcome when the task is to identify a\nsingle root cause, and propose two simple and efficient methods for doing so. In section 2, we give the\npreliminaries to causal RCA and introduce ‘information theoretic’ (IT) anomaly scores upon which\nour methods are based. In section 3 we show that marginal anomaly scores are already sufficient\nfor drawing conclusions about the causal relationships between anomalies: first for cause-effect\npairs and then more generally when the causal DAG is a polytree. We show that marginal anomaly\nscore ‘jumps’ along causal paths can enable identification of the root cause and propose SMOOTH\nTRAVERSAL, for when one knows the causal graph. We conclude Section 3 by arguing that the\nheuristic of selecting the variables with the highest IT anomaly scores as candidate root causes is\ncausally justified in polytrees, and propose SCORE ORDERING, for when one does not know the\ncausal graph. We also discuss its theoretical limitations. Finally, in Section 4 we compare existing\napproaches to RCA to our own proposals on both synthetic and real-world data, demonstrating that\ndespite their simplicity, our approaches are competitive. To our knowledge, no other methods operate\nwith causal guarantees in an RCA setting as general as we address in this paper.\n\n2\n\nPreliminaries\n\nWe consider the scenario in which the value xn of a target variable Xn has been flagged as an\nanomaly by an anomaly detection algorithm. We have jointly observed values (x1 , . . . , xn ) of\nvariables (X1 , . . . , Xn ). Our goal is to identify a unique root cause of the anomaly xn from among\nthe variables X1 , . . . , Xn .\nWe assume the causal relationships between X1 , . . . , Xn are given by a Causal Bayesian Network\n(CBN) [33], so that their joint distribution factorises into causal conditionals according to an underlying causal DAG:\nn\nY\nP (X1 , . . . , Xn ) =\nP (Xi | P Ai ),\n(1)\ni=1\n\nwhere each P (Xi | P Ai ) corresponds to the causal mechanism of variable Xi given its parents\nP Ai in the causal DAG. We then model the anomaly xn as having arisen due to one of the causal\n2\n\n\fmechanisms having been ‘corrupted’. We observe only the single sample (x1 , . . . , xn ) drawn from\nthe ‘anomalous’ distribution\nn\nY\nP̃ (X1 , . . . , Xn ) = P̃ (Xj | P Aj )\nP (Xi | P Ai ),\n(2)\ni̸=j\n\nwherein the ‘normal’ mechanism P (Xj | P Aj ) has been replaced by a corrupted one P̃ (Xj | P Aj )\nat the root cause. Identifying the root cause is then a matter of identifying which causal conditional\nchanged from the normal period based on a single sample from the anomalous one. While we can\nnever exclude the case where several mechanisms are corrupted, we always start with the working\nhypothesis that there has been only one. If this does not work, we can still try hypotheses with\nmore than one, but with the strong inductive bias of preferring explanations where most mechanisms\nworked as expected, in agreement with the so-called ‘sparse mechanism shift hypothesis’ [34, 35]. It\nis also important to note that although we have adopted the language of CBNs, our results can be\nrecast in terms of the counterfactual contribution analysis introduced in [23] (see Appendix A). Indeed,\nit is noteworthy in itself that the counterfactual description can be simplified to an interventional one\nfor the case of identifying a single root cause.\n2.1\n\nAnomaly score\n\nWe next define an anomaly score, which we use in the following sections. Let τ : X → R be an\nappropriate feature map, which can be any existing anomaly score function, mapping elements of X\nto real values, for example, the z-score. Further, define the event\nE := {τ (Xn ) ≥ τ (xn )},\n\n(3)\n\nof being at least as extreme as the observed event xn according to the feature function τ . As the goal\nof RCA is to identify which causal mechanism has been corrupted, an important interpretation of τ\nis as a test statistic for the null hypothesis that xn was drawn from P (Xn ), i.e., H0 : Xn ∼ P (Xn ),\nwith P (τ (Xn ) ≥ τ (xn )) = P (E) as the corresponding p-value. Small P (E) indicates that the\nnull hypothesis is rejected with high confidence2 and we assume rather that the usual mechanism\ngenerating samples from P (Xn ) has been corrupted for that specific statistical unit. Since small\np-values correspond to strong anomalies, we define the marginal anomaly score by\nS(xn ) := − log P (τ (Xn ) ≥ τ (xn )) = − log P (E).\n\n(4)\n\nSince the logarithm of the probability of an event measures its surprise in information theory [13, 15],\nas in [23], we call anomaly scores with the above calibration IT scores for information theoretic.\nGiven k observations x1n , . . . , xkn , including the single anomalous one, we will use the following\nsimple estimator3\n1\n(5)\nŜ(xjn ) := − log {i ∈ {1, . . . , k} : with τ (xin ) ≥ τ (xjn )} .\nk\nIt is important to note that this value can be at most log k, i.e., the estimated score can attain the\nvalue s only when at least es samples have been used. We provide detailed sample complexity results\nfor IT anomaly score estimation in Appendix B.\nIn addition to the marginal anomaly score, we also introduce the conditional IT anomaly score (as in\nthe arXiv version of [23]):\nS(xn | pan ) := − log P (τ (Xi ) ≥ τ (xn ) | P An = pan ),\n\n(6)\n\nwhere now τ becomes a test statistic for the null hypothesis that xn was drawn according to its\ncausal mechanism P (Xn | P An = pan ) for that particular statistical unit. Although suppressed\nnotationally, we allow variable-dependent feature functions τi , but they must coincide between\nmarginal and conditional anomaly scores. As the goal of RCA, as stated, is to identify which causal\nmechanism was corrupted, the conditional anomaly score is instrumental to what follows. To illustrate\nthe difference between marginal and conditional anomaly scores, consider the following example:\n2\n\nThis interpretation is certainly invalid in a standard anomaly detection scenario where Eq. 3 is repeatedly\ncomputed for every observation in a sequence. However, so-called anytime p-values [36] are outside of the\nscope of this paper.\n3\nThis estimator is not just a finite sample approximation of (4), but also the negative logarithm of a conformal\np-value [37] for the null hypothesis of exchangeability.\n\n3\n\n\fExample 1 (Linear cause-effect model). Consider causal model Y := βX + N , N ⊥\n⊥ X. For\nstrictly increasing τ (e.g. the z-score, τ (y) = (y − µY )/σY ), and observation (x, y), the marginal\nanomaly score S(y) = − log P (Y ≥ y) is simply the ‘surprise’ of the one-sided tail event for Y .\nHowever, the conditional anomaly score S(y | x) = − log P (Y ≥ y | X = x) = − log P (bx + N ≥\ny) = − log P (N ≥ y − bx), is a marginal anomaly score of the residual after accounting for X.\nFor the following sections, all proofs can be found in Appendix C unless otherwise indicated.\n\n3\n\nRoot cause analysis when conditional probability estimation is ill-posed\n\nTo answer the question of which causal mechanism was corrupted for the sample (x1 , . . . , xn ), we\nneed to determine which value xi cannot be ‘explained’ by the values of its parents according to its\nnormal causal conditional, P (Xi | P Ai ). However, inferring the causal conditional is statistically\nill-posed, particularly when the number of parents is large. One could, for example, make the\nadditive noise assumption [38, 39] and thereby reduce the problem to that of estimating conditional\nexpectations, but the problem remains ill-posed because analysing anomalies amounts to probing\nregression models in regions with low probability density. In this section, we show that causal\nrelationships can be inferred between anomalies with a given causal DAG together with only marginal\nanomaly scores {S(xi ), . . . , S(xn )}, using the simple estimator in Eq. 5, in the case the causal DAG\nis a polytree. However, to introduce the ideas we will need, we start first with cause-effect pairs, then\ndiscuss the problem more generally in DAGs, and then lastly restrict our attention to polytrees.\n3.1\n\nAnomalies in cause and effect pairs\n\nLet the causal DAG be X → Y for two variables X, Y , and we observe (x, y) with anomaly\nscores S(x), S(y). We define two null hypotheses that state that each causal mechanism, P (X)\nor P (Y | X), worked as normal: H0X : x was drawn from P (X), and H0Y : y was drawn from\nP (Y | X = x). Note that H0Y does not impose a constraint on X, it allows x to be drawn from\nan arbitrary distribution instead of P (X), only the mechanism generating y from x is assumed to\nhave remained ‘normal’. We show that whether one should reject one or both hypotheses can be\ndetermined from a comparison of S(x) and S(y) alone. To see how, we first need to introduce a\ndefinition which we will justify shortly:\nDefinition 3.1 (Bivariate score typicality). We say that observation (x, y) for X, Y satisfies score\ntypicality if\nS(y | x) ≥ |S(y) − S(x)|+ ,\n(7)\nwhere | · |+ denotes the positive part.\nWe then have the following criteria for rejecting H0X and H0Y :\nLemma 3.2 (p-value bound for marginal anomaly event.). H0X can be rejected at level p ≤ e−S(x) .\nThis follows immediately from the definition of IT scores in Eq. 4. On the other hand, we obtain:\nLemma 3.3 (Anomalies rarely cause larger anomalies). Subject to score typicality, H0Y can be\nrejected at level p ≤ e−|S(y)−S(x))|+ .\nProof. That H0Y can be rejected at level p = e−S(y|x) follows from the definition of conditional IT\nscores in Eq. 6, the result then follows immediately, subject to score typicality.\nLemma 3.3 therefore states that, subject to score typicality, an anomaly of strength S(x) causes\nan anomaly of strength S(y) only with probability at most e−|S(y)−S(x)|+ , i.e. an anomaly at X is\nunlikely to cause a much stronger anomaly at Y (see also Corollary 3.3 in [40] for an algorithmic\ninformation theoretic view of this result).\nScore typicality, therefore, gives us a criterion for rejecting H0Y using only marginal scores, but the\nquestion remains whether we should expect it to be satisfied. The following lemma shows that for\nany given y, although we cannot guarantee score typicality is satisfied for any particular x, we can\nconclude that the bound is likely to hold approximately for a randomly chosen x:\nLemma 3.4 (Score typicality probably holds approximately). Let the distribution of X (possibly\nmultivariate) be absolutely continuous with respect to the Lebesgue measure. For any sX ≤ S(y) − 1,\n4\n\n\f\u0001\nlet x be chosen at random according to P X | S(X) ∈ [sX , S(y)] . Then we obtain, with probability\nat least 1 − 2/c, an x for which the following inequality holds:\nS(y | x) ≥ |S(y) − S(x)|+ − 2 log c.\n\n(8)\n\nThere are also non-trivial cases where score typicality holds exactly:\nLemma 3.5 (Injectivity and monotonicity imply score typicality). Let the mapping x 7→ S(x) be\none-to-one, and P (S(Y ) ≥ S(y) | S(X) = S(x)) ≤ P (S(Y ) ≥ S(y) | S(X) ≥ S(x)). Then\nobservation (x, y) satisfies score typicality.\nThe first condition is the injectivity of S. The second is a monotonicity condition, it says: increasing\nthe anomaly score of X does not decrease the probability of an anomaly event at Y . Both assumptions\nare satisfied for all (x, y), for example, for real-valued variables when Y := f (X, N ), where N is an\nindependent noise term, f is monotonic in X and N and τ = id.\nIn the following sections, we state our results subject to score typicality for ease of exposition, but we\nshould keep in mind that Lemmas 3.4 and 3.5 show that we could avoid it entirely, at the expense of\nhaving slightly weaker bounds holding for most samples, or by assuming injectivity and monotonicity.\nReturning to our bivariate case, there is also a third hypothesis, namely that x and y are causally\nunrelated. Even if there is a causal connection between X and Y , in this case X → Y , it could\nhappen that x being anomalous was irrelevant for the anomaly y because P (Y |X = x) = P (Y ). In\nother words, although x is anomalous, it happens to be an anomaly that does not render an anomaly\nat Y more likely. The corresponding null hypothesis is H0XY : x was drawn from P (X) and y from\nP (Y ). We find:\nLemma 3.6 (Bound on p-value for independent anomalies). H0XY can be rejected at level p ≤\ne−S(x)−S(y) [1 + S(x) + S(y)].\nThe lemma follows from the fact that for independent variables X, Y , the corrected sum S(x)+S(y)−\nlog[1 + S(x) + S(y)] =: S̃((x, y)) is a valid IT score for pairs and thus satisfies P (S̃((X, Y )) ≥\nS̃((x, y))) ≤ e−S̃((x,y)) (see Theorem 1 in the arXiv version of [23]).\nLemmas 3.2 to 3.6 illustrate some of the ideas that will be of use in the case the causal graph is a\npolytree: in particular, Lemma 3.3 is noteworthy as it shows that we can test hypotheses concerning\nconditional distributions using differences between marginal anomaly scores, so long as we have\nthe causal graph. However, they also entail interesting consequences for the case where the causal\ndirection is not known. For example, let S(x) = 10, S(y) = 5 and significance level α = 0.01.\nFor X → Y we can only reject H0X , while the mechanism P (Y |X) possibly worked as expected.\nHowever, for Y → X, we would reject both hypotheses, that P (Y ) and that P (X|Y ) worked as\nexpected with p-value e−5 each. Following the working hypothesis that at most one mechanism was\ncorrupted, we thus prefer X → Y . Note that the third alternative of causally independent generation\nof x and y can be rejected even at level p ≤ e−5−10 (1 + 5 + 10).\n3.2\n\nAnomalies in DAGs\n\nBefore restricting our attention to the case where the causal DAG is a polytree, let us first consider\nthe problem in full generality in DAGs. To infer for which variable the causal mechanism has\nbeen corrupted, we start with the hypothesis that all mechanisms worked as expected except for\nP (Xj | P Aj ): H0j : for the anomaly event (x1 , . . . , xn ) all xi with i ̸= j have been drawn from\nP (Xi | P Ai = pai ). We will return to marginal anomaly scores shortly, but first, to define test\nstatistics, we focus on conditional anomaly scores. We also need to make the assumption:\n1. Continuity: all variables Xi are continuous with density w.r.t. the Lebesgue measure, and also all\nconditional distributions P (Xi |P Ai = pai ) have such a density.\nReferring to Eq. 6, conditional scores with variable inputs Xi , P Ai define random variables S(Xi |\nP Ai ). Continuity ensures that all conditional anomaly scores are distributed according to the density\np(s) = e−s for s ≥ 0, and entails a property that will be convenient for testing H0j :\nLemma 3.7 (Conditional anomaly scores are independent). Subject to the continuity assumption,\n{S(X1 |P A1 ), · · · , S(Xn |P An )} are independent random variables.\n5\n\n\fIndependence of conditional scores enables the definition of a simple test\nP statistic that is obtained by\nsumming over them4 together with a correction term. With Ssum := i̸=j S(Xi |P Ai ), we define\nthe joint anomaly score\nn−2\nX Sl\nsum\nS := Ssum − log\n.\n(9)\nl!\nl=0\n\nTo understand Eq. 9, note that Ssum no longer has the properties of an IT anomaly score: the sum of\nindependent IT scores is likely to be large because it is not unlikely that the set contains at least one\nlarge term. The second term is therefore needed to ‘recalibrate’ the sum and is akin to a multiple\ntesting correction. The following result states that this is quantitatively the right correction:\nLemma 3.8 (The joint score is an IT anomaly score). If H0j holds, Eq. 9 is distributed according to\nthe density p(s) = e−s for s ≥ 0.\nAs a direct result of the above lemmas, we have:\nTheorem 3.9 (p-value for joint anomaly event). H0j can be rejected for the observation (x1 , . . . , xn )\nPn−2 S l\nwith p-value p = e−Ssum · l=0 sum\nl! .\nThe theorem justifies choosing the index j with the maximal conditional anomaly score as the root\ncause, whenever we follow the working hypothesis that only one mechanism is corrupted.\nWith our framework in place, we can return to our original goal: to show how RCA is possible,\nwithout the estimation of conditional probabilities, using only marginal anomaly scores. In order to\ndo so, we restrict our attention to the case where the causal DAG is a polytree.\n3.3\n\nAnomalies in polytrees\n\nPolytrees are DAGs where the underlying skeleton is a tree (see Fig. 2 in Appendix D). The key property of polytrees that we exploit is that the parents of any given variable are marginally independent.\nThis allows us to replace conditional anomaly scores with bounds derived from marginal anomaly\nscores, following the ideas from the bivariate case. To this end, note that, as they are independent, we\nmay use the same construction as we did in Eq. 9 to define a joint score over the parents of a given\nvariable. For variable Xi , with parents P A1i , . . . , P Aki , and event pai :\nP\nk\nk−1\nX\nX ( kj=1 S(paji ))l\nj\nSjoint (pai ) :=\nS(pai ) − log\n.\n(10)\nl!\nj=1\nl=0\n\nThat this is indeed an IT score for joint event pai follows from the same proof as for Lemma 3.8. For\nbrevity, we drop the subscript and simply write S(pai ) to mean the joint anomaly score of multivariate\nevent pai , as it will be clear from context whether we refer to a marginal score or a joint score. By\nusing the joint score over the parents of each variable, we have effectively reduced the polytree case\nto the bivariate one with respect to each variable and its parents. In particular, we generalise score\ntypicality:\nDefinition 3.10 (Score typicality). We say that observation (x, pai ) for X, P Ai satisfies score\ntypicality if\nS(xi | pai ) ≥ |S(xi ) − S(pai )|+ .\n(11)\nSubject to the continuity assumption, Lemma 3.4 applies directly, in statement and proof, to score\ntypicality as defined above, simply substituting Y for Xi and X for P Ai . We can therefore say that\nfor observation xi , score typicality is likely to hold approximately for a randomly chosen pai , in the\nsense given by Lemma 3.4.\nAs a result, we obtain the following bound on the joint statistics introduced in the previous subsection:\nTheorem 3.11. (Bound on p-value for joint anomaly event using only marginal anomaly scores).\nP\nWith Ŝsum = i̸=j |S(xi ) − S(pai )|+ it holds that subject to score typicality, H0j can be rejected\nwith p-value\nn−2\nX Ŝ l\nsum\np ≤ e−Ŝsum ·\n.\n(12)\nl!\nl=0\n\n4\n\nNote that this corresponds to Fisher’s method [41] for aggregating p-values, which also considers the sum\nof independent, log-transformed p-values.\n\n6\n\n\fWe conclude that H0j needs to be rejected whenever the anomaly score increases significantly along a\npath of anomalies at any i ̸= j. This justifies inferring the index j that maximises the score difference\n|S(xj ) − S(paj )|+ as the unique root cause (with the difference being |S(xi ) − 0|+ = S(xi ) for\nany node with no parents) because this yields the weakest bound in Eq. 12. Motivated by these\nbounds, we propose the algorithm SMOOTH TRAVERSAL5 which selects the node as the root cause\nthat shows the strongest increase in anomaly score compared to its parents (as a heuristic we consider\nthe score difference with the most anomalous parent of each node, see Algorithm 1 below). In the\nusual traversal approach [24, 25, 9], a variable is identified as a root cause if it is anomalous, none of\nits parents are, and it is linked to the target variable through a path of anomalous variables. However,\nthis requires the user to choose a threshold above which a node is considered anomalous. SMOOTH\nTRAVERSAL avoids having to make any such arbitrary choice. We can prove that if the maximum\nscore difference is large, then the node at which the difference is maximised is likely to be the root\ncause. To this end: for anomaly event (x1 , . . . , xn ) and anomaly score differences\nδi := S(xi ) − S(pai ) + ,\n\ni = 1, . . . , n,\n\ndefine null hypothesis H0max : for anomaly event (x1 , . . . , xn ) and j = argmaxi δi , xj was drawn\nfrom P (Xj | P Aj = paj ), i.e. the anomaly with the largest score difference with its parents is not\nthe root cause.\nTheorem 3.12 (Bound on p-value for anomaly with biggest jump not being the root cause). Subject to\nscore typicality, when there is a single root cause, H0max can be rejected for observation (x1 , . . . , xn ),\nand maximum score difference δmax := max(δ1 , . . . , δn ) with p-value\np ≤ 1 − (1 − e−δmax )n−1 .\n\n(13)\n\nThe theorem follows from the fact that if the node maximising the score difference from its parent\nis not the root cause, it implies that at least one conditional anomaly score, of the (n − 1) non-root\ncauses, is at least δmax .6\nAlgorithm 1 (Smooth Traversal) Returns the variable with the largest positive score difference to its\nhighest scoring parent\nRequire: Scores S(x1 ), . . . , S(xn ), causal DAG G of variables X1 , . . . , Xn\nEnsure: Variable Xk with the largest positive score difference to its highest-scoring parent\n1: Initialize max_min_difference ← −∞\n2: Initialize candidate_root_cause ← None\n3: for each ancestor Xi of Xn in G do\n4:\nLet PAi be the set of parents of Xi in G\n5:\nif PAi ̸= ∅ then\n6:\nmax_parent_score ← max S(xj )\nXj ∈PAi\n\n7:\nelse\n8:\nmax_parent_score ← 0\n9:\nend if\n10:\nscore_difference ← |S(xi ) − max_parent_score|+\n11:\nif score_difference &gt; max_min_difference then\n12:\nmax_min_difference ← score_difference\n13:\ncandidate_root_cause ← Xi\n14:\nend if\n15: end for\n16: return candidate_root_cause\n\n3.4\n\nShortlist of root causes via ordering anomaly scores\n\nWe have shown that a unique root cause can be identified using only marginal anomaly scores if the\ncausal graph is known. We now drop the assumption that the causal graph is known and ask, can\n5\n\nWe thank Elke Kirschbaum for suggesting this name.\nThe approach for deriving this p-value broadly resembles Tippett’s method [42] for combining independent\np-values.\n6\n\n7\n\n\fwe find the root cause given only the marginal anomaly scores S(x1 ), . . . , S(xn )? We argue that the\ntop-scoring anomalies constitute a good shortlist for the root cause.\nTo see this, assume again that the (unknown) causal DAG for variables X1 , . . . , Xn is a polytree as\nbefore, and for illustration, first consider a particular causal path through the graph,\nXi1 → Xi2 → · · · → Xik .\nIf we now ‘coarsen’ the graph, marginalising out all the intermediate variables between Xi1 and Xik ,\nso that we collapse the whole path into a single edge Xi1 → Xik , application of Lemma 3.3 shows\nthat we can reject the hypothesis that the new ‘coarse’ mechanism P (Xik | Xi1 = xik ) worked as\nexpected at level p ≤ e−|S(xik )−S(xi1 )|+ . However, note that the coarse mechanism for Xik now\nimplicitly encompasses each of the intermediate mechanisms that connected Xi1 to Xik in the full\ngraph. In other words, the anomaly xi1 is unlikely to cause a much larger anomaly xik anywhere\ndownstream, unless we allow that any of the intermediate mechanisms connecting them has been\ncorrupted.\nWith this in mind, consider the full graph on X1 , . . . , Xn and let π be a permutation of {1, . . . , n}\nsuch that\nS(xπ(1) ) ≥ S(xπ(2) ) ≥ · · · ≥ S(xπ(n) ).\nWe define the null hypothesis that the mechanisms worked as expected for all of the top-k scoring\nanomalies: H0top-k : for anomaly event (x1 , . . . , xn ) all xπ(i) with i ≤ k have been drawn from\nP (Xπ(i) | P Aπ(i) = paπ(i) ). Under the null hypothesis, we know that the score for xπ(1) must have\nbeen greater by at least ∆k := S(xπ(1) ) − S(xπ(k+1) ) compared to an ancestral node, despite its\nmechanism, and the mechanisms of any intermediates, working as expected. This is because whether\nor not any of the variables Xπ(2) , . . . , Xπ(k) are intermediates, their mechanisms, by assumption,\nworked as expected under the null. If any of the variables Xπ(k+2) , . . . , Xπ(n) are intermediates (or\nif Xπ(1) has no ancestors), then its score increased by an even greater amount than ∆k . Applying the\nsame coarsening idea as above, and accounting for multiple testing, we therefore have:\nTheorem 3.13. (Bound on likelihood root cause not in top-k highest scoring anomalies). Subject to\nscore typicality, where dmax denotes the maximum in-degree among all nodes in the graph, we can\nreject H0top-k at level p ≤ n · dmax · e−∆k .\nThese bounds motivate SCORE ORDERING which, given the marginal anomaly scores and an\nassumed upper bound on the in-degree of nodes in the causal graph, returns the set of top-k highest\nscoring anomalies with the guarantee that the root cause is among them with at least the desired\nconfidence level 1 − α (see Algorithm 2). Note that one could just as well specify a desired number\nof variables, k, and SCORE ORDERING would then return a confidence level for each possible dmax\nso that the latter is not a strict input requirement.\nAlgorithm 2 (Score Ordering) Returns the top-k scoring anomalies such that the root cause is\namong them with confidence at least 1 − α\nRequire: Scores S(x1 ), . . . , S(xn ), maximum in-degree dmax , confidence level 1 − α\nEnsure: A set L ⊆ {X1 , . . . , Xn }\n1: Let π be a permutation of {1, . . . , n} such that S(xπ(1) ) ≥ S(xπ(2) ) ≥ · · · ≥ S(xπ(n) )\n2: Initialize L ← ∅\n3: for k = 1 to n do\n4:\nL ← L ∪ {Xπ(k) }\n5:\nif k = n then\n6:\nreturn L\n7:\nend if\n8:\n∆ ← S(xπ(1) ) − S(xπ(k+1) )\n9:\nif n · dmax · e−∆ ≤ α then\n10:\nreturn L\n11:\nend if\n12: end for\n\n8\n\n\f3.5\n\nBeyond polytrees: limitations of score ordering\n\nMost of the theory developed in this section has depended on the assumption that the causal graph is\na polytree. While this assumption appears in causal literature (e.g. [43, 44, 45]), it is nonetheless a\nstrong structural assumption. One of the strengths of both of the algorithms we propose, SMOOTH\nTRAVERSAL and SCORE ORDERING, is their simplicity and efficiency. SCORE ORDERING\nin particular demands very weak input requirements, and so the fact that it comes with any causal\nguarantees at all might be a surprise. As a minimum, this might justify its use as a ‘first pass’ heuristic\nin settings beyond those we study here. However, the question remains as to what extent we might\nexpect our proposed algorithms to perform well in settings that do not meet the structural assumptions\n(we empirically assess this question in the next section). The key observation on which SCORE\nORDERING depends in the proof of Theorem 3.13 is that an anomaly xi is unlikely to cause a much\nlarger anomaly downstream. Li et al. [46] describe a condition under which the z 2 -score of an effect\nXj can be larger than the z 2 -score of the root cause Xi in a DAG with linear structural equations.\nAlthough our results refer to IT scores rather than z 2 -scores, their example nonetheless applies to us\nas the z 2 -score can be turned into an IT score by a monotonic recalibration. They show (see Corollary\n2.1 in [46]) that a sufficient condition for such a case not to occur is that the DAG be a polytree,\nand so their results do not contradict our own. However, in addition, we show in Appendix E that\nin DAGs (with linear structural equations) more generally such cases are ‘rare’ in the sense that,\nunder reasonable assumptions, it will hold for only a ‘small’ fraction of root causes. Despite, then,\nexceptions occurring, we believe our results nonetheless give confidence that SCORE ORDERING\ncan be applied as a useful first heuristic even beyond polytrees.\n\n4\n\nExperiments\n\nWe evaluate SMOOTH TRAVERSAL and SCORE ORDERING against a range of existing RCA\nmethods, that can also operate with a single anomalous sample, on both synthetic and real world\ndata. In particular we evaluate our methods against:\n‘Cholesky’ [46] Assumes linear structural causal models, but does not require the causal graph.\nMakes use of the Cholesky decomposition of the covariance matrix of observed variables, exploiting\nan invariance property across permutations to identify the root cause.\n‘Traversal’ [9, 24, 25] Requires the causal graph. Identifies nodes which are anomalous, have no\nanomalous parents, and are linked to the target node via a path of anomalous nodes as root causes.\nCirca [47] Requires the causal graph. Fits a linear structural causal model to the data from the normal\nperiod and returns the node with the largest residual, given its parents, in the anomalous period.\n‘Counterfactual’ [23] Requires the structural causal model. Finds the counterfactual Shapley\ncontribution of each node to the anomalousness of the target event and outputs the node with the\nhighest contribution.\nWe also evaluate against RCD [10] and ε-Diagnosis [11] in Appendix F, however, neither method\noperates in the single anomalous sample setting, and so we do not recommend direct comparison.\nSynthetic data generation: full details are provided in Appendix F. In brief, to generate data, we\nsample a random DAG (not restricted to a polytree) of n nodes. Structural equations are randomly\nassigned as simple feed-forward neural networks or as linear models of the parents and noise variables.\nIn all experiments, 1000 observations are drawn according to the randomly assigned model in the normal period. To produce an anomalous sample, a root cause is chosen at random from among the nodes\nand a target node from among its descendants (including itself). An anomaly is then injected at the root\ncause by adding x multiples of its standard deviation to its value, and propagated through the causal\nmodel. In each experiment, this process is repeated 100 times per data point. Unless otherwise stated,\neach algorithm is evaluated by its top-1 recall. With synthetic data, we answer the following questions:\nHow does performance vary with anomaly strength?\nWe display results for\nx ∈ {2.0, 2.1, 2.2, . . . , 3.0} in Fig. 1. We find that the strongest performing algorithms are\nSMOOTH TRAVERSAL, Traversal, and Counterfactual, all of which outperform SCORE\nORDERING. Circa and Cholesky perform considerably worse than the other approaches, apparently\ndue to the assumption of linearity (see Fig. 5 in Appendix F). The performance of SCORE\nORDERING improves slightly as the anomaly strength increases, but performance is approximately\nconstant for the other approaches. We extend this analysis in Appendix F.2: to RCA and ε-Diagnosis\n(Fig. 4), using only linear SCMs (Fig. 5), and restricting the DAG to being a polytree (Fig. 6).\n9\n\n\fPct. correctly identified RC\n\n1.0\n0.9\n0.8\n0.7\nSCORE ORDERING\nTraversal\nCholesky\n\n0.6\n0.5\n\nSMOOTH TRAVERSAL\nCounterfactual\nCirca\n\n0.4\n0.3\n0.2\n2.0\n\n2.2\n\n2.4\n\n2.6\n\n2.8\n\n3.0\n\nAnomaly strength (Nr. standard deviations)\n\nFigure 1: True positive rate for identifying the root cause against anomaly strength injected at the\nroot cause.\nHow do runtimes scale with increasing graph size? For a fixed x = 3, we measure the runtime\nof each algorithm for graphs with an increasing number of nodes, generated as described above.\nWe observe that (see Fig. 3 in Appendix F), Traversal and SMOOTH TRAVERSAL are the fastest,\nwith the remaining approaches having comparable average runtimes.\nHow does performance vary with increasing graph size? We generate causal models with\nn ∈ {20, 40, . . . , 100} and fixed anomaly strength of x = 3 (see Fig. 7). While the performance of\nSMOOTH TRAVERSAL, Traversal and Counterfactual seems to remain constant, the performances\nof SCORE ORDERING, Cholesky, and Circa all begin to decrease as the graph increases in size.\nHow robust are the methods to misspecification of the causal graph? For the approaches that\nrequire a causal graph, we investigated how their performances varied as an increasing number of\nrandom edge additions/removals/reversals were introduced to the given graph (see Appendix F.4).\nFor n = 50 and x = 3.0, we see SMOOTH TRAVERSAL, Traversal and Counterfactual are similarly\nrobust, showing similar delays in performance, while the performance of Circa decayed more rapidly.\nReal world data evaluation: We additionally performed a comprehensive evaluation with two\n‘real-world’ datasets: the PetShop [27] dataset (see Appendix F.6) and the Sock-shop 2 dataset [26]\n(see Appendix F.7), as well as ‘semi-synthetic’ datasets generated using the ProRCA package [48]\n(see Appendix F.8). In these evaluations, the picture can be quite different from that in the synthetic\ndata experiments. SCORE ORDERING often performs well across the datasets, but both of our\nalgorithms are variously outperformed by Cholesky, Circa or Counterfactual in certain settings.\nCode: https://github.com/amazon-science/RCAWithMissingStructuralKnowledgeCode\n\n5\n\nConclusion\n\nWe have explored several directions in which the practical limitations of RCA can be addressed: first\nby avoiding estimation of conditional distributions in the setting that the causal graph is known, and\nsecond by avoiding needing the causal graph at all, in the setting that it is a polytree. To do so, we leverage information-theoretic (IT) anomaly scores and prove general laws about their typical decay along\ncausal paths without any parametric assumptions. Using our results, we then propose two novel algorithms: SMOOTH TRAVERSAL and SCORE ORDERING, give probabilistic guarantees for the correctness of their outputs, and show they have competitive performance in both synthetic and real-world\ndata despite their simplicity. To our knowledge, our work is the only which provides non-parametric\nguarantees for RCA with a single anomalous point without requiring the full structural causal model.\n\nAcknowledgments and Disclosure of Funding\nWe would like to thank Manuel Gomez-Rodriguez for fruitful discussions during different stages\nof this project. W. R. Orchard would like to thank Peterhouse, Cambridge, and Cancer Research\nUK for their support for this work.\n10\n\n\fReferences\n[1] S Wibisono, MT Anwar, Aji Supriyanto, and IHA Amin. Multivariate weather anomaly\ndetection using dbscan clustering algorithm. In Journal of Physics: Conference Series, volume\n1869, page 012077. IOP Publishing, 2021.\n[2] Eric V Strobl and Thomas A Lasko. Identifying patient-specific root causes with the heteroscedastic noise model. Journal of Computational Science, 72:102099, 2023.\n[3] Eric V Strobl. Counterfactual formulation of patient-specific root causes of disease. Journal of\nBiomedical Informatics, page 104585, 2024.\n[4] Gian Antonio Susto, Matteo Terzi, and Alessandro Beghi. Anomaly detection approaches for\nsemiconductor manufacturing. Procedia Manufacturing, 11:2018–2024, 2017.\n[5] Jellis Vanhoeyveld, David Martens, and Bruno Peeters. Value-added tax fraud detection with\nscalable anomaly detection techniques. Applied Soft Computing, 86:105895, 2020.\n[6] Sanjiv Das, Richard Stanton, and Nancy Wallace. Algorithmic fairness. Annual Review of\nFinancial Economics, 15:565–593, 2023.\n[7] Dongjie Wang, Zhengzhang Chen, Jingchao Ni, Liang Tong, Zheng Wang, Yanjie Fu, and\nHaifeng Chen. Hierarchical graph neural networks for causal discovery and root cause localization. arXiv preprint arXiv:2302.01987, 2023.\n[8] Cheng-Ming Lin, Ching Chang, Wei-Yao Wang, Kuang-Da Wang, and Wen-Chih Peng.\nRoot cause analysis in microservice using neural granger causal discovery. arXiv preprint\narXiv:2402.01140, 2024.\n[9] Dewei Liu, Chuan He, Xin Peng, Fan Lin, Chenxi Zhang, Shengfang Gong, Ziang Li, Jiayu Ou,\nand Zheshun Wu. Microhecl: high-efficient root cause localization in large-scale microservice\nsystems. In Proceedings of the 43rd International Conference on Software Engineering:\nSoftware Engineering in Practice, ICSE-SEIP ’21, page 338–347. IEEE Press, 2021.\n[10] Azam Ikram, Sarthak Chakraborty, Subrata Mitra, Shiv Saini, Saurabh Bagchi, and Murat\nKocaoglu. Root cause analysis of failures in microservices through causal discovery. Advances\nin Neural Information Processing Systems, 35:31158–31170, 2022.\n[11] Huasong Shan, Yuan Chen, Haifeng Liu, Yunpeng Zhang, Xiao Xiao, Xiaofeng He, Min Li, and\nWei Ding. ε-diagnosis: Unsupervised and real-time diagnosis of small-window long-tail latency\nin large-scale microservice platforms. In The World Wide Web Conference, pages 3215–3222,\n2019.\n[12] Meng Ma, Jingmin Xu, Yuan Wang, Pengfei Chen, Zonghua Zhang, and Ping Wang. Automap:\nDiagnose your microservice-based web applications automatically. In Proceedings of The Web\nConference 2020, pages 246–258, 2020.\n[13] Douglas M Hawkins. Identification of outliers, volume 11. Springer, 1980.\n[14] Varun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM\ncomputing surveys (CSUR), 41(3):1–58, 2009.\n[15] Charu C Aggarwal. An introduction to outlier analysis. Springer, 2017.\n[16] Ane Blázquez-García, Angel Conde, Usue Mori, and Jose A Lozano. A review on outlier/anomaly detection in time series data. ACM Computing Surveys (CSUR), 54(3):1–33,\n2021.\n[17] Leman Akoglu. Anomaly mining: Past, present and future. In Proceedings of the 30th ACM\nInternational Conference on Information &amp; Knowledge Management, pages 1–2, 2021.\n[18] Edwin M Knorr and Raymond T Ng. Finding intensional knowledge of distance-based outliers.\nIn Vldb, volume 99, pages 211–222, 1999.\n11\n\n\f[19] Barbora Micenková, Raymond T Ng, Xuan-Hong Dang, and Ira Assent. Explaining outliers\nby subspace separability. In 2013 IEEE 13th international conference on data mining, pages\n518–527. IEEE, 2013.\n[20] Ninghao Liu, Donghwa Shin, and Xia Hu. Contextual outlier interpretation. arXiv preprint\narXiv:1711.10589, 2017.\n[21] Meghanath Macha and Leman Akoglu. Explaining anomalies in groups with characterizing\nsubspace rules. Data Mining and Knowledge Discovery, 32:1444–1480, 2018.\n[22] Nikhil Gupta, Dhivya Eswaran, Neil Shah, Leman Akoglu, and Christos Faloutsos. Beyond\noutlier detection: Lookout for pictorial explanation. In Machine Learning and Knowledge\nDiscovery in Databases: European Conference, ECML PKDD 2018, Dublin, Ireland, September\n10–14, 2018, Proceedings, Part I 18, pages 122–138. Springer, 2019.\n[23] Kailash Budhathoki, Lenon Minorics, Patrick Bloebaum, and Dominik Janzing. Causal structurebased root cause analysis of outliers. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song,\nCsaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International\nConference on Machine Learning, volume 162 of Proceedings of Machine Learning Research,\npages 2357–2369. PMLR, 17–23 Jul 2022.\n[24] Pengfei Chen, Yong Qi, Pengfei Zheng, and Di Hou. Causeinfer: Automatic and distributed\nperformance diagnosis with hierarchical causality graph in large distributed systems. In IEEE\nINFOCOM 2014 - IEEE Conference on Computer Communications, pages 1887–1895, 2014.\n[25] JinJin Lin, Pengfei Chen, and Zibin Zheng. Microscope: Pinpoint performance issues with\ncausal graphs in micro-service environments. In International Conference on Service Oriented\nComputing, 2018.\n[26] Luan Pham, Huong Ha, and Hongyu Zhang. Root cause analysis for microservice system based\non causal inference: How far are we? In Proceedings of the 39th IEEE/ACM International\nConference on Automated Software Engineering, ASE ’24, page 706–715, New York, NY, USA,\n2024. Association for Computing Machinery.\n[27] Michaela Hardt, William Roy Orchard, Patrick Blöbaum, Elke Kirschbaum, and Shiva Kasiviswanathan. The petshop dataset — finding causes of performance issues across microservices.\nIn Francesco Locatello and Vanessa Didelez, editors, Proceedings of the Third Conference on\nCausal Learning and Reasoning, volume 236 of Proceedings of Machine Learning Research,\npages 957–978. PMLR, 01–03 Apr 2024.\n[28] Yu Gan, Mingyu Liang, Sundar Dev, David Lo, and Christina Delimitrou. Sage: practical and\nscalable ml-driven performance debugging in microservices. In Proceedings of the 26th ACM\nInternational Conference on Architectural Support for Programming Languages and Operating\nSystems, ASPLOS ’21, page 135–151, New York, NY, USA, 2021. Association for Computing\nMachinery.\n[29] Azam Ikram. Sock-shop data. https://github.com/azamikram/ rcd/tree/master/sock-shopdata, 2023.\n[30] Amin Jaber, Murat Kocaoglu, Karthikeyan Shanmugam, and Elias Bareinboim. Causal discovery\nfrom soft interventions with unknown targets: Characterization and learning. In H. Larochelle,\nM. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information\nProcessing Systems, volume 33, pages 9551–9561. Curran Associates, Inc., 2020.\n[31] Nicola Gnecco, Nicolai Meinshausen, Jonas Peters, and Sebastian Engelke. Causal discovery in\nheavy-tailed models. The Annals of Statistics, 49(3):1755 – 1778, 2021.\n[32] Carlos Améndola, Benjamin Hollering, Seth Sullivant, and Ngoc Tran. Markov equivalence\nof max-linear Bayesian networks. In Cassio de Campos and Marloes H. Maathuis, editors,\nProceedings of the Thirty-Seventh Conference on Uncertainty in Artificial Intelligence, volume\n161 of Proceedings of Machine Learning Research, pages 1746–1755. PMLR, 27–30 Jul 2021.\n[33] J. Pearl. Causality. Cambridge University Press, 2000.\n12\n\n\f[34] Jonas Peters, Peter Bühlmann, and Nicolai Meinshausen. Causal inference by using invariant\nprediction: Identification and confidence intervals. Journal of the Royal Statistical Society\nSeries B: Statistical Methodology, 78(5):947–1012, 10 2016.\n[35] B. Schölkopf, F. Locatello, S. Bauer, N. R. Ke, N. Kalchbrenner, A. Goyal, and Y. Bengio.\nToward causal representation learning. Proceedings of the IEEE, 109(5):612–634, 2021.\n[36] Akash Maharaj, Ritwik Sinha, David Arbour, Ian Waudby-Smith, Simon Z. Liu, Moumita\nSinha, Raghavendra Addanki, Aaditya Ramdas, Manas Garg, and Viswanathan Swaminathan.\nAnytime-valid confidence sequences in an enterprise a/b testing platform. In Companion\nProceedings of the ACM Web Conference 2023, WWW ’23 Companion, page 396–400, New\nYork, NY, USA, 2023. Association for Computing Machinery.\n[37] Stephen Bates, Emmanuel J. Candès, Lihua Lei, Yaniv Romano, and Matteo Sesia. Testing for\noutliers with conformal p-values. The Annals of Statistics, 2021.\n[38] Patrik Hoyer, Dominik Janzing, Joris M Mooij, Jonas Peters, and Bernhard Schölkopf. Nonlinear\ncausal discovery with additive noise models. In D. Koller, D. Schuurmans, Y. Bengio, and\nL. Bottou, editors, Advances in Neural Information Processing Systems, volume 21. Curran\nAssociates, Inc., 2008.\n[39] Jonas Peters, Joris M. Mooij, Dominik Janzing, and Bernhard Schölkopf. Causal discovery with\ncontinuous additive noise models. Journal of Machine Learning Research, 15(58):2009–2053,\n2014.\n[40] Aram Ebtekar, Yuhao Wang, and Dominik Janzing. Toward universal laws of outlier propagation.\nIn Proceedings of the Forty-First Conference on Uncertainty in Artificial Intelligence, UAI ’25.\nJMLR.org, 2025.\n[41] R. A. Fisher. Statistical Methods for Research Workers. Oliver and Boyd, 1925.\n[42] L. H. C. Tippett. The Methods of Statistics: An Introduction Mainly for Workers in the Biological\nSciences. Williams and Norgate Ltd., London, UK, 1931.\n[43] Daniele Tramontano, Anthea Monod, and Mathias Drton. Learning linear non-Gaussian\npolytree models. In James Cussens and Kun Zhang, editors, Proceedings of the Thirty-Eighth\nConference on Uncertainty in Artificial Intelligence, volume 180 of Proceedings of Machine\nLearning Research, pages 1960–1969. PMLR, 01–05 Aug 2022.\n[44] Martin E. Jakobsen, Rajen D. Shah, Peter Bühlmann, and Jonas Peters. Structure learning for\ndirected trees. Journal of Machine Learning Research, 23(159):1–97, 2022.\n[45] Davin Choo, Joy Qiping Yang, Arnab Bhattacharyya, and Clément L Canonne. Learning\nbounded-degree polytrees with known skeleton. In Claire Vernade and Daniel Hsu, editors,\nProceedings of The 35th International Conference on Algorithmic Learning Theory, volume\n237 of Proceedings of Machine Learning Research, pages 402–443. PMLR, 25–28 Feb 2024.\n[46] Jinzhou Li, Benjamin B. Chu, Ines F. Scheller, Julien Gagneur, and Marloes H. Maathuis. Root\ncause discovery via permutations and cholesky decomposition, 2024.\n[47] Mingjie Li, Zeyan Li, Kanglin Yin, Xiaohui Nie, Wenchi Zhang, Kaixin Sui, and Dan Pei. Causal\ninference-based root cause analysis for online service systems with intervention recognition. In\nProceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining,\npages 3230–3240, 2022.\n[48] Ahmed Dawoud and Shravan Talupula. Prorca: A causal python package for actionable root\ncause analysis in real-world business scenarios. arXiv preprint arXiv:2503.01475, 2025.\n[49] Kun Zhang, Zhikun Wang, Jiji Zhang, and Bernhard Schölkopf. On estimation of functional\ncausal models: general results and application to the post-nonlinear causal model. ACM\nTransactions on Intelligent Systems and Technology (TIST), 7(2):1–22, 2015.\n13\n\n\f[50] Julius Von Kügelgen, Abdirisak Mohamed, and Sander Beckers. Backtracking counterfactuals.\nIn Mihaela van der Schaar, Cheng Zhang, and Dominik Janzing, editors, Proceedings of the\nSecond Conference on Causal Learning and Reasoning, volume 213 of Proceedings of Machine\nLearning Research, pages 177–196. PMLR, 11–14 Apr 2023.\n[51] A. Balke and J. Pearl. Counterfactual probabilities: Computational methods, bounds, and\napplications. In R. Lopez D. Mantaras and D. Poole, editors, Uncertainty in Artifical Intelligence,\nvolume 10. Morgan Kaufmann, San Mateo, 1994.\n[52] Dominik Janzing, Patrick Blöbaum, Atalanti A Mastakouri, Philipp M Faller, Lenon Minorics,\nand Kailash Budhathoki. Quantifying intrinsic causal contributions via structure preserving\ninterventions. In International Conference on Artificial Intelligence and Statistics, pages\n2188–2196. PMLR, 2024.\n[53] Oliver Ibe. Markov Processes for Stochastic Modelling. Elsevier, 2nd edition edition, 2013.\n[54] Alexander G. Reisach, Myriam Tami, Christof Seiler, Antoine Chambaz, and Sebastian Weichwald. A scale-invariant sorting criterion to find a causal order in additive noise models. In\nProceedings of the 37th International Conference on Neural Information Processing Systems,\nNIPS ’23, Red Hook, NY, USA, 2023. Curran Associates Inc.\n[55] J. D. Hunter. Matplotlib: A 2d graphics environment. Computing in Science &amp; Engineering,\n9(3):90–95, 2007.\n[56] Chenghao Liu, Wenzhuo Yang, Himanshu Mittal, Manpreet Singh, Doyen Sahoo, and Steven\nC. H. Hoi. Pyrca: A library for metric-based root cause analysis, 2023.\n[57] Silvia Acid and Luis M. de Campos. Searching for bayesian network structures in the space of\nrestricted acyclic partially directed graphs. J. Artif. Int. Res., 18(1):445–490, May 2003.\n[58] Ioannis Tsamardinos, Laura E. Brown, and Constantin F. Aliferis. The max-min hill-climbing\nbayesian network structure learning algorithm. Machine Learning, 65(1):31–78, Oct 2006.\n[59] Elias Eulig, Atalanti A. Mastakouri, Patrick Blöbaum, Michaela Hardt, and Dominik Janzing.\nToward falsifying causal graphs using a permutation-based test. In Proceedings of the ThirtyNinth AAAI Conference on Artificial Intelligence and Thirty-Seventh Conference on Innovative\nApplications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in\nArtificial Intelligence, AAAI’25/IAAI’25/EAAI’25. AAAI Press, 2025.\n\n14\n\n\fNeurIPS Paper Checklist\n1. Claims\nQuestion: Do the main claims made in the abstract and introduction accurately reflect the\npaper’s contributions and scope?\nAnswer: [Yes]\nJustification: All the theoretical claims in the abstract and introduction are part of the main\narticle.\nGuidelines:\n• The answer NA means that the abstract and introduction do not include the claims\nmade in the paper.\n• The abstract and/or introduction should clearly state the claims made, including the\ncontributions made in the paper and important assumptions and limitations. A No or\nNA answer to this question will not be perceived well by the reviewers.\n• The claims made should match theoretical and experimental results, and reflect how\nmuch the results can be expected to generalize to other settings.\n• It is fine to include aspirational goals as motivation as long as it is clear that these goals\nare not attained by the paper.\n2. Limitations\nQuestion: Does the paper discuss the limitations of the work performed by the authors?\nAnswer: [Yes]\nJustification: Most of the limitations come from theoretical assumptions made to obtain the\nresults. These limitations are discussed in the main article.\nGuidelines:\n• The answer NA means that the paper has no limitation while the answer No means that\nthe paper has limitations, but those are not discussed in the paper.\n• The authors are encouraged to create a separate \"Limitations\" section in their paper.\n• The paper should point out any strong assumptions and how robust the results are to\nviolations of these assumptions (e.g., independence assumptions, noiseless settings,\nmodel well-specification, asymptotic approximations only holding locally). The authors\nshould reflect on how these assumptions might be violated in practice and what the\nimplications would be.\n• The authors should reflect on the scope of the claims made, e.g., if the approach was\nonly tested on a few datasets or with a few runs. In general, empirical results often\ndepend on implicit assumptions, which should be articulated.\n• The authors should reflect on the factors that influence the performance of the approach.\nFor example, a facial recognition algorithm may perform poorly when image resolution\nis low or images are taken in low lighting. Or a speech-to-text system might not be\nused reliably to provide closed captions for online lectures because it fails to handle\ntechnical jargon.\n• The authors should discuss the computational efficiency of the proposed algorithms\nand how they scale with dataset size.\n• If applicable, the authors should discuss possible limitations of their approach to\naddress problems of privacy and fairness.\n• While the authors might fear that complete honesty about limitations might be used by\nreviewers as grounds for rejection, a worse outcome might be that reviewers discover\nlimitations that aren’t acknowledged in the paper. The authors should use their best\njudgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers\nwill be specifically instructed to not penalize honesty concerning limitations.\n3. Theory assumptions and proofs\nQuestion: For each theoretical result, does the paper provide the full set of assumptions and\na complete (and correct) proof?\n15\n\n\fAnswer: [Yes]\nJustification: Most of the article is given over to theoretical results and their proofs. We\nclearly state all assumptions, and proofs of every lemma and theorem in the paper.\nGuidelines:\n• The answer NA means that the paper does not include theoretical results.\n• All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.\n• All assumptions should be clearly stated or referenced in the statement of any theorems.\n• The proofs can either appear in the main paper or the supplemental material, but if\nthey appear in the supplemental material, the authors are encouraged to provide a short\nproof sketch to provide intuition.\n• Inversely, any informal proof provided in the core of the paper should be complemented\nby formal proofs provided in appendix or supplemental material.\n• Theorems and Lemmas that the proof relies upon should be properly referenced.\n4. Experimental result reproducibility\nQuestion: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions\nof the paper (regardless of whether the code and data are provided or not)?\nAnswer: [Yes]\nJustification: We give a detailed description of the set-up for all experiments performed, and\npoint to 3rd party Python libraries where applicable.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• If the paper includes experiments, a No answer to this question will not be perceived\nwell by the reviewers: Making the paper reproducible is important, regardless of\nwhether the code and data are provided or not.\n• If the contribution is a dataset and/or model, the authors should describe the steps taken\nto make their results reproducible or verifiable.\n• Depending on the contribution, reproducibility can be accomplished in various ways.\nFor example, if the contribution is a novel architecture, describing the architecture fully\nmight suffice, or if the contribution is a specific model and empirical evaluation, it may\nbe necessary to either make it possible for others to replicate the model with the same\ndataset, or provide access to the model. In general. releasing code and data is often\none good way to accomplish this, but reproducibility can also be provided via detailed\ninstructions for how to replicate the results, access to a hosted model (e.g., in the case\nof a large language model), releasing of a model checkpoint, or other means that are\nappropriate to the research performed.\n• While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the\nnature of the contribution. For example\n(a) If the contribution is primarily a new algorithm, the paper should make it clear how\nto reproduce that algorithm.\n(b) If the contribution is primarily a new model architecture, the paper should describe\nthe architecture clearly and fully.\n(c) If the contribution is a new model (e.g., a large language model), then there should\neither be a way to access this model for reproducing the results or a way to reproduce\nthe model (e.g., with an open-source dataset or instructions for how to construct\nthe dataset).\n(d) We recognize that reproducibility may be tricky in some cases, in which case\nauthors are welcome to describe the particular way they provide for reproducibility.\nIn the case of closed-source models, it may be that access to the model is limited in\nsome way (e.g., to registered users), but it should be possible for other researchers\nto have some path to reproducing or verifying the results.\n5. Open access to data and code\n16\n\n\fQuestion: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental\nmaterial?\nAnswer: [Yes]\nJustification: We provide a link to the complete code for reproducing our experimental\nresults at the end of the article.\nGuidelines:\n• The answer NA means that paper does not include experiments requiring code.\n• Please see the NeurIPS code and data submission guidelines\n(https://nips.cc/public/guides/CodeSubmissionPolicy) for more details.\n• While we encourage the release of code and data, we understand that this might not be\npossible, so “No” is an acceptable answer. Papers cannot be rejected simply for not\nincluding code, unless this is central to the contribution (e.g., for a new open-source\nbenchmark).\n• The instructions should contain the exact command and environment needed to run\nto reproduce the results. See the NeurIPS code and data submission guidelines\n(https://nips.cc/public/guides/CodeSubmissionPolicy) for more details.\n• The authors should provide instructions on data access and preparation, including how\nto access the raw data, preprocessed data, intermediate data, and generated data, etc.\n• The authors should provide scripts to reproduce all experimental results for the new\nproposed method and baselines. If only a subset of experiments are reproducible, they\nshould state which ones are omitted from the script and why.\n• At submission time, to preserve anonymity, the authors should release anonymized\nversions (if applicable).\n• Providing as much information as possible in supplemental material (appended to the\npaper) is recommended, but including URLs to data and code is permitted.\n6. Experimental setting/details\nQuestion: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the\nresults?\nAnswer: [Yes]\nJustification: Yes, as in answer to questions 4 and 5 above.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• The experimental setting should be presented in the core of the paper to a level of detail\nthat is necessary to appreciate the results and make sense of them.\n• The full details can be provided either with the code, in appendix, or as supplemental\nmaterial.\n7. Experiment statistical significance\nQuestion: Does the paper report error bars suitably and correctly defined or other appropriate\ninformation about the statistical significance of the experiments?\nAnswer: [Yes]\nJustification: In all figures where error bars are necessary and large enough to be visible,\nthey are displayed.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• The authors should answer \"Yes\" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support\nthe main claims of the paper.\n• The factors of variability that the error bars are capturing should be clearly stated (for\nexample, train/test split, initialization, random drawing of some parameter, or overall\nrun with given experimental conditions).\n17\n\n\f• The method for calculating the error bars should be explained (closed form formula,\ncall to a library function, bootstrap, etc.)\n• The assumptions made should be given (e.g., Normally distributed errors).\n• It should be clear whether the error bar is the standard deviation or the standard error\nof the mean.\n• It is OK to report 1-sigma error bars, but one should state it. The authors should\npreferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis\nof Normality of errors is not verified.\n• For asymmetric distributions, the authors should be careful not to show in tables or\nfigures symmetric error bars that would yield results that are out of range (e.g. negative\nerror rates).\n• If error bars are reported in tables or plots, The authors should explain in the text how\nthey were calculated and reference the corresponding figures or tables in the text.\n8. Experiments compute resources\nQuestion: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce\nthe experiments?\nAnswer: [Yes]\nJustification: The work requires very modest compute resources, but details have been\nprovided in the appendix nonetheless.\nGuidelines:\n• The answer NA means that the paper does not include experiments.\n• The paper should indicate the type of compute workers CPU or GPU, internal cluster,\nor cloud provider, including relevant memory and storage.\n• The paper should provide the amount of compute required for each of the individual\nexperimental runs as well as estimate the total compute.\n• The paper should disclose whether the full research project required more compute\nthan the experiments reported in the paper (e.g., preliminary or failed experiments that\ndidn’t make it into the paper).\n9. Code of ethics\nQuestion: Does the research conducted in the paper conform, in every respect, with the\nNeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?\nAnswer: [Yes]\nJustification: Due to the paper being entirely theoretical, the paper adheres to the NeurIPS\nCode of Ethics.\nGuidelines:\n• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.\n• If the authors answer No, they should explain the special circumstances that require a\ndeviation from the Code of Ethics.\n• The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).\n10. Broader impacts\nQuestion: Does the paper discuss both potential positive societal impacts and negative\nsocietal impacts of the work performed?\nAnswer: [NA]\nJustification: There are no broad societal impacts of the application of the ideas outlined in\nthis paper.\nGuidelines:\n• The answer NA means that there is no societal impact of the work performed.\n• If the authors answer NA or No, they should explain why their work has no societal\nimpact or why the paper does not address societal impact.\n18\n\n\f• Examples of negative societal impacts include potential malicious or unintended uses\n(e.g., disinformation, generating fake profiles, surveillance), fairness considerations\n(e.g., deployment of technologies that could make decisions that unfairly impact specific\ngroups), privacy considerations, and security considerations.\n• The conference expects that many papers will be foundational research and not tied\nto particular applications, let alone deployments. However, if there is a direct path to\nany negative applications, the authors should point it out. For example, it is legitimate\nto point out that an improvement in the quality of generative models could be used to\ngenerate deepfakes for disinformation. On the other hand, it is not needed to point out\nthat a generic algorithm for optimizing neural networks could enable people to train\nmodels that generate Deepfakes faster.\n• The authors should consider possible harms that could arise when the technology is\nbeing used as intended and functioning correctly, harms that could arise when the\ntechnology is being used as intended but gives incorrect results, and harms following\nfrom (intentional or unintentional) misuse of the technology.\n• If there are negative societal impacts, the authors could also discuss possible mitigation\nstrategies (e.g., gated release of models, providing defenses in addition to attacks,\nmechanisms for monitoring misuse, mechanisms to monitor how a system learns from\nfeedback over time, improving the efficiency and accessibility of ML).\n11. Safeguards\nQuestion: Does the paper describe safeguards that have been put in place for responsible\nrelease of data or models that have a high risk for misuse (e.g., pretrained language models,\nimage generators, or scraped datasets)?\nAnswer: [NA]\nJustification: No major risks are posed by the paper.\nGuidelines:\n• The answer NA means that the paper poses no such risks.\n• Released models that have a high risk for misuse or dual-use should be released with\nnecessary safeguards to allow for controlled use of the model, for example by requiring\nthat users adhere to usage guidelines or restrictions to access the model or implementing\nsafety filters.\n• Datasets that have been scraped from the Internet could pose safety risks. The authors\nshould describe how they avoided releasing unsafe images.\n• We recognize that providing effective safeguards is challenging, and many papers do\nnot require this, but we encourage authors to take this into account and make a best\nfaith effort.\n12. Licenses for existing assets\nQuestion: Are the creators or original owners of assets (e.g., code, data, models), used in\nthe paper, properly credited and are the license and terms of use explicitly mentioned and\nproperly respected?\nAnswer: [Yes]\nJustification: The only assets used by the paper are public datasets. We cite all original\npapers and a URL to access it alonside licensing information.\nGuidelines:\n• The answer NA means that the paper does not use existing assets.\n• The authors should cite the original paper that produced the code package or dataset.\n• The authors should state which version of the asset is used and, if possible, include a\nURL.\n• The name of the license (e.g., CC-BY 4.0) should be included for each asset.\n• For scraped data from a particular source (e.g., website), the copyright and terms of\nservice of that source should be provided.\n19\n\n\f• If assets are released, the license, copyright information, and terms of use in the package\nshould be provided. For popular datasets, paperswithcode.com/datasets has curated\nlicenses for some datasets. Their licensing guide can help determine the license of a\ndataset.\n• For existing datasets that are re-packaged, both the original license and the license of\nthe derived asset (if it has changed) should be provided.\n• If this information is not available online, the authors are encouraged to reach out to\nthe asset’s creators.\n13. New assets\nQuestion: Are new assets introduced in the paper well documented and is the documentation\nprovided alongside the assets?\nAnswer: [Yes]\nJustification: The only assets are code for running the experiments (to be released on\nacceptance at the latest). This code is well documented. The paper otherwise released no\nnew assets.\nGuidelines:\n• The answer NA means that the paper does not release new assets.\n• Researchers should communicate the details of the dataset/code/model as part of their\nsubmissions via structured templates. This includes details about training, license,\nlimitations, etc.\n• The paper should discuss whether and how consent was obtained from people whose\nasset is used.\n• At submission time, remember to anonymize your assets (if applicable). You can either\ncreate an anonymized URL or include an anonymized zip file.\n14. Crowdsourcing and research with human subjects\nQuestion: For crowdsourcing experiments and research with human subjects, does the paper\ninclude the full text of instructions given to participants and screenshots, if applicable, as\nwell as details about compensation (if any)?\nAnswer: [NA]\nJustification: The paper does not involve crowdsourcing.\nGuidelines:\n• The answer NA means that the paper does not involve crowdsourcing nor research with\nhuman subjects.\n• Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be\nincluded in the main paper.\n• According to the NeurIPS Code of Ethics, workers involved in data collection, curation,\nor other labor should be paid at least the minimum wage in the country of the data\ncollector.\n15. Institutional review board (IRB) approvals or equivalent for research with human\nsubjects\nQuestion: Does the paper describe potential risks incurred by study participants, whether\nsuch risks were disclosed to the subjects, and whether Institutional Review Board (IRB)\napprovals (or an equivalent approval/review based on the requirements of your country or\ninstitution) were obtained?\nAnswer: [NA]\nJustification: The paper does not involve human subjects.\nGuidelines:\n• The answer NA means that the paper does not involve crowdsourcing nor research with\nhuman subjects.\n20\n\n\f• Depending on the country in which research is conducted, IRB approval (or equivalent)\nmay be required for any human subjects research. If you obtained IRB approval, you\nshould clearly state this in the paper.\n• We recognize that the procedures for this may vary significantly between institutions\nand locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the\nguidelines for their institution.\n• For initial submissions, do not include any information that would break anonymity (if\napplicable), such as the institution conducting the review.\n16. Declaration of LLM usage\nQuestion: Does the paper describe the usage of LLMs if it is an important, original, or\nnon-standard component of the core methods in this research? Note that if the LLM is used\nonly for writing, editing, or formatting purposes and does not impact the core methodology,\nscientific rigorousness, or originality of the research, declaration is not required.\nAnswer: [NA]\nJustification: The paper does not involve the use nor development of LLMs in any way.\nGuidelines:\n• The answer NA means that the core method development in this research does not\ninvolve LLMs as any important, original, or non-standard components.\n• Please refer to our LLM policy (https://neurips.cc/Conferences/2025/LLM) for\nwhat should or should not be described.\n\n21\n\n\fA\n\nRelationship to contribution analysis\n\nWe first sketch the causal framework adopted by Budhathoki et al. [23]. In particular, they assume that\nthe causal relationships between X1 , . . . , Xn are described by a Structural Causal Model (SCM). In\nan SCM, each variable Xi is a function fi of its parents P Ai in the causal graph, and an unobserved\nnoise term Ni :\nXi := fi (P Ai , Ni ),\n(14)\nwhere the noise variables N1 , . . . , Nn are jointly independent [33]. In addition, it is assumed that the\nSCM is invertible [49]. That is, the noise value nj of Nj can be recovered from the value xj of its\ncorresponding observed variable Xj and the values paj of its parents.\nAs in our case, the value xn is flagged as an anomaly, and we wish to identify its root cause from\namong the variables (X1 , . . . , Xn ). Treating (without loss of generality) Xn as a sink node in the\ncausal DAG, iterative application of Eq. 14 results in the representation\nXn = F (N1 , . . . , Nn ),\n\n(15)\n\nin which the structural information is implicit in the function F . By Eq. 15 we therefore have\nthat xn = F (n1 , . . . , nn ) where (n1 , . . . , nn ) := n denote the corresponding values of the noise\nvariables for sample (x1 , . . . , xn ). This representation makes clear that a node Xj ’s contribution to\nthe anomaly xn is ultimately attributable to the contribution of its noise term [23, 50].\nIf you consider our presentation of RCA, wherein we attribute the anomaly xn to one of the causal\nmechanisms being corrupted, the characterisation in terms of noise terms may appear quite different.\nHowever, we can connect the two perspectives by noting that one can think of each value nj as\nrandomly switching between deterministic mechanisms fj (·, nj ) – so-called response functions [51].\nIf a noise term is \"corrupted\" and takes an unusual value nj , the corresponding mechanism generating\nxj from its parents paj will be unusual as well. The goal of finding which causal mechanism did not\nwork as expected, then is common between the two perspectives. The intuition behind the approach\nof Budhathoki et al. is that if for the root cause Xj the unusual value of its noise term nj were\nreplaced by a \"normal\" one, then xn would change to a non-anomaly with high probability. This\ngives the basis for defining how much each variable contributed to the observed anomaly. We explain\nhow this is formalised next.\nA.1\n\nContribution analysis\n\nTo compute the contribution of each noise Ni to the anomaly xn , Budhathoki et al. [23] measure how\nreplacing the observed value ni (originating from a potentially corrupted mechanism) with a random\n\"normal\" value, sampled from its regular distribution P (Ni ), changes the likelihood of the anomaly\nevent, E = {τ (Xn ) ≥ τ (xn )}. Intuitively, this shows us the extent to which ni was responsible for\nthe extremeness of xn .\nNote, however, that the influence of the value ni on the likelihood of the anomaly event will also\ndepend on the values of the other noise variables. In order to assess the contribution of ni we therefore\nalso need to consider how it depends on the context, i.e. how it changes depending on which other\nnoise variables we similarly replace with random \"normal\" values. To formalise this, for any subset\nof the index set, S ⊆ U := {1, . . . , n}, first note that the probability of the anomaly event when\nall nodes in S are set to their observed value and all the nodes in S̄ = U \\ S are randomised is\nP (E | NS = nS ). Now the contribution of a node j ̸∈ S given the context S is defined as:7\nC(j|S) := log\n\nP (E|NS = nS , Nj = nj )\n.\nP (E|NS = nS )\n\n(16)\n\nTo give a \"fair\" attribution among the noise variables, the authors adopt Shapley values. Let Π :\nU → U be the set of all possible permutations of the nodes and π ∈ Π be any permutation. One\nthen defines the contribution of a node j given permutation π as C π (j) := C(j|I π&lt;j ), where I π&lt;j\ndenotes the set of nodes that appear before j with respect to π, i.e., I π&lt;j = {i ∈ U | π(i) &lt; π(j)}.\nWe easily see that for each permutation π, S(xn ) decomposes into the contributions of each node,\n7\n\nNote the difference in the definition of C(.|S) compared to [23]. In our case S is the set for which NS = nS\nwhile in [23] NU \\S = nU \\S .\n\n22\n\n\fP\ni.e., S(xn ) = j∈{1,...,n} C π (j). The Shapley contribution of a node is then given by averaging\nover all the possible permutations in Π:\n1 X\nC Sh (j) :=\nC(j|I π&lt;j ).\n(17)\nn!\nπ∈Π\n\nThis approach therefore provides a full quantitative contribution analysis of root causes. However,\nit suffers from some practical issues. Firstly, the Shapley contribution of a node is expensive to\ncompute [23]. More fundamentally, however, for most permutations π, the contributions C π (j)\nrely on knowing the structural equations (14). As the SCM cannot generally be inferred even with\ninterventional data, this is a serious bottleneck for the application of this approach. As the approaches\nwe propose in this paper do not depend on knowing the structural equations (or even the causal graph\nin the case of SCORE ORDERING), we explain next how we can nonetheless recast our results in\nterms of the contribution approach just presented.\nA.2\n\nInterventional vs counterfactual RCA\n\nThe key result we will need is that so long as π is a topological ordering of the nodes in the causal\ngraph, then all contributions C π (j) do not require knowing the SCM. To illustrate this, first consider\nthe bivariate case X → Y with structural equations X := NX and Y := f (X, NY ), and anomaly y\nin sample (x, y). To determine the contribution of NY to the anomaly, we consider randomising NY\nand fixing NX = nX = x. This generates Y according to the observational distribution P (Y | x),\nso its estimation does not require knowledge of the SCM. On the other hand, randomising NX and\nfixing NY = nY cannot be resolved into any observational term (see also Section 5 in [52]).8\nThe following result generalises this insight:\nProposition A.1. Whenever π is a topological order of the causal DAG, i.e., there are no arrows\nXi → Xj for π(i) &gt; π(j), all contributions C π (j) can be computed from observational conditional\ndistributions.\nThis will allow us to connect our approach to that of Budhathoki et al. [23] in the following sense: if\nour goal is to simply identify a single root cause, then as long as it is \"dominating\" in the sense that it\nhas the largest contribution of any variable regardless of the order chosen, Proposition A.1 says we\ncan identify it without knowing the SCM.\nIt will prove instructive to generalise the notion of the contribution of a single node in (16) to the\ncontribution of a set R ⊆ U \\ S of nodes, given the context S, i.e.,\nP (E|NR = nR , NS = nS )\n.\n(18)\nP (E|NS = nS )\nThis notion becomes rather intuitive after observing that it is given by the sum of the contributions of\nall the elements in R when they are one by one added to the context S:\nPk\nLemma A.2. For any set R ⊆ U \\ S, it holds that C(R|S) := C(j1 |S) + i=2 C(ji |S ∪\n{j1 , . . . , ji−1 }) with R = {j1 , . . . , jk }.\nC(R|S) := log\n\nNext, the following result shows that a set of nodes are unlikely to obtain a high contribution when\nthe noise values are randomly drawn from their usual distributions, i.e., we have the following\nproposition:\nProposition A.3. Whenever all noise variable in some set R are sampled from P (NR ), it holds that\nP (C(R|S) ≥ α) ≤ e−α .\nNote that the proposition allows that the variables Nj not in R are drawn from a different distribution.\nThus, Proposition A.3 states that it is unlikely that a set that only contains non-corrupted nodes has\nhigh contribution.\nNext, we will show how our main results can be recast in terms of bounds on contributions, rather\nthan on p-values.\n8\nThis can be checked by an SCM with two binaries where Y := X ⊕ NY , with unbiased NY , which induces\nthe same distribution as the SCM Y := NY , where X and Y are disconnected and thus X has a contribution of\nzero.\n\n23\n\n\fA.3\n\nBounds on contributions\n\nConsider, for illustration, the setting discussed in subsection 3.1 wherein the causal DAG is X → Y ,\nwe observe (x, y) with anomaly scores S(x), S(y), and we wish to find the root cause of anomaly y.\nUnder the same assumptions as stated there we have the following proposition:\nProposition A.4. Subject to score typicality, the contributions of y and x on the anomaly y satisfy:\nC(x) ≤ S(x)\n\nand\n\nC(y | x) ≥ |S(y) − S(x)|+\n\nProof. Proposition A.1 permits rewriting contributions in terms of observational probabilities, so\nthat, together with score typicality, we have:\nP (τ (Y ) ≥ τ (y) | Y = y, X = x)\nP (τ (Y ) ≥ τ (y) | X = x)\n1\n= log\nP (τ (Y ) ≥ τ (y) | X = x)\n= S(y | x) ≥ |S(y) − S(x)|+ ,\n\nC(y | x) := log\n\nand using C(x) + C(y | x) = S(y) we obtain the bound for C(x).\nWe can now further interpret the conclusions drawn in subsection 3.1, in terms of contributions. For\nexample, suppose we have S(y) ≫ S(x). In the case that X → Y , Proposition A.4 says that y\nmust have a large contribution to the anomaly, while x must have a smaller one. We would therefore\nfavour y as the root cause. Alternatively, if S(x) ≫ S(y), then we cannot conclude that y has a\nlarge contribution, but we would reject the hypothesis that the mechanism generating x worked as\nnormal (from Lemma 3.2), and its contribution may be large. Under the working hypothesis that\nthere is only a single root cause, we would favour x. Following the extensions from the bivariate\ncase in subsections 3.2 and 3.3, we can similarly recast the results in terms of contributions as above.\nNaturally, this does not alter any of the conclusions, but rather demonstrates that our results do not\ndepend strictly on our adopted formalisation of the RCA problem in terms of CBNs, but additionally\nadmits an interpretation in terms of contributions.\n\nB\n\nSample complexity of information-theoretic anomaly score estimation\n\nTo reliably tell whether the IT anomaly score of one anomaly exceeds that of another, we need to\nestimate each score up to an error of at least half their difference. We investigate how many samples\nare required to estimate the scores S(xi ), . . . , S(xn ) up to an error level δ:\nLemma B.1. If we use at least\n\u0012 \u0013\n3eSmax\n2n\nk=\nlog\n(19)\nδ2\nα\nsamples from the ‘normal’ period, the score estimates Ŝ(x1 ), . . . , Ŝ(xn ) using the estimator in\nEquation (5) satisfy |Ŝ(xi ) − S(xi )| &lt; δ for all i ∈ {1, . . . , n} with probability at least 1 − α.\nPk\nProof. Let pi := P (τ (Xi ) ≥ τ (xi )) and estimate p̂i := k1 j=1 1{τ (xji ) ≥ τ (xi )} so that S(xi ) =\n− log pi and Ŝ(xi ) = − log p̂i as in Equations (4) and (5), respectively. |Ŝ(xi ) − S(xi )| &lt; δ is\nequivalent to,\np̂i\n| log p̂i − log pi | &lt; δ =⇒ e−δ &lt;\n&lt; eδ .\n(20)\npi\nRearranging, we have pi (e−δ − 1) &lt; p̂i − pi &lt; pi (eδ − 1), and noting eδ − 1 &gt; 1 − e−δ for all\nδ &gt; 0, we have\n|p̂i − pi | &lt; ϵi := (eδ − 1)pi ,\n(21)\nso that when δ is small we have ϵi ≈ δpi . We can then use the multiplicative form of the Chernoff\nbound for 0 ≤ δ ≤ 1 to say,\n\u0012 2\n\u0013\nδ pi k\nP (|p̂i − pi | ≥ δpi ) ≤ 2 exp −\n.\n(22)\n3\n24\n\n\fNoting that mini pi = mini e−S(xi ) = e− maxi S(xi ) =: e−Smax and applying the union bound,\n!\n\u0012 2 −Smax \u0013\nn\n[\nδ e\nk\nP\n{|p̂i − pi | ≥ δpi } ≤ 2n exp −\n,\n(23)\n3\ni=1\nso that finally,\n\u0012 2 −Smax \u0013\nδ e\nk\n&lt;α\n2n exp −\n3\n\nC\n\nProofs\n\nC.1\n\nProof of Lemma 3.4\n\n=⇒\n\nk&gt;\n\n3eSmax\nlog\nδ2\n\n\u0012\n\n2n\nα\n\n\u0013\n\nSince we assume that S(X) is a continuous variable with density with respect to the Lebesgue\nmeasure, it follows from the properties of IT scores that it is distributed according to the density\np(S(X) = s) = e−s for s ≥ 0. Accordingly, the conditional distribution of S(X), given S(X) ∈\n[sX , S(y)] has the density p(S(X) = s | S(X) ∈ [sX , S(y)]) = e−s /(esX − e−S(y) ). We want to\ncompare averages of the expressions\nP (S(Y ) ≥ S(y)|S(X) = s) versus e−|S(y)−s|+\nover the interval [sX , S(y)]. Averaging the difference of the two expressions with respect to the\nabove-mentioned density yields\nZ S(y) \u0010\n\u0011\nP (S(Y ) ≥ S(y)|S(X) = s) − e−|S(y)−s|+ p(s | S(y) ≥ S(X) ≥ sX )ds\nsX\n\nZ S(y)\n= P (S(Y ) ≥ S(y)|S(y) ≥ S(X) ≥ sX ) −\nsX\n\n≤\n\ne\n\nZ S(y)\n\n−S(y)\n\ne−sX − e−S(y)\n\n−\ns̃X\n\ne\n\n−S(y)\n\ne−s̃X − e−S(y)\n\nds =\n\ne−s\nds\nes−S(y) −s\ne X − e−S(y)\ne−S(y)\n\ne−sX − e−S(x)\n\n(1 − S(y) + sX ) ≤ 0.\n\nThe first inequality holds because P (B|A) ≤ P (B)/P (A) for any two events A, B and the second\nbecause we have assumed sX ≤ S(y) − 1.\nApplying Markov’s inequality, we therefore have\nPX|S(X)∈[sX ,S(y)] [P (S(Y ) ≥ S(y) | S(X)) ≥ c · e−|S(y)−S(X)|+ ] ≤ 1/c.\n(24)\nAs X may in general be multivariate, S will not in general be injective, and so we cannot substitute\nconditioning on a particular value of the score for conditioning on the associated x, which is required\nto give a bound on the conditional score. As such, note that\nZ\nP (S(Y ) ≥ S(y) | S(X) = s) = P (S(Y ) ≥ S(y) | X = x) p(x | S(X) = s) dx,\nso that applying Markov’s inequality for any given s,\nPX|S(X)=s [P (S(Y ) ≥ S(y) | X) ≥ c · P (S(Y ) ≥ S(y) | S(X))] ≤ 1/c.\nAs the inequality holds for all s, we can take the average of the LHS with respect to\np(S(X) = s | S(X) ∈ [sX , S(y)]) to say,\nPX|S(X)∈[sX ,S(y)] [P (S(Y ) ≥ S(y) | X) ≥ c · P (S(Y ) ≥ S(y) | S(X))] ≤ 1/c.\nApplying the union bound to the events in equations 24 and 26, the joint event\nP (S(Y ) ≥ S(y) | S(X)) ≤ c · e−|S(y)−S(X)|+ and\nP (S(Y ) ≥ S(y) | X) ≤ c · P (S(Y ) ≥ S(y) | S(X))\noccurs with probability at least 1 − 2/c, and in such case the following inequality holds:\n\n(25)\n\n(26)\n\nP (S(Y ) ≥ S(y) | X = x) ≤ c2 · e−|S(y)−S(x)|+ .\n(27)\nFinally, noting we can exchange S(Y ) ≥ S(y) for τ (Y ) ≥ τ (y) due to the properties of IT\nscores, and taking the negative logarithm of both sides, for x sampled at random according to\nP (X = x | S(X) ∈ [sX , S(y)]),\nS(y | x) ≥ |S(y) − S(x)|+ − 2 log c,\n(28)\nholds with probability at least 1 − 2/c, as desired.\n25\n\n\fC.2\n\nProof of Lemma 3.5\n\nP (τ (Y ) ≥ τ (y) | X = x) = P (S(Y ) ≥ S(y) | X = x) = P (S(Y ) ≥ S(y) | S(X) = S(x))\n≤ P (S(Y ) ≥ S(y) | S(X) ≥ S(x)) ≤\n\ne−S(y)\nP (S(Y ) ≥ S(y))\n= −S(x) .\nP (S(X) ≥ S(x))\ne\n\nWhere the first equality follows from the definition of IT scores and the second from injectivity. The\nfirst inequality follows from monotonicity, and the second because P (B | A) ≤ P (B)/P (A) for\nany two events A, B. The final equality again follows from the definition of IT scores. Taking the\nnegative logarithm of both sides, and remembering that anomaly scores are non-negative, we prove\nthe lemma.\nC.3\n\nProof of Lemma 3.7\n\nAssume without loss of generality that X1 , . . . , Xn is a topological ordering of the DAG. Then\nS(Xi |X1 , . . . , Xi−1 ) = S(Xi |P Ai ) holds due to the local Markov condition. Since S(Xj |P Aj =\npaj ) has density e−s for all pai , also S(Xi |X1 = x1 , . . . , Xi−1 = xi−1 ) has density e−s for all\nx1 , . . . , xi−1 . Hence, S(Xi |P Ai ) is independent of X1 , . . . , Xi−1 .\nC.4\n\nProof of Lemma 3.8\n\nFrom Lemma 3.7, and the properties of IT scores, if H0j holds then S(Xi | P Ai ) for i ̸= j are\nindependent, standard Exponential random variables. The sum of n − 1 independent, standard\nExponential random variables is Erlang distributed [53] with CDF\nF (x) = 1 − e−x\n\nn−2\nX\nl=0\n\nxl\n,\nl!\n\nand as such, Ssum is Erlang distributed. By the probability integral transform U := F (Ssum ) is\nuniformly distributed on [0, 1], and so by symmetry, so is 1 − U . Again by the probability integral\ntransform, − log(1 − U ) is standard Exponential, so finally noting that S = − log(1 − F (Ssum )),\nwe have the result.\nC.5\n\nProof of Theorem 3.9\n\nThe theorem is a direct result of Lemma 3.7 and Lemma 3.8.\nC.6\n\nProof of Theorem 3.11\nX\nX\nssum :=\nS(xi |pai ) ≥\n|S(xi ) − S(pai )|+ =: ŝsum ,\ni̸=j\n\n(29)\n\ni̸=j\n\nwhere the inequality follows from score typicality of event (x1 , . . . , xn ), and ssum and ŝsum are the\nrealisations of Ssum and Ŝsum , respectively. The theorem then follows directly from Theorem 3.9\nwith Ŝsum in place of Ssum .\nC.7\n\nProof of Theorem 3.12\n\nFrom Lemma 3.7 we have that the conditional anomaly score for the anomaly with the maximum\nscore gap must be at least δmax . From Lemma 3.4, and the properties of IT anomaly scores, the\nconditional anomaly scores are independent and each distributed according to density p(s) = e−s .\nUnder H0max , assume without loss of generality that xn corresponds to the true root cause. Then the\nremaining (n − 1) conditional scores are i.i.d. Exp(1), and\n\u0001\n\u0001n−1\nP S(Xi | PAi ) &lt; δ for all i &lt; n = P (S(Xi | PAi ) &lt; δ)\n= (1 − e−δ )n−1 .\nTherefore, the probability of observing at least one conditional anomaly score of at least δmax among\nthe (n − 1) non-root causes is 1 − (1 − e−δmax )n−1 . This probability upper bounds the probability\nof observing at least one score gap of δmax or greater as score gaps lower bound conditional scores.\n26\n\n\fC.8\n\nProof of Theorem 3.13\n\nThe proof of the theorem is already almost complete, following the argument in the main text.\nAs noted there, H0top-k implies that along the causal path the score of xπ(1) must be higher than\nan ancestral node by at least ∆k . Lemma 3.3 along with the coarsening argument, implies that,\nindividually, the hypothesis that the mechanism generating x worked as expected, where S(x) is\nhigher than the score of an ancestral node by ∆k , can be rejected at level p ≤ e−∆k . Therefore,\nalong the causal path, the probability that the score of any of the (maximum of) n nodes exceeds an\nancestral node by ∆k is at most n · e−∆k , applying the union bound. However, note that we need to\nreapply this argument for each of the chains incident on Xπ(1) in the graph. The number of incident\nchains is at most dmax , and so again applying the union bound, we arrive at the final bound given in\nthe theorem.\nC.9\n\nProof of Proposition A.1\n\nWith the event E as in Eq. 3 and C π (j) := C(j|I π&lt;j ) we have\nP (E|Nπ&lt;j ∪{j} = nπ&lt;j ∪{j} ) i\nP (E|Xπ&lt;j ∪{j} = xπ&lt;j ∪{j} )\n= log\nP (E|Nπ&lt;j = nπ&lt;j )\nP (E|Xπ&lt;j = xπ&lt;j )\nP\n(E|do(X\n=\nx\n)\nii\nπ&lt;j ∪{j}\nπ&lt;j ∪{j}\n.\n= log\nP (E|do(Xπ&lt;j = xπ&lt;j ))\n\nC π (j) = log\n\n(30)\n\n(i) and (ii) are seen as follows:\nP (E|NI ) = P (E|XI )) = P (E|do(XI )).\n(31)\nThe first equality in Eq. 31 follows from Xn ⊥ XI |NI and because XI is a function of NI . The\nsecond one follows because conditioning on all ancestors blocks all backdoor paths. Note that since\nπ is a topological ordering of the nodes, all π &lt; j are ancestors of j.\nC.10\n\nProof of Lemma A.2\n\nDenote q(S) = P (E | NS = nS ) then we have that\nC(R|S) = log q(S ∪ R) − log q(S)\n= (log q(S ∪ R) − log q(S ∪ R \\ {jk })) + . . .\n(log q(S ∪ R \\ {jk }) − log q(S ∪ R \\ {jk , jk−1 })) + . . .\n+ (log q(S ∪ {j1 }) − log q(S)) = C(j1 |S) +\n\nk\nX\n\nC(ji |S ∪ {j1 , . . . , ji−1 }).\n\ni=2\n\nC.11\n\nProof of Proposition A.3\n\nBy definition, we have that\nC(R|S) = log\n\nP (E|NR = nR , NS = nS )\n,\nP (E|NS = nS )\n\nand we use P (E|nS ) instead of P (E|NS = nS ) when it is clear from the context.\nFurther, C(R|S) is actually a function of nR and nS . For fixed nS , define the set B :=\n{nR |C(R|S) ≥ α}. It can equivalently be described by\nB = {nR | log\nWe thus have\n\nP (E|nR , nS )\n≥ α} = {nR |P (E|nR , nS ) ≥ P (E|nS ) · eα }.\nP (E|nS )\nP (E|nR ∈ B, nS ) ≥ P (E|nS ) · eα .\n\nHence,\nP (E, nR ∈ B|nS )\n≥ P (E|nS ) · eα .\nP (nR ∈ B|nS )\n27\n\n\fUsing\nP (E|nS ) ≥ P (E, nR ∈ B|nS )\nwe obtain\n\nD\n\nP (nR ∈ B|nS ) ≤ e−α .\n\nVisualising polytrees\nX2\n\nX1\n\nX1\n\nX2\n\nX3\n\nX3\n\nX4\n\nX4\n\n(a) General DAG\n\n(b) Polytree\n\nFigure 2: (a) A general DAG may contain undirected cycles, as between X1 − X2 − X3 − X1 . (b) A\npolytree cannot contain undirected cycles so could not have an edge between X1 and X2 without\nfirst removing another.\n\nE\n\nIs increase of scores along causal pathways rare?\n\nLi et al. [46] describe a condition under which the z 2 -score of the effect Xj can be larger than the\nz 2 -score from the cause Xi in a DAG with linear structural equations. Their Theorem 2.1 states\nthat this happens (in the limit of large perturbations, see the details further below) if and only if the\nvariances σi2 , σj2 of Xi , Xj satisfy\n2\nσj2 &lt; αi→j\nσi2 ,\n(32)\n2\nwhere αi→j\ndenotes the structural coefficient for the effect from Xi to Xj (which consists of the\nsum over the product of all direct influences along the paths from i to j). Although our results\nrefer to IT scores instead of z 2 -scores, it is at the same time an example for increasing IT scores\nsince the z 2 -score can be turned into an IT score by a monotonic recalibration. It is therefore\nimportant that we understand this result if we are to understand if we expect SCORE ORDERING\nto be applicable in cases beyond polytrees. For an intuitive understanding we should first note that\n(32) describes the regime of strong negative confounding. This is because an unconfounded causal\n2\ninfluence Xj = αi→j Xi + Ej with independent error term Ej results in σj2 = αi→j\nσi2 + Var(Ej ).\nWe are therefore in the regime where the noise is so strongly negatively correlated with the cause that\nit decreases the variance instead of increasing it.\n\nLet us now discuss whether this phenomenon is rare or not when Xi and Xj are variables in a larger\nnetwork (note that the following working is strongly inspired by [46]). To this end let X1 , . . . , Xn be\ncausally ordered with structural equations\nX = AX + N,\n\n(33)\n\nwhere A is a strictly lower triangular matrix and N is the vector of independent noise variables. To\nsimplify notation, let all variables have zero mean.\nThe covariance matrix ΣXX can be derived by well-known algebra:\nΣXX = (I − A)−1 ΣNN (I − A)−T ,\nwhere ΣNN denotes the covariance matrix of the noise, which is diagonal by assumption. Defining\n1/2\n\nL := (I − A)−1 ΣNN ,\nwe obtain the unique Cholesky decomposition of ΣXX since ΣXX = LLT , where L is lower diagonal\n(with non-zero diagonal by construction if we assume non-zero noise variance). The matrix L has\n28\n\n\finteresting interpretations:\n(i) L generates the observations from independent noise variables as sources, formally X = LÑ,\n−1/2\nwhere Ñ := ΣNN N is the standardized version of the noise from the original structural equation\n(33).\nP\n(ii) The squared row sums of L thus show the variance of the observed variables, that is, j L2ij = σi2 .\nHenceforth, we will assume it to be 1 without loss of generality.\n(iii) The ith column of L describes how shifting the noise ñi to ñi + 1 changes the observations\nx, that is, the observation x = Lñ is changed to x + Lei , where ei denotes the ith canonical basis\nvector.\nSince all the Xj are standardized and centered, their z 2 score is simply their squared value x2j . If\nwe shift the noise ñi by a large value, the z 2 -scores x2i of the root cause Xi versus the score x2j of\nthe effect Xj satisfies the ratio L2ii /L2ij in the limit of infinitely strong perturbation. The question\nof whether scores of effects are typically smaller than scores of their root causes now boils down to\nthe following question: Given a lower triangular matrix L whose row vectors have norm 1. Is L2ij\n“typically” smaller than L2ii ? We will discuss this question for the assumption that n is large and\nthat ρ := mini {L2ii } is much larger than 1/n. This assumption simply formalizes the idea that no\nXi is close to be a deterministic function of its ancestors. It may seem strong, but we could easily\nextend the below discussion to the case where only most of the variables satisfy this condition.9 . We\nconclude:\nX\nL2ij ≤ 1 − ρ.\n1≤i&lt;j\n\nHence, the number k of i with i &lt; j for which L2ii &lt; L2ij is at most (1 − ρ)/ρ. Using ρ ≫ 1/n we\nconclude k ≪ n. Thus, only for a small fraction k/n of root causes i, the score L2ii of the root cause\nis smaller than the score L2ij of the downstream effect j. In this sense, we may consider effects with\nlarger score than the root cause as a rare phenomenon, even for fixed causal structural equations, not\nonly as a statistical statement over multiple randomly generated structures.\n\nF\n\nExperimental details and further experiments\n\nF.1\n\nExperimental details\n\nTo run Circa and Counterfactual, we used the implementations available in [27] using default\nparameters. We wrote our own implementation of Traversal (with anomaly score threshold of\n3), and our own algorithms, SMOOTH TRAVERSAL AND SCORE ORDERING. The code for\nCholesky is available at [46], however, there are in fact three different algorithms. For all experiments\ninvolving real-world data (see subsection F.6 below) we applied their \"main\" algorithm, using default\nparameters. For the synthetic experiments, we had to opt for the \"highdim\" version as the alternatives\nhad already become prohibitively slow for the graph sizes considered. To generate an SCM for the\nexperiments in Section. 4 (see Fig. 1), we first uniformly sample between 10 and 20 root nodes (20%\nto 40% of the total nodes of the graph) and uniformly assign to each either a standard Gaussian,\nuniform, or mixture of Gaussians as its noise distribution. As a second step, we recursively sample\nnon-root nodes. Non-root nodes need not be sink nodes. The number of parent nodes that each\nnon-root node is conditioned on is randomly chosen following a distribution that assigns a lower\nprobability to a higher number of parents. In total, the causal graph is composed of 50 nodes. The\nparametric forms of the structural equations are randomly assigned to be either a simple feed-forward\nneural network with a probability of 0.8 (to account for non-linear models) and a linear model. The\nfeed-forward neural network has three layers (input layer, hidden layer, and output layer) where the\nhidden layer has a number of nodes chosen randomly between 2 and 100. All the parameters of the\nneural network are sampled from a uniform distribution between -5 and 5. For the linear model, we\nsample the coefficients of the linear model from a uniform distribution between -1 and 1 and set the\nintercept to 0. In both cases, we use additive Gaussian noise as the relation between the noise and the\nvariables.\n9\nNote that simulated data can easily violate this assumption since many simulation schemes result in artifacts\nwhere variables that are late in the causal order can be almost perfectly reconstructed from others, a phenomenon\ncalled R2 -sortability in [54]\n\n29\n\n\fTo generate data for the non-anomalous regime, we sample the noise of each of the variables and\npropagate the noise forward using the previously sampled structural equations. As mentioned in the\nmain text, to produce anomalous data, we choose a root cause at random from the list of all nodes\nand a target node from the set of its descendants (including itself). Then we sample the noise of\nall variables and modify the noise of the root cause by adding x-times standard deviations (of its\nmarginal distribution), where x ∈ {2, 2.1, 2.2, . . . , 3}, and propagate the modified noise through the\nSCM to obtain a realisation of each variable. We repeat this process 100 times for each x value added\nto the standard deviation and consider the algorithm successful if its result coincides with the chosen\nroot cause.\nComputing Infrastructure. All the experiments were run on a MacBook Pro with 16GB of memory\nwith an Apple M1 processor.\n102\n\n104\n\n102\n101\n\n103\n\n10\n\n−2\n\n10−3\n\n10\n\n102\n\nRuntime (seconds)\n\n10\n\n−1\n\nRuntime (seconds)\n\nRuntime (seconds)\n\n101\n100\n\n0\n\n10−1\n10−2\n\n101\n100\n10−1\n\n10−3\n\n10−2\n\n10−4\nSCORE Cholesky\nORDERING\n\nTraversal SMOOTH CounterTRAVERSAL factual\n\nCirca\n\nSCORE Cholesky\nORDERING\n\nTraversal SMOOTH CounterTRAVERSAL factual\n\nCirca\n\nSCORE Cholesky\nORDERING\n\nTraversal SMOOTH CounterTRAVERSAL factual\n\nCirca\n\nFigure 3: Runtimes of the algorithms for the experiment in Fig. 1; that is 50 nodes (left), an SCM\nwith 100 nodes (center) and one with 1k nodes (right) (refer to the generation process above). The\nboxplots are produced using the default implementation in Matplotlib [55]. Note the log scale in the\nvertical axis.\nF.2\n\nFurther experiments varying root cause anomaly strength\n\nMethods which require multiple samples from the anomalous regime Most RCA approaches\nrequire multiple samples from the anomalous regime. For completeness, we extended the evaluation\nin Figure 1 to include two such methods: RCD [29] and ε-Diagnosis [11], as neither require the\ncausal graph (see Figure 4). For both methods we made use of the implementations available in the\nPyRCA library [56] using default parameters. While all other methods were provided with only a\nsingle sample from the anomalous regime, both RCD and ε-Diagnosis were provided with 100, and so\nwe believe that direct comparison is not appropriate. The experiment was otherwise identical to that\ndescribed above in Appendix F. Nonetheless, we see that while RCD has very strong performance,\nwith a top-1 recall close to one at all anomaly strengths, ε-Diagnosis is the opposite, with a recall close\nto zero for all anomaly strengths. It is worth noting that the original authors of the RCD method [10]\nshow in their supplemental material that performance is very poor in the low-sample regime (&lt;100\nanomalous samples, see Figure 2 therein). We conclude that RCD could be preferable in scenarios\nwhere one has access to many samples in the anomalous period, but that in the low-sample regime\nSCORE ORDERING is preferable.\nHow do the algorithms perform when the structural causal model is linear? To test whether\nthe performance of Circa and Cholesky in Fig. 1 was poor compared to the other algorithms due to\nthe assumption of linearity, we reproduced the experiment as detailed in Section 4 and Appendix F\nabove, with the only change being that now all structural equations were sampled to be linear. Indeed,\nFig. 5 shows that Circa now becomes one of the best performing algorithms, alongside SMOOTH\nTRAVERSAL, Traversal, and Counterfactual. Similarly, although Cholesky remains below the top\nperformers, its performance is notably improved at all anomaly strengths, even now outperforming\nSCORE ORDERING.\nHow do the algorithms perform when the causal graph is a polytree? In all synthetic experiments, we placed no restrictions on the structure of the causal graph other than that it be a DAG.\nOur main theorems are stated, however, for polytrees. We therefore repeated the experiments from\nFigure 1 with the single change constraining the simulated causal graphs to be polytrees (see Figure 6).\nUnsurprisingly, methods which do not make use of the causal graph have unchanged performance,\nand and those that do are either unchanged or show improvement, including SMOOTH TRAVERSAL.\n30\n\n\fSCORE ORDERING\nTraversal\nCholesky\nSMOOTH TRAVERSAL\nCounterfactual\nCirca\nrcd\nepsilon-diagnosis\n\nPct. correctly identified RC\n\n1.0\n\n0.8\n\n0.6\n\n0.4\n\n0.2\n\n0.0\n2.0\n\n2.2\n\n2.4\n\n2.6\n\n2.8\n\n3.0\n\nAnomaly strength (Nr. standard deviations)\n\nFigure 4: True positive rate for identifying the root cause against anomaly strength injected at the root\ncause, including RCD and ε-Diagnosis. Note that both RCD and ε-Diagnosis are given 100 samples\nfrom the anomalous period, while all other methods are given only one.\n\nPct. correctly identified RC\n\n1.0\n\n0.8\n\n0.6\n\n0.4\n\nSCORE ORDERING\nTraversal\nCholesky\n\n0.2\n\n0.0\n\n2.0\n\n2.2\n\n2.4\n\nSMOOTH TRAVERSAL\nCounterfactual\nCirca\n2.6\n\n2.8\n\n3.0\n\nAnomaly strength (Nr. standard deviations)\n\nFigure 5: True positive rate for identifying the root cause against anomaly strength injected at the\nroot cause, when all structural equations are linear.\n\nInterestingly, Circa shows a marked improvement in performance despite not depending on the\npolytree assumption.\nF.3\n\nFurther experiments by varying the number of nodes in the graph\n\nWe also run experiments by fixing the number of standard deviations added (x in Section. 4) to 3 and\nvarying the number of nodes in the SCM. Here, we have chosen the numbers {20, 40, 60, 80, 100}.\nWe observe in Fig. 7 that the performance for Traversal, SMOOTH TRAVERSAL, and Counterfactual\ndoes not change much for different graph sizes, whereas the performance of SCORE ORDERING,\nCholesky and Circa decreases slightly for larger graph sizes.\nF.4\n\nHow does performance change when the given causal graph is misspecified\n\nTo mimic the scenario where one has access to an imperfect causal graph, we investigate how robust\nthe performance each of the algorithms (which require a causal graph) is to its misspecification (8).\nThe data were generated as described at the beginning of Appendix F, but with a fixed anomaly\n31\n\n\fPct. correctly identified RC\n\n1.0\n0.8\n0.6\n0.4\nSCORE ORDERING\nTraversal\nCholesky\nSMOOTH TRAVERSAL\n\n0.2\n\nCounterfactual\nCirca\nrcd\nepsilon diagnosis\n\n0.0\n2.0\n\n2.2\n\n2.4\n\n2.6\n\n2.8\n\n3.0\n\nAnomaly strength (Nr. standard deviations)\nFigure 6: True positive rate for identifying the root cause against anomaly strength injected at the root\ncause, when all causal graphs are polytrees. Note that RCD and ε-Diagnosis are given 100 samples\nfrom the anomalous period, while all other algorithms are given only one.\n\nPct. correctly identified RC\n\n1.0\n0.9\n0.8\n0.7\n\nSCORE ORDERING\nTraversal\nCholesky\n\n0.6\n\nSMOOTH TRAVERSAL\nCounterfactual\nCirca\n\n0.5\n0.4\n0.3\n20\n\n30\n\n40\n\n50\n\n60\n\n70\n\n80\n\n90\n\n100\n\nNumber of nodes\n\nFigure 7: True positive rate of the compared algorithms in identifying the root cause with increasing\nnumbers of nodes.\n\nstrength of x = 3.0, all structural equations linear, and the graph provided to each algorithm randomly\naltered to introduce mismatches with the true causal graph.\nStarting from the sampled, true causal graph, random edge additions, removals and reversals were\nintroduced according to a desired target Structural Hamming Distance [57, 58] from the true graph.\nTo control for the density of the graph, an equal number of edges are randomly added as removed. In\nparticular, for true causal graph G = (V, E), the total number of edges added and removed is sampled\nuniformly at random from nadd/rem = [SHD(G, Galt ) − |E|, SHD(G, Galt )], with the number of\nedges flipped nflip = SHD − 2 · nadd/rem . Of the edges in G, nadd/rem are randomly selected\nfor removal, and an equal number of ‘missing’ edges are selected for addition. Of the remaining\n‘un-removed’ edges in G, nflip are reversed. If the resulting graph is not a DAG, the whole process is\nrepeated until it is. The procedure for generating a randomly misspecified graph given a ground truth\nmatches the \"edge domain expert\" procedure described in [59].\nWe chose to sample all linear structural equations as the relationship between top-1 recall and SHD\nwas the same as when sampling non-linear structural equations for SMOOTH TRAVERSAL, Traversal\nand Counterfactual, but was more noteworthy for Circa. The reason being that the performance for\n32\n\n\fCirca is already so low for non-linear structural equations, that a considerable drop in performance\nwas not easily perceptible.\nWe observe that all four evaluated algorithms show a considerable drop in performance as the SHD\nof the given graph from the true causal graph increased, with the most pronounced drop occurring\nfor Circa. However, even when half of all edges are removed/flipped or added elsewhere in the\ngraph (SHD/|E| = 1), SMOOTH TRAVERSAL, Traversal and Counterfactual still achieve a top-1\nrecall of approximately 0.6 to 0.7, showing that all three algorithms are relatively robust to graph\nmisspecification.\n1.0\n\nTop-1 recall\n\n0.9\n0.8\n0.7\n0.6\n0.5\n\nTraversal\nSMOOTH TRAVERSAL\n\n0.4\n0.0\n\n0.2\n\n0.4\n\nCirca\nCounterfactual\n0.6\n\n0.8\n\n1.0\n\nSHD/(number of edges)\n\nFigure 8: Top-1 recall for identifying the root cause using a graph with an increasing SHD (average\nper edge) from the true causal graph.\nF.5\n\nHow do the algorithms compare in terms of their practicality?\n\nIt is important to keep in mind when interpreting the performances of each of the algorithms their\ndifferent input requirements. Counterfactual either needs to be provided the SCM or must attempt to\nlearn it from data. Traversal, Circa and SMOOTH TRAVERSAL require the causal graph as input\nbut with differing assumptions on its structure. Traversal makes no assumptions, Circa assumes the\nSCM is linear and attempts to learn it from data, given the graph, and SMOOTH TRAVERSAL has\nguarantees only for the case the graph is a polytree (though it may be applied even if this assumption\nis not met). Traversal, however, requires an additional tuning parameter: the anomaly score threshold,\nwhile SMOOTH TRAVERSAL does not have any such free parameter. Both SCORE ORDERING\nand Cholesky do not even require the causal graph, however, Cholesky assumes the underlying SCM is\nlinear. In synthetic data experiments, SCORE ORDERING consistently outperformed Cholesky other\nthan when the SCM was restricted to be linear (see Fig. 5 above). Cholesky also scales more poorly\nin terms of run-time (see Fig. 3) due to the need to estimate the covariance matrix. In comparison,\nSCORE ORDERING makes very weak demands on the input, is efficient, and consistently performs\nwell across experiments.\nF.6\n\nPetShop dataset\n\nHardt et al. [27] introduce a dataset from cloud computing, specifically designed for evaluating root\ncause analyses in microservice-based applications. The dataset is collected from a microservice\napplication and includes 68 injected performance issues, which increase latency and reduce availability\nthroughout the system. Latency and availability are so-called ‘metrics’ of the microservice application,\nand measure the length of time it takes for a request to the service to be processed, and the fraction\nof the time a request returns an error, respectively. The dataset also encompasses three traffic\nscenarios: low, high, and temporal. These correspond to the amount and periodicity of user traffic\nto the application. This presents a challenging task due to high missingness, low sample sizes, and\nnear-constant variables. Furthermore, the ground truth causal graph is only partially known, as we\nmust treat the edge-inverted call graph as a proxy for the causal graph.\n33\n\n\fIn addition to the approaches evaluated by Hardt et al. (see [27] for more details), which we have\nreproduced below, we evaluated our algorithms in both top-1 recall (Table. 1) and top-3 recall\n(Table. 2). In addition, we included, as an additional baseline, the Traversal algorithm as described\nin Section 4. This is added as although the evaluation already includes a ‘Traversal’ algorithm\nimplemented by Hardt et al., here called ‘petshop Traversal’, their algorithm does not match the\nstandard approach as described in [9, 24, 25]. Instead, ‘petshop Traversal’ has been designed for use\non the PetShop dataset, takes into account particular aspects of that data, and contrary to standard\ntraversal algorithms, scores potential root causes according to anomalousness of whole paths of\nnodes from root cause to target node. ‘Petshop Traversal’ should not, therefore, be treated as an\n‘out-of-the-box’ baseline.\nWe observe that SMOOTH TRAVERSAL and SCORE ORDERING perform very well in top-1 and\ntop-3 recall, often being the best performing algorithms, and clearly outperforming simple Traversal\nand Cholesky. However, while SMOOTH TRAVERSAL always matches or exceeds the performance\nof simple Traversal in top-1 recall, on latency issues it nonetheless tends to perform relatively poorly\ncompared to SCORE ORDERING.\n\nTable 1: Top-1∗ recall, with ties. ∗ Multiple anomalies can receive the same, highest, anomaly score.\nThe root cause being in the top-1 means that it is among the variables receiving the highest score.\ngraph given\ntraffic\nscenario\n\nmetric\n\nlow\nlow\nhigh\nhigh\ntemporal\ntemporal\n\nlatency\navailability\nlatency\navailability\nlatency\navailability\n\nthis paper\n\ngraph not given\n\npetshop\nTraversal\n\nCirca\n\ncounterfactual\n\nϵ-diagnosis\n\nrcd\n\ncorrelation\n\nTraversal\n\nCholesky\n\nSCORE ORDERING\n\nSMOOTH TRAVERSAL\n\n0.57\n0.50\n0.57\n0.33\n1.00\n0.38\n\n0.36\n0.42\n0.50\n0.00\n0.75\n0.38\n\n0.36\n0.00\n0.57\n0.00\n0.38\n0.00\n\n0.00\n0.00\n0.00\n0.00\n0.12\n0.00\n\n0.07\n0.58\n0.00\n0.00\n0.25\n0.50\n\n0.43\n0.75\n0.64\n0.83\n0.62\n0.62\n\n0.14\n0.42\n0.14\n0.33\n0.25\n0.25\n\n0.29\n0.00\n0.14\n0.00\n0.50\n0.00\n\n1.00\n0.75\n1.00\n1.00\n0.75\n1.00\n\n0.14\n0.75\n0.14\n1.00\n0.25\n1.00\n\nTable 2: Top-3∗ recall, with ties. ∗ Multiple anomalies can receive the same, highest, anomaly score.\nThe root cause being in the top-3 means that it is among the variables ranked in the top three including\nall variables tied at the top.\ngraph given\ntraffic\nscenario\n\nmetric\n\nlow\nlow\nhigh\nhigh\ntemporal\ntemporal\n\nlatency\navailability\nlatency\navailability\nlatency\navailability\n\nthis paper\n\ngraph not given\n\npetshop\nTraversal\n\nCirca\n\ncounterfactual\n\nϵ-diagnosis\n\nrcd\n\ncorrelation\n\nTraversal\n\nCholesky\n\nSCORE ORDERING\n\nSMOOTH TRAVERSAL\n\n0.57\n1.00\n0.79\n1.00\n1.00\n1.00\n\n0.86\n1.00\n1.00\n0.00\n1.00\n1.00\n\n0.71\n0.42\n0.86\n0.00\n0.50\n0.25\n\n0.00\n0.00\n0.00\n0.33\n0.12\n1.00\n\n0.21\n0.75\n0.07\n0.00\n0.75\n0.12\n\n0.57\n0.92\n0.79\n0.92\n0.75\n0.75\n\n0.14\n0.50\n0.14\n0.33\n0.25\n0.25\n\n0.57\n0.00\n0.57\n0.00\n0.63\n0.00\n\n1.00\n1.00\n1.00\n1.00\n1.00\n1.00\n\n0.86\n1.00\n0.93\n1.00\n0.75\n1.00\n\nNote, however, the caveat that owing to the small sample size in the normal period in the PetShop\ndataset, it is frequently the case that multiple anomalies receive the same highest IT anomaly score\n(see Table 3 for numbers and proportions of nodes with tied scores in eah traffic scenario). In the\nmost severe cases there can be as many as 20 nodes tied with the maximum score (in the high traffic\nscenario), but it is typically fewer than 10. The multiplicity of highest scores is due to the fact that for\nthe issue at hand all these metrics were more extreme than ever sampled in the normal period. In\nthis case, the root cause being in the top-1 means that it is among the variables receiving the highest\nscore. This problem should become less severe for datasets where anomaly scorers are trained on\na longer history. Since root cause analysis without any graphical information is a notoriously hard\nproblem, returning short lists of potential root causes, even if they contain 10 or more candidates, can\nstill result in a drastic reduction of the search space, and so is of vital use in real applications.\n34\n\n\fTable 3: Average number and proportion of nodes in each traffic scenario and metric with a tied\nmarginal anomaly score\nTraffic scenario\nMetric\nAverage number Average proportion\nhigh traffic\nhigh traffic\nlow traffic\nlow traffic\ntemporal traffic1\ntemporal traffic1\ntemporal traffic2\ntemporal traffic2\n\nLatency\nAvailability\nLatency\nAvailability\nLatency\nAvailability\nLatency\nAvailability\n\n18.26\n16.46\n9.96\n6.54\n5.75\n7.00\n5.75\n7.12\n\n41.50%\n37.41%\n23.72%\n15.57%\n14.02%\n17.07%\n14.02%\n17.38%\n\nWe, nonetheless, also report the top-1 (Table. 4) and top-3 (Table. 5) recall after randomly selecting\namong the nodes tied with the highest anomaly score. As expected, we observe an approx. 10x\ndecrease in top-1 recall for Traversal, SCORE ORDERING and SMOOTH TRAVERSAL, corresponding to selecting at random from among the approx. 10 candidate root causes with tied highest\nscores. Similar decreases are present in top-3 recalls for Traversal and SCORE ORDERING whenever the true root cause is among those with the tied highest score. Note, however, that SMOOTH\nTRAVERSAL generally still has high top-3 recall even after random selection of the top-1 node,\noutperforming both Traversal, SCORE ORDERING and Cholesky in all but one evaluation. Note that\nthe performance of Cholesky does not considerably drop after random selection of ties, as variables\nrarely receive the same score.\nTable 4: Top-1 recall, with random selection among ties.\nthis paper\ntraffic\nscenario\n\nmetric\n\nlow\nlow\nhigh\nhigh\ntemporal\ntemporal\n\nlatency\navailability\nlatency\navailability\nlatency\navailability\n\nTraversal\n\nCholesky\n\nSCORE ORDERING\n\nSMOOTH TRAVERSAL\n\n0.02\n0.06\n0.01\n0.03\n0.04\n0.04\n\n0.29\n0.00\n0.14\n0.00\n0.50\n0.00\n\n0.10\n0.10\n0.06\n0.06\n0.10\n0.13\n\n0.02\n0.10\n0.01\n0.09\n0.04\n0.14\n\nTable 5: Top-3 recall, with random selection among ties\nthis paper\ntraffic\nscenario\n\nmetric\n\nlow\nlow\nhigh\nhigh\ntemporal\ntemporal\n\nlatency\navailability\nlatency\navailability\nlatency\navailability\n\nF.7\n\nTraversal\n\nCholesky\n\nSCORE ORDERING\n\nSMOOTH TRAVERSAL\n\n0.02\n0.10\n0.01\n0.03\n0.04\n0.04\n\n0.57\n0.00\n0.50\n0.00\n0.63\n0.00\n\n0.10\n0.31\n0.06\n0.06\n0.18\n0.13\n\n0.73\n0.31\n0.80\n0.09\n0.54\n0.14\n\nSock-shop dataset\n\nSimilar to the PetShop dataset described above, Pham et al. [26] introduces another dataset from\ncloud computing for evaluating root cause analyses. The dataset includes 125 injected performance\nissues encompassing five types of common faults: CPU hog - ‘cpu’, memory leak - ‘mem’, disk IO\nstress - ‘disk’, network delay - ‘delay’, and packet loss - ‘loss’. We again used the edge-inverted call\ngraph for the Sock-shop application as a proxy for the causal graph. We evaluated the performance\n35\n\n\fof our algorithms in top-1 (Table 6) and top-3 (Table 7) recall. It is important to note that while for\nmost algorithms we provided only a single anomalous sample (the first sample from the anomalous\nperiod) for RCD and ϵ-Diagnosis we provided all 361 anomaly samples and so direct comparison is\nnot recommended: both algorithms were included rather for completeness of evaluation.\nWe observe that on three out of five issue types (delay, disk and loss), SCORE ORDERING is the\ntop performing approach for top-1 and top-3 recall. In each instance, SMOOTH TRAVERSAL\nalso performed competitively. For issue types cpu and mem, however, both SCORE ORDERING\nand SMOOTH TRAVERSAL performed poorly, although performance was comparable among\nall algorithms which were provided with only a single anomalous sample. Given both RCD and\nϵ-Diagnosis performed considerably better for both issues, this would suggest that the effect of the\nfault was not easily discernible from only a single sample in the anomaly period.\nAs for PetShop, we also report the top-1 (Table 8) and top-3 (Table 9) recall after randomly selecting among nodes with tied ranks. Here we observe that although the performance of SMOOTH\nTRAVERSAL is competitive for delay, disk and loss issues, both SCORE ORDERING and SMOOTH\nTRAVERSAL are outperformed by Circa and/or Cholesky. As both algorithms assume linear causal\nmodels, and that both algorithms struggled in non-linear settings in our simulation studies (see\nFigure 1), this may suggest that the causal relationships in Sock-shop are well modelled by linear\nrelationships. As before, for cpu and mem issues, while all methods which use only a single anomaly\nsample perform very poorly, RCD performs well.\n\nTable 6: Top-1∗ recall, with ties. ∗ Multiple anomalies can receive the same, highest, anomaly score.\nThe root cause being in the top-1 means that it is among the variables receiving the highest score.\n†\nThese methods were provided with all samples from the anomaly period, whereas all else were\ngiven only one.\ncpu delay disk loss mem\nSCORE ORDERING\nSMOOTH TRAVERSAL\nCholesky\nCirca\nCounterfactual\nTraversal\nrcd†\nepsilon diagnosis†\n\n0.08\n0.00\n0.04\n0.04\n0.04\n0.04\n0.88\n0.24\n\n0.80\n0.72\n0.56\n0.52\n0.28\n0.80\n0.52\n0.08\n\n0.84\n0.76\n0.48\n0.68\n0.00\n0.76\n0.52\n0.16\n\n0.72\n0.60\n0.40\n0.64\n0.12\n0.72\n0.44\n0.20\n\n0.08\n0.00\n0.12\n0.16\n0.04\n0.12\n0.36\n0.00\n\nTable 7: Top-3∗ recall, with ties. ∗ Multiple anomalies can receive the same, highest, anomaly score.\nThe root cause being in the top-3 means that it is among the variables ranked in the top three, including\ntied ranks. † These methods were provided with all samples from the anomaly period, whereas all\nelse were given only one.\ncpu delay disk loss mem\nSCORE ORDERING\nSMOOTH TRAVERSAL\nCholesky\nCirca\nCounterfactual\nTraversal\nrcd†\nepsilon diagnosis†\n\n0.24\n0.12\n0.16\n0.28\n0.24\n0.04\n1.00\n0.56\n\n36\n\n0.92\n0.80\n0.88\n0.72\n0.76\n0.80\n0.52\n0.52\n\n0.92\n0.84\n0.88\n0.80\n0.52\n0.76\n0.56\n0.28\n\n0.88\n0.72\n0.84\n0.80\n0.64\n0.72\n0.44\n0.48\n\n0.16\n0.12\n0.24\n0.28\n0.40\n0.12\n0.52\n0.00\n\n\fTable 8: Top-1 recall, with random selection among ties. † These methods were provided with all\nsamples from the anomaly period, whereas all else were given only one.\ncpu delay disk loss mem\nSCORE ORDERING\nSMOOTH TRAVERSAL\nCholesky\nCirca\nCounterfactual\nTraversal\nrcd†\nepsilon diagnosis†\n\n0.08\n0.00\n0.04\n0.04\n0.04\n0.02\n0.88\n0.24\n\n0.24\n0.49\n0.56\n0.52\n0.28\n0.41\n0.56\n0.08\n\n0.29\n0.50\n0.48\n0.68\n0.00\n0.37\n0.48\n0.16\n\n0.26\n0.47\n0.40\n0.64\n0.12\n0.47\n0.40\n0.20\n\n0.04\n0.00\n0.12\n0.16\n0.00\n0.02\n0.36\n0.00\n\nTable 9: Top-3 recall, with random selection among ties. † These methods were provided with all\nsamples from the anomaly period, whereas all else were given only one.\ncpu delay disk loss mem\nSCORE ORDERING\nSMOOTH TRAVERSAL\nCholesky\nCirca\nCounterfactual\nTraversal\nrcd†\nepsilon diagnosis†\n\nF.8\n\n0.24\n0.12\n0.16\n0.28\n0.24\n0.04\n1.00\n0.56\n\n0.67\n0.76\n0.88\n0.72\n0.80\n0.79\n0.56\n0.52\n\n0.70\n0.83\n0.92\n0.80\n0.48\n0.75\n0.56\n0.28\n\n0.68\n0.72\n0.84\n0.80\n0.64\n0.72\n0.44\n0.48\n\n0.14\n0.04\n0.24\n0.28\n0.28\n0.07\n0.48\n0.00\n\nProRCA\n\nTo provide evaluations of the algorithms in a semi-synthetic setting, we used the ProRCA package,\nintroduced in [48]. ProRCA consists of a hand-crafted model of a retail service, with a known causal\ngraph, allowing synthesis of data from real-world business scenarios, into which different types of\nanomalies can be introduced.\nThere are five types of anomalies that can be injected in the process, affecting different variables.\nWe synthesised data following the introduction of four of these anomaly types, as listed in the first\ncolumn in Table 10, performing 100 replicates of each. We excluded the ‘COGs’ anomaly type, which\nintroduces an anomaly at the variable ‘UNIT_COST’, as for a range of strengths of the anomaly,\nwe were unable to produce changes in the data that were statistically distinct from those in the\nnon-anomalous regime.\nWe removed from consideration variables in the graph that had plain text values, such as\n‘PROMO_CODE’ as these are unsuitable for RCA, but doing so introduced no unmeasured confounding and so does not affect the analysis. For each anomaly, we considered ‘PROFIT’ to be\nthe target variable. ‘PROFIT’ is not a leaf node in the causal graph and the length of the paths\nbetween the root cause and the target variable varies between two and three. We applied Circa,\nCounterfactual, Traversal, and SMOOTH TRAVERSAL algorithms for which we are able to provide\n(the marginalised) causal graph, and the Cholesky algorithm and SCORE ORDERING, which only\nrequires data from the observational and the anomalous regime. Only one anomalous sample was\nprovided in each case. The resulting Top-1 recall of the algorithms is reported in Table 10.\nThe results are mixed. SCORE ORDERING performs well for two types of anomaly. In both cases,\nthe methods that require the graph also perform well. However, requiring the graph for the RCA\nalgorithm might be constraining in most real-world scenarios. There are two types of anomaly\nwhere SCORE ORDERING does not perform well: In ‘ExcessiveDiscount’ only the Counterfactual\nmethod provides a Top-1 recall above 30%, even for those methods requiring the graph as input. In\n‘ReturnSurge’, the Cholesky method performs well (66%) and those methods for which the graph\n37\n\n\fTable 10: Top-1 recall, with random selection among ties.\ngraph given\n\nthis paper\n\ngraph not given\n\nType of anomaly\n\nCirca\n\nCounterfactual\n\nTraversal\n\nCholesky\n\nSCORE\nORDERING\n\nSMOOTH\nTRAVERSAL\n\nExcessiveDiscount\nFulfillmentSpike\nReturnSurge\nShippingDisruption\n\n0.04\n0.96\n1.00\n0.94\n\n0.89\n0.98\n0.88\n0.94\n\n0.30\n0.94\n0.97\n0.94\n\n0.00\n0.74\n0.66\n0.47\n\n0.04\n0.94\n0.00\n0.95\n\n0.04\n0.28\n0.18\n0.27\n\nis given provide a recall above 85%. In all types of anomalies, SMOOTH TRAVERSAL has a\nperformance below 30%.\n\n38\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"