"<!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>Published as a conference paper at ICLR 2026\n\narXiv:2510.03904v2 [cs.LG] 30 Mar 2026\n\nLLM AS AN A LGORITHMIST: E NHANCING A NOMALY\nD ETECTORS VIA P ROGRAMMATIC S YNTHESIS\nHangting Ye1 2 , Jinmeng Li1 , He Zhao3 4 , Mingchen Zhuge5 , Dandan Guo1 5∗ ,\nYi Chang1 6 7∗ , Hongyuan Zha2\nSchool of Artificial Intelligence, Jilin University1 ; CUHK-Shenzhen2\nCSIRO’s Data613 ; Department of DSAI, Monash University4 ; KAUST5\nInternational Center of Future Science, Jilin University6\nEngineering Research Center of Knowledge-Driven Human-Machine Intelligence, MOE, China7\n{yeht22,lijm9921}@mails.jlu.edu.cn,\nhe.zhao@data61.csiro.au, mingchen.zhuge@kaust.edu.sa,\n{guodandan,yichang}@jlu.edu.cn, zhahy@cuhk.edu.cn\n\nA BSTRACT\nExisting anomaly detection (AD) methods for tabular data usually rely on some\nassumptions about anomaly patterns, leading to inconsistent performance in realworld scenarios. While Large Language Models (LLMs) show remarkable reasoning capabilities, their direct application to tabular AD is impeded by fundamental\nchallenges, including difficulties in processing heterogeneous data and significant privacy risks. To address these limitations, we propose LLM-DAS, a novel\nframework that repositions the LLM from a “data processor” to an “algorithmist”.\nInstead of being exposed to raw data, our framework leverages the LLM’s ability\nto reason about algorithms. It analyzes a high-level description of a given detector\nto understand its intrinsic weaknesses and then generates detector-specific, dataagnostic Python code to synthesize “hard-to-detect” anomalies that exploit these\nvulnerabilities. This generated synthesis program, which is reusable across diverse\ndatasets, is then instantiated to augment training data, systematically enhancing\nthe detector’s robustness by transforming the problem into a more discriminative\ntwo-class classification task. Extensive experiments on 36 TAD benchmarks show\nthat LLM-DAS consistently boosts the performance of mainstream detectors. By\nbridging LLM reasoning with classic AD algorithms via programmatic synthesis,\nLLM-DAS offers a scalable, effective, and privacy-preserving approach to patching the logical blind spots of existing detectors. The source code is available at\nhttps://github.com/HangtingYe/LLM_DAS#.\n\n1\n\nI NTRODUCTION\n\nAnomaly detection (AD) is a fundamental machine learning task that identifies instances significantly\ndeviating from normal data. Tabular data, typically represented as heterogeneous feature vectors\n(e.g. numerical and categorical features) (Gorishniy et al., 2021; Borisov et al., 2022a; Ye et al.,\n2024), is a crucial modality for AD (Han et al., 2022; Yin et al., 2024), with applications spanning\ncyber-security (Ahmad et al., 2021), rare disease diagnosis (Fernando et al., 2021; Ye et al., 2023a),\nand financial fraud detection (Al-Hashedi &amp; Magalingam, 2021). However, labeled anomalies are\nscarce due to the costly and time-consuming annotation by domain experts (Chandola et al., 2009; Ye\net al., 2023b; Guo et al., 2023). In tabular anomaly detection, many recent works adopt a one-class\nclassification paradigm, where only normal samples are available for training (Schölkopf et al., 1999;\nSohn et al., 2021; Yin et al., 2024; Ye et al., 2025). These TAD methods usually model how anomalies\ndiffer from normal data (Ahmed et al., 2016) by making specific assumptions, e.g., reconstructionbased approaches like Principal Component Analysis (PCA) (Shyu et al., 2003) assume anomalies are\nharder to reconstruct. Despite the success of these methods, it has been shown that assumptions made\nby a method may not hold when facing to heterogeneous tabular data in real-world scenarios (Wolpert\n&amp; Macready, 1997; Han et al., 2022).\n∗\n\nCorresponding authors.\n\n1\n\n\fLegend:\nTrue\nNormal\n\nExis9ng TAD\n\nPublished as a conference paper at ICLR 2026\n\n*Only normal\ntraining data are\nused for fitting\n\nAlgorithm\n\nTraining set\nReusable across\ndiﬀerent datasets Code\n\nLLM-DAS\n\nTrue\nAnomaly\nSynthe9c\nAnomaly\n\nDetector\n\n*Containing\nsynthe.c\nanomalies\n\n❄LLM\n\nEnhanced\ndetector\n\nAugmented training set\n\n*Diﬃcult to\niden.fy\n\"hard\"\nanomalies\n\nPrediction\n\n*Can iden.fy\n\"hard\"\nanomalies\n\nPrediction\n\nFigure 1: Comparison between traditional TAD methods and our LLM-DAS. By synthesizing “hard” anomalies,\nLLM-DAS effectively transforms the original one-class classification problem into a more discriminative twoclass classification problem, thereby strengthening the detector and yielding a more nuanced decision boundary.\n\nRather than designing yet another detector with its own new set of fragile assumptions, we ask a more\nfundamental question: can we systematically enhance existing detectors to be more robust against the\nviolation of their own core logic? Our core idea is to strengthen detectors by exposing them to their\n“blind spots” through synthesized “hard” anomalies. Here, “hard” anomalies are synthetic anomalous\nsamples that the detector struggles to tell apart from normal data., i.e., cases where the detector is most\nlikely to fail. As illustrated in Fig. 1, this targeted augmentation effectively transforms the learning\nproblem from a limited one-class setting into a more powerful and discriminative two-class setting,\nallowing a model to learn a more nuanced and robust decision boundary. The pivotal challenge,\nhowever, lies in generating anomalies of sufficient quality to be truly “hard”. This requires targeting\nthe detector’s core algorithmic logic, demanding a paradigm shift from data-level optimization to a\nlogic-level strategic attack. This is a task for which the unique algorithmic reasoning capabilities of\nLarge Language Models (LLMs) are exceptionally well-suited. With their remarkable capabilities\nin language understanding (Brown et al., 2020), complex planning (Qin et al., 2023), and code\ngeneration (Zheng et al., 2024), LLMs possess an unparalleled ability to reason about abstract\nalgorithmic mechanisms.\nIn this paper, we introduce LLM-DAS (LLM-Guided Detector-Aware Anomaly Synthesis), a framework that positions the LLM as an “algorithm strategist” rather than a “data processor”. In the first\nstage, LLM-DAS utilizes an LLM’s reasoning capabilities to analyze the underlying mechanism of\na given detector and generate detector-specific, data-agnostic Python code for anomaly synthesis.\nAs no data is input into the LLM, this process elegantly sidesteps challenges related to tabular\ndata processing and privacy concerns. In the second stage, the generated code is instantiated on a\nspecific dataset to synthesize “hard-to-detect” anomalies. These anomalies are then used to augment\nthe training data, enhancing the detector’s robustness against violated assumptions. Crucially, the\ndetector-specific synthesis code is reusable across different TAD datasets, enabling both scalability\nand high effectiveness of LLM utilization. In brief, our contributions are summarized as follows:\n1) We identify the fragile assumptions of existing TAD methods as a core limitation and propose a\nnovel direction of using LLM-generated code for targeted anomaly synthesis to enhance detector\nrobustness. This approach simultaneously addresses inherent issues related to data privacy and processing for LLMs in the tabular domain. 2) We propose the LLM-DAS framework, which leverages\nan LLM to reason about detectors and generate reusable, data-agnostic synthesis code. This code\nis then instantiated to create synthetic hard anomalies that enhance detection performance. 3) We\nconduct extensive experiments on numerous benchmarks, where results demonstrate that LLM-DAS\nconsistently and significantly boosts the performance of mainstream TAD methods.\n\n2\n\nR ELATED W ORK\n\nTabular Anomaly Detection. One of the main settings for tabular anomaly detection is one-class\nclassification, where a model learns from only normal samples (Sohn et al., 2021; Yin et al., 2024).\nThe success of existing methods, however, relies on specific and often fragile assumptions. (1)\nReconstruction-based methods like PCA (Shyu et al., 2003) and autoencoders (Principi et al., 2017;\nKim et al., 2019) assume anomalies yield high reconstruction error (Shyu et al., 2003; Kim et al.,\n2019; Ye et al., 2025). This premise fails for anomalies that lie deceptively close to the learned\nmanifold of normal data. (2) Density estimation methods posit that anomalies occupy low-density\nregions (Parzen, 1962; Li et al., 2022). This makes them vulnerable to local anomalies hidden\nwithin otherwise dense data clusters. (3) Classification-based approaches such as OCSVM learn a\nboundary around normal data (Schölkopf et al., 1999; Tax &amp; Duin, 2004), an assumption that is easily\n2\n\n\fPublished as a conference paper at ICLR 2026\n\nviolated by complex, non-convex data distributions. (4) Isolation-based methods like IForest assume\nanomalies are easily isolated (Liu et al., 2008; Cao et al., 2025). Their effectiveness diminishes when\nanomalies form small clusters or are adjacent to normal ones. In these cases, the isolation paths of\nanomalies are no longer much shorter than those of normal data, compromising the core principle\nof isolation. The inherent brittleness of these varied assumptions motivates our work to directly\nenhance detectors against the violation of their own core logic. For a comprehensive overview, we\nrefer readers to several surveys (Pang et al., 2021; Ruff et al., 2021; Chandola et al., 2009).\nLarge Language Models for Tabular Data Learning. Recent advances in LLMs have sparked\ngrowing interest in their application to tabular data tasks, including prediction (Dinh et al., 2022;\nHegselmann et al., 2023), synthesis (Borisov et al., 2022b; Zhang et al., 2023), and feature engineering (Han et al., 2024; Nam et al., 2024). A comprehensive overview can be found in the survey\nby Fang et al. (2024). However, these approaches mostly treat the LLM as a data processor, requiring\ndirect access to raw feature values and treating each row as natural language descriptions. This\nparadigm faces fundamental challenges: LLMs inherently struggle with heterogeneous numerical\nfeatures (Fang et al., 2024; Yan et al., 2024), and direct data exposure creates significant privacy risks.\nEven recent attempts (Tsai et al., 2025) to apply LLMs for tabular anomaly detection—by fine-tuning\nthem on normal samples—are still bound by these data-access and cost limitations, hindering their\npracticality. In this work, we depart from this paradigm by proposing a new role for the LLM:\nan algorithmist. Instead of processing data, the LLM reasons about the high-level, data-agnostic\nlogic of a given anomaly detector. Its task is to understand the detector’s intrinsic weaknesses and\nprogrammatically generate a synthesis strategy in the form of executable code. This “logic-level”\napproach inherently preserves data privacy, leverages the LLM’s core strengths in reasoning and code\ngeneration, and produces a reusable synthesis logic that is both detector-aware and data-agnostic.\n\n3\n\nM ETHOD\n\n3.1\n\nP ROBLEM F ORMULATION AND M OTIVATION\n\nFollowing previous works (Yin et al., 2024; Ye et al., 2025), we formulate tabular anomaly detection\n(TAD) in a one-class classification setting, where training set Dtrain only contains normal samples\nwith x ∈ X and test set Dtest contains both normal and anomalous samples. The goal of TAD is\nto learn a score function f : X → R from Dtrain , which assigns an anomaly score f (x) to a given\ntest sample, with a higher score indicating a higher likelihood of being an anomaly. A variety of\nmethods have been developed for this task, such as reconstruction-based (e.g., PCA (Shyu et al.,\n2003)), isolation-based (e.g., IForest (Liu et al., 2008)), and density-based (e.g., ECOD (Li et al.,\n2022)) approaches. To make our exposition precise, we denote T = {“IForest”, “PCA”, ...} as the\nset of algorithm names, where t ∈ T is a symbolic label specifying the chosen algorithm type. Each t\ncorresponds to an abstract, parameter-free algorithmic description, At . Applying the algorithm At to\nthe training set Dtrain yields a concrete score function ft with learned parameters.\nThe efficacy of these classical TAD algorithms, however, hinges on their underlying assumptions\nabout the nature of anomalies. For instance, IForest (Liu et al., 2008) assumes anomalies are more\neasily isolated, while PCA (Shyu et al., 2003) assumes they have large reconstruction errors from a\nlearned low-dimensional subspace. Details of these detectors are in Appendix 6.4. These assumptions\nare often brittle and fail when confronted with heterogeneous, real-world data, leading to degraded\nperformance (Wolpert &amp; Macready, 1997; Han et al., 2022). It raises a critical question: how can we\nsystematically enhance existing detectors to be more robust against the violation of their own core\nlogic?\nOur core approach is to strengthen detectors by exposing them to their own blind spots through the\nsynthesis of “hard” anomalies—samples specifically crafted to challenge the algorithmic assumptions\nof a given detector. By augmenting the training data with these targeted negative examples, we\ntransform the learning problem from a limited one-class setting into a more discriminative two-class\nsetting. The success of this approach, however, hinges on generating anomalies of sufficient quality\nto be truly “hard”. Naive, data-level methods, such as applying small perturbations to input features,\noften fail to target the core algorithmic logic of a detector. To overcome this, we introduce a paradigm\nshift from data-level optimization to a logic-level strategic attack, leveraging the unique ability of\nLarge Language Models (LLMs) to reason about abstract algorithmic mechanisms. The LLM’s role\nis not to process data, but to analyze a detector’s high-level logic, infer its weaknesses, and then\n3\n\n\fPublished as a conference paper at ICLR 2026\n\nPhase 1 (Data-agnostic)\nYou are an expert in anomaly\ndetection systems. The\ntraining set contains only\nnormal samples. I will provide\nyou the &lt;detector type 𝒕 &gt;.\nPlease return a description of\nthis detector, and the pseudo\ncode of the algorithm (step1,\nstep2,…).\n\nLLM\n\n𝒑𝒕𝐝𝐞𝐬𝐜𝐫𝐢𝐩𝐭𝐢𝐨𝐧\n\n𝒕\n𝒑𝐝𝐞𝐬𝐜𝐫𝐢𝐩𝐭𝐢𝐨𝐧\n\nDetector description:\n\n𝒑𝒕𝐫𝐞𝐪𝐮𝐢𝐫𝐞𝐦𝐞𝐧𝐭\nYou should strictly\nfollow below requirements: … …\n\nDi\nda ff\nta er\nse en\nts t\n\n𝐂𝐨𝐝𝐞𝒕\n\nPrompt 𝒑𝒕𝐜𝐨𝐝𝐞\n\nReplace\n\nReusable across different TAD datasets\n\nPhase 2 (Data-specific)\nInterface\nInterface\n\nAnomalies\n𝑫𝒕𝐬𝐲𝐧\n\n(𝒇𝒕 ,𝑫𝐭𝐫𝐚𝐢𝐧 , 𝑵𝐬𝐲𝐧 )\n\nAnomalies\n𝑫𝒕𝐬𝐲𝐧\n\n(𝒇𝒕 ,𝑫𝐭𝐫𝐚𝐢𝐧 , 𝑵𝐬𝐲𝐧 )\n𝐂𝐨𝐝𝐞𝒕\n\nAnomalies\n𝒕\n𝑫𝐬𝐲𝐧\n\n⊕ 𝑫𝐭𝐫𝐚𝐢𝐧\n\nEnhanced\ndetector 𝑭𝒕\n\n⊕ 𝑫𝐭𝐫𝐚𝐢𝐧\n\nEnhanced\ndetector 𝑭𝒕\n\n⊕ 𝑫𝐭𝐫𝐚𝐢𝐧\n\nEnhanced\ndetector 𝑭𝒕\n\n…\n\nInterface\n\n(𝒇𝒕 ,𝑫𝐭𝐫𝐚𝐢𝐧 , 𝑵𝐬𝐲𝐧 )\n\n…\n\n…\n\nTraining set\n𝑫𝐭𝐫𝐚𝐢𝐧\n\nLLM\n\n𝒑𝒕𝐨𝐛𝐣𝐞𝐜𝐭𝐢𝐯𝐞\nYour task is to write\na python function … …\n\nPseudo code:\nStep 1:\nStep 2:\n\nPrompt 𝒑𝒕𝐢𝐧𝐢𝐭𝐢𝐚𝐥\n\n&lt;detector type&gt; is … …\n\nThe main steps are … …\n\nFigure 2: The LLM-DAS framework consists of two phases: (1) a data-agnostic reasoning phase, where an LLM\ngenerates a reusable anomaly synthesis code for one type of detector, and (2) a data-specific phase, where this\ncode is applied to generate challenging anomalies for detector enhancement.\n\ngenerate data-agnostic Python code that programmatically synthesizes anomalies tailored to exploit\nthese specific vulnerabilities.\n3.2\n\nP ROPOSED M ETHOD : LLM-DAS\n\nThis work proposes LLM-DAS (LLM-Guided Detector-Aware Anomaly Synthesis), a two-stage\nframework. The core of LLM-DAS is to first leverage an LLM’s reasoning to generate a data-agnostic\nsynthesis code tailored for a detector algorithm At (Stage 1), and then execute this code to create the\n“hard” anomalies needed to enhance ft on a specific dataset (Stage 2). Notably, the detector-specific\nsynthesis code is reusable across different TAD datasets. Fig. 2 illustrates the overall pipeline.\n3.2.1\n\nD ETECTOR -AWARE C ODE G ENERATION VIA LLM\n\nThis stage aims to translate the LLM’s abstract algorithmic knowledge regarding a detector type t\n(represented by its algorithm At ) into a concrete, executable synthesis code. As the LLM analyzes\nthe detector not the data, this process is entirely data-agnostic to preserve privacy and ensure the\nreusability of the generated code. Specifically, given a detector type t, we construct a prompt ptcode that\nguides the LLM to capture the underlying assumptions and mechanisms of algorithm At , and then\nproduce anomalies synthesis code that captures the kinds of anomalies that are inherently difficult for\nAt to detect. To fully exploit the reasoning capability of LLMs, the prompt ptcode is defined as:\nptcode = ptdescription + ptobjective + ptrequirements .\n\n(1)\n\nBelow we introduce the three key components (see Appendix 6.5 for details).\n(i) Detector description ptdescription ,a summary and pseudo-code of the detector algorithm At . This\ninformation is generated by the LLM itself:\nptdescription = LLM(ptinitial ),\n\n(2)\n\nwhere prompt ptinitial is the input for LLM with details provided in Appendix 6.5. This step provides a\nstructured context to prime the LLM for generating detector-aware synthesis code.\n\n(ii) Objective specification ptobjective , which instructs the LLM to generate code that synthesizes\n“hard” anomalies. A core tenet of our framework is the use of symbolic interfaces, which are defined\nin this prompt section. For example, we state: “... After the Python function is completed, users\ncan provide the function with: A trained PCA model (model) that exposes predict_score(),\nThe training samples (X_train).” This interaction paradigm is crucial: by defining interfaces as\nsymbolic placeholders rather than concrete values, the LLM can write a general-purpose program\nwithout ever accessing the real data. It effectively provides the LLM with a standard API to program\nagainst, positioning it as an “algorithm strategist” rather than a “data processor.” This enables the\n4\n\n\fPublished as a conference paper at ICLR 2026\n\ngenerated code to be both powerful–accessing training set statistics and querying the detector’s\nscoring behavior–and universally applicable across different datasets.\n(iii) Generation requirements ptrequirements , which impose constraints on the code format and functionality. Notably, we encourage the code to identify “borderline” normal training samples lying near\nthe decision boundary of the detector, and transform them into anomalies leveraging LLM reasoning.\nThis approach is effective for producing informative anomalous samples. Nevertheless, if the LLM\ndiscovers a superior strategy, it is allowed to adopt it.\nThe LLM takes the prompt ptcode as input and leverages its prior knowledge to understand the\nmechanism of algorithm At (summarized as ptdescription in Eq. 2). Based on this understanding, it\nreasons about which types of anomalies are most challenging for At to detect while being most\ninformative for improving detection performance. The output strictly follows a Python code format:\nCodet = LLM(ptcode ),\nt\nt\nt\n{Spolicy\n, Sprogram\n, Sexplanation\n} ⊆ Codet ,\n\n(3)\n\nt\nwhere the code consists of three structured components: the policy Spolicy\nthat specifies how anomalies\nt\nt\nshould be synthesized in detail, the executable program Sprogram\nthat implements the policy Spolicy\nt\nin Python, and the explanation Sexplanation with clear comments explaining key steps in program\nt\nSprogram\n. This structured output, comprising not just a program but also its underlying policy and\nexplanation, significantly enhances the interpretability and trustworthiness of our approach, allowing\nusers to verify the logic behind the LLM’s synthesis strategy. We provide an example template of the\ngenerated code in List. 3.2.1, with detailed generated code provided in Appendix 6.6.\n\nThe Generated Python Code Template\n\nCrucially, this LLM-driven code generation is\ndata-agnostic. The LLM reasons about a detector’s algorithmic weaknesses based solely on its\ndescription—never observing raw data or model\nparameters, thus preserving privacy. This process yields a reusable, detector-specific synthesis code without requiring any LLM fine-tuning.\nThe resulting structured code is instantiated with\ndataset-specific values in the next stage to synthesize anomalies.\n\ndef generate_hard_anomalies(n_samples: int, model\n, X_train: np.ndarray) -&gt; np.ndarray:\n\"\"\"\n# === Policy placeholder ===\n# The anomaly synthesis logic is applied here\n# (details omitted for brevity)\n\"\"\"\n# === Program and explanation placeholder ===\n# (details omitted for brevity)\n# Explanation for step 1\nStep 1 xxx\n...\nreturn np.array(generated_anomalies)\n\n3.2.2\n\nDATASET-W ISE H ARD A NOMALY I NSTANTIATION\n\nOnce the detector-aware code is generated, the next step is to instantiate it on a specific dataset. To\ndo so, the generated code, denoted as Codet , requires a well-defined set of input interfaces to execute.\nWe define this complete set of interfaces as I, which comprises three core elements presented in\ntheir logical order: (1) Training set Dtrain , which serves as the foundation for the instantiation process.\nThe code requires this data not only to train the score function in the next step but also to access its\ndistribution and statistical properties (such as the decision boundary) during the synthesis phase to\ngenerate more challenging anomalies. (2) A fitted score function ft : Using the training set Dtrain\ndescribed above, we obtain a fitted score function ft by applying algorithm At to Dtrain . This score\nfunction provides the key standardized interface that maps any given input sample to an anomaly\nscore. (3) The number of anomalies to synthesize Nsyn , a hyperparameter specifying the desired\nnumber of anomaly samples to be generated. Collectively, these three components constitute the\ncomplete set of information required for the code’s execution. The complete interface set I is\ntherefore defined as their union:\nIt = Dtrain ∪ ft ∪ Nsyn .\n\n(4)\n\nWith this set of interfaces I available for a specific dataset, we can execute the LLM-generated code.\nThe code operates as a function that accepts I as input and returns a set of synthesized anomalies,\nt\nt\nCodet : It 7→ Dsyn\n, Dsyn\n= {xtsyn }.\n\n(5)\n\nThis formulation makes explicit that the code consumes both the score function and the training set\nat instantiation time, while the LLM that produced the code itself remained data-agnostic during\n5\n\n\fPublished as a conference paper at ICLR 2026\n\ngeneration. The resulting Codet , generated in a single forward pass for a specific detector type t, can\nbe applied universally across diverse datasets.\nCase Study. To make this instantiation process concrete, we now present a case study for the\nIForest detector (Liu et al., 2008). The LLM-generated code, CodeIForest , operates based on a specific\nIForest\nsynthesis policy designed to exploit the core mechanics of IForest. This policy Spolicy\n, which the\nLLM articulates as part of its output (Eq. 3), is detailed below in Policy 3.2.2.\nt\nPolicy Spolicy\ncontained in Codet (Eq. 3) for Generating Hard Anomalies for IForest\n\nThe core weakness of IForest is that it relies on axis-aligned splits to isolate points. A sample is considered anomalous if it can be isolated\nin a few splits (short path length). Conversely, a sample is normal if it is \"deep\" within the data cloud, requiring many splits to be isolated\n(long path length). Our strategy exploits this by creating new points that are conceptually anomalous but are geometrically located in a\nway that maximizes their path length, thereby fooling the IForest. The policy consists of two main steps:\n1. Identify ’Borderline’ Normal Samples: These are the normal training samples that lie on the fringe or edge of the dense data cloud.\nThe IForest model is already less certain about these points, assigning them the highest anomaly scores among all normal samples. They\nserve as perfect \"seeds\" for our hard anomalies because they are already close to the decision boundary. We identify these by finding the\ntraining samples in the top percentile of anomaly scores.\n2. Transform Seeds into Hard Anomalies via ’Controlled Extrapolation’: We transform these borderline seeds into anomalies. A\nnaive transformation (e.g., adding large random noise) would create an obvious outlier with a short path length, which is an *easy*\nanomaly. To create a *hard* anomaly, we must move the seed point in a way that doesn’t significantly shorten its path length.\n\nIn practice, the implementation of this policy relies on the interfaces provided to the code. Specifically,\nto identify \"Borderline\" Normal Samples (Step 1), the code uses the fitted ft to compute anomaly\nscores for all samples in the training set. It then selects a subset of these samples as “seeds” from the\ntop percentile of scores. For Step 2, the code applies targeted modifications to these seed points. The\nobjective is to push them into a sparser region of the feature space, making them factually anomalous,\nwhile algorithmically ensuring the transformation does not significantly reduce their path length\nas computed by the IForest score function ft . This process effectively creates anomalies that are\n“camouflaged” to appear normal to IForest, thus representing a significant challenge for the detector.\nDetector Enhancement with Hard Anomalies. Finally, the synthesized anomalies are integrated\nwith the original training set:\nt\nt\nDaug\n= Dtrain ∪ Dsyn\n,\n(6)\nt\nand a binary classifier f˜t (e.g., a decision tree) is trained on Daug\nto distinguish between normal\nand anomalous samples. By explicitly framing the task as a supervised classification problem and\nexposing the classifier to these challenging synthetic anomalies, the learning process encourages the\nf˜t to capture more discriminative patterns between the two classes, thereby improving its ability to\ngeneralize and detect real-world anomalies. We fuse the original (ft ) and enhancement (f˜t ) score\nfunctions by summing their min-max normalized scores with the following final score:\n(7)\nFt (x) = Normmin-max (ft (x)) + Normmin-max (f˜t (x)).\nThis approach preserves the original detector’s biases while adding the nuanced patterns learned\nfrom synthetic data. A key aspect of our method is its adherence to the one-class classification\nframework since training set Dtrain only have ground-truth normal data. We leverage LLM-generated\ncode to synthesize anomalies tailored to the detector and the training dataset. This approach allows\nthe detector to adapt to edge cases that it would otherwise fail to recognize, effectively broadening\nits coverage of the abnormal space while preserving its ability to model the normal distribution\n(mitigating the challenge of fragile assumptions in TAD). Overall, this straightforward yet principled\nstrategy ensures that the benefits of LLM-guided anomaly synthesis are fully incorporated into the\ndetector, enhancing both its discriminative power and generalization ability.\n3.2.3\n\nS UMMARY AND D ISCUSSION\n\nThe LLM-DAS framework operates in a two-phase process that decouples data-agnostic reasoning\nfrom data-specific synthesis. In Phase 1, an LLM analyzes a high-level description of a detector\nand generates a universal, reusable Python code that encapsulates a strategy for synthesizing hard\nanomalies. Crucially, this phase is data-agnostic, preserving privacy. In Phase 2, this code is\ninstantiated on a specific training set Dtrain and its fitted detector ft to generate challenging anomalies.\nThese anomalies are then used to train an enhancement classifier f˜t , which is fused with ft to\nform the final detector Ft . Please the detailed Algorithm 1 in Appendix 6.3. The core rationale of\nthis framework is to improve detector robustness. Traditional one-class detectors rely on fragile\n6\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 1: The statistical information of detection performance improvement achieved by LLM-DAS (Ft ) over\ntrained source detectors (ft ) on 36 datasets. “Baseline” means the average performance achieved by the corresponding source detector (ft ) on all datasets. “Improv. (∆)” indicates the average absolute performance\nimprovement by the LLM-DAS (Ft ) over ft , “Improv. (%)” indicates the average relative performance improvement in percentage. “Win Count” represents the number of datasets that LLM-DAS (Ft ) made improvements\nover ft . p-value measures the improvement significance across the 36 datasets (&lt; 5% is significant).\nDetector\n\nAUC-PR\nBaseline Improv. (∆) Improv. (%) Win Count p-value\n\nAUC-ROC\nBaseline Improv. (∆) Improv. (%) Win Count p-value\n\nPCA\nIForest\nOCSVM\nECOD\nDRL\n\n.5975\n.5724\n.5295\n.5376\n.7437\n\n.7349\n.7555\n.7141\n.7056\n.8509\n\n.0402\n.0617\n.0723\n.0512\n.0412\n\n21.50\n23.60\n84.49\n23.05\n15.81\n\n30 / 36\n26 / 36\n25 / 36\n28 / 36\n25 / 36\n\n.0271\n.0010\n.0239\n.0014\n.0238\n\n.0325\n.0385\n.0437\n.0398\n.0272\n\n7.64\n10.90\n10.02\n8.20\n3.79\n\n27 / 36\n28 / 36\n25 / 36\n26 / 36\n21 / 36\n\n.0155\n.0034\n.0170\n.0183\n.0035\n\nassumptions that are often violated by real-world anomalies. By leveraging an LLM’s unique\ncapability for algorithmic reasoning, our method programmatically generates samples that specifically\ntarget these assumptions, exposing the detector to edge cases it would otherwise miss. This targeted\naugmentation leads to a more nuanced decision boundary and better generalization(a theoretical\nintuition is in Appendix 6.14). Overall, our method offers three key advantages: (i) Data privacy, as\nthe LLM never observes the data; (ii) Model-specificity, leading to highly effective synthesis; and\n(iii) Generalizability, as the framework is a plug-and-play module for various detectors.\n\n4\n\nE XPERIMENTS\n\n4.1\n\nE XPERIMENTAL S ETUP\n\nDatasets. We adopt an extensive benchmark with 36 datasets selected from Outlier Detection\nDataSets (ODDS) (Rayana, 2016) and Anomaly Detection Benchmark (ADBench) (Han et al.,\n2022) following previous works (Yin et al., 2024; Ye et al., 2025). These datasets span diverse\ndomains, including healthcare, science, and social sciences. The dataset properties are summarized\nin Appendix 6.2. Per the literature (Zong et al., 2018; Bergman &amp; Hoshen, 2020; Yin et al., 2024;\nThimonier et al., 2024; Ye et al., 2025), we construct the training set by subsampling 50% of the\nnormal samples. The remaining 50% of the normal samples are then combined with the entire set of\nanomalies to form the test set. We employ Area Under the Precision-Recall Curve (AUC-PR) and\nArea Under the Receiver Operating Characteristic Curve (AUC-ROC) as our evaluation criteria.\nImplementation and Baselines Details. For the code generation phase, we utilized the Gemini2.5-Pro API. This represents a modest, two-time cost per detector type (Eq. 2 and Eq. 3), as the\nresulting synthesis Codet is reusable across any dataset. The subsequent anomaly instantiation and\nbinary f˜t classifier training phases were performed locally and incurred no further monetary cost.\nThe number of synthesized samples is set to 10% of the training set size by default. Following recent\nstudies (Yin et al., 2024; Thimonier et al., 2024; Ye et al., 2025), we implement the hyperparameters\nof all detector models according to their original papers. In our experiments, we use PCA (Shyu\net al., 2003), IForest (Liu et al., 2008), OCSVM (Schölkopf et al., 1999), ECOD (Li et al., 2022),\nand DRL (Ye et al., 2025) as five source detectors (based on different assumptions) to evaluate\nthe effectiveness of LLM-DAS. In addition to these detector-based integrations, we also conduct\ndirect comparisons against conventional and advanced TAD baselines to further evaluate benchmark\nperformance. Details of these detectors are provided in Appendix 6.4.\n4.2\n\nM AIN R ESULTS\n\nImprovement over Source Detectors. We first evaluate the effectiveness of LLM-DAS by measuring\nits improvements over the original source detectors across 36 benchmark datasets. As summarized\nin Table 1, overall, LLM-DAS consistently enhances all source detectors across both AUC-PR and\nAUC-ROC metrics. For instance, when enhancing OCSVM, LLM-DAS improves the AUC-PR by\nan average of 0.0723, corresponding to an 84.49% relative improvement, and achieves gains on 25\nout of 36 datasets. Similar trends can be observed for PCA, IForest, ECOD, and DRL, confirming\nthat the ours is broadly effective across diverse detection algorithms. To assess whether the observed\n7\n\n\fPublished as a conference paper at ICLR 2026\n\nimprovements are statistically significant, we conduct a paired one-tailed t-test across the 36 datasets.\nThe results show that most improvements achieve p-values below 0.05, indicating that the performance\ngains are statistically significant rather than random fluctuations. These results demonstrate that\nLLM-DAS can reliably enhance existing detectors by leveraging synthesized anomalies. Complete\nresults can be found in Table 4 and Table 5 located in the Appendix 6.7.\nComparison with Other Baseline Methods. We further compare the performance of\nLLM-DAS with conventional and advanced TAD baselines.\nSince LLM-DAS and\nthe recent finetune-based AnoLLM (Tsai et al., 2025) have some shared datasets,\nwe cite the results of AnoLLM due to its high compuOCSVM\nKNN\ntational cost, and perform other methods on the shared\nLOF\nPCA\nsubsets. As shown in Fig. 3, LLM-DAS, when coupled\nIForest\nwith DRL, achieves the highest average performance\nECOD\nDeepSVDD\nacross these datasets. Notably, although both AnoLLM\nAutoEncoder\nICL\nand ours leverage LLMs, the ways they are used differ\nDTE\nMCM\nfundamentally: AnoLLM fine-tunes a small LLM with\nNPT-AD\nDRL\nopen-weights on each target dataset, learning a specific AnoLLM(135M)\nAnoLLM(360M)\nmodel for each dataset. In contrast, we view the LLM\nOurs(PCA)\nOurs(DRL)\nwith the reasoning ability as an algorithmic analyst: it ex0.0\n0.2\n0.4\n0.6\n0.8\n1.0\namines the logic of detection methods and generates corAUC-PR Performance ( )\nresponding code, making our approach dataset-agnostic Figure 3: Comparison of all models’ perforand independent of further LLM fine-tuning. Even with mance across different datasets (in AUC-PR).\na significantly lower computational cost than AnoLLM, The red triangles represent the average value.\nour method still outperforms it. Full results are provided AnoLLM has two versions (135M and 360M\nparameters).\nin Table 6 and Table 7 of Appendix 6.8.\n4.3\n\nF URTHER A NALYSIS\n\nComparison with Other Anomaly Synthesis Methods. We compare LLM-DAS with several\nrepresentative anomaly synthesis strategies, including Gaussian noise injection, random outliers, and\nSMOTE-based (Chawla et al., 2002) sample generation. Fig. 4 (a) reports the average AUC-PR\nacross datasets (detailed results and base synthesis strategy details in Appendix 6.13.1). We can find\nthat, naive methods usually yield inconsistent results. While methods like random outlier generation\nmay offer marginal gains for simple detectors like IForest, they are not universally effective and can\nbe detrimental. For instance, random synthesis severely degrades the performance of sophisticated\nmodels like DRL, highlighting the risk of a generic policy conflicting with a detector’s intrinsic\nlogic. In contrast, LLM-DAS delivers consistent and substantial improvements across all models. Its\ndetector-aware strategy generates hard anomalies tailored to each model’s specific vulnerabilities,\nensuring the augmented data is always informative and leads to a more robust decision boundary.\nAblation Studies on LLM-DAS Design. Our ablation studies (Fig. 4 (b)) validate the critical role\nof each core component in LLM-DAS by changing our designed prompt. First, to test our core\ndetector-aware premise, a Generic variant was created by removing the detector’s principles from\nthe prompt. Second, to confirm the necessity of generating hard anomalies, a Simple variant was\nprompted without access to the model.predict_score() function, preventing the LLM from assessing\nanomaly difficulty. Finally, to evaluate our borderline heuristic, a Random variant was instructed to\ntransform randomly selected normal samples rather than borderline normal samples into anomalies.\nThe inferior performance of each variant confirms that detector-awareness, the capability to generate\n\nAverage AUC-PR\n\n(a) Different Alternative Anomaly Synthesis Methods\n0.80\n0.75\n0.70\n0.65\n0.60\n0.55\n0.50\n0.45\n\n(b) Different LLM-DAS Designs\n\n0.785\n\n0.785\n\n0.744\n\n0.744\n0.692\n\n0.634\n0.610\n0.5720.585\n0.550\n\n0.638\n0.5970.5910.606\n0.559\n\nIForest\n\nPCA\n\n0.615\n\n0.615\n\n0.604\n0.5720.579\n\n0.634\n\n0.638\n0.5970.593 0.608\n0.573\n\n0.681\n0.644 0.649\n\n0.481\n\nBase\n\nGauss\n\nRandom\n\nSmote\n\nDRL\n\nIForest\n\nLLM-DAS\n\nBase\n\nGeneric\n\nPCA\n\nSimple\n\nRandom\n\nDRL\n\nLLM-DAS\n\nFigure 4: Performance comparison of anomaly synthesis methods (left) and LLM-DAS designs across different\ndatasets (right) in terms of AUC-PR.\n\n8\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 2: Performance comparison in AUC-PR when enhancing OCSVM with the anomaly generation code\ndesigned for IForest, PCA, OCSVM, respectively. The average relative improvement is provided (↑ %).\nBaseline\n\nSynthesis code\n\nVertebral\n\nGlass\n\nImgseg\n\nShuttle\n\nSpeech\n\nCardio\n\nVowels\n\nAverage\n\nOCSVM\n\nIForest\nPCA\nOCSVM\n\n+0.1025\n-0.0037\n+0.1216\n\n+0.0615\n+0.1108\n+0.111\n\n+0.0546\n+0.0378\n+0.0709\n\n+0.0414\n+0.0457\n+0.0418\n\n-0.0015\n-0.0025\n+0.0015\n\n-0.1148\n-0.1476\n-0.0531\n\n-0.0905\n-0.1899\n-0.0871\n\n+0.0076(↑ 1.68%)\n-0.0213(↓ 4.72%)\n+0.0295(↑ 6.53%)\n\n(a)\n\n(b)\n\n(c)\n\nFigure 5: Visualization of synthetic hard anomalies and score distributions on Thyroid test dataset. (a) T-SNE\nplots of normal, real anomaly, and LLM-DAS–generated anomaly samples. (b) Kernel density estimation (KDE)\nof anomaly scores from the source detector ft . (c) KDE of anomaly scores from the enhanced detector Ft .\n\nchallenging anomalies, and a focus on borderline samples are all critical to the success of LLM-DAS.\nPlease find details in Appendix 6.13.2.\nCross-Detector Synthesis Results. To validate the critical role of our detector-aware design, we\nconducted a cross-detector experiment to test if a synthesis strategy for one detector could enhance\nanother. We set the base detector ft as OCSVM and applied synthesis codes generated specifically for\nIForest, PCA, and OCSVM itself. The results in Table 2, which report the absolute AUC-PR change,\nare revealing. The “mismatched” scenarios (e.g., using PCA-specific code to enhance OCSVM)\nyielded inconsistent outcomes. While gains were observed on some datasets, this approach introduced\na significant risk of performance degradation, evidenced by a substantial drop of 0.1899 on the Vowels\ndataset. In contrast, the “matched” synthesis (using OCSVM-specific code for the OCSVM detector)\nprovided the most stable and significant average improvement. This experiment strongly demonstrates\nthat the success of LLM-DAS stems not from a generic augmentation effect, but from the LLM’s\nability to programmatically exploit the unique mechanics of the target detector. It confirms that\ndetector-awareness is the critical factor for achieving robust performance enhancement.\nVisualization and KDE Analysis of Synthetic Anomalies. To further examine the quality of\nanomalies synthesized by LLM-DAS, we utilize T-SNE and Kernel Density Estimation (KDE) plots\nof anomaly scores on the Thyroid. Fig. 5 (a) shows that the Synthetic Anomalies (green stars)\nare strategically placed near the boundary of the True Normal manifold, confirming they are hard\nanomalies that intentionally avoid the sparse, obvious outlier regions. This “hardness” is quantitatively\nproven by the KDE plots of the original score distribution in Fig. 5 (b). The synthetic anomaly\ndistribution severely overlaps with both true normal and anomaly distribution. This indicates the base\ndetector struggles to distinguish the synthetic samples from normal data. Crucially, after training\nwith LLM-DAS, the enhanced detector’s KDE in Fig. 5 (c) shows a significant rightward shift in the\nsynthetic anomaly scores. This boundary refinement not only elevates the synthetic anomaly scores\nbut also pushes the true anomaly score distribution further away from the normal score distribution.\nThis confirms that exposure to LLM-DAS generated hard samples results in a significantly tighter\nand more robust decision boundary, improving overall generalization.\nAdditional Analysis. We incorporate Appendix 6.15 to demonstrate how LLM-DAS inherently\ntargets detector-specific weaknesses across diverse anomaly types. We introduce a controllable\nhardness-level prompting interface and a comprehensive failure-mode analysis in Appendix 6.16.\n\n5\n\nC ONCLUSION\n\nThis paper introduces LLM-DAS, a novel framework that reimagines the role of LLMs in tabular\nanomaly detection. Instead of treating LLMs as direct data processors, we have successfully repositioned them as “algorithmists” that reason about the intrinsic logic of detectors. This paradigm shift\ncan address two challenges: the LLM’s inherent difficulty with raw tabular data and the fragile assump9\n\n\fPublished as a conference paper at ICLR 2026\n\ntions of conventional detectors. Our core contribution is a fully programmatic, privacy-preserving\napproach where the LLM generates detector-specific, data-agnostic, and reusable synthesis code to\nproduce “hard” anomalies, enhancing model robustness. Extensive experiments on 36 benchmarks\ndemonstrate that LLM-DAS significantly enhances a wide array of detectors. Looking forward, the\n“LLM as an algorithmist” paradigm opens up exciting new avenues, such as enhancing algorithms in\nother domains or even automating algorithmic discovery. Our work paves the way for more adaptive\nand robust machine learning systems by integrating the algorithmic reasoning of LLMs.\nEthics Statement We confirm that this research complies with all applicable ethical guidelines and\ndoes not present any ethical issues.\nReproducibility Statement To ensure reproducibility, we provide source code through the link\nin the abstract. Complete details regarding datasets, experimental settings, and implementation are\ndocumented in Appendix 6.2, Appendix 6.3 and Appendix 6.4.\nACKNOWLEDGMENTS\nThe authors would like to thank the anonymous referees for their valuable comments. In this work,\nHangting Ye, Jinmeng Li, Dandan Guo and Yi Chang are supported by the National Key R&amp;D\nProgram of China under Grant (No. 2023YFF0905400), the National Natural Science Foundation\nof China (No. 623B2043, No. U2341229, No. 62306125), the Fundamental and Interdisciplinary\nDisciplines Breakthrough Plan of the Ministry of Education of China (No. JYB2025XDXM903), and\nthe New Cornerstone Science Foundation through the XPLORER PRIZE. Hongyuan Zha’s research\nis supported in part by Shenzhen Stability Science Program 2023, and National Natural Science\nFoundation of China (No. 72495131).\nPart of this work was carried out during Dandan Guo’s visit to King Abdullah University of Science\nand Technology (KAUST).\n\nR EFERENCES\nZeeshan Ahmad, Adnan Shahid Khan, Cheah Wai Shiang, Johari Abdullah, and Farhan Ahmad.\nNetwork intrusion detection system: A systematic study of machine learning and deep learning\napproaches. Transactions on Emerging Telecommunications Technologies, 32(1):e4150, 2021.\nMohiuddin Ahmed, Abdun Naser Mahmood, and Md Rafiqul Islam. A survey of anomaly detection\ntechniques in financial domain. Future Generation Computer Systems, 55:278–288, 2016.\nKhaled Gubran Al-Hashedi and Pritheega Magalingam. Financial fraud detection applying data\nmining techniques: A comprehensive review from 2009 to 2019. Computer Science Review, 40:\n100402, 2021.\nLiron Bergman and Yedid Hoshen. Classification-based anomaly detection for general data. arXiv\npreprint arXiv:2005.02359, 2020.\nVadim Borisov, Tobias Leemann, Kathrin Seßler, Johannes Haug, Martin Pawelczyk, and Gjergji\nKasneci. Deep neural networks and tabular data: A survey. IEEE transactions on neural networks\nand learning systems, 2022a.\nVadim Borisov, Kathrin Seßler, Tobias Leemann, Martin Pawelczyk, and Gjergji Kasneci. Language\nmodels are realistic tabular data generators. arXiv preprint arXiv:2210.06280, 2022b.\nMarkus M Breunig, Hans-Peter Kriegel, Raymond T Ng, and Jörg Sander. Lof: identifying densitybased local outliers. In Proceedings of the 2000 ACM SIGMOD international conference on\nManagement of data, pp. 93–104, 2000.\nTom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal,\nArvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are\nfew-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.\nYang Cao, Haolong Xiang, Hang Zhang, Ye Zhu, and Kai Ming Ting. Anomaly detection based on\nisolation mechanisms: A survey. Machine Intelligence Research, 22(5):849–865, 2025.\n10\n\n\fPublished as a conference paper at ICLR 2026\n\nVarun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM computing\nsurveys (CSUR), 41(3):1–58, 2009.\nNitesh V Chawla, Kevin W Bowyer, Lawrence O Hall, and W Philip Kegelmeyer. Smote: synthetic\nminority over-sampling technique. Journal of artificial intelligence research, 16:321–357, 2002.\nZhaomin Chen, Chai Kiat Yeo, Bu Sung Lee, and Chiew Tong Lau. Autoencoder-based network\nanomaly detection. In 2018 Wireless telecommunications symposium (WTS), pp. 1–5. IEEE, 2018.\nTuan Dinh, Yuchen Zeng, Ruisu Zhang, Ziqian Lin, Michael Gira, Shashank Rajput, Jy-yong\nSohn, Dimitris Papailiopoulos, and Kangwook Lee. Lift: Language-interfaced fine-tuning for\nnon-language machine learning tasks. Advances in Neural Information Processing Systems, 35:\n11763–11784, 2022.\nXi Fang, Weijie Xu, Fiona Anting Tan, Jiani Zhang, Ziqing Hu, Yanjun Qi, Scott Nickleach, Diego\nSocolinsky, Srinivasan Sengamedu, and Christos Faloutsos. Large language models (llms) on\ntabular data: Prediction, generation, and understanding–a survey. arXiv preprint arXiv:2402.17944,\n2024.\nTharindu Fernando, Harshala Gammulle, Simon Denman, Sridha Sridharan, and Clinton Fookes.\nDeep learning for medical anomaly detection–a survey. ACM Computing Surveys (CSUR), 54(7):\n1–37, 2021.\nYury Gorishniy, Ivan Rubachev, Valentin Khrulkov, and Artem Babenko. Revisiting deep learning\nmodels for tabular data. Advances in neural information processing systems, 34:18932–18943,\n2021.\nDandan Guo, Long Tian, Chuan Du, Pengfei Xie, Bo Chen, and Lei Zhang. Suspicious object\ndetection for millimeter-wave images with multi-view fusion siamese network. IEEE Transactions\non Image Processing, 32:4088–4102, 2023. doi: 10.1109/TIP.2023.3270765.\nSongqiao Han, Xiyang Hu, Hailiang Huang, Minqi Jiang, and Yue Zhao. Adbench: Anomaly\ndetection benchmark. Advances in Neural Information Processing Systems, 35:32142–32159,\n2022.\nSungwon Han, Jinsung Yoon, Sercan O Arik, and Tomas Pfister. Large language models can\nautomatically engineer features for few-shot tabular learning. arXiv preprint arXiv:2404.09491,\n2024.\nStefan Hegselmann, Alejandro Buendia, Hunter Lang, Monica Agrawal, Xiaoyi Jiang, and David\nSontag. Tabllm: Few-shot classification of tabular data with large language models. In International\nconference on artificial intelligence and statistics, pp. 5549–5581. PMLR, 2023.\nKi Hyun Kim, Sangwoo Shim, Yongsub Lim, Jongseob Jeon, Jeongwoo Choi, Byungchan Kim,\nand Andre S Yoon. Rapp: Novelty detection with reconstruction along projection pathway. In\nInternational Conference on Learning Representations, 2019.\nZheng Li, Yue Zhao, Xiyang Hu, Nicola Botta, Cezar Ionescu, and George H Chen. Ecod: Unsupervised outlier detection using empirical cumulative distribution functions. IEEE Transactions on\nKnowledge and Data Engineering, 35(12):12181–12193, 2022.\nFei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation forest. In 2008 eighth ieee international\nconference on data mining, pp. 413–422. IEEE, 2008.\nVictor Livernoche, Vineet Jain, Yashar Hezaveh, and Siamak Ravanbakhsh. On diffusion modeling\nfor anomaly detection. In The Twelfth International Conference on Learning Representations,\n2024. URL https://openreview.net/forum?id=lR3rk7ysXz.\nJaehyun Nam, Kyuyoung Kim, Seunghyuk Oh, Jihoon Tack, Jaehyung Kim, and Jinwoo Shin.\nOptimized feature generation for tabular data via llms with decision tree reasoning. Advances in\nNeural Information Processing Systems, 37:92352–92380, 2024.\nGuansong Pang, Chunhua Shen, Longbing Cao, and Anton Van Den Hengel. Deep learning for\nanomaly detection: A review. ACM computing surveys (CSUR), 54(2):1–38, 2021.\n11\n\n\fPublished as a conference paper at ICLR 2026\n\nEmanuel Parzen. On estimation of a probability density function and mode. The annals of mathematical statistics, 33(3):1065–1076, 1962.\nEmanuele Principi, Fabio Vesperini, Stefano Squartini, and Francesco Piazza. Acoustic novelty\ndetection with adversarial autoencoders. In 2017 International Joint Conference on Neural\nNetworks (IJCNN), pp. 3324–3330. IEEE, 2017.\nYujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru\nTang, Bill Qian, et al. Toolllm: Facilitating large language models to master 16000+ real-world\napis. arXiv preprint arXiv:2307.16789, 2023.\nSridhar Ramaswamy, Rajeev Rastogi, and Kyuseok Shim. Efficient algorithms for mining outliers\nfrom large data sets. In Proceedings of the 2000 ACM SIGMOD international conference on\nManagement of data, pp. 427–438, 2000.\nShebuti Rayana. Odds library. Stony Brook University, Department of Computer Sciences, 2016.\nLukas Ruff, Robert Vandermeulen, Nico Goernitz, Lucas Deecke, Shoaib Ahmed Siddiqui, Alexander\nBinder, Emmanuel Müller, and Marius Kloft. Deep one-class classification. In International\nconference on machine learning, pp. 4393–4402. PMLR, 2018.\nLukas Ruff, Jacob R Kauffmann, Robert A Vandermeulen, Grégoire Montavon, Wojciech Samek,\nMarius Kloft, Thomas G Dietterich, and Klaus-Robert Müller. A unifying review of deep and\nshallow anomaly detection. Proceedings of the IEEE, 109(5):756–795, 2021.\nBernhard Schölkopf, Robert C Williamson, Alex Smola, John Shawe-Taylor, and John Platt. Support\nvector method for novelty detection. Advances in neural information processing systems, 12, 1999.\nTom Shenkar and Lior Wolf. Anomaly detection for tabular data with internal contrastive learning.\nIn International conference on learning representations, 2022.\nMei-Ling Shyu, Shu-Ching Chen, Kanoksri Sarinnapakorn, and LiWu Chang. A novel anomaly\ndetection scheme based on principal component classifier. In Proceedings of the IEEE foundations\nand new directions of data mining workshop, pp. 172–179. IEEE Press Piscataway, NJ, USA, 2003.\nKihyuk Sohn, Chun-Liang Li, Jinsung Yoon, Minho Jin, and Tomas Pfister. Learning and evaluating representations for deep one-class classification. In International Conference on Learning\nRepresentations, 2021. URL https://openreview.net/forum?id=HCSgyPUfeDj.\nDavid MJ Tax and Robert PW Duin. Support vector data description. Machine learning, 54:45–66,\n2004.\nHugo Thimonier, Fabrice Popineau, Arpad Rimmel, and Bich-Liên DOAN. Beyond individual input\nfor deep anomaly detection on tabular data. In Forty-first International Conference on Machine\nLearning, 2024. URL https://openreview.net/forum?id=chDpBp2P6b.\nChe-Ping Tsai, Ganyu Teng, Phillip Wallis, and Wei Ding. AnoLLM: Large language models for tabular anomaly detection. In The Thirteenth International Conference on Learning Representations,\n2025. URL https://openreview.net/forum?id=7VkHffT5X2.\nDavid H Wolpert and William G Macready. No free lunch theorems for optimization. IEEE\ntransactions on evolutionary computation, 1(1):67–82, 1997.\nHongzuo Xu, Guansong Pang, Yijie Wang, and Yongjun Wang. Deep isolation forest for anomaly\ndetection. IEEE Transactions on Knowledge and Data Engineering, 35(12):12591–12604, 2023.\ndoi: 10.1109/TKDE.2023.3270293.\nJiahuan Yan, Bo Zheng, Hongxia Xu, Yiheng Zhu, Danny Z Chen, Jimeng Sun, Jian Wu, and\nJintai Chen. Making pre-trained language models great on tabular prediction. arXiv preprint\narXiv:2403.01841, 2024.\nHangting Ye, Zhining Liu, Wei Cao, Amir M Amiri, Jiang Bian, Yi Chang, Jon D Lurie, Jim Weinstein,\nand Tie-Yan Liu. Web-based long-term spine treatment outcome forecasting. In Proceedings of\nthe 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 3082–3092,\n2023a.\n12\n\n\fPublished as a conference paper at ICLR 2026\n\nHangting Ye, Zhining Liu, Xinyi Shen, Wei Cao, Shun Zheng, Xiaofan Gui, Huishuai Zhang,\nYi Chang, and Jiang Bian. Uadb: Unsupervised anomaly detection booster. In 2023 IEEE 39th\nInternational Conference on Data Engineering (ICDE), pp. 2593–2606. IEEE, 2023b.\nHangting Ye, Wei Fan, Xiaozhuang Song, Shun Zheng, He Zhao, Dan dan Guo, and Yi Chang.\nPTaRL: Prototype-based tabular representation learning via space calibration. In The Twelfth\nInternational Conference on Learning Representations, 2024. URL https://openreview.\nnet/forum?id=G32oY4Vnm8.\nHangting Ye, He Zhao, Wei Fan, Mingyuan Zhou, Dan dan Guo, and Yi Chang. Drl: Decomposed\nrepresentation learning for tabular anomaly detection. In The Thirteenth International Conference\non Learning Representations, 2025.\nJiaxin Yin, Yuanyuan Qiao, Zitang Zhou, Xiangchao Wang, and Jie Yang. Mcm: Masked cell\nmodeling for anomaly detection in tabular data. In The Twelfth International Conference on\nLearning Representations, 2024.\nTianping Zhang, Shaowen Wang, Shuicheng Yan, Jian Li, and Qian Liu. Generative table pre-training\nempowers models for tabular prediction. arXiv preprint arXiv:2305.09696, 2023.\nYue Zhao, Zain Nasrullah, and Zheng Li. Pyod: A python toolbox for scalable outlier detection.\nJournal of machine learning research, 20(96):1–7, 2019.\nTianyu Zheng, Ge Zhang, Tianhao Shen, Xueling Liu, Bill Yuchen Lin, Jie Fu, Wenhu Chen, and\nXiang Yue. Opencodeinterpreter: Integrating code generation with execution and refinement. arXiv\npreprint arXiv:2402.14658, 2024.\nBo Zong, Qi Song, Martin Renqiang Min, Wei Cheng, Cristian Lumezanu, Daeki Cho, and Haifeng\nChen. Deep autoencoding gaussian mixture model for unsupervised anomaly detection. In\nInternational conference on learning representations, 2018.\n\n13\n\n\f6\n\nA PPENDIX\n\nTABLE OF CONTENTS\n\n1\n\nIntroduction\n\n1\n\n2\n\nRelated Work\n\n2\n\n3\n\nMethod\n3.1 Problem Formulation and Motivation . . . . . . . . . . . . . . . . . . . . . . . . .\n3.2 Proposed Method: LLM-DAS . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n3.2.1 Detector-Aware Code Generation via LLM . . . . . . . . . . . . . . . . .\n3.2.2 Dataset-Wise Hard Anomaly Instantiation . . . . . . . . . . . . . . . . . .\n3.2.3 Summary and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . .\n\n3\n3\n4\n4\n5\n6\n\n4\n\nExperiments\n4.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n4.2 Main Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n4.3 Further Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n\n7\n7\n7\n8\n\n5\n\nConclusion\n\n9\n\n6 Appendix\n6.1 Use of LLMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.2 Datasets details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.3 LLM-DAS details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.4 Baseline details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.4.1 Base Detectors Coupled with LLM-DAS . . . . . . . . . . . . . . . . . .\n6.4.2 Additional Conventional and Advanced TAD Baselines. . . . . . . . . . .\n6.4.3 Implementation Details. . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.5 Example Prompt Used in LLM-DAS . . . . . . . . . . . . . . . . . . . . . . . . .\n6.6 Example Generated Code by LLM . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.7 Full Results of Improvement Over Source Detectors . . . . . . . . . . . . . . . . .\n6.8 Full Results of Comparison with Other Baseline Methods . . . . . . . . . . . . . .\n6.9 Varying LLM backbones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.10 Computational Efficiency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.11 Visualization and KDE Analysis of Synthetic Anomalies . . . . . . . . . . . . . .\n6.12 Sensitivity Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.13 Additional results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.13.1 Comparison with Alternative Anomaly Synthesis Methods . . . . . . . . .\n6.13.2 Ablation Studies on LLM-DAS Design . . . . . . . . . . . . . . . . . . .\n6.14 A Simple Theoretical Illustration of Boundary Refinement . . . . . . . . . . . . . .\n6.14.1 Motivation and Theoretical Abstraction . . . . . . . . . . . . . . . . . . . .\n6.14.2 Margin Transfer from Synthetic Hard Anomalies . . . . . . . . . . . . . . .\n6.14.3 Remarks on Applicability and Model Classes . . . . . . . . . . . . . . . .\n6.14.4 Convergence and Stability of the Fused Detector . . . . . . . . . . . . . .\n6.14.5 Justification for Local Boundary Refinement Mechanism in LLM-DAS . .\n6.14.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.15 Detector-Aware Anomaly Synthesis Across Different Anomaly Types . . . . . . .\n6.15.1 Motivation and Experimental Philosophy. . . . . . . . . . . . . . . . . . .\n6.15.2 Experimental Setup: Constructing Type-Specific Testbeds . . . . . . . . .\n6.15.3 Analysis Procedure for LLM-DAS . . . . . . . . . . . . . . . . . . . . . .\n6.15.4 Original detectors’ priori on different types of anomalies. . . . . . . . . . .\n6.15.5 Key findings: LLM-DAS automatically targets the anomaly types that each\ndetector performs worst on . . . . . . . . . . . . . . . . . . . . . . . . . .\n14\n\n14\n15\n15\n15\n15\n15\n18\n18\n19\n20\n23\n23\n28\n28\n28\n30\n33\n33\n37\n41\n41\n41\n42\n42\n42\n43\n44\n44\n44\n44\n45\n45\n\n\fPublished as a conference paper at ICLR 2026\n\n6.16 Hardness-Controlled Synthetic Anomalies and Side-Effects Analysis . . . . . . . .\n6.17 Analysis of Generating Detector-Specific Binary Classifiers . . . . . . . . . . . . . .\n6.18 Analysis of Generating Synthetic Samples Targeting Multiple Weaknesses of Base\nDetector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\n6.19 How we ensure the robustness of LLM-DAS? . . . . . . . . . . . . . . . . . . . .\n6.20 On Isolating the Contribution of LLM Reasoning . . . . . . . . . . . . . . . . . .\n\n6.1\n\n48\n51\n52\n57\n58\n\nU SE OF LLM S\n\nLarge Language Models were used as assistive tools in the preparation of this manuscript. We\nemployed LLMs for grammar checking, LaTeX formatting, and improving the clarity of technical\ndescriptions. The core scientific contributions and conclusions presented in this paper originate from\nthe authors’ work.\n6.2\n\nDATASETS DETAILS\n\nWe adopt an extensive benchmark with 36 datasets selected from Outlier Detection DataSets\n(ODDS) (Rayana, 2016) and Anomaly Detection Benchmark (ADBench) (Han et al., 2022) following\nprevious works (Yin et al., 2024; Ye et al., 2025). These datasets span diverse domains, including\nhealthcare, science, and social sciences. The dataset properties are summarized in Table 3.\n6.3\n\nLLM-DAS DETAILS\n\nFor the code generation phase, we utilized the Gemini-2.5-Pro API. This represents a modest, twotime cost per detector type (Eq. 2 and Eq. 3), as the resulting synthesis Codet is reusable across any\ndataset. The subsequent anomaly instantiation and binary f˜t classifier training phases were performed\nlocally and incurred no further monetary cost. The number of synthesized samples is set to 10% of\nthe training set size by default. The detailed algorithm is as follows.\nAlgorithm 1 LLM-DAS training and inference workflow.\n1: Input: Normal-only training set Dtrain , test set Dtest (labels not accessed), LLM API, detector\n\ntype;\n2: Obtaining ptdescription that summarizes the algorithm At of t and provides its pseudo code describ-\n\ning the concrete steps (Eq. 2);\n3: Formulate a prompt ptcode describing the detector mechanism, synthesis objectives and require-\n\nments (Eq. 1);\n\n4: Query LLM with prompt ptcode to generate a detector-aware anomaly synthesis code Codet\n\n(Eq. 3);\n\n5: Train the initial score function ft on Dtrain ;\n6: Extract interfaces It = Dtrain ∪ ft ∪ Nsyn (Eq. 4);\n7: Instantiate the LLM-generated code Codet using the interfaces It to synthesize hard anomalies\n\nt\nDsyn\n(Eq. 5);\nt\nt\n8: Augment the training set: Daug\n= Dtrain ∪ Dsyn\n(Eq. 6);\nt\n9: Train a binary classifier on Daug to obtain the enhanced score function f˜t ;\n10: Integrate the source function ft with f˜t to form the final function Ft (Eq. 7);\n11: Output: Final anomaly scores {F (x) | x ∈ Dtest }.\n\n6.4\n6.4.1\n\nBASELINE DETAILS\nBASE D ETECTORS C OUPLED WITH LLM-DAS\n\nFollowing recent studies (Yin et al., 2024; Thimonier et al., 2024; Ye et al., 2025), we implement the\nhyperparameters of all detector models according to their original papers. In our experiments, we\n15\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 3: Dataset properties. We use 36 commonly used tabular anomaly detection datasets in this\npaper.\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWDBC\nWPBC\nWbc\nWilt\nWine\nYeast\n\nSamples\n\nDims\n\nAnomalies\n\n4177\n10000\n7200\n452\n683\n41188\n1831\n2114\n1994\n1941\n214\n80\n2310\n351\n148\n11183\n7603\n3062\n5216\n195\n6870\n768\n6435\n5803\n49097\n4207\n3686\n3772\n240\n1456\n367\n198\n378\n4819\n129\n1484\n\n7\n768\n6\n274\n9\n62\n21\n21\n101\n27\n9\n19\n18\n33\n18\n6\n100\n166\n64\n22\n16\n8\n36\n36\n9\n57\n400\n6\n6\n12\n30\n33\n30\n5\n13\n8\n\n2081\n500\n534\n66\n239\n4640\n176\n466\n993\n673\n9\n13\n990\n126\n6\n260\n700\n97\n150\n147\n156\n268\n2036\n71\n3511\n1679\n61\n93\n30\n50\n10\n47\n21\n257\n10\n507\n\nuse PCA (Shyu et al., 2003), IForest (Liu et al., 2008), OCSVM (Schölkopf et al., 1999), ECOD (Li\net al., 2022), and DRL (Ye et al., 2025) as five source detectors (based on different assumptions) to\nevaluate the effectiveness of LLM-DAS. The details of these detectors and LLM’s opinion towards\ntheir weakness (included in the generated code Codet ) are as follows.\nPCA. Principal Component Analysis (PCA) is a commonly used method for dimensionality reduction\nand anomaly detection. It identifies directions in the data (called principal components) along which\nthe variance is maximized. In anomaly detection, PCA can be used to reconstruct each sample from\nthe top principal components and compute the reconstruction error as the anomaly score. Samples\nwith higher reconstruction error are considered more anomalous.\nIForest. Isolation Forest (IForest) is an ensemble-based anomaly detection method that isolates\nanomalies instead of profiling normal data points. The key intuition is that anomalies are few and\ndifferent, so they are easier to isolate using random partitions. IForest builds multiple random binary\ntrees (isolation trees) by recursively splitting data based on randomly chosen features and split values.\nData points that require fewer splits to be isolated are more likely to be anomalies, while normal\n16\n\n\fPublished as a conference paper at ICLR 2026\n\npoints typically require more splits. The average path length across trees is used to compute an\nanomaly score, where shorter paths indicate higher anomaly likelihood.\nOCSVM. One-Class Support Vector Machine (OCSVM) is a kernel-based anomaly detection method\nthat learns a decision boundary around normal data. It maps the input data into a high-dimensional\nfeature space using a kernel function, then finds the smallest region (a hyperplane or hypersphere)\nthat encloses most of the normal samples. The assumption is that normal data lies in a dense region,\nwhile anomalies fall outside this boundary. OCSVM is particularly effective when the training set\ncontains only normal samples, as it explicitly models the support of the normal data distribution.\nECOD. ECOD (Empirical Cumulative Distribution-based Outlier Detection) is a lightweight, univariate anomaly detection method that leverages the empirical cumulative distribution (ECDF) of each\nfeature independently. It computes how extreme a value is relative to the distribution of that feature\nby evaluating its position in the ECDF. The core idea is that anomalous values often lie in the tails\nof the distribution. ECOD combines the tail probabilities across all features to produce an overall\nanomaly score, without assuming any parametric distribution. This makes it simple, interpretable,\nand effective for high-dimensional tabular data with only normal samples for training.\nDRL. DRL (Decomposed Representation Learning) is an anomaly detection method designed for\ntabular data that learns only from normal samples. Instead of relying purely on reconstruction,\nDRL enforces a structured latent space where each normal representation is expressed as a linear\ncombination of fixed, orthogonal basis vectors. This decomposition constraint encourages normal\nsamples to occupy a well-defined subspace, while anomalies naturally fall outside of it. By amplifying\ndiscrepancies in this constrained representation space, DRL improves separation between normal\nand anomalous patterns. The anomaly score is derived from how poorly a test sample aligns with the\ndecomposed latent space, optionally combined with reconstruction error.\nLLM’s opinion on PCA’s weakness. PCA’s Blind Spot: PCA-based anomaly detectors learn a\nlow-dimensional subspace (the \"principal subspace\") that captures the maximum variance of the\nnormal training data. The anomaly score is the reconstruction error, which is the distance of a sample\nto this subspace. Consequently, PCA is good at detecting samples that lie far from this subspace. Its\nprimary weakness is detecting anomalies that lie *within* this learned subspace but are far from the\ncluster of normal data. Such points are “anomalous” because they are in an unobserved region, but\nhave a low reconstruction error, fooling the detector.\nLLM’s opinion on IForest’s weakness. The core weakness of the Isolation Forest (IForest) lies in\nits reliance on axis-aligned splits to isolate data points. A sample is deemed anomalous if it can be\nisolated with just a few splits (resulting in a short path length). Conversely, a sample is considered\nnormal if it is “deep” within the data cluster and requires numerous splits for isolation (leading to a\nlong path length). Therefore, it exhibits insufficient sensitivity to samples that reside in the principal\ncomponent subspace and are far from the data center, to synthetic anomalies within dense regions,\nand to samples where all feature values are normal yet their combinations are novel. This is because\nthese anomalous samples all result in longer split paths, thereby receiving lower anomaly scores in\nIForest.\nLLM’s opinion on OCSVM’s weakness. The core mechanism of One-Class SVM (OCSVM) is to\nlearn a decision boundary that encloses normal data, and determine whether a sample is anomalous\nbased on the sample’s relative position to this boundary (quantified by an anomaly score). The\ndecision boundary of OCSVM is entirely defined by support vectors, while “borderline normal\nsamples” themselves are the group “closest to anomalies” among normal data—they have the highest\nanomaly scores among all normal samples. When such samples are slightly pushed across the decision\nboundary and converted into anomalous samples, OCSVM becomes even less able to effectively\ndistinguish between “normal samples inside the boundary” and “neighboring anomalous samples\noutside the boundary” : the two groups are extremely close in the feature space, and the difference in\ntheir anomaly scores is negligible. This ultimately leads to the formation of an ambiguous zone for\nanomaly determination near the decision boundary of OCSVM, resulting in obvious detection blind\nspots.\nLLM’s opinion on ECOD’s weakness. ECOD assesses the anomaly of a sample by evaluating how\nextreme each feature value is in its univariate distribution,independently of other features. A hard\nanomaly for ECOD is therefore a sample whose feature values are individually common (i.e., not in\nthe tails of their distributions) but whose *combination* of feature values is novel or unseen.\n\n17\n\n\fPublished as a conference paper at ICLR 2026\n\nLLM’s opinion on DRL’s weakness. DRL first learns a structured latent space spanned by orthogonal\nbasis vectors, and then uses the degree of deviation of samples from the “structured latent subspace\ndefined by the decomposition process” as the basis for anomaly scoring. Under this mechanism,\nnormal samples form a tight alignment with this latent subspace; once a sample’s latent space\nrepresentation deviates, the model will classify it as an anomaly. However,DRL often struggles to\neffectively detect samples that are inherently anomalous yet maintain a high degree of alignment with\nthe learned latent subspace.\n6.4.2\n\nA DDITIONAL C ONVENTIONAL AND A DVANCED TAD BASELINES .\n\nIn addition to these detector-based integrations, we also conduct direct comparisons against conventional and advanced TAD baselines to further evaluate benchmark performance. Specifically,\nKNN (Ramaswamy et al., 2000), LOF (Breunig et al., 2000) represent classic AD approaches that\ncontinue to maintain popularity. In addition, we compare our method to recent deep learning based\nmethods, namely Deep SVDD (Ruff et al., 2018), AutoEncoder (Chen et al., 2018), ICL (Shenkar\n&amp; Wolf, 2022), DTE (Livernoche et al., 2024), MCM (Yin et al., 2024) and NPT-AD (Thimonier\net al., 2024). A recent attempt AnoLLLM (Tsai et al., 2025) has been made to apply LLMs to\ntabular anomaly detection by fine-tuning them on normal samples via next-token prediction, enabling\nthe model to act as a generative learner of the normal distribution. However, this approach still\nrequires direct access to raw feature values and incurs the additional cost of fine-tuning, limiting its\npracticality.\n6.4.3\n\nI MPLEMENTATION D ETAILS .\n\nWe use the popular PyOD python package (Zhao et al., 2019) to implement OCSVM, LOF, PCA,\nIForest, ECOD, Deep SVDD and AutoEncoder. We use the DeepOD python library (Xu et al., 2023)\nto implement ICL. The implementation of the other methods is based on their official open-source\ncode releases. Following latest works (Yin et al., 2024; Ye et al., 2025), We implement all baseline\nmodels’ hyperparameters following their original papers. All the methods are implemented with\nidentical dataset partitioning and preprocessing procedures, following previous works (Ye et al.,\n2025).\n\n18\n\n\fPublished as a conference paper at ICLR 2026\n\n6.5\n\nE XAMPLE P ROMPT U SED IN LLM-DAS\n\nHere, we take the IForest as an example, i.e., t =“IForest”.\n\nExample Prompt ptinitial (the input of Eq. 2) for Generating Detector Description.\nYou are an expert in anomaly detection systems. The training set contains only normal\nsamples. I will provide you the &lt;IForest&gt;. Please return a description of this detector, and the\npseudo code of the algorithm (step1, step2,. . . ). The answer format for another detector is:\nHere you should provide one paragraph for description\nThe main steps of &lt;detector type&gt; for anomaly detection are:\nHere you should provide the main steps for this algorithm\n* xxx.\n* xxx.\n* xxx.\n...\n\nExample Prompt ptdescription (the output of Eq. 2), Serving as One Part of ptcode .\nIsolation Forest (IForest) is an ensemble-based anomaly detection method that isolates\nanomalies instead of profiling normal data points. The key intuition is that anomalies are few\nand different, so they are easier to isolate using random partitions. IForest builds multiple\nrandom binary trees (isolation trees) by recursively splitting data based on randomly chosen\nfeatures and split values. Data points that require fewer splits to be isolated are more likely\nto be anomalies, while normal points typically require more splits. The average path length\nacross trees is used to compute an anomaly score, where shorter paths indicate higher anomaly\nlikelihood.\nThe main steps of Isolation Forest (IForest) for anomaly detection are:\n* Randomly select a subsample of the training data to build each tree.\n* For each tree, recursively split the data by choosing a random feature and a random split\nvalue within its range, until the data is isolated or the maximum tree depth is reached.\n* For each sample, compute its path length (the number of splits required for isolation) in\nevery tree.\n* Average the path lengths across all trees and normalize them to compute the anomaly score.\n* Classify samples as anomalies if their score exceeds a chosen threshold (higher score →\nmore anomalous).\n\n19\n\n\fPublished as a conference paper at ICLR 2026\n\nExample Prompt ptcode = ptdescription + ptobjective + ptrequirements (the input of Eq. 3) for\nGenerating Synthesis Code\nYou are an expert in anomaly detection systems. The training set contains only normal samples.\nWe use a IForest detector, where the anomaly score is computed using model.predict_score().\nThe higher the score, the more anomalous the sample.\nThe description of IForest.\nIsolation Forest (IForest) is an ensemble-based anomaly detection method that isolates anomalies instead of profiling normal data points. The key intuition is that anomalies are few and\ndifferent, so they are easier to isolate using random partitions. IForest builds multiple random\nbinary trees (isolation trees) by recursively splitting data based on randomly chosen features\nand split values. Data points that require fewer splits to be isolated are more likely to be\nanomalies, while normal points typically require more splits. The average path length across\ntrees is used to compute an anomaly score, where shorter paths indicate higher anomaly\nlikelihood.\nThe main steps of Isolation Forest (IForest) for anomaly detection are:\n* Randomly select a subsample of the training data to build each tree.\n* For each tree, recursively split the data by choosing a random feature and a random split\nvalue within its range, until the data is isolated or the maximum tree depth is reached.\n* For each sample, compute its path length (the number of splits required for isolation) in\nevery tree.\n* Average the path lengths across all trees and normalize them to compute the anomaly score.\n* Classify samples as anomalies if their score exceeds a chosen threshold (higher score →\nmore anomalous).\nYour task is to write a Python function generate_hard_anomalies(...) that generates anomalies\nwhich are the most difficult for the IForest detector to detect. This means that you the\ngenerated anomalies should have relatively low anomaly score, thus they are hard to be\ndetected. But these anomalies are helpful to build a more robust detector. After the Python\nfunction is completed, users can provide the function with:\n* A trained IForest model (model) that exposes predict_score(),\n* training samples (X_train).\nRequirements: Your should strictly follow below requirements:\n1. You must use your expertise to give anomalies generation policies that are specific designed\nfor IForest, not a model-agnostic policy.\n2. Generated samples should have as low a score as possible from model.predict_score().\nTo achieve it, you can first find the set of ‘borderline’ normal training samples based on\nyour unique and professional understanding to IForest, not only based on the anomaly score.\nThen transform them to anomalies that is tailor-designed for IForest. Please note that the\ntransformation function should be specific for IForest, which means that it is not a general\ntransformation for other detectors.\n3. For the model, you can only use the function model.predict_score.\n4. Use NumPy to generate the samples, and output an array of shape (n_samples, d). And it\nshould generate anomalies as much as I want.\n5. The function should allow setting:\n* the number of samples (n_samples),\n* the trained IForest model (model),\n* training samples (X_train).\nReturn only the complete Python function generate_hard_anomalies(...), with policy you used\nfor genenrating anomalies and clear comments explaining key steps.\n\n6.6\n\nE XAMPLE G ENERATED C ODE BY LLM\n\nCode 1: Generated Code (the output of Eq. 3) for IForest-Specific Hard Anomaly Generation\n1\n2\n\nimport numpy as np\ndef generate_hard_anomalies(n_samples: int , model , X_train: np.\nndarray):\n\n20\n\n\fPublished as a conference paper at ICLR 2026\n\n3\n4\n\n\"\"\"\nGenerates anomalies that are difficult for a trained Isolation\nForest (IForest) model to detect.\n\n5\n6\n\nThese \"hard\" anomalies are designed to have relatively low\nanomaly scores , making them resemble normal data from the\nperspective of the IForest , thus challenging the detector.\n\n7\n8\n9\n10\n11\n12\n\nPolicy for Generating IForest −Specific Hard Anomalies:\n−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\nThe core weakness of IForest is that it relies on axis −aligned\nsplits to isolate points.\nA sample is considered anomalous if it can be isolated in a\nfew splits (short path length).\nConversely , a sample is normal if it is \"deep\" within the data\ncloud , requiring many splits to be isolated (long path\nlength).\n\n13\n14\n\nOur strategy exploits this by creating new points that are\nconceptually anomalous but are geometrically located in a\nway that maximizes their path length , thereby fooling the\nIForest.\n\n15\n16\n\nThe policy consists of two main steps:\n\n17\n18\n\n1.\n\nIdentify ’Borderline’ Normal Samples:\nThese are the normal training samples that lie on the\nfringe or edge of the dense data cloud.\nThe IForest model is already less certain about these\npoints , assigning them the highest anomaly scores among\nall normal samples.\nThey serve as perfect \"seeds\" for our hard anomalies\nbecause they are already close to the decision boundary\n.\nWe identify these by finding the training samples in the\ntop percentile of anomaly scores.\n\n2.\n\nTransform Seeds into Hard Anomalies via ’Controlled\nExtrapolation ’:\nWe transform these borderline seeds into anomalies.\nA naive transformation (e.g., adding large random noise)\nwould create an obvious outlier with a short path\nlength , which is an∗easy∗ anomaly.\nTo create a ∗hard∗ anomaly , we must move the seed point in\na way that doesn’t significantly shorten its path\nlength.\n\n19\n20\n\n21\n\n22\n23\n24\n25\n26\n\n27\n\n28\n29\n\n30\n31\n32\n33\n\n34\n\nThe chosen transformation is a controlled extrapolation\nalong the vector pointing from the center of the\ntraining data to the borderline seed point.\n− ‘new_anomaly = seed + magnitude ∗ (seed − data_center)‘\nThis pushes the borderline point slightly further away\nfrom the data’s core , making it a true anomaly.\nHowever , because it’s moved along an existing axis of the\ndata’s distribution , it remains \"camouflaged\".\nThe new point is not in a completely isolated region of\nthe feature space but rather just outside the densest\npart of the manifold.\nAn IForest will still require a relatively high number of\nsplits to isolate it compared to a random , distant\noutlier , resulting in a deceptively low anomaly score.\n\n35\n36\n\nThis tailored approach ensures the generated anomalies\nspecifically target the operational logic of the Isolation\nForest , making them truly \"hard\" to detect.\n\n21\n\n\fPublished as a conference paper at ICLR 2026\n\n37\n38\n39\n40\n\n41\n\nArgs:\nn_samples (int): The number of hard anomaly samples to\ngenerate.\nmodel: A trained Isolation Forest model with a ‘\npredict_score()‘ method.The method should return higher\nscores for more anomalous samples.\nX_train (np.ndarray): The training data (normal samples)\nused to train the model ,with shape (n_train_samples ,\nn_features).\n\n42\n43\n44\n45\n46\n47\n\nReturns:\nnp.ndarray: An array of generated hard anomalies with\nshape (n_samples , n_features).\n\"\"\"\n# 1. All package imports must be done inside the function.\nimport numpy as np\n\n48\n49\n50\n51\n52\n53\n54\n\nif not hasattr(model , ’predict_score’):\nraise AttributeError(\"The provided model must have a ’\npredict_score’ method.\")\nif not isinstance(X_train , np.ndarray) or X_train.ndim != 2:\nraise ValueError(\"X_train must be a 2D NumPy array.\")\nif n_samples &lt;= 0:\nraise ValueError(\"n_samples must be a positive integer.\")\n\n55\n56\n57\n58\n59\n60\n61\n\n# 2. Identify ’borderline’ normal training samples.\n# These are the normal samples that the model already finds\nmost anomalous.\n# We define them as the top 20% of training samples with the\nhighest anomaly scores.\n# This percentile is a tunable parameter but 80 (for top 20%)\nis a robust choice.\nprint(\"Step 1: Identifying borderline normal samples from the\ntraining set...\")\ntrain_scores = model.predict_score(X_train)\n\n62\n63\n64\n65\n\n# Find the score threshold for the 80th percentile.\n# Samples with scores above this are our \"borderline\" seeds.\nscore_threshold = np.percentile(train_scores , 80)\n\n66\n67\n\nborderline_indices = np.where(train_scores &gt;= score_threshold)\n[0]\n\n68\n69\n70\n71\n72\n\n# If no samples are above the threshold (e.g., all scores are\nidentical),\n# fall back to using the entire training set as potential\nseeds.\nif len(borderline_indices) == 0:\nborderline_indices = np.arange(len(X_train))\n\n73\n74\n75\n\nborderline_samples = X_train[borderline_indices]\nprint(f\"Found {len(borderline_samples)} borderline samples to\nuse as seeds.\")\n\n76\n77\n78\n79\n\n# 3. Transform borderline samples into hard anomalies.\n# We will generate each hard anomaly from a randomly chosen\nborderline seed.\nprint(f\"Step 2: Generating {n_samples} hard anomalies via\ncontrolled extrapolation...\")\n\n80\n81\n82\n\n# Calculate the geometric center (mean) of the normal data\ndistribution.\ndata_center = np.mean(X_train , axis=0)\n\n83\n\n22\n\n\fPublished as a conference paper at ICLR 2026\n\nhard_anomalies = []\nfor _ in range(n_samples):\n# Randomly select a borderline sample to serve as the base\nfor our new anomaly.\n# We sample with replacement , allowing us to generate more\nanomalies than seeds.\nseed_idx = np.random.randint(0, len(borderline_samples))\nseed_sample = borderline_samples[seed_idx]\n\n84\n85\n86\n87\n88\n89\n90\n\n# Calculate the direction vector pointing from the data\ncenter to the seed sample.\n# This vector represents a direction of natural variation\nin the data.\ndirection_vector = seed_sample − data_center\n\n91\n92\n93\n94\n\n# Define a small , random magnitude for the extrapolation.\n# A small magnitude ensures the new point is not an\nobvious outlier but just\n# beyond the boundary of the normal data cloud.\n# Values between 5% and 25% of the vector length work well\n.\nmagnitude = np.random.uniform(0.05, 0.25)\n\n95\n96\n97\n98\n99\n100\n\n# Create the new hard anomaly by pushing the seed sample\nalong the direction vector.\nperturbation = direction_vector ∗ magnitude\nnew_anomaly = seed_sample + perturbation\n\n101\n102\n103\n104\n\nhard_anomalies.append(new_anomaly)\n\n105\n106\n\nprint(\"Generation complete.\")\n# 4. Return the generated samples as a NumPy array.\nreturn np.array(hard_anomalies)\n\n107\n108\n109\n\n6.7\n\nF ULL R ESULTS OF I MPROVEMENT OVER S OURCE D ETECTORS\n\nWe evaluate the effectiveness of LLM-DAS by measuring its improvements over the original source\ndetectors across 36 benchmark datasets. The full results are provided in Table 4 and Table 5.\n6.8\n\nF ULL R ESULTS OF C OMPARISON WITH OTHER BASELINE M ETHODS\n\nWe further compare the performance of LLM-DAS with conventional and advanced TAD baselines.\nThe full results are detailed in Table 6 and Table 7. Since LLM-DAS and the recent finetune-based\nAnoLLM (Tsai et al., 2025) have some shared datasets, we cite the results of AnoLLM due to its\nhigh computational cost, and perform other methods on the shared subsets.\n\n23\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 4: The performance improvement achieved by LLM-DAS (Ft ) over trained source detectors\n(ft ) on 36 datasets in terms of AUC-PR (↑).\nPCA +LLM-DAS\n\n+LLM-DAS OCSVM +LLM-DAS\n\nECOD\n\n+LLM-DAS\n\nDRL\n\n+LLM-DAS\n\n0.645±0.002\n0.104±0.002\n0.304±0.008\n0.466±0.003\n0.977±0.038\n0.503±0\n0.716±0.026\n0.664±0.009\n0.702±0.021\n0.573±0.007\n0.125±0.045\n0.477±0.024\n0.844±0.02\n0.896±0.007\n0.97±0.028\n0.543±0.007\n0.322±0.004\n1±0\n0.087±0.003\n0.863±0.025\n0.498±0.028\n0.569±0.014\n0.803±0.006\n0.934±0.008\n0.992±0\n0.737±0.007\n0.031±0.003\n0.765±0.01\n0.403±0.068\n0.274±0.015\n0.881±0.016\n0.93±0.046\n0.375±0.043\n0.289±0.098\n0.393±0.013\n0.543±0.017\n\n0.885±0.006\n0.121±0.007\n0.676±0.018\n0.627±0.036\n0.997±0.004\n0.501±0.006\n0.833±0.024\n0.754±0\n0.916±0.004\n0.665±0\n0.167±0\n0.663±0.109\n0.924±0.007\n0.99±0.013\n1±0.062\n0.841±0.02\n0.887±0.017\n1±0.009\n0.936±0\n0.921±0.009\n0.936±0.135\n0.745±0.012\n0.869±0.008\n0.97±0.044\n0.982±0.006\n0.841±0.008\n0.058±0.011\n0.863±0.021\n0.285±0.043\n0.451±0.025\n0.974±0.032\n1±0.016\n0.454±0.058\n1±0.03\n0.502±0.057\n0.542±0.008\n\n0.902±0.001\n0.12±0.008\n0.762±0.021\n0.73±0.014\n0.997±0.001\n0.495±0.004\n0.886±0.038\n0.805±0.026\n0.947±0.004\n0.705±0.043\n0.493±0.116\n0.696±0.107\n0.944±0.008\n0.985±0.004\n0.871±0.07\n0.529±0.025\n0.911±0.018\n1±0\n0.957±0.017\n0.966±0.007\n0.885±0.025\n0.791±0.007\n0.894±0.009\n0.98±0.006\n0.999±0\n0.933±0.013\n0.119±0.01\n0.877±0.017\n0.566±0.093\n0.892±0.016\n0.934±0.018\n1±0\n0.593±0.05\n1±0\n0.567±0.044\n0.528±0.009\n\n0.855±0.005\n0.109±0.002\n0.62±0.055\n0.602±0.037\n0.995±0.002\n0.452±0.007\n0.622±0.032\n0.638±0.041\n0.896±0.006\n0.577±0.02\n0.12±0.02\n0.566±0.069\n0.859±0.023\n0.869±0.035\n0.979±0.02\n0.571±0.019\n0.601±0.01\n1±0\n0.179±0.043\n0.951±0.011\n0.602±0.049\n0.74±0.017\n0.808±0.007\n0.871±0.085\n0.995±0.001\n0.889±0.007\n0.032±0.007\n0.886±0.053\n0.269±0.084\n0.178±0.011\n0.823±0.033\n0.994±0.009\n0.278±0.049\n0.456±0.076\n0.399±0.017\n0.546±0.019\n\n0.846±0\n0.105±0\n0.183±0\n0.534±0\n0.993±0\n0.475±0\n0.861±0\n0.662±0\n0.837±0\n0.606±0\n0.09±0\n0.282±0\n0.788±0\n0.897±0\n0.811±0\n0.418±0\n0.169±0\n0.061±0\n0.069±0\n0.889±0\n0.518±0\n0.701±0\n0.778±0\n0.919±0\n0.949±0\n0.814±0\n0.028±0\n0.813±0\n0.152±0\n0.297±0\n0.839±0\n0.435±0\n0.225±0\n0.142±0\n0.397±0\n0.48±0\n\n0.849±0.005 0.655±0\n0.106±0\n0.104±0\n0.248±0.01\n0.4±0\n0.609±0.012 0.446±0.005\n0.995±0\n0.952±0\n0.435±0\n0.471±0\n0.808±0.015 0.364±0\n0.703±0.057 0.697±0\n0.843±0.022 0.685±0\n0.542±0.01 0.517±0\n0.201±0.033 0.111±0\n0.3±0.007\n0.405±0\n0.859±0.011 0.737±0\n0.838±0.012 0.971±0\n0.934±0.03 0.897±0\n0.536±0.022 0.538±0\n0.181±0.012 0.302±0.007\n0.868±0.075 0.982±0\n0.928±0 0.067±0.006\n0.92±0.021\n0.891±0\n0.491±0.044 0.415±0\n0.651±0.036 0.588±0\n0.832±0.005 0.833±0\n0.9±0.014\n0.778±0\n0.991±0.001 0.982±0\n0.814±0\n0.713±0\n0.029±0.002 0.029±0\n0.633±0.014 0.681±0\n0.273±0.038 0.192±0\n0.21±0.02\n0.177±0\n0.793±0.034 0.722±0\n0.874±0.059 0.773±0\n0.219±0.06 0.077±0\n0.334±0.172 0.358±0\n0.407±0.015 0.353±0\n0.515±0.007 0.494±0\n\nAverage AUC-PR 0.597±0 0.638±0.011 0.572±0.02 0.634±0.027\n\n0.53±0\n\n0.602±0.024 0.538±0.001 0.589±0.019 0.744±0.024 0.785±0.024\n\nAbalone\n0.839±0\nAmazon\n0.107±0\nAnnthyroid\n0.566±0\nArrhythmia\n0.534±0\nBreastw\n0.993±0\nCampaign\n0.488±0\nCardio\n0.863±0\nCardiotocography 0.697±0\nComm.and.crime 0.889±0\nFault\n0.604±0\nGlass\n0.09±0\nHepatitis\n0.583±0\nImgseg\n0.772±0\nIonosphere\n0.897±0\nLympho\n1±0\nMammography 0.417±0\nMnist\n0.65±0\nMusk\n1±0\nOptdigits\n0.06±0\nParkinson\n0.93±0\nPendigits\n0.386±0\nPima\n0.701±0\nSatellite\n0.778±0\nSatimage-2\n0.919±0\nShuttle\n0.963±0\nSpamBase\n0.818±0\nSpeech\n0.028±0\nThyroid\n0.813±0\nVertebral\n0.138±0\nVowels\n0.105±0\nWbc\n0.839±0\nWDBC\n0.983±0\nWilt\n0.064±0\nWine\n0.133±0\nWPBC\n0.394±0\nYeast\n0.468±0\n\n0.841±0\n0.108±0.001\n0.66±0.009\n0.551±0.013\n0.996±0.001\n0.488±0\n0.824±0.014\n0.734±0.006\n0.881±0.002\n0.603±0.009\n0.128±0.016\n0.626±0.038\n0.824±0.014\n0.926±0.026\n0.989±0.022\n0.579±0.008\n0.65±0\n0.997±0.006\n0.06±0\n0.944±0.004\n0.485±0.047\n0.751±0.005\n0.792±0.001\n0.931±0.01\n0.991±0.002\n0.823±0.002\n0.029±0.001\n0.815±0.022\n0.143±0.004\n0.109±0.01\n0.84±0.013\n0.98±0.01\n0.097±0.011\n0.846±0.044\n0.408±0.015\n0.505±0.005\n\nIForest\n0.848±0.003\n0.109±0.002\n0.615±0.053\n0.51±0.034\n0.945±0\n0.461±0.007\n0.702±0.039\n0.604±0.032\n0.894±0.009\n0.595±0.014\n0.095±0.006\n0.418±0.022\n0.756±0.012\n0.977±0.008\n0.959±0.023\n0.333±0.032\n0.535±0.013\n0.528±0.202\n0.157±0.015\n0.96±0.004\n0.513±0.02\n0.666±0.007\n0.858±0.006\n0.885±0.007\n0.917±0.005\n0.89±0.006\n0.035±0.009\n0.606±0.025\n0.134±0.001\n0.098±0.013\n0.857±0.015\n0.975±0.029\n0.085±0.004\n0.246±0.026\n0.376±0.012\n0.465±0.004\n\n24\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 5: The performance improvement achieved by LLM-DAS (Ft ) over trained source detectors\n(ft ) on 36 datasets in terms of AUC-ROC (↑).\nPCA +LLM-DAS\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.704±0\n0.549±0\n0.852±0\n0.768±0\n0.994±0\n0.771±0\n0.966±0\n0.789±0\n0.787±0\n0.559±0\n0.548±0\n0.812±0\n0.674±0\n0.877±0\n1±0\n0.899±0\n0.902±0\n1±0\n0.582±0\n0.693±0\n0.944±0\n0.713±0\n0.666±0\n0.982±0\n0.994±0\n0.814±0\n0.364±0\n0.986±0\n0.175±0\n0.523±0\n0.967±0\n0.999±0\n0.261±0\n0.447±0\n0.469±0\n0.432±0\n\n0.705±0.001\n0.549±0\n0.906±0.006\n0.776±0.015\n0.996±0.001\n0.771±0\n0.958±0.006\n0.804±0.007\n0.779±0.002\n0.592±0.005\n0.62±0.03\n0.835±0.022\n0.708±0.031\n0.911±0.026\n0.999±0.003\n0.907±0.002\n0.902±0\n1±0\n0.582±0\n0.729±0.013\n0.949±0.005\n0.739±0.004\n0.678±0.001\n0.984±0.001\n0.998±0.001\n0.815±0.002\n0.402±0.014\n0.985±0.002\n0.192±0.015\n0.559±0.011\n0.966±0.001\n0.999±0.001\n0.474±0.06\n0.933±0.015\n0.471±0.012\n0.456±0.005\n\nIForest\n0.735±0.006\n0.559±0.008\n0.911±0.022\n0.773±0.01\n0.972±0\n0.727±0.005\n0.922±0.017\n0.725±0.028\n0.804±0.014\n0.561±0.018\n0.577±0.014\n0.726±0.02\n0.686±0.021\n0.968±0.006\n0.995±0.003\n0.822±0.005\n0.862±0.006\n0.952±0.024\n0.824±0.026\n0.768±0.016\n0.967±0.003\n0.674±0.006\n0.803±0.007\n0.994±0.002\n0.996±0.001\n0.858±0.009\n0.381±0.014\n0.927±0.001\n0.144±0.011\n0.59±0.031\n0.972±0.003\n0.998±0.002\n0.46±0.027\n0.657±0.095\n0.498±0.011\n0.41±0.007\n\n+LLM-DAS OCSVM +LLM-DAS\n0.746±0.007\n0.559±0.008\n0.925±0.018\n0.795±0.022\n0.995±0.002\n0.729±0.005\n0.919±0.015\n0.768±0.036\n0.807±0.01\n0.558±0.018\n0.624±0.027\n0.778±0.021\n0.833±0.049\n0.844±0.031\n0.998±0.003\n0.903±0.003\n0.876±0.005\n1±0\n0.837±0.032\n0.74±0.035\n0.975±0.005\n0.74±0.017\n0.754±0.014\n0.989±0.002\n0.999±0.001\n0.857±0.007\n0.4±0.008\n0.995±0.002\n0.423±0.101\n0.727±0.034\n0.953±0.018\n1±0.001\n0.765±0.03\n0.748±0.065\n0.502±0.006\n0.526±0.024\n\n0.724±0\n0.542±0\n0.555±0\n0.769±0\n0.994±0\n0.763±0\n0.965±0\n0.752±0\n0.705±0\n0.568±0\n0.548±0\n0.496±0\n0.741±0\n0.877±0\n0.981±0\n0.9±0\n0.5±0\n0.5±0\n0.634±0\n0.604±0\n0.964±0\n0.713±0\n0.666±0\n0.982±0\n0.997±0\n0.768±0\n0.367±0\n0.986±0\n0.265±0\n0.756±0\n0.967±0\n0.964±0\n0.792±0\n0.485±0\n0.47±0\n0.448±0\n\nECOD\n\n0.728±0.007 0.487±0\n0.542±0\n0.538±0\n0.667±0.013 0.785±0\n0.774±0.011 0.72±0.007\n0.996±0\n0.965±0\n0.689±0\n0.756±0\n0.954±0.002 0.637±0\n0.761±0.034 0.789±0\n0.713±0.035 0.517±0\n0.561±0.006 0.504±0\n0.644±0.015 0.624±0\n0.513±0.007 0.699±0\n0.778±0.016 0.624±0\n0.839±0.005 0.957±0\n0.992±0.004 0.991±0\n0.897±0.005 0.825±0\n0.508±0.008 0.749±0.011\n0.986±0.009 0.999±0\n0.997±0 0.615±0.009\n0.67±0.058\n0.515±0\n0.951±0.001\n0.93±0\n0.627±0.032 0.583±0\n0.799±0.007 0.788±0\n0.984±0.004 0.965±0\n0.999±0\n0.998±0\n0.768±0\n0.688±0\n0.385±0.008\n0.36±0\n0.956±0.008 0.883±0\n0.574±0.062 0.412±0\n0.716±0.017 0.615±0\n0.952±0.009 0.875±0\n0.994±0.002 0.979±0\n0.762±0.022 0.375±0\n0.669±0.221 0.743±0\n0.472±0.018 0.471±0\n0.464±0.002 0.446±0\n\n+LLM-DAS\n\nDRL\n\n+LLM-DAS\n\n0.475±0.002\n0.539±0.004\n0.745±0.013\n0.74±0.005\n0.985±0.021\n0.775±0.001\n0.931±0.005\n0.778±0.008\n0.525±0.031\n0.533±0.005\n0.425±0.073\n0.707±0.052\n0.813±0.024\n0.873±0.008\n0.997±0.003\n0.907±0.001\n0.769±0.002\n1±0\n0.635±0.001\n0.472±0.071\n0.945±0.006\n0.552±0.014\n0.788±0.006\n0.993±0.001\n0.998±0\n0.703±0.008\n0.394±0.037\n0.972±0.009\n0.65±0.038\n0.766±0.022\n0.968±0.008\n0.993±0.006\n0.801±0.026\n0.648±0.11\n0.517±0.024\n0.526±0.031\n\n0.809±0.008\n0.57±0.016\n0.924±0.007\n0.774±0.013\n0.997±0.003\n0.771±0.004\n0.956±0.009\n0.84±0\n0.846±0.008\n0.628±0\n0.697±0\n0.812±0.038\n0.909±0.009\n0.984±0.015\n1±0.002\n0.946±0.012\n0.971±0.004\n1±0\n0.997±0\n0.673±0.035\n0.998±0.019\n0.765±0.015\n0.832±0.008\n0.997±0.004\n0.999±0\n0.829±0.008\n0.582±0.031\n0.991±0.003\n0.622±0.057\n0.851±0.004\n0.996±0.008\n1±0.001\n0.936±0.007\n1±0.007\n0.62±0.045\n0.512±0.015\n\n0.837±0.003\n0.553±0.025\n0.949±0.013\n0.832±0.007\n0.997±0\n0.753±0.004\n0.968±0.015\n0.853±0.029\n0.894±0.007\n0.698±0.05\n0.906±0.044\n0.869±0.035\n0.915±0.011\n0.978±0.007\n0.991±0.003\n0.883±0.013\n0.974±0.004\n1±0\n0.99±0.005\n0.832±0.026\n0.994±0.002\n0.782±0.009\n0.873±0.013\n0.998±0.001\n1±0\n0.912±0.019\n0.577±0.035\n0.987±0.003\n0.763±0.075\n0.987±0.003\n0.988±0.003\n1±0\n0.919±0.011\n1±0\n0.67±0.031\n0.49±0.017\n\nAverage AUC-ROC 0.735±0 0.767±0.009 0.755±0.014 0.794±0.019 0.714±0 0.758±0.018 0.706±0.001 0.745±0.019 0.851±0.012 0.878±0.015\n\n25\n\n\f0.547\n10.2381\n1\n\n0.6149\n0.5097\n0.9449\n0.0952\n0.9768\n0.9593\n0.3334\n0.5279\n0.157\n0.5133\n0.6662\n0.8583\n0.8846\n0.9172\n0.0353\n0.6055\n0.1342\n0.0984\n0.8573\n0.2458\n0.4654\n\n26\n0.5472\n11.2381\n1\n\n0.5291\n0.3029\n0.9896\n0.1079\n0.7328\n0.2709\n0.253\n1\n0.1418\n0.8904\n0.7174\n0.8218\n0.9688\n0.9316\n0.027\n0.8096\n0.1476\n0.3475\n0.8578\n0.1605\n0.4833\n\nIForest ECOD DeepSVDD AutoEncoder\n\nAverage AUC-PR 0.5082 0.6607 0.6129 0.5632 0.5429 0.5529\nAverage ranking 12.1429 10.7143 9.3810 11.6429 12.1429 11.7619\nWin\n0\n1\n1\n2\n0\n0\n\n0.3525 0.4513 0.5657\n0.6008 0.5277 0.5336\n0.9712 0.9923 0.9934\n0.1099 0.0923 0.0896\n0.9297 0.9591 0.8969\n0.9401 0.9762\n1\n0.381 0.4063 0.4165\n0.9917\n1\n1\n0.8589 0.4363 0.0602\n0.9692 0.7855 0.3863\n0.7098 0.697 0.7008\n0.8515 0.8088 0.7778\n0.9555 0.9692 0.9192\n0.937 0.9601 0.9627\n0.0197 0.0315 0.0277\n0.5903 0.7892 0.8134\n0.1239 0.2063 0.1381\n0.3146 0.3277 0.1051\n0.8022 0.8412 0.8391\n0.9917 0.1253 0.1325\n0.4737 0.4866 0.4678\n\nPCA\n0.3235\n0.6036\n0.9924\n0.0912\n0.867\n0.9749\n0.419\n1\n0.1159\n0.0616\n0.7165\n0.8217\n0.9427\n0.9818\n0.04\n0.7282\n0.159\n0.1717\n0.834\n0.1476\n0.4953\n\n0.1831\n0.5339\n0.9934\n0.0896\n0.8969\n0.8107\n0.4178\n0.0614\n0.0692\n0.5178\n0.7008\n0.7778\n0.9192\n0.9488\n0.0279\n0.8134\n0.1517\n0.2969\n0.8391\n0.1424\n0.4803\n\nLOF\n0.4002\n0.4461\n0.9522\n0.1113\n0.9713\n0.8972\n0.538\n0.982\n0.0669\n0.4145\n0.5877\n0.8334\n0.7775\n0.9815\n0.0287\n0.6807\n0.1917\n0.1772\n0.7217\n0.3578\n0.4943\n\nAnnthyroid\nArrhythmia\nBreastw\nGlass\nIonosphere\nLympho\nMammography\nMusk\nOptdigits\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWine\nYeast\n\nOCSVM KNN\n0.6761\n0.627\n0.9966\n0.167\n0.9895\n1\n0.8406\n1\n0.9356\n0.936\n0.7449\n0.8692\n0.9703\n0.9819\n0.0584\n0.8626\n0.2854\n0.4506\n0.9742\n1\n0.5416\n\n0.5607 0.6006 0.6348 0.6961 0.7575\n10.0952 10 7.9048 6.7619 3.1667\n1\n1\n0\n2\n7\n\n0.62\n0.4345\n0.9813\n0.2204\n0.9812\n0.9929\n0.364\n1\n0.4203\n0.9671\n0.7527\n0.8576\n0.9862\n0.9151\n0.0584\n0.8179\n0.2279\n0.9498\n0.8079\n0.7746\n0.4888\n0.6851\n6.619\n3\n\n0.631\n0.636\n0.991\n0.247\n0.933\n0.856\n0.592\n1\n0.75\n0.623\n0.677\n0.91\n0.988\n0.997\n0.036\n0.696\n0.289\n0.839\n0.873\n0.522\n0.301\n\n0.637\n8.119\n1\n\n0.648\n0.642\n0.992\n0.234\n0.932\n0.938\n0.364\n1\n0.398\n0.554\n0.674\n0.891\n0.974\n0.996\n0.037\n0.74\n0.181\n0.599\n0.753\n0.529\n0.302\n\n0.6249\n8.5714\n0\n\n0.6602\n0.5508\n0.9956\n0.1278\n0.926\n0.9889\n0.5793\n0.9969\n0.0602\n0.4847\n0.7509\n0.7921\n0.9311\n0.9906\n0.0293\n0.8146\n0.1433\n0.109\n0.84\n0.8459\n0.5053\n\n0.7994\n2.5\n12\n\n0.7618\n0.7298\n0.9972\n0.4934\n0.9846\n0.8706\n0.5288\n1\n0.9566\n0.8848\n0.7912\n0.8942\n0.9804\n0.9991\n0.1189\n0.877\n0.5657\n0.8918\n0.9341\n1\n0.5281\n\nDTE MCM NPT-AD DRL AnoLLM(135M) AnoLLM(360M) Ours(PCA) Ours(DRL)\n\n0.4114 0.6288 0.3215\n0.6155 0.4912 0.6107\n0.9656 0.8825 0.9952\n0.2573 0.2151 0.1905\n0.9777 0.9683 0.9802\n0.6091 0.8677 0.4204\n0.1894 0.3985 0.4755\n1\n1\n0.639\n0.1696 0.1534 0.8885\n0.4039 0.4844 0.8258\n0.6965 0.6798 0.7389\n0.8799 0.8479 0.8532\n0.8124 0.6821 0.985\n0.9811 0.9403 0.9479\n0.0335 0.0285 0.038\n0.6575 0.8167 0.8417\n0.1598 0.2514 0.1949\n0.1574 0.381 0.0977\n0.7218 0.3997 0.8887\n0.5659 0.9985 0.9335\n0.5097 0.4974 0.4631\n\nICL\n\nTable 6: Comparison of AUC-PR (↑) results between other baseline methods and LLM-DAS.\n\nPublished as a conference paper at ICLR 2026\n\n\f0.7845\n0.7199\n0.9649\n0.6235\n0.9569\n0.9906\n0.8251\n0.9987\n0.6145\n0.9295\n0.5834\n0.7884\n0.965\n0.9978\n0.3596\n0.8827\n0.4124\n0.6147\n0.8747\n0.7433\n0.4464\n\n0.7311 0.8045 0.7974 0.7481 0.7766 0.7655\n11.8095 11.3810 8.8333 11.5952 11.2857 12.7143\n0\n0\n1\n2\n0\n0\n\n0.9112\n0.7734\n0.9719\n0.5771\n0.9683\n0.9945\n0.822\n0.9521\n0.8239\n0.9666\n0.6737\n0.8026\n0.9938\n0.9961\n0.3812\n0.9271\n0.1444\n0.5902\n0.9715\n0.6571\n0.4095\n\n27\n0.7448\n10.3095\n1\n\n0.5678\n0.7941\n0.9925\n0.5566\n0.8552\n0.9977\n0.8879\n1\n0.7603\n0.4563\n0.7348\n0.7659\n0.9881\n0.9952\n0.5071\n0.9887\n0.2706\n0.5734\n0.9633\n0.5067\n0.479\n0.7418\n11.2857\n1\n\n0.7295\n0.5682\n0.9909\n0.6088\n0.6231\n0.7856\n0.8472\n1\n0.6694\n0.9937\n0.7163\n0.7233\n0.9979\n0.9944\n0.3633\n0.978\n0.2375\n0.7905\n0.9737\n0.5356\n0.4503\n\nIForest ECOD DeepSVDD AutoEncoder\n\nAverage\nRank\nWin\n\n0.6903 0.7216 0.8519\n0.7933 0.7688 0.7684\n0.9714 0.9937 0.9938\n0.6141 0.562 0.548\n0.9167 0.9454 0.8765\n0.987 0.9977\n1\n0.864 0.8922 0.8993\n0.9917\n1\n1\n0.9862 0.9665 0.5817\n0.9906 0.9905 0.9437\n0.6723 0.6913 0.7133\n0.8139 0.7391 0.6663\n0.9891 0.9961 0.9817\n0.9893 0.9983 0.9936\n0.3561 0.3759 0.3638\n0.9525 0.9856 0.9855\n0.1171 0.4317 0.1746\n0.8174 0.8564 0.5229\n0.9536 0.967 0.9667\n0.9917 0.4083 0.4467\n0.4366 0.4571 0.4324\n\nPCA\n\n0.5551\n0.7689\n0.9938\n0.548\n0.8765\n0.9812\n0.9003\n0.5\n0.6338\n0.9636\n0.7133\n0.6663\n0.9817\n0.9969\n0.3673\n0.9855\n0.2654\n0.7557\n0.9667\n0.485\n0.4483\n\nLOF\n\nAnnthyroid\nArrhythmia\nBreastw\nGlass\nIonosphere\nLympho\nMammography\nMusk\nOptdigits\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWine\nYeast\n\nOCSVM KNN\n0.9239\n0.7742\n0.9968\n0.6969\n0.984\n1\n0.9455\n1\n0.9972\n0.9979\n0.7651\n0.832\n0.9968\n0.9992\n0.5821\n0.9911\n0.6216\n0.8511\n0.9963\n1\n0.512\n\n0.8028 0.8174 0.8263 0.8665 0.8792\n10.4762 9.3810 7.8571 6.8571 3.7143\n1\n1\n0\n3\n6\n\n0.8682\n0.7185\n0.9848\n0.7875\n0.9735\n0.9993\n0.8873\n1\n0.9317\n0.9987\n0.7553\n0.806\n0.9995\n0.9931\n0.5925\n0.9787\n0.5347\n0.9935\n0.9619\n0.9622\n0.4691\n0.8801\n6.2381\n3\n\n0.927\n0.825\n0.992\n0.819\n0.909\n0.968\n0.915\n1\n0.983\n0.971\n0.663\n0.902\n1\n1\n0.47\n0.975\n0.565\n0.982\n0.964\n0.909\n0.744\n\n0.8620\n7.1905\n2\n\n0.931\n0.822\n0.993\n0.797\n0.924\n0.993\n0.876\n1\n0.939\n0.964\n0.654\n0.877\n0.999\n1\n0.47\n0.983\n0.408\n0.938\n0.952\n0.851\n0.73\n\n0.7766\n8.6667\n6\n\n0.9065\n0.7757\n0.6196\n0.9109\n0.9986\n0.9074\n0.9998\n0.5817\n0.9487\n0.7393\n0.6783\n0.9837\n0.9977\n0.4020\n0.9849\n0.1917\n0.5591\n0.9656\n0.9333\n0.4557\n0.7674\n\n0.9032\n3.4048\n7\n\n0.9492\n0.8316\n0.9972\n0.9061\n0.9779\n0.9911\n0.8834\n1\n0.9902\n0.9941\n0.7818\n0.8726\n0.9984\n0.9999\n0.5774\n0.9873\n0.7629\n0.9869\n0.9883\n1\n0.4905\n\nDTE MCM NPT-AD DRL AnoLLM(135M) AnoLLM(360M) Ours(PCA) Ours(DRL)\n\n0.6997 0.909 0.6894\n0.8145 0.5912 0.8114\n0.9725 0.9278 0.9955\n0.835 0.6964 0.7225\n0.971 0.9542 0.9726\n0.9546 0.9899 0.9257\n0.6548 0.8862 0.9053\n1\n1 0.9752\n0.787 0.8238 0.9947\n0.9142 0.9761 0.9919\n0.6727 0.6788 0.7639\n0.8549 0.7661 0.7962\n0.9792 0.9967 0.9992\n0.9935 0.9993 0.9975\n0.4883 0.3817 0.4409\n0.9518 0.9863 0.9804\n0.2821 0.543 0.3767\n0.702 0.8142 0.6529\n0.908 0.8054 0.9814\n0.915 0.9944 0.9538\n0.5076 0.4458 0.4259\n\nICL\n\nTable 7: Comparison of AUC-ROC (↑) results between other baseline methods and LLM-DAS.\n\nPublished as a conference paper at ICLR 2026\n\n\fPublished as a conference paper at ICLR 2026\n\n6.9\n\nVARYING LLM BACKBONES\n\nTo investigate the impact of using different LLMs in our framework, given their distinct prior knowledge and reasoning abilities from being trained on various text corpora, we measured performance\nusing not only Gemini-2.5-Pro but also the GPT-4o and Qwen3 as a backbone for comparison.\nThough the performance of LLM-DAS on Qwen3 slightly drops compared to Gemini-2.5-pro and\nGPT-4o, it still surpasses the base detector by a large margin. The results clearly show that LLM-DAS\nmaintains its strong performance across all three LLMs.\nTable 8: Effects of various LLM backbones. The AUC-PR results are averaged across all datasets.\nHere, we use OCSVM as the base detector.\n\n6.10\n\nOCSVM\n\n+LLM-DAS (Qwen3)\n\n+LLM-DAS (GPT-4o)\n\n+LLM-DAS (Gemini-2.5-Pro)\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8459\n0.1050\n0.1831\n0.5339\n0.9934\n0.4749\n0.8614\n0.6619\n0.8371\n0.6062\n0.0896\n0.2815\n0.7883\n0.8969\n0.8107\n0.4178\n0.1686\n0.0614\n0.0692\n0.8892\n0.5178\n0.7008\n0.7778\n0.9192\n0.9488\n0.8136\n0.0279\n0.8134\n0.1517\n0.2969\n0.8391\n0.4348\n0.2254\n0.1424\n0.3974\n0.4803\n\n0.8460\n0.1048\n0.4490\n0.5898\n0.9966\n0.4417\n0.8625\n0.6244\n0.8360\n0.5597\n0.2215\n0.4196\n0.7970\n0.8212\n0.6816\n0.4181\n0.4366\n0.9605\n0.8242\n0.9381\n0.5584\n0.6090\n0.8225\n0.7065\n0.9955\n0.8331\n0.0275\n0.3506\n0.2292\n0.1860\n0.6796\n0.8900\n0.1914\n0.4390\n0.4010\n0.4880\n\n0.8465\n0.1058\n0.4532\n0.5965\n0.9969\n0.4409\n0.8551\n0.6773\n0.8394\n0.5637\n0.2204\n0.4481\n0.8056\n0.8211\n0.7346\n0.4440\n0.4573\n0.9561\n0.8456\n0.9420\n0.5563\n0.6377\n0.8326\n0.8207\n0.9958\n0.8305\n0.0278\n0.3505\n0.2336\n0.1843\n0.6811\n0.8733\n0.2619\n0.4679\n0.3978\n0.4872\n\n0.8487\n0.1061\n0.2483\n0.6086\n0.9954\n0.4349\n0.8083\n0.7029\n0.8434\n0.5417\n0.2006\n0.3002\n0.8592\n0.8384\n0.9337\n0.5359\n0.1806\n0.8676\n0.9281\n0.9200\n0.4912\n0.6514\n0.8319\n0.8996\n0.9906\n0.8138\n0.0294\n0.6326\n0.2733\n0.2098\n0.7928\n0.8740\n0.2193\n0.3335\n0.4065\n0.5148\n\nAverage\n\n0.5295\n\n0.5899\n\n0.6025\n\n0.6019\n\nC OMPUTATIONAL E FFICIENCY.\n\nAs shown in Table 9, LLM-DAS remains computationally efficient in both training and inference\nstages. This efficiency comes from two key properties: (i) LLM-DAS does not require repeatedly\nquerying or fine-tuning LLMs; instead, the detector-specific synthesis code is generated once per\nanomaly type and reused across datasets, and (ii) inference only involves an additional lightweight\nbinary classifier on top of the source detector, introducing negligible overhead.\n6.11\n\nV ISUALIZATION AND KDE A NALYSIS OF S YNTHETIC A NOMALIES\n\nTo further examine the quality of anomalies synthesized by LLM-DAS, we utilize T-SNE and Kernel\nDensity Estimation (KDE) plots of anomaly scores on the Thyroid and Vertebral datasets.\n\n28\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 9: Runtime in seconds of baseline ft and LLM-DAS Ft for the training and inference, averaged\nover all datasets. The training time of ft is not included in the LLM-DAS training time. LLM-DAS\ntraining time includes anomalies synthesis and binary classifier f˜t training, while excluding the\ntwo-time LLM querying cost for code generation, as the resulting synthesis code is reusable across\nany dataset.\nStage\n\nPCA\n\nIForest\n\nOCSVM\n\nECOD\n\nDRL\n\nBaseline Train\nLLM-DAS Train\nBaseline Test\nLLM-DAS Test\n\n0.2891\n0.5186\n0.2402\n0.3389\n\n0.8091\n1.1474\n0.2391\n0.3089\n\n4.4825\n6.4229\n1.8455\n2.5990\n\n0.1313\n0.1890\n0.2727\n0.3207\n\n23.6555\n1.5253\n0.0777\n0.2390\n\n(a)\n\n(b)\n\n(c)\n\n(d)\n\n(e)\n\n(f)\n\nFigure 6: Visualization of synthetic hard anomalies and score distributions on Thyroid and Vertebral test\ndataset. (a, d) T-SNE plots of normal, real anomaly, and LLM-DAS–generated anomaly samples. (b, e) Kernel\ndensity estimation (KDE) of anomaly scores from the source detector ft . (c, f) KDE of anomaly scores from the\nenhanced detector Ft .\n\n29\n\n\fPublished as a conference paper at ICLR 2026\n\n6.12\n\nS ENSITIVITY A NALYSIS\n\nWe incorporate the sensitivity analysis for the number of synthetic samples (set to the ratio of training\nset size), performance robustness across different queries and the type of binary classifiers. We also\nverify the effectiveness of summing ft and f˜t .\n\n0.850\n\n0.825\n\nPCA+LLM-DAS\nPCA\n\n0.800\n\nAUC-PR\n\nAUC-PR\n\n0.850\n\n0.775\n0.1\n\n0.2\n\nratio\n\n0.3\n\n0.750\n\n0.4\n\nIForest+LLM-DAS\nIForest\n\n0.800\n0.1\n\n0.2\n\nratio\n\n0.3\n\n0.4\n\nFigure 7: AUC-PR-based performance comparison of different anomalous samples injection ratios on the\nImgseg dataset, with results for PCA (left) and IForest (right).\n\nTable 10: AUC-PR performance of PCA and PCA+LLM-DAS under different anomaly synthesis\nratios.\nPCA\n\n0.1\n\n0.2\n\nLLM-DAS with various anomaly synthesis ratios\n0.3\n0.4\n0.5\n0.6\n0.7\n0.8\n\n0.9\n\n1\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.839\n0.107\n0.566\n0.534\n0.993\n0.488\n0.863\n0.697\n0.889\n0.604\n0.090\n0.583\n0.772\n0.897\n1.000\n0.417\n0.650\n1.000\n0.060\n0.930\n0.386\n0.701\n0.778\n0.919\n0.963\n0.818\n0.028\n0.813\n0.138\n0.105\n0.839\n0.983\n0.064\n0.133\n0.394\n0.468\n\n0.841\n0.108\n0.660\n0.551\n0.996\n0.488\n0.824\n0.734\n0.881\n0.603\n0.128\n0.626\n0.824\n0.926\n0.989\n0.579\n0.650\n0.997\n0.060\n0.944\n0.485\n0.751\n0.792\n0.931\n0.991\n0.823\n0.029\n0.815\n0.143\n0.109\n0.840\n0.980\n0.097\n0.846\n0.408\n0.505\n\n0.841\n0.108\n0.701\n0.545\n0.996\n0.488\n0.828\n0.738\n0.875\n0.607\n0.111\n0.611\n0.823\n0.919\n0.969\n0.580\n0.650\n1.000\n0.060\n0.946\n0.467\n0.751\n0.793\n0.929\n0.991\n0.825\n0.031\n0.832\n0.139\n0.123\n0.834\n0.992\n0.108\n0.801\n0.406\n0.508\n\n0.841\n0.108\n0.690\n0.551\n0.995\n0.488\n0.850\n0.741\n0.872\n0.589\n0.114\n0.555\n0.828\n0.944\n0.968\n0.579\n0.650\n1.000\n0.060\n0.944\n0.485\n0.751\n0.790\n0.928\n0.991\n0.824\n0.033\n0.852\n0.142\n0.132\n0.840\n0.989\n0.106\n0.801\n0.415\n0.508\n\n0.841\n0.107\n0.698\n0.553\n0.995\n0.488\n0.826\n0.726\n0.876\n0.591\n0.111\n0.584\n0.829\n0.939\n0.986\n0.574\n0.650\n1.000\n0.060\n0.943\n0.478\n0.751\n0.789\n0.935\n0.991\n0.824\n0.031\n0.863\n0.142\n0.131\n0.827\n0.974\n0.120\n0.782\n0.398\n0.511\n\n0.842\n0.108\n0.698\n0.555\n0.995\n0.488\n0.812\n0.734\n0.873\n0.583\n0.105\n0.559\n0.825\n0.902\n0.963\n0.578\n0.662\n1.000\n0.060\n0.944\n0.550\n0.750\n0.790\n0.931\n0.991\n0.823\n0.032\n0.869\n0.141\n0.133\n0.818\n0.964\n0.141\n0.741\n0.413\n0.513\n\n0.841\n0.108\n0.695\n0.551\n0.995\n0.488\n0.826\n0.735\n0.872\n0.591\n0.106\n0.563\n0.840\n0.912\n0.962\n0.573\n0.651\n1.000\n0.060\n0.943\n0.544\n0.748\n0.790\n0.929\n0.990\n0.823\n0.035\n0.879\n0.142\n0.137\n0.831\n0.977\n0.132\n0.757\n0.415\n0.512\n\n0.842\n0.107\n0.712\n0.549\n0.995\n0.488\n0.826\n0.741\n0.876\n0.597\n0.106\n0.615\n0.832\n0.926\n0.968\n0.577\n0.650\n1.000\n0.060\n0.941\n0.548\n0.748\n0.789\n0.931\n0.991\n0.825\n0.029\n0.875\n0.143\n0.156\n0.846\n0.974\n0.144\n0.730\n0.416\n0.514\n\n0.841\n0.108\n0.692\n0.553\n0.996\n0.488\n0.828\n0.737\n0.878\n0.583\n0.103\n0.571\n0.838\n0.922\n0.969\n0.571\n0.650\n1.000\n0.060\n0.942\n0.585\n0.744\n0.788\n0.931\n0.991\n0.826\n0.029\n0.882\n0.140\n0.128\n0.825\n0.972\n0.123\n0.714\n0.409\n0.513\n\n0.841\n0.108\n0.691\n0.554\n0.995\n0.488\n0.830\n0.738\n0.875\n0.600\n0.103\n0.564\n0.831\n0.910\n0.990\n0.578\n0.650\n1.000\n0.060\n0.941\n0.558\n0.742\n0.788\n0.931\n0.991\n0.826\n0.030\n0.881\n0.140\n0.137\n0.826\n0.972\n0.135\n0.726\n0.400\n0.511\n\n0.841\n0.108\n0.688\n0.557\n0.996\n0.489\n0.846\n0.750\n0.877\n0.576\n0.101\n0.564\n0.831\n0.914\n0.995\n0.577\n0.650\n1.000\n0.060\n0.941\n0.546\n0.739\n0.787\n0.933\n0.991\n0.825\n0.030\n0.877\n0.141\n0.151\n0.826\n0.970\n0.137\n0.732\n0.404\n0.514\n\nAverage\n\n0.597\n\n0.638\n\n0.637\n\n0.638\n\n0.637\n\n0.636\n\n0.638\n\n0.641\n\n0.637\n\n0.637\n\n0.638\n\n30\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 11: AUC-PR performance of IForest and IForest+LLM-DAS under different anomaly synthesis\nratios.\n0.1\n\n0.2\n\nLLM-DAS with various anomaly synthesis ratios\n0.3\n0.4\n0.5\n0.6\n0.7\n0.8\n\n0.9\n\n1\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.848\n0.109\n0.615\n0.510\n0.945\n0.461\n0.702\n0.604\n0.894\n0.595\n0.095\n0.418\n0.756\n0.977\n0.959\n0.333\n0.535\n0.528\n0.157\n0.960\n0.513\n0.666\n0.858\n0.885\n0.917\n0.890\n0.035\n0.606\n0.134\n0.098\n0.857\n0.975\n0.085\n0.246\n0.376\n0.465\n\n0.855\n0.109\n0.620\n0.602\n0.995\n0.452\n0.622\n0.638\n0.896\n0.577\n0.120\n0.566\n0.859\n0.869\n0.979\n0.571\n0.601\n1.000\n0.179\n0.951\n0.602\n0.740\n0.808\n0.871\n0.995\n0.889\n0.032\n0.886\n0.269\n0.178\n0.823\n0.994\n0.278\n0.456\n0.399\n0.546\n\n0.856\n0.109\n0.628\n0.590\n0.994\n0.452\n0.674\n0.666\n0.895\n0.574\n0.119\n0.587\n0.852\n0.818\n0.973\n0.584\n0.610\n1.000\n0.161\n0.955\n0.604\n0.738\n0.803\n0.844\n0.995\n0.890\n0.037\n0.895\n0.304\n0.150\n0.844\n0.987\n0.263\n0.307\n0.396\n0.574\n\n0.857\n0.109\n0.628\n0.586\n0.995\n0.452\n0.634\n0.669\n0.894\n0.568\n0.124\n0.556\n0.846\n0.763\n0.965\n0.575\n0.610\n0.999\n0.161\n0.954\n0.608\n0.735\n0.804\n0.830\n0.995\n0.890\n0.037\n0.891\n0.315\n0.161\n0.842\n0.989\n0.238\n0.361\n0.395\n0.600\n\n0.859\n0.109\n0.630\n0.581\n0.995\n0.452\n0.640\n0.667\n0.894\n0.562\n0.121\n0.596\n0.836\n0.746\n0.943\n0.576\n0.610\n0.999\n0.161\n0.958\n0.596\n0.740\n0.801\n0.823\n0.995\n0.890\n0.034\n0.945\n0.320\n0.151\n0.846\n0.976\n0.207\n0.352\n0.390\n0.597\n\n0.858\n0.109\n0.647\n0.571\n0.996\n0.452\n0.647\n0.684\n0.894\n0.564\n0.119\n0.673\n0.824\n0.699\n0.924\n0.572\n0.610\n0.989\n0.161\n0.962\n0.626\n0.736\n0.799\n0.771\n0.994\n0.889\n0.033\n0.912\n0.335\n0.172\n0.840\n0.986\n0.187\n0.414\n0.405\n0.603\n\n0.858\n0.109\n0.634\n0.566\n0.996\n0.452\n0.675\n0.669\n0.894\n0.563\n0.106\n0.652\n0.829\n0.675\n0.956\n0.576\n0.610\n0.996\n0.161\n0.963\n0.630\n0.739\n0.796\n0.737\n0.994\n0.890\n0.036\n0.914\n0.385\n0.186\n0.841\n0.984\n0.181\n0.449\n0.406\n0.603\n\n0.858\n0.109\n0.643\n0.556\n0.996\n0.452\n0.671\n0.682\n0.893\n0.557\n0.119\n0.655\n0.836\n0.670\n0.955\n0.572\n0.610\n0.990\n0.161\n0.963\n0.639\n0.743\n0.795\n0.783\n0.994\n0.889\n0.035\n0.914\n0.384\n0.160\n0.830\n0.972\n0.179\n0.472\n0.400\n0.603\n\n0.858\n0.109\n0.636\n0.556\n0.996\n0.452\n0.670\n0.684\n0.893\n0.555\n0.098\n0.619\n0.829\n0.654\n0.932\n0.567\n0.610\n0.962\n0.161\n0.963\n0.652\n0.741\n0.792\n0.760\n0.994\n0.889\n0.032\n0.936\n0.373\n0.182\n0.832\n0.973\n0.165\n0.483\n0.405\n0.610\n\n0.859\n0.109\n0.633\n0.562\n0.997\n0.452\n0.676\n0.681\n0.894\n0.557\n0.094\n0.598\n0.829\n0.641\n0.925\n0.565\n0.610\n0.959\n0.161\n0.962\n0.642\n0.742\n0.794\n0.800\n0.994\n0.889\n0.039\n0.933\n0.389\n0.165\n0.827\n0.944\n0.157\n0.518\n0.408\n0.604\n\n0.858\n0.109\n0.647\n0.571\n0.996\n0.452\n0.676\n0.681\n0.891\n0.555\n0.096\n0.642\n0.829\n0.631\n0.963\n0.567\n0.610\n0.933\n0.161\n0.964\n0.643\n0.744\n0.794\n0.787\n0.995\n0.888\n0.037\n0.935\n0.382\n0.190\n0.831\n0.962\n0.154\n0.514\n0.412\n0.607\n\nAverage\n\n0.572\n\n0.634\n\n0.631\n\n0.629\n\n0.628\n\n0.629\n\n0.631\n\n0.632\n\n0.628\n\n0.628\n\n0.631\n\nPCA+LLM-DAS\nPCA\n\n0.800\n0.780\n1\n\n2\n\n3\n\nquery times\n\n4\n\n0.950\n\n0.850\nIForest+LLM-DAS\nIForest\n\n0.800\n0.750\n\nAUC-PR\n\n0.820\n\nAUC-PR\n\nAUC-PR\n\nIForest\n\n1\n\n2\n\n3\n\nquery times\n\n4\n\n0.940\n\nDRL+LLM-DAS\nDRL\n\n0.930\n1\n\n2\n\n3\n\nquery times\n\n4\n\nFigure 8: AUC-PR-based performance comparison of different query times on the Imgseg dataset, with results\nfor PCA (left), IForest (middle) and DRL(right).\n\n31\n\n\fAUC-PR\n\nAUC-PR\n\nPublished as a conference paper at ICLR 2026\n\n0.650\n0.625\n0.600\n0.575\n0.550\n0.850\n0.825\n0.800\n0.775\n0.750\n\n(a) Hepatitis - PCA\n0.6262 0.6249\n0.5828\nBase Random Forest SVM\n\n(d) Imgseg - PCA\n0.8243 0.8143\n0.7724\n\n0.600\n0.550\n0.500\n0.450\n0.400\n\n0.850\n0.800\n0.750\n\nBase Random Forest SVM\n\n(b) Hepatitis - IForest\n0.5662 0.5571\n0.4182\nBase Random Forest SVM\n\n(e) Imgseg - IForest\n0.8589 0.8584\n\n0.350\n0.325\n0.300\n0.275\n0.250\n\n0.850\n0.800\n\n0.7556\nBase Random Forest SVM\n\nBinary Classifier Type\n\n(c) Hepatitis - OCSVM\n0.3217\n0.3002\n0.2815\nBase Random Forest SVM\n\n(f) Imgseg - OCSVM\n0.8592 0.8577\n0.7883\nBase Random Forest SVM\n\nBinary Classifier Type\n\nBinary Classifier Type\n\nAUC-PR\n\nAUC-PR\n\nFigure 9: AUC-PR-based performance comparison of different binary classifier choices for LLM-DAS on\nthe Hepatitis and Imgseg datasets, where PCA (left), IForest (middle), and OCSVM (right) serve as the base\ndetectors. “Base” corresponds to the base detector performance. “Random Forest” and “SVM” correspond to\nLLM-DAS’s performance with different binary classifier types.\n\n0.650\n0.625\n0.600\n0.575\n0.550\n0.850\n0.825\n0.800\n0.775\n0.750\n\n(a) Hepatitis - PCA\n0.6262\n0.6093\n0.5828\nOriginalOrigina+Binary Binary\n\n(d) Imgseg - PCA\n0.8243\n0.8040\n0.7724\n\n0.600\n0.550\n0.500\n0.450\n0.400\n\n0.850\n0.800\n0.750\n\nOriginalOrigina+Binary Binary\n\n(b) Hepatitis - IForest\n0.5662\n0.5425\n0.4182\nOriginalOrigina+Binary Binary\n\n(e) Imgseg - IForest\n0.8589\n0.8400\n\n0.350\n0.325\n0.300\n0.275\n0.250\n\n0.850\n0.800\n\n0.7556\nOriginalOrigina+Binary Binary\n\n(c) Hepatitis - OCSVM\n0.2815\n\n0.3002 0.2959\n\nOriginalOrigina+Binary Binary\n\n(f) Imgseg - OCSVM\n0.8592\n0.8454\n0.7883\nOriginalOrigina+Binary Binary\n\nFigure 10: AUC-PR-based performance comparison of ensemble strategies on the Hepatitis and Imgseg datasets,\nwhere PCA (left), IForest (middle), and OCSVM (right) serve as the base detectors. “Original” denotes the\nbase detector performance. “Origina+Binary”denotes the performance of LLM-DAS (our proposed method,\ncombining binary classifiers with original detectors), while “Binary” denotes the scheme using binary classifiers\ndirectly without integrating original detectors.\n\n32\n\n\fPublished as a conference paper at ICLR 2026\n\n6.13\n\nA DDITIONAL RESULTS\n\n6.13.1\n\nC OMPARISON WITH A LTERNATIVE A NOMALY S YNTHESIS M ETHODS\n\nTo further verify the effectiveness of LLM-DAS, we compared several representative anomaly\nsynthesis strategies, including Gaussian noise injection, random outliers, and SMOTE-based sample\ngeneration, which are denoted as Gauss, Random, and Smote respectively. The results are in\nTable 12 to Table 14.\nThree Common Anomalies synthesis strategies:\n• Gaussian noise injection is a method for generating anomalous samples by introducing\nGaussian-distributed noise to normal training samples.The process works as follows: first,\nrandomly select a specified number of base samples from the normal training data. Then,\ngenerate noise that follows a Gaussian distribution with a predefined mean and standard\ndeviation. This noise is then added to the selected base samples, resulting in new samples\nthat deviate from the original normal data.\n• Random outliers refer to anomalous samples generated by randomly sampling points within\nan extended feature space derived from the range of normal training samples. This method\nfirst expands the boundaries of each feature dimension beyond the minimum and maximum values of normal data, then randomly distributes the generated anomalies within this\nextended range, thereby ensuring the anomalies deviate from the distribution of normal\nsamples.\n• SMOTE-based sample generation draws on the SMOTE algorithm, which is originally used\nto address data imbalance issues. It can generate boundary anomalous samples near normal\ntraining samples.The method first randomly selects base samples from the normal training\ndata and finds k nearest neighbors for each base sample. Then, it calculates the difference\nbetween each base sample and a randomly chosen neighbor, and extrapolates along the line\nconnecting them to generate new samples.To create boundary anomalous samples that are\ncloser to or slightly beyond the boundary of the normal data distribution, the interpolation\nfactor is set within the range of 0.5 to 1.5. This ensures that the generated samples either lie\nnear the boundary of the normal data distribution or just outside it, thus effectively serving\nas boundary anomalous samples.\n\n33\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 12: AUC-PR (↑) performance comparison of PCA under different alternative anomaly synthesis\nmethods across 36 datasets.\nPCA\n\nGauss\n\nRandom\n\nSmote\n\nLLM-DAS\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8393\n0.1072\n0.5657\n0.5336\n0.9934\n0.4884\n0.8628\n0.6969\n0.8892\n0.6035\n0.0896\n0.5828\n0.7724\n0.8969\n1.0000\n0.4165\n0.6499\n1.0000\n0.0602\n0.9297\n0.3863\n0.7008\n0.7778\n0.9192\n0.9627\n0.8184\n0.0277\n0.8134\n0.1381\n0.1051\n0.8391\n0.9833\n0.0641\n0.1325\n0.3940\n0.4678\n\n0.8307\n0.1079\n0.6143\n0.4718\n0.9881\n0.4860\n0.7322\n0.6646\n0.8628\n0.5131\n0.0975\n0.4790\n0.7722\n0.9480\n0.8056\n0.4184\n0.6584\n0.9981\n0.0601\n0.9372\n0.6063\n0.6723\n0.8137\n0.9163\n0.9845\n0.8230\n0.0295\n0.8486\n0.1933\n0.1570\n0.7876\n0.8165\n0.1281\n0.1859\n0.3522\n0.5049\n\n0.8418\n0.1077\n0.5667\n0.5406\n0.9939\n0.4845\n0.9025\n0.7145\n0.8829\n0.5451\n0.1055\n0.4874\n0.7793\n0.9372\n0.9754\n0.4990\n0.6445\n0.9990\n0.0604\n0.9442\n0.4464\n0.7054\n0.7897\n0.9517\n0.9891\n0.8384\n0.0250\n0.8230\n0.1424\n0.1680\n0.8159\n0.9912\n0.0642\n0.1772\n0.3871\n0.4825\n\n0.7683\n0.1116\n0.2574\n0.5216\n0.9872\n0.3820\n0.7755\n0.5911\n0.7624\n0.5475\n0.0937\n0.5052\n0.8002\n0.9295\n0.9440\n0.4003\n0.5175\n1.0000\n0.0724\n0.9300\n0.3828\n0.6732\n0.8035\n0.8954\n0.9726\n0.7829\n0.0275\n0.6885\n0.1771\n0.1958\n0.7477\n0.6980\n0.1334\n0.1401\n0.4112\n0.5126\n\n0.8411\n0.1077\n0.6602\n0.5508\n0.9956\n0.4884\n0.8243\n0.7337\n0.8806\n0.6034\n0.1278\n0.6262\n0.8243\n0.9260\n0.9889\n0.5793\n0.6499\n0.9969\n0.0602\n0.9436\n0.4847\n0.7509\n0.7921\n0.9311\n0.9906\n0.8228\n0.0293\n0.8146\n0.1433\n0.1090\n0.8400\n0.9802\n0.0972\n0.8459\n0.4085\n0.5053\n\nAverage\n\n0.5975\n\n0.5907\n\n0.6058\n\n0.5594\n\n0.6376\n\n34\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 13: AUC-PR (↑) performance comparison of IForest under different alternative anomaly\nsynthesis methods across 36 datasets.\nIForest\n\nGauss\n\nRandom\n\nSmote\n\nLLM-DAS\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8481\n0.1091\n0.6149\n0.5097\n0.9449\n0.4608\n0.7018\n0.6036\n0.8940\n0.5948\n0.0952\n0.4182\n0.7556\n0.9768\n0.9593\n0.3334\n0.5349\n0.5279\n0.1570\n0.9595\n0.5133\n0.6662\n0.8583\n0.8846\n0.9172\n0.8902\n0.0353\n0.6055\n0.1342\n0.0984\n0.8573\n0.9749\n0.0848\n0.2458\n0.3760\n0.4654\n\n0.8177\n0.1094\n0.6642\n0.5044\n0.9817\n0.4396\n0.6447\n0.6355\n0.8577\n0.4997\n0.1162\n0.5088\n0.7894\n0.9374\n0.6675\n0.3690\n0.6283\n0.9168\n0.1458\n0.9639\n0.6070\n0.6985\n0.8206\n0.9063\n0.9870\n0.8707\n0.0331\n0.7906\n0.1557\n0.1729\n0.8015\n0.7128\n0.1246\n0.3130\n0.3829\n0.4964\n\n0.8523\n0.1093\n0.6365\n0.5848\n0.9949\n0.4421\n0.8473\n0.6835\n0.8503\n0.5393\n0.1495\n0.4368\n0.7987\n0.9237\n0.9642\n0.4970\n0.5880\n1.0000\n0.1417\n0.9583\n0.5365\n0.7074\n0.8281\n0.9495\n0.9937\n0.8809\n0.0279\n0.8381\n0.1354\n0.1436\n0.8271\n0.9625\n0.0871\n0.1687\n0.3998\n0.4717\n\n0.8056\n0.1097\n0.1515\n0.5562\n0.9839\n0.3518\n0.6018\n0.5607\n0.7641\n0.5677\n0.1218\n0.4816\n0.8346\n0.9006\n0.9503\n0.3024\n0.4381\n1.0000\n0.1555\n0.9175\n0.4698\n0.6792\n0.8118\n0.9119\n0.9813\n0.8227\n0.0301\n0.5110\n0.2320\n0.1676\n0.7239\n0.6298\n0.1531\n0.2132\n0.4076\n0.4933\n\n0.8555\n0.1093\n0.6200\n0.6021\n0.9947\n0.4517\n0.6220\n0.6382\n0.8958\n0.5774\n0.1205\n0.5662\n0.8589\n0.8685\n0.9794\n0.5712\n0.6011\n1.0000\n0.1790\n0.9514\n0.6020\n0.7397\n0.8079\n0.8706\n0.9954\n0.8892\n0.0318\n0.8856\n0.2686\n0.1779\n0.8233\n0.9936\n0.2784\n0.4559\n0.3993\n0.5462\n\nAverage\n\n0.5724\n\n0.5853\n\n0.6099\n\n0.5498\n\n0.6341\n\n35\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 14: AUC-PR (↑) performance comparison of DRL under different alternative anomaly synthesis\nmethods across 36 datasets.\nDRL\n\nGauss\n\nRandom\n\nSmote\n\nLLM-DAS\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8850\n0.1206\n0.6761\n0.6270\n0.9966\n0.5013\n0.8325\n0.7540\n0.9164\n0.6649\n0.1670\n0.6627\n0.9238\n0.9895\n1.0000\n0.8406\n0.8870\n1.0000\n0.9356\n0.9210\n0.9360\n0.7449\n0.8692\n0.9703\n0.9819\n0.8413\n0.0584\n0.8626\n0.2854\n0.4506\n0.9742\n1.0000\n0.4543\n1.0000\n0.5017\n0.5416\n\n0.8394\n0.0972\n0.1731\n0.6273\n0.9857\n0.4854\n0.8480\n0.7323\n0.9421\n0.5765\n0.3107\n0.6880\n0.9239\n0.9530\n0.6193\n0.3719\n0.9067\n0.8481\n0.2927\n0.9649\n0.0688\n0.6972\n0.8408\n0.9160\n0.0884\n0.6783\n0.0516\n0.2007\n0.2369\n0.8461\n0.8381\n0.9164\n0.6363\n0.9564\n0.4507\n0.5263\n\n0.8747\n0.1150\n0.6310\n0.6518\n0.9942\n0.4898\n0.9142\n0.7148\n0.9455\n0.6417\n0.2948\n0.6856\n0.9300\n0.9636\n0.7607\n0.4496\n0.9049\n1.0000\n0.2713\n0.9629\n0.2553\n0.7100\n0.8857\n0.9666\n0.9924\n0.8975\n0.0511\n0.7836\n0.2592\n0.8216\n0.7973\n0.9363\n0.4872\n0.9292\n0.4409\n0.5143\n\n0.8202\n0.1021\n0.1727\n0.6992\n0.9639\n0.4625\n0.8427\n0.7252\n0.9386\n0.5880\n0.2273\n0.6870\n0.9363\n0.9539\n0.7348\n0.2873\n0.8693\n0.9998\n0.3133\n0.9636\n0.2345\n0.7083\n0.7997\n0.9248\n0.0875\n0.8278\n0.0476\n0.1660\n0.2277\n0.8381\n0.7393\n0.8364\n0.3760\n0.9423\n0.4720\n0.6136\n\n0.9021\n0.1197\n0.7618\n0.7298\n0.9972\n0.4945\n0.8861\n0.8046\n0.9470\n0.7053\n0.4934\n0.6957\n0.9436\n0.9846\n0.8706\n0.5288\n0.9109\n1.0000\n0.9566\n0.9659\n0.8848\n0.7912\n0.8942\n0.9804\n0.9991\n0.9335\n0.1189\n0.8770\n0.5657\n0.8918\n0.9341\n1.0000\n0.5926\n1.0000\n0.5671\n0.5281\n\nAverage\n\n0.7437\n\n0.6149\n\n0.6923\n\n0.6147\n\n0.7849\n\n36\n\n\fPublished as a conference paper at ICLR 2026\n\n6.13.2\n\nA BLATION S TUDIES ON LLM-DAS D ESIGN\n\nTo further validate the effectiveness of the key components in LLM-DAS, we conduct an ablation\nstudy by systematically removing distinct components of our framework. The results are in Table 16\nto Table 18. Specifically, we compare the full LLM-DAS model with its variants that:\n• Remove detector-awareness and use generic prompts (Generic): modify the prompt by\nremoving descriptions of the specific detector’s principles, and instruct the LLM to generate\na “general-purpose” synthesis code. By comparing its performance with that of LLM-DAS,\nwe can demonstrate that “awareness” the detector’s underlying principles and designing\ntargeted anomaly sample generation strategies are crucial.\n• Replace “hard” anomalies with “simple” ones (Simple): modify the prompt such that the\nLLM generates only “simple” anomalies that are far from the normal cluster. We remove\nthe availability of model.predict_score() for evaluating the anomaly degree of generated\nsamples, thereby eliminating the capability to generate more difficult anomalies based on\nmodel.predict_score() values. By comparing the performance of this setup against that\nof LLM-DAS, we can verify that the “hard” requirement (for generating hard-to-detect\nanomalies) is critical.\n• Replace borderline synthesis with random selection (Random): generates anomalies by\nfirst transforming “randomly selected” normal samples into anomalies through prompt\nmodification, unlike LLM-DAS, which emphasizes selecting or transforming “borderline\nnormal samples” from the training set into anomalies. By comparing the performance of this\n“randomly selected normal sample-based transformation” method against that of LLM-DAS,\nwe can verify that the “borderline” heuristic is critical.\nTable 15: Ablation Studies on the Different Components of LLM-DAS Design\nVariants\n\nAwareness\n\nHard\n\nBorderline\n\nGeneric\nSimple\nRandom\nLLM-DAS\n\n✓\n✓\n✓\n\n✓\n✓\n✓\n\n✓\n✓\n\n37\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 16: AUC-PR (↑) performance comparison of PCA under different LLM prompt designs across\n36 datasets.\nPCA\n\nGeneric\n\nSimple\n\nRandom\n\nLLM-DAS\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8393\n0.1072\n0.5657\n0.5336\n0.9934\n0.4884\n0.8628\n0.6969\n0.8892\n0.6035\n0.0896\n0.5828\n0.7724\n0.8969\n1.0000\n0.4165\n0.6499\n1.0000\n0.0602\n0.9297\n0.3863\n0.7008\n0.7778\n0.9192\n0.9627\n0.8184\n0.0277\n0.8134\n0.1381\n0.1051\n0.8391\n0.9833\n0.0641\n0.1325\n0.3940\n0.4678\n\n0.8290\n0.1079\n0.5614\n0.5497\n0.9944\n0.4784\n0.7465\n0.6627\n0.8909\n0.5320\n0.0968\n0.5799\n0.8150\n0.8291\n0.9549\n0.4808\n0.6423\n0.9855\n0.0677\n0.9341\n0.5422\n0.7064\n0.7923\n0.8532\n0.9862\n0.8237\n0.0279\n0.8244\n0.1426\n0.0930\n0.7705\n0.8506\n0.0658\n0.2685\n0.3872\n0.4723\n\n0.8252\n0.1055\n0.5329\n0.4569\n0.9916\n0.4894\n0.7576\n0.7612\n0.8854\n0.5045\n0.0829\n0.5948\n0.8054\n0.9571\n0.8556\n0.3893\n0.6549\n0.9981\n0.0602\n0.9323\n0.6302\n0.6244\n0.7697\n0.2350\n0.9791\n0.8289\n0.0311\n0.7363\n0.1391\n0.2136\n0.7304\n0.9124\n0.0642\n0.1809\n0.4341\n0.4789\n\n0.8415\n0.1078\n0.5418\n0.5442\n0.9937\n0.4881\n0.7830\n0.6716\n0.8312\n0.5421\n0.0999\n0.4836\n0.8124\n0.9246\n0.9718\n0.4725\n0.6543\n0.9585\n0.0602\n0.9343\n0.4028\n0.7034\n0.7886\n0.8704\n0.9745\n0.8312\n0.0280\n0.8364\n0.1426\n0.1203\n0.8249\n0.9226\n0.0641\n0.7635\n0.3855\n0.4964\n\n0.8411\n0.1077\n0.6602\n0.5508\n0.9956\n0.4884\n0.8243\n0.7337\n0.8806\n0.6034\n0.1278\n0.6262\n0.8243\n0.9260\n0.9889\n0.5793\n0.6499\n0.9969\n0.0602\n0.9436\n0.4847\n0.7509\n0.7921\n0.9311\n0.9906\n0.8228\n0.0293\n0.8146\n0.1433\n0.1090\n0.8400\n0.9802\n0.0972\n0.8459\n0.4085\n0.5053\n\nAverage\n\n0.5975\n\n0.5929\n\n0.5730\n\n0.6076\n\n0.6376\n\n38\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 17: AUC-PR (↑) performance comparison of IForest under different LLM prompt designs\nacross 36 datasets.\nIForest\n\nGeneric\n\nSimple\n\nRandom\n\nLLM-DAS\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8481\n0.1091\n0.6149\n0.5097\n0.9449\n0.4608\n0.7018\n0.6036\n0.8940\n0.5948\n0.0952\n0.4182\n0.7556\n0.9768\n0.9593\n0.3334\n0.5349\n0.5279\n0.1570\n0.9595\n0.5133\n0.6662\n0.8583\n0.8846\n0.9172\n0.8902\n0.0353\n0.6055\n0.1342\n0.0984\n0.8573\n0.9749\n0.0848\n0.2458\n0.3760\n0.4654\n\n0.8390\n0.1107\n0.5911\n0.5794\n0.9966\n0.4332\n0.6611\n0.6570\n0.8794\n0.5347\n0.1004\n0.5292\n0.8238\n0.7474\n0.9577\n0.4366\n0.5728\n0.8382\n0.1339\n0.9615\n0.6743\n0.7244\n0.8203\n0.5511\n0.9956\n0.8832\n0.0267\n0.7622\n0.1385\n0.1127\n0.7837\n0.8893\n0.0955\n0.1551\n0.3752\n0.4798\n\n0.8492\n0.1099\n0.6243\n0.5951\n0.9921\n0.4517\n0.7771\n0.6513\n0.7943\n0.5894\n0.1063\n0.4908\n0.8268\n0.9119\n0.9213\n0.4321\n0.6154\n1.0000\n0.1579\n0.9557\n0.5427\n0.7110\n0.8217\n0.9515\n0.9912\n0.8175\n0.0296\n0.8280\n0.1339\n0.1054\n0.8531\n0.9687\n0.0871\n0.1886\n0.3990\n0.4668\n\n0.7452\n0.1102\n0.2804\n0.4967\n0.9266\n0.4330\n0.5234\n0.5278\n0.8661\n0.5602\n0.0890\n0.3799\n0.6780\n0.7488\n0.8498\n0.1642\n0.6294\n0.8611\n0.1423\n0.9156\n0.5022\n0.6084\n0.8158\n0.1444\n0.9978\n0.8648\n0.0351\n0.1924\n0.1814\n0.0940\n0.2100\n0.1164\n0.1913\n0.5410\n0.4400\n0.4708\n\n0.8555\n0.1093\n0.6200\n0.6021\n0.9947\n0.4517\n0.6220\n0.6382\n0.8958\n0.5774\n0.1205\n0.5662\n0.8589\n0.8685\n0.9794\n0.5712\n0.6011\n1.0000\n0.1790\n0.9514\n0.6020\n0.7397\n0.8079\n0.8706\n0.9954\n0.8892\n0.0318\n0.8856\n0.2686\n0.1779\n0.8233\n0.9936\n0.2784\n0.4559\n0.3993\n0.5462\n\nAverage\n\n0.5724\n\n0.5792\n\n0.6041\n\n0.4815\n\n0.6341\n\n39\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 18: AUC-PR (↑) performance comparison of DRL under different LLM prompt designs across\n36 datasets.\nDRL\n\nGeneric\n\nSimple\n\nRandom\n\nLLM-DAS\n\nAbalone\nAmazon\nAnnthyroid\nArrhythmia\nBreastw\nCampaign\nCardio\nCardiotocography\nComm.and.crime\nFault\nGlass\nHepatitis\nImgseg\nIonosphere\nLympho\nMammography\nMnist\nMusk\nOptdigits\nParkinson\nPendigits\nPima\nSatellite\nSatimage-2\nShuttle\nSpamBase\nSpeech\nThyroid\nVertebral\nVowels\nWbc\nWDBC\nWilt\nWine\nWPBC\nYeast\n\n0.8850\n0.1206\n0.6761\n0.6270\n0.9966\n0.5013\n0.8325\n0.7540\n0.9164\n0.6649\n0.1670\n0.6627\n0.9238\n0.9895\n1.0000\n0.8406\n0.8870\n1.0000\n0.9356\n0.9210\n0.9360\n0.7449\n0.8692\n0.9703\n0.9819\n0.8413\n0.0584\n0.8626\n0.2854\n0.4506\n0.9742\n1.0000\n0.4543\n1.0000\n0.5017\n0.5416\n\n0.8813\n0.1023\n0.3477\n0.6657\n0.9954\n0.4957\n0.8978\n0.6607\n0.9460\n0.5967\n0.3493\n0.6876\n0.9301\n0.9486\n0.7374\n0.4620\n0.9165\n0.9925\n0.3192\n0.9643\n0.0538\n0.7499\n0.8659\n0.9384\n0.1962\n0.8272\n0.0478\n0.2966\n0.2329\n0.8592\n0.7369\n0.8423\n0.6526\n0.9591\n0.4675\n0.5457\n\n0.8716\n0.1011\n0.5409\n0.6138\n0.9934\n0.4857\n0.9116\n0.7109\n0.9442\n0.6044\n0.3166\n0.6880\n0.9308\n0.9770\n0.7339\n0.4819\n0.9083\n1.0000\n0.2817\n0.9628\n0.3199\n0.6457\n0.8843\n0.9641\n0.9934\n0.7837\n0.0502\n0.6301\n0.2564\n0.8147\n0.8001\n0.9250\n0.4637\n0.9577\n0.4550\n0.5195\n\n0.8625\n0.0958\n0.3578\n0.6380\n0.9879\n0.4852\n0.8597\n0.7084\n0.9438\n0.6537\n0.3036\n0.6808\n0.9283\n0.9514\n0.7490\n0.3158\n0.9106\n1.0000\n0.2909\n0.9659\n0.0467\n0.6541\n0.8770\n0.9353\n0.8961\n0.7212\n0.0494\n0.3089\n0.2389\n0.8985\n0.7317\n0.7377\n0.6250\n0.9635\n0.4361\n0.5373\n\n0.9021\n0.1197\n0.7618\n0.7298\n0.9972\n0.4945\n0.8861\n0.8046\n0.9470\n0.7053\n0.4934\n0.6957\n0.9436\n0.9846\n0.8706\n0.5288\n0.9109\n1.0000\n0.9566\n0.9659\n0.8848\n0.7912\n0.8942\n0.9804\n0.9991\n0.9335\n0.1189\n0.8770\n0.5657\n0.8918\n0.9341\n1.0000\n0.5926\n1.0000\n0.5671\n0.5281\n\nAverage\n\n0.7437\n\n0.6436\n\n0.6812\n\n0.6485\n\n0.7849\n\n40\n\n\fPublished as a conference paper at ICLR 2026\n\n6.14\n\nA S IMPLE T HEORETICAL I LLUSTRATION OF B OUNDARY R EFINEMENT\n\nThis appendix provides a stylized theoretical perspective on why detector-aware synthetic hard\nanomalies can improve the detection of true hard anomalies. While the main paper focuses on\nempirical validation across five detector families, a lightweight theoretical model helps clarify the\ngeometric mechanism underlying the improvements observed in Fig. 5 and Tables 1, 4–5.\n6.14.1\n\nM OTIVATION AND T HEORETICAL A BSTRACTION\n\nMotivation. Empirically, we observe that most detection errors arise from hard anomalies— true\nanomalies that lie close to the decision boundary of the base detector ft . In contrast, easy anomalies\nthat lie far from this boundary are already well-detected by ft without augmentation. LLM-DAS is\nexplicitly designed to target this near-boundary region: it identifies borderline normal samples and\ntransforms them into synthetic hard anomalies that reflect the failure modes of ft . These synthetic\nanomalies provide precisely the type of near-boundary supervision that one-class detectors inherently\nlack. The enhancement classifier f˜t is trained on these hard synthetic samples, and the final fused\ndetector\nFt (x) = Norm(ft (x)) + Norm(f˜t (x))\ncombines the strengths of both models.\nTheoretical abstraction.\n\nTo formalize this mechanism, we adopt the following stylized model:\n\n- The set of true anomalies is conceptually decomposed into easy anomalies (far from the decision\nboundary of ft ) and hard anomalies (near the boundary, where most errors occur).\n- LLM-DAS generates detector-aware synthetic hard anomalies by transforming normal samples that\nlie near the decision boundary of ft .\n- If these synthetic anomalies geometrically cover the true hard anomalies within a small neighborhood,\nthen any margin learned by the enhancement classifier f˜ on the synthetic anomalies should transfer\nto the nearby true hard anomalies.\nThis abstraction leads to the proposition below, which formalizes this margin-transfer intuition under\na mild smoothness assumption on f˜.\n6.14.2\n\nM ARGIN T RANSFER FROM S YNTHETIC H ARD A NOMALIES\n\nProposition 1 (Margin transfer via detector-aware synthetic anomalies) Let X ⊂ Rd be the input space and τ ∈ R a decision threshold. Let f˜ : X → R be a B-Lipschitz scoring function:\n|f˜(x) − f˜(x′ )| ≤ B∥x − x′ ∥2\n\n∀x, x′ .\n\nSuppose a set of detector-aware synthetic anomalies Ssyn = {xsyn } satisfies\nf˜(xsyn ) ≥ τ + γ,\n\nγ &gt; 0.\n\nAssume the set of true hard anomalies DA is ε-covered by Ssyn , i.e., for each xa ∈ DA there exists\nxsyn ∈ Ssyn with ∥xa − xsyn ∥2 ≤ ε. Then each true hard anomaly satisfies\nf˜(xa ) ≥ τ + γ − Bε.\nIn particular, if Bε &lt; γ, then f˜(xa ) &gt; τ , and xa is correctly detected under threshold τ .\nProof. Fix any xa ∈ DA . By ε-covering, choose xsyn ∈ Ssyn with ∥xa − xsyn ∥2 ≤ ε. By\nLipschitzness,\n|f˜(xa ) − f˜(xsyn )| ≤ Bε.\nThus,\nf˜(xa ) ≥ f˜(xsyn ) − Bε ≥ (τ + γ) − Bε.\nIf Bε &lt; γ, then f˜(xa ) &gt; τ , completing the proof.\n41\n\n\fPublished as a conference paper at ICLR 2026\n\nInterpretation. The proposition states that if synthetic hard anomalies are close (in geometry) to\nthe true hard anomalies (↓ ε), and if the enhancement classifier can enforce a margin (↑ γ) on the\nsynthetic samples, then the true hard anomalies inherit a positive margin up to a Lipschitz slack\n(Bε &lt; γ). This formalizes how near-boundary synthetic anomalies help the enhanced classifier learn\na tighter decision boundary exactly where the base detector is weak.\n6.14.3\n\nR EMARKS ON A PPLICABILITY AND M ODEL C LASSES\n\nSmooth vs. non-smooth enhancement classifiers. The margin-transfer proposition relies on a\nLipschitz regularity condition on f˜, which holds for smooth discriminative models such as linear\nor kernel SVMs. As shown in Fig. 9 of Appendix 6.12, LLM-DAS yields clear performance\nimprovements when f˜ is instantiated as an SVM, consistent with the proposition.\nAlthough tree ensembles are not Lipschitz in the Euclidean sense, they follow similar qualitative\ngeometry: synthetic anomalies near the boundary tend to fall into similar leaves or partitions as true\nhard anomalies, providing comparable refinement. Extending the formal analysis to non-smooth\nmodels is an interesting direction for future work.\n6.14.4\n\nC ONVERGENCE AND S TABILITY OF THE F USED D ETECTOR\n\nThe final fused detector is\nFt (x) = Norm(ft (x)) + Norm(f˜t (x)).\nBoth components are bounded and monotone, so the enhancement step preserves the stability and\nasymptotic behavior of the base detector ft , while adding a bounded corrective term concentrated\naround the decision boundary. Thus the enhancement procedure behaves as a stable additive refinement: it reduces bias near hard anomalies while introducing only controlled variance determined by\nthe number and quality of the synthetic samples and the complexity of f˜t .\n6.14.5\n\nJ USTIFICATION FOR L OCAL B OUNDARY R EFINEMENT M ECHANISM IN LLM-DAS\n\nA complex, global decision boundary may not be uniformly \"tightened\". The effectiveness of LLMDAS does not rely on such global coverage but on a targeted, local refinement mechanism. Our\nconceptual justification is twofold and is strongly supported by our anomaly-type analysis.\n(1) Local Patching of Algorithmic Weak Spots: The LLM in LLM-DAS acts as an automatic\nanalyst that identifies a detector’s structural weaknesses from its algorithm description. It then\ngenerates a program to create anomalies that specifically target these weaknesses. The goal is not to\nresample the entire boundary but to patch critical, high-error regions where the base detector ft is\nknown to fail. The performance improvement stems from precisely this targeted effort.\n(2) Empirical Evidence via Anomaly-Type Alignment (Connecting to Appendix 6.15): Our\nexperiments in Appendix 6.15 (Table 19, Fig. 11-13) provide direct, empirical validation of this\nlocal-patching principle. They demonstrate that LLM-DAS automatically synthesizes anomalies\nwhose distribution is closest to the specific anomaly types (e.g., dependency and local anomalies)\nthat each base detector (e.g., IForest, OCSVM) struggles with most, as per established benchmarks\nlike ADBench.\n• This is crucial: Different anomaly types challenge different segments of the decision\nboundary. By generating anomalies that align with a detector’s known algorithmic blind\nspots, LLM-DAS proves it can automatically locate and target the most impactful \"weak\nregions\" of the boundary, even if they constitute only a portion of the whole.\n• The significant performance gains we observe on these specific anomaly types confirm that\npatching these localized regions is both necessary and sufficient for overall improvement.\n(3) Preservation of Existing Strengths via Ensembling: Furthermore, our framework is designed\nto be robust and non-destructive. As noted in our analysis, for anomaly types where the base detector\nalready performs well (e.g., IForest on Cluster anomalies in Table 19), LLM-DAS maintains stable or\nslightly improved results. This indicates that our method enhances robustness without overfitting to\nthe particular anomaly categories it uses for augmentation. This is a direct benefit of our ensemble\n42\n\n\fPublished as a conference paper at ICLR 2026\n\ndesign F (x) = Norm(ft (x)) + Norm(f˜t (x)). The original detector ft continues to dominate in\nregions it already models accurately, preserving its discriminative ability for \"easy\" anomalies, while\nthe enhancement classifier f˜t extends the coverage toward harder cases targeted by the LLM.\nTherefore, while a single set of synthetic anomalies may not cover the entire boundary, its coverage is\nhighly strategic. It focuses on the regions that matter most for reducing the base detector’s error, which\nis why the method delivers consistent and significant gains beyond purely empirical observations.\n6.14.6\n\nS UMMARY\n\nTogether with Fig. 5, this stylized analysis provides a formal illustration of the empirical finding that\nLLM-DAS tightens the decision boundary around hard anomalies. The proposition explains why\ndetector-aware synthetic anomalies bring improved separation precisely in the near-boundary region,\nwhile the ensemble structure ensures that easy anomalies remain correctly handled by the original\ndetector.\n\n43\n\n\fPublished as a conference paper at ICLR 2026\n\n6.15\n\nD ETECTOR -AWARE A NOMALY S YNTHESIS ACROSS D IFFERENT A NOMALY T YPES\n\n6.15.1\n\nM OTIVATION AND E XPERIMENTAL P HILOSOPHY.\n\nA core challenge in tabular anomaly detection (TAD) is the diversity of anomaly types. The groundtruth anomaly type is not standardized across datasets, and different datasets may correspond to\ndifferent or mixed anomaly mechanisms, making real-world anomalies inherently complex and\nheterogeneous. Different detectors inherently excel at detecting different kinds of anomalies due to\ntheir underlying algorithms’ assumptions. According to ADBench (Han et al., 2022), many tabular\ndetectors—such as IForest, OCSVM—struggle to detect “Dependency” and “Local” anomalies, while\nperforming well on “Clustered” types.\nThe key innovation of LLM-DAS is that it does not require a priori specification of anomaly types.\nInstead, it positions the LLM as an “algorithmist” that reasons about a detector’s intrinsic logic to\ngenerate code Codet for synthesizing anomalies that are specifically “hard” for that detector. A\ncritical question thus arises: What types of anomalies does this detector-aware code actually produce?\nTo answer this scientifically, we need a controlled experimental setup where ground-truth anomaly\ntypes are known. We, therefore, adopt the established synthesis protocol from ADBench (Han et al.,\n2022) to create a benchmark where different, pure anomaly types are injected into the same normal\ndata backbone. This allows us to rigorously analyze the relationship between a detector’s weaknesses\nand the characteristics of the anomalies synthesized by its corresponding Codet .\n6.15.2\n\nE XPERIMENTAL S ETUP : C ONSTRUCTING T YPE -S PECIFIC T ESTBEDS\n\nTo analyze how LLM-DAS adapts to different anomaly mechanisms in a controlled and detector-aware\nmanner, we follow the official ADBench (Han et al., 2022) protocol to construct four benchmark\nvariants of the same real-world dataset (“Hepatitis”). The core idea is to build a generative model (e.g.,\nGaussian mixture model GMM) using the normal samples from the real-world dataset (“Hepatitis”)\nand discard its original anomalies as we do not know their types. Then, We could generate normal\nsamples and different types of anomalies based on their definitions by tweaking the generative\nmodel. The generation of normal samples is the same in all settings if not noted, and we provide the\ngeneration process of four types of anomalies below.\nUnified anomaly-generation protocol. Each anomaly type is created using the following standardized procedures from ADBench (Han et al., 2022):\n• Local anomalies: Generated by scaling the covariance matrix of Gaussian mixture components (Σ̂ ← αΣ̂ with α = 5), producing locally deviant samples within dense regions of the\nnormal manifold.\n• Global anomalies: They are more different from the normal data, drawn from a uniform\ndistribution Unif(α min(Xk ), α max(Xk )) with α = 1.1, where the boundaries are defined\nas the min and max of an input feature, e.g., k-th feature Xk .\n• Dependency anomalies: Produced by removing feature dependencies modeled by Vine Copula, where the joint density is replaced by independent marginals, breaking the correlation\nstructure among features.\n• Clustered anomalies: Formed by scaling the mean vector of the normal data (µ̂ ← αµ̂ with\nα = 5), creating compact abnormal clusters separated from the normal distribution.\nFor each anomaly type τ ∈ {Local, Global, Dependency, Clustered}, we obtain a dataset consisting\n(τ )\n(τ )\nof: {Dtrain (normal only), Dtest (normal + anomalies of type τ )}. Importantly, the synthesized\nanomalies produced by LLM-DAS and normal samples are kept the same across all variants, ensuring\nthat the only varying factor is the anomaly type in the test set.\n6.15.3\n\nA NALYSIS P ROCEDURE FOR LLM-DAS\n\nGiven a detector t (e.g., IForest), we examine how the LLM-generated synthesis code Codet adapts\nto different anomaly types:\n44\n\n\fPublished as a conference paper at ICLR 2026\n\n(τ )\n\n1. Train the base detector. Train ft on the normal-only dataset Dtrain .\n2. Generate detector-specific synthetic anomalies. We instantiate the LLM-generated,\n(τ )\ndetector-specific synthesis code Codet using Dtrain and ft . This produces a set of synthetic\n(τ )\nanomalies A(Dtrain , t):\n3. Measure distributional similarity. (Table 19) Compute the Wasserstein distance between\n(τ )\n(τ )\nA(Dtrain , t) and each of the four ground-truth anomaly-type distributions in Dtest .\n(τ )\n\n(τ )\n\n4. Evaluate performance improvement. (Table 19) We use A(Dtrain , t) to augment Dtrain\nand train a binary classifier f˜t . We then fuse the f˜t and ft to obtain the final detector Ft ,\n(τ )\nand evaluate performance on Dtest to obtain the improvement ∆.\n5. Kernel Density Estimation (KDE). (Fig. 11–13) We visualize the kernel density estimation (KDE) of anomaly scores before and after applying LLM-DAS, illustrating how the\nsynthesized anomalies reshape the decision boundary.\nTogether, these analyses enable a detailed examination of (i) what types of anomalies LLM-DAS tends\nto generate, and (ii) how such generated samples influence the detector’s behavior and decision-space\nseparation under different anomaly mechanisms.\n6.15.4\n\nO RIGINAL DETECTORS ’ PRIORI ON DIFFERENT TYPES OF ANOMALIES .\n\nAccording to ADBench (Han et al., 2022), many tabular detectors—such as IForest,\nOCSVM—struggle to detect “Dependency” and “Local” anomalies, while performing well on\n“Clustered” types. To further broaden our observations, we also evaluate LLM-DAS paired with LOF,\nsince LOF shows the opposite pattern: it performs better on “Dependency” and “Local” anomalies\nbut poorly on “Clustered” anomalies. Although LOF was not part of our main benchmark suite,\nit serves as a valuable complementary case for examining whether LLM-DAS adaptively targets\ndetector’s weakest anomaly type.\n6.15.5\n\nK EY FINDINGS : LLM-DAS AUTOMATICALLY TARGETS THE ANOMALY TYPES THAT\nEACH DETECTOR PERFORMS WORST ON\n\nTable 19 shows that the base detectors exhibit distinct weaknesses across different anomaly types:\nIForest and OCSVM perform poorly on Dependency- and Local-type anomalies, while LOF struggles\non Cluster-type anomalies. These findings are consistent with the conclusions of ADBench (Han\net al., 2022), confirming that each detector has its own characteristic sensitivity to specific anomaly\nstructures.\nAs shown in Table 19, the anomalies synthesized by LLM-DAS are distributionally closer to the\nanomaly types on which the corresponding detectors underperform— Dependency and Local for\nIForest and OCSVM, and Cluster for LOF. This observation aligns with our core claim that LLMDAS is not generating arbitrary or predefined anomaly types, but instead dynamically adapts its\nsynthesis behavior based on the weaknesses of the base detector. In other words, LLM-DAS learns\nto identify and reproduce the challenging regions within each detector’s decision space rather than\nfollowing a fixed anomaly taxonomy.\nFurthermore, combining the quantitative and visual evidence from Table 19 and Fig. 11–13, we\nobserve that the anomalies synthesized by LLM-DAS significantly improve performance and enhance\nscore separation between normal and abnormal samples on those hard anomaly types where the base\ndetectors originally perform poorly. This confirms that LLM-DAS effectively addresses the intrinsic\nblind spots of each detector. Meanwhile, for anomaly types that the base detectors already handle\nwell, LLM-DAS maintains stable or slightly improved performance, demonstrating its robustness and\nbalanced ensemble design.\nOverall, these results validate that LLM-DAS adaptively captures the detector-specific difficulty\npatterns across heterogeneous anomaly types, thereby inherently accounting for anomaly diversity\nrather than ignoring it.\nDiscussion and Future Work. These findings highlight that LLM-DAS does not generate arbitrary\nanomalies, but adaptively learns to emphasize those challenging for the base detector. Meanwhile,\n45\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 19: Detector-aware anomaly synthesis: Wasserstein distance versus performance improvement.\nFor each detector and each canonical anomaly type (Local, Global, Dependency, Clustered), we report:\n(i) the Wasserstein distance between the LLM-DAS–generated anomalies and the corresponding\nground-truth anomaly-type distribution, (ii) the base detector performance (ft ), (iii) the enhanced\nperformance after applying LLM-DAS (Ft ), and (iv) the improvement ∆ of Ft over ft . Across\ndetectors, the anomaly types with the smallest Wasserstein distances (highlighted in blue) consistently\ncorrespond to the largest performance gains, demonstrating that LLM-DAS automatically synthesizes\nanomalies that resemble each detector’s weakest anomaly mechanism.\nDetector type\n\nAnomaly type\n\nWasserstein distance ↓\n\nBase detector (ft ) ↑\n\nLLM-DAS (Ft ) ↑\n\nImprov. (∆) ↑\n\nIForest\n\nDependency\nLocal\nCluster\nGlobal\n\n0.942\n0.958\n1.694\n1.824\n\n0.419\n0.575\n0.781\n0.701\n\n0.701\n0.717\n0.797\n0.722\n\n0.282\n0.142\n0.016\n0.021\n\nOCSVM\n\nDependency\nLocal\nCluster\nGlobal\n\n0.651\n0.681\n1.630\n1.779\n\n0.246\n0.560\n0.789\n0.719\n\n0.727\n0.696\n0.803\n0.722\n\n0.481\n0.136\n0.014\n0.002\n\nLOF\n\nDependency\nLocal\nCluster\nGlobal\n\n1.117\n1.877\n0.897\n1.723\n\n0.777\n0.737\n0.141\n0.647\n\n0.791\n0.761\n0.757\n0.676\n\n0.014\n0.024\n0.616\n0.029\n\nour ensemble strategy ensures that the original detector ft continues to dominate detection of easy\nanomaly types it already handles well, preserving generalization (see Appendix 6.14). In future\nwork, we plan to design a controllable synthesis module that allows users to explicitly specify target\nanomaly types (e.g., dependency or clustered) to further enhance interpretability and diagnostic use.\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n4\n\n3.5\n\n3\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n5\n4\n\n2.0\n1.5\n\n1\n\n3\n\n5\n\nDensity\n\nDensity\n\n2\n\n2.5\n\n2\n1\n\n0.4\n\n0.6\n\nAnomaly Score\n\n0.8\n\n1.0\n\n0.0\n\n1.2\n\n(a) ft on Dependency\n3.0\n\n3.5\n3.0\n\nDensity\n\nDensity\n\n1.5\n\n0.2\n\n0.4\n\n0.6\n\nAnomaly Score\n\n0.8\n\n1.0\n\n0\n\n1.2\n\n2.0\n1.5\n\n0.5\n\n2.0\n\nAnomaly Score\n\n2.5\n\n3.0\n\n3.5\n\n(e) Ft on Dependency\n\n0.0\n\nAnomaly Score\n\n0.8\n\n1.0\n\n0\n\n1.2\n\n0.0\n\n0.5\n\n1.0\n\n1.5\n\n2.0\n\nAnomaly Score\n\n2.5\n\n3.0\n\n0.0\n\n3.5\n\n(f) Ft on Local\n\n0.2 0.0\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nAnomaly Score\n\n1.0\n\n1.2\n\n(d) ft on Global\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n3.5\n3.0\n2.5\n\n1.5\n\n0.5\n1.5\n\n0.6\n\n2.0\n\n0.5\n1.0\n\n0.4\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n3.0\n\n1.0\n\n0.5\n\n0.2\n\n2.5\n\n2.5\n\n1.0\n\n0.0\n\n0.0\n\n3.5\n\n1.0\n\n0.0\n\n0.2\n\n(c) ft on Cluster\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n4.0\n\n2.5\n2.0\n\n0.0\n\n(b) ft on Local\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n3.5\n\n0.2\n\nDensity\n\n0.2\n\nDensity\n\n0.0\n\n3\n\n1\n\n0.5\n\n0.2\n\n4\n\n2\n\n1.0\n\n0\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n6\n\n3.0\n\nDensity\n\nDensity\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n4.0\n\n2.0\n1.5\n1.0\n0.5\n\n0.5 0.0\n\n0.5\n\n1.0\n\n1.5\n\n2.0\n\nAnomaly Score\n\n2.5\n\n3.0\n\n(g) Ft on Cluster\n\n3.5\n\n0.0\n\n0.0\n\n0.5\n\n1.0\n\n1.5\n\n2.0\n\nAnomaly Score\n\n2.5\n\n3.0\n\n3.5\n\n(h) Ft on Global\n\nFigure 11: Kernel density estimation (KDE) of anomaly scores from the source IForest detector ft\nand the LLM-DAS–enhanced detector Ft . The first row (subplots a–d) shows the original detector ft ,\nand the second row (e–h) shows the corresponding results after applying LLM-DAS. Each column\ncorresponds to one anomaly type (Dependency, Local, Cluster, Global). The enhanced detector\nFt exhibits improved boundary separation, especially for the Dependency and Local types, whose\ncharacteristics are most similar to the synthesized anomalies.\n\n46\n\n\fPublished as a conference paper at ICLR 2026\n\n6\n\n4\n3\n\n4\n3\n\n5\n4\n3\n\n2\n\n2\n\n1\n\n1\n\n1\n\n0.0\n\n0.2\n\n0.4\n\n0.6\n\n0.8\n\nAnomaly Score\n\n1.0\n\n0\n\n1.2\n\n0.2\n\n0.0\n\n0.6\n\nAnomaly Score\n\n0.8\n\n1.0\n\n0\n\n1.2\n\n4\n\nDensity\n\n3\n\n5\n\n2\n\n0.0\n\n0.5\n\n1.0\n\nAnomaly Score\n\n1.5\n\n3\n\n0.2\n\n0.4\n\n0.6\n\nAnomaly Score\n\n0.8\n\n1.0\n\n0.0\n\n(e) Ft on Dependency\n\n0.5\n\n1.0\n\nAnomaly Score\n\n3\n\n0\n\n1.2\n\n0.2\n\n0.0\n\n1.5\n\n3\n2\n\n0.4\n\n0.6\n\nAnomaly Score\n\n0.8\n\n1.0\n\n1.2\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n5\n4\n3\n2\n1\n\n0\n\n2.0\n\n0.2\n\n(d) ft on Global\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n1\n\n0\n\n2.0\n\n0.0\n\n4\n\n1\n\n0\n\n4\n\n1\n0.2\n\n5\n\n2\n\n1\n\n5\n\n(c) ft on Cluster\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\nDensity\n\n4\n\n0.4\n\n6\n\n2\n\n(b) ft on Local\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n5\n\n0.2\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n7\n\nDensity\n\n0.2\n\n(a) ft on Dependency\n\nDensity\n\n6\n\n5\n\n2\n0\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n7\n\nDensity\n\n5\n\nDensity\n\nDensity\n\n6\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n7\n\nDensity\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n7\n\n0.0\n\n(f) Ft on Local\n\n0.5\n\n1.0\n\nAnomaly Score\n\n1.5\n\n0\n\n2.0\n\n0.0\n\n(g) Ft on Cluster\n\n0.5\n\n1.0\n\nAnomaly Score\n\n1.5\n\n2.0\n\n(h) Ft on Global\n\nFigure 12: Kernel density estimation (KDE) of anomaly scores from the source OCSVM detector ft\nand the LLM-DAS–enhanced detector Ft . The first row (subplots a–d) shows the original detector ft ,\nand the second row (e–h) shows the corresponding results after applying LLM-DAS. Each column\ncorresponds to one anomaly type (Dependency, Local, Cluster, Global). The enhanced detector\nFt exhibits improved boundary separation, especially for the Dependency and Local types, whose\ncharacteristics are most similar to the synthesized anomalies.\n\n3.5\n3.0\n\n3\n\n2.0\n\n1\n\n2\n\n3\n\n4\n\n5\n\nAnomaly Score\n\n0.0\n\n6\n\n1\n\n0\n\n(a) ft on Dependency\n5\n\n4\n\n5\n\nAnomaly Score\n\n0\n\n2\n\n4\n\n6\n\nAnomaly Score\n\n8\n\n10\n\n(e) Ft on Dependency\n\n2\n\n3\n\nAnomaly Score\n\n4\n\n5\n\n0.0\n\n6\n\n3\n\n7\n5\n4\n3\n\n4\n\n6\n\nAnomaly Score\n\n8\n\n0\n\n10\n\n(f) Ft on Local\n\n1\n\n2\n\n3\n\n4\n\nAnomaly Score\n\n5\n\n6\n\n7\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n6\n5\n4\n3\n\n1\n\n1\n2\n\n0\n\n2\n\n2\n\n0\n\n1\n\n(d) ft on Global\n\n6\n\n4\n\n0\n\n1\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n8\n\n1\n0\n\n0\n\n(c) ft on Cluster\n\n2\n2\n\n0.5\n\n0\n\n6\n\nDensity\n\nDensity\n\nDensity\n\n3\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n6\n\n6\n4\n\n2\n\n2.0\n1.0\n\n(b) ft on Local\n\nEnhanced Anomaly Scores of Ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n8\n\n1\n\n2.5\n1.5\n\n1\n\n0.5\n\n0\n\n3.5\n3.0\n\n3\n2\n\n1.0\n\n1\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n4.0\n\n4\n\n1.5\n\n2\n\n0\n\n2.5\n\nDensity\n\nDensity\n\nDensity\n\n4\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n5\n\nDensity\n\n5\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n4.0\n\nDensity\n\nOriginal Anomaly Scores of ft\nGround-truth Normal\nGround-truth Anomaly\nLLM-DAS Anomaly\n\n6\n\n0\n\n2\n\n4\n\n6\n\nAnomaly Score\n\n8\n\n(g) Ft on Cluster\n\n10\n\n0\n\n0\n\n2\n\n4\n\n6\n\nAnomaly Score\n\n8\n\n10\n\n(h) Ft on Global\n\nFigure 13: Kernel density estimation (KDE) of anomaly scores from the source LOF detector ft and\nthe LLM-DAS–enhanced detector Ft . The first row (subplots a–d) shows the original detector ft ,\nand the second row (e–h) shows the corresponding results after applying LLM-DAS. Each column\ncorresponds to one anomaly type (Dependency, Local, Cluster, Global). The enhanced detector Ft\nexhibits improved boundary separation, especially for the Cluster types, whose characteristics are\nmost similar to the synthesized anomalies.\n\n47\n\n\fPublished as a conference paper at ICLR 2026\n\n6.16\n\nH ARDNESS -C ONTROLLED S YNTHETIC A NOMALIES AND S IDE -E FFECTS A NALYSIS\n\nMotivation. An important question is (i) whether LLM-DAS can generate anomalies with different levels of hardness, and (ii) whether overly hard synthetic anomalies may negatively impact\ngeneralization in some datasets. To systematically study these aspects, we extend the synthesis\nprompt with an explicit hardness-level interface (prompt is detailed in Prompt 6.16) and introduce a\nquantitative metric for anomaly hardness based on Wasserstein distances. This appendix provides the\nexperimental protocol and detailed results that support our claim.\nHardness-level interface and experimental setup. We modify the original LLM-DAS prompt so\nthat the LLM is required to produce synthesis code that accepts a discrete hardness level \"High\",\n\"Medium\", or \"Low\". Intuitively:\n• High aims to generate anomalies that are close to the normal-data manifold and are therefore\nhard to detect;\n• Medium generates anomalies moderately separated from normal data;\n• Low generates anomalies further away, which are easier to detect.\nThe original LLM-DAS implementation in the main paper corresponds closely to the High-hardness\nbehavior, i.e., its synthesized anomalies typically lie near the decision boundary and are thus challenging for the base detector.\nWe instantiate this interface on two representative base detectors: PCA and IForest. For each dataset,\nwe compare:\n• the base detector alone (PCA / IForest),\n• the original LLM-DAS (denoted “LLM-DAS (Ours)”),\n• LLM-DAS with hardness levels High / Medium / Low (denoted “LLM-DAS (Hardness\nLevel)”).\nPerformance effect of hardness control. Table 20 reports the performance of PCA and IForestbased LLM-DAS under different hardness settings. Rows highlighted in blue correspond to datasets\nwhere the original LLM-DAS already improves over the base detector. Rows highlighted in red\ncorrespond to fail cases where the original LLM-DAS underperforms the base detector.\nSeveral consistent patterns emerge:\n• Original ≈ High hardness. For most datasets, the original LLM-DAS and the Highhardness variant achieve very similar performance. This confirms that the default policy\nlearned by LLM-DAS indeed focuses on generating hard anomalies.\n• Robust gains across hardness levels. On the majority of datasets (blue rows), all hardness\nlevels (High/Medium/Low) outperform the base detector, and the original (High) version is\noften the best or close to the best. This shows that LLM-DAS is not fragile with respect to\nthe exact hardness level, as long as synthetic anomalies inhabit a reasonably informative\nregion near the boundary.\n• Failure cases and recovery by lowering hardness. In a few datasets (red rows), the original\nLLM-DAS underperforms the base detector. Crucially, these failures are reversible: by\nlowering the hardness level (Medium or Low), performance recovers to the baseline or even\nexceeds it. For example, for PCA on lympho, the original LLM-DAS yields 0.989, while\nMedium/Low hardness both achieve 1.000; for IForest on cardio, the original LLM-DAS\nyields 0.622, while Low hardness reaches 0.718.\nThese results empirically validate that (i) LLM-DAS can generate anomalies at different difficulty\nlevels, and (ii) the hardness control interface provides a simple and effective knob to mitigate rare\nside effects.\nQuantifying hardness via Wasserstein distance. To make hardness evaluation model-agnostic,\nwe compute the multivariate Wasserstein distance between the synthetic anomalies and the normal\n48\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 20: AUC-PR performance of LLM-DAS with different hardness levels of anomaly synthesis.\nWe extend the synthesis prompt (detailed in Prompt 6.16) so that the LLM-generated code includes\na discrete hardness parameter (High, Medium, Low). Rows in blue indicate datasets where the\noriginal LLM-DAS improves over the base detector. Rows in red indicate cases where the original\nLLM-DAS underperforms the base detector, but performance can be recovered or improved by\nlowering the hardness.\nDatasets\n\nBase detector\nPCA\n\n+LLM-DAS (Ours)\n\nimgseg\nlympho\nsatellite\nsatimage-2\nvertebral\nWPBC\nmusk\ncadio\nWDBC\nmammography\npima\n\n0.772\n1.000\n0.778\n0.919\n0.138\n0.394\n1.000\n0.863\n0.983\n0.417\n0.701\n\n0.824\n0.989\n0.792\n0.931\n0.143\n0.408\n0.997\n0.824\n0.980\n0.579\n0.751\n\nDatasets\n\nBase detector\nIForest\n\n+LLM-DAS\n\nimgseg\nlympho\nsatellite\nsatimage-2\nvertebral\nWPBC\nmusk\ncadio\nWDBC\nmammography\npima\n\n0.756\n0.959\n0.858\n0.885\n0.134\n0.376\n0.528\n0.702\n0.975\n0.333\n0.666\n\n0.859\n0.979\n0.808\n0.871\n0.269\n0.399\n1.000\n0.622\n0.994\n0.571\n0.740\n\n+LLM-DAS (Hardness Level)\nHigh\nMedium\nLow\n0.820\n0.987\n0.799\n0.933\n0.144\n0.411\n0.996\n0.826\n0.981\n0.575\n0.749\n\n0.796\n1.000\n0.796\n0.933\n0.143\n0.402\n1.000\n0.847\n0.983\n0.563\n0.740\n\n0.787\n1.000\n0.790\n0.927\n0.141\n0.401\n1.000\n0.864\n0.989\n0.561\n0.734\n\n+LLM-DAS (Hardness Level)\nHigh\nMedium\nLow\n0.854\n0.976\n0.811\n0.870\n0.249\n0.396\n1.000\n0.624\n0.997\n0.571\n0.747\n\n0.843\n0.976\n0.849\n0.892\n0.237\n0.386\n1.000\n0.687\n0.991\n0.565\n0.728\n\n0.847\n0.968\n0.862\n0.906\n0.231\n0.384\n1.000\n0.718\n0.983\n0.554\n0.721\n\nTable 21: Wasserstein distance metrics for quantifying anomaly hardness. d(A, N) is the multivariate\nWasserstein distance between anomalies A and normal samples N via optimal-transport in the\nfeature space. Lower distance indicates higher hardness (more overlap with normal). The ratio\nd(ASyn , N)/d(ATrue , N) is the Relative Hardness Ratio.\nBase detector: PCA\nDatasets\n\nd(ASyn , N) / d(ATrue , N)\n\nd(ATrue , N)\n\nd(ASyn , N)\n\nd(ASynHigh , N)\n\nd(ASynMedium , N)\n\nd(ASynLow , N)\n\nimgseg\nlympho\nsatellite\nsatimage-2\nvertebral\nWPBC\nmusk\ncardio\nWDBC\nmammography\npima\n\n1.870\n0.540\n1.431\n0.457\n8.141\n0.915\n0.261\n0.724\n0.322\n1.424\n5.944\n\n4.963\n17.529\n7.828\n14.716\n1.691\n5.407\n31.207\n12.054\n16.559\n5.439\n2.376\n\n9.279\n9.474\n11.198\n6.728\n13.765\n4.947\n8.157\n8.726\n5.340\n7.743\n14.124\n\n9.148\n9.504\n11.078\n6.734\n13.895\n4.962\n8.179\n8.736\n5.724\n7.746\n14.173\n\n10.534\n18.017\n11.386\n7.194\n14.911\n5.237\n9.249\n9.088\n8.706\n7.903\n17.924\n\n11.953\n58.429\n13.125\n8.066\n16.732\n5.875\n12.112\n9.769\n9.159\n8.813\n20.202\n\nBase detector: IForest\nDatasets\n\nd(ASyn , N) / d(ATrue , N)\n\nd(ATrue , N)\n\nd(ASyn , N)\n\nd(ASynHigh , N)\n\nd(ASynMedium , N)\n\nd(ASynLow , N)\n\nimgseg\nlympho\nsatellite\nsatimage-2\nvertebral\nWPBC\nmusk\ncardio\nWDBC\nmammography\npima\n\n1.050\n0.224\n0.772\n0.222\n6.440\n0.685\n0.125\n0.379\n0.174\n1.518\n3.557\n\n4.963\n17.529\n7.828\n14.716\n1.691\n5.407\n31.207\n12.054\n16.559\n5.439\n2.376\n\n5.213\n3.920\n6.042\n3.262\n10.889\n3.705\n3.906\n4.573\n2.888\n8.257\n8.453\n\n5.214\n3.919\n6.056\n3.258\n10.768\n3.718\n3.917\n4.588\n2.919\n8.276\n8.438\n\n5.678\n4.050\n6.773\n4.910\n10.910\n4.057\n4.917\n7.112\n3.071\n8.377\n8.950\n\n6.168\n4.263\n7.922\n7.228\n11.729\n4.763\n5.196\n8.878\n4.471\n8.658\n9.052\n\nset using an optimal-transport formulation EMD (Earth Mover’s Distance), where the two point\n49\n\n\fPublished as a conference paper at ICLR 2026\n\nclouds are treated as empirical distributions in the feature space. Unlike the classical 1D Wasserstein\ndistance computed over scalar score distributions, our implementation uses the full multivariate point\nsets (normal vs. synthetic anomalies) and measures their geometric discrepancy through an optimal\ntransport cost.\nWe denote d(A, N) as the multivariate Wasserstein distance between anomalies A and normal\nsamples N via optimal-transport in the feature space. A lower value of d(A, N) indicates that\nanomalies lie closer to the normal manifold and are therefore harder to detect.\nTable 21 reports:\n• d(ATrue , N): the inherent difficulty of the dataset (how far true anomalies are from normal\nsamples),\n• d(ASyn , N): distance for anomalies synthesized by the original LLM-DAS,\n• d(ASynHigh , N), d(ASynMedium , N), d(ASynLow , N): distances under each hardness level,\nd(A\n\n,N)\n\nSyn\n• the ratio d(ATrue\n,N) , which we refer to as the Relative Hardness Ratio.\n\nTwo observations are particularly important:\n• Monotonic trend across hardness levels. For both PCA and IForest, d(ASynHigh , N) is\nconsistently smaller than or comparable to the Medium and Low settings, and the distances\nincrease from High → Medium → Low. This confirms that the hardness control interface\nis effective: High hardness produces anomalies closer to normal data, while Low hardness\nproduces more easily separable anomalies.\n• Failure cases correspond to “overly hard” synthetic anomalies. In the failure cases\nd(ASyn ,N)\nhighlighted in red in Table 20, the ratio d(ATrue\n,N) in Table 21 tends to be comparatively\nsmall. This means that the synthesized anomalies are much closer to normal samples than\nthe true anomalies, even though the true anomalies are already far from normal (large\nd(ATrue , N)). In these failure cases, the problem is inherently easy, and generating very hard\nsynthetic anomalies can over-complicate the learned boundary and hurt performance.\n\nPractical takeaway.\n\nTaken together, Table 20 and Table 21 show that:\n\n• LLM-DAS can synthesize anomalies at controllable hardness levels;\n• the original implementation naturally produces hard anomalies (small Wasserstein distance);\n• rare side effects arise when the dataset is inherently easy but the synthetic anomalies are\n“too hard”;\n• these side effects can be mitigated in practice by lowering the hardness level, which increases\nd(ASyn , N) and restores performance to baseline or better.\nPrompt used in LLM-DAS variant with controlled hardness. To further analyze the impact of\nanomalous samples with varying difficulty levels, we modified the prompt in the “Requirements”\nsection by introducing a variable, the difficulty coefficient “degree”, enabling LLMs to generate\nanomalies with varying degrees of difficulty. The specific prompt is as follows.\n50\n\n\fPublished as a conference paper at ICLR 2026\n\nExample Prompt for Generating Varying Difficulty Synthesis Code\nYou are an expert in anomaly detection systems. The training set contains only normal samples.\nWe use a IForest detector, where the anomaly score is computed using model.predict_score().\nThe higher the score, the more anomalous the sample.\nThe description of IForest.\n*XXX.\n*XXX.\n*XXX.\n...(Same as original prompt)\nYour task is ...\n*XXX.\n*XXX.\n*XXX.\n...(Same as original prompt)\nRequirements: Your should strictly follow below requirements:\n...\nThus the function format is generate_hard_anomalies(n_samples: int, model, X_train:\nnp.ndarray, degree)\nSupplementary explanation: The parameter degree is used to generate anomalies with\nvarying levels of detection difficulty, featuring three optional values:\n- low (low difficulty)\n- med (medium difficulty)\n- high (high difficulty)\nThese correspond to generating anomalies that are hard, moderately hard, and extremely hard\nto detect, respectively. You need to generate anomalies of the corresponding difficulty level\nbased on the specific value of degree.\nReturn only the complete Python function generate_hard_anomalies(...), with policy you used\nfor genenrating anomalies and clear comments explaining key steps.\n\n6.17\n\nA NALYSIS OF G ENERATING D ETECTOR -S PECIFIC B INARY C LASSIFIERS\n\nTo further explore the potential of LLMs within the proposed framework, we redesigned the prompts\nin the “Objective” and “Requirements” sections to enable LLMs to develop detector-specific binary\nclassifiers. These classifiers are then directly integrated with the original ones to enhance the anomaly\ndetection performance of the baseline models. The specific prompt can be found in prompt 6.17.\n51\n\n\fPublished as a conference paper at ICLR 2026\n\nExample Prompt for Generating Detector-Specific Binary Classifiers\nYou are an expert in anomaly detection systems. The training set contains only normal samples.\nWe use a IForest detector, where the anomaly score is computed using model.predict_score().\nThe higher the score, the more anomalous the sample.\nThe description of IForest.\n*XXX.\n*XXX.\n*XXX.\n...(Same as original prompt)\nYour task is to write a Python function detector_specific_binary_classifiers(...) tailored\nfor PCA detectors. This function must complement PCA by focusing on capturing the\naforementioned anomaly types that PCA fails to detect. Once the function is implemented,\nusers will be able to provide it with the following inputs:\n* A trained PCA model (model) that exposes predict_score(),\n* The training samples (X_train)\nRequirements: Your should strictly follow below requirements:\n1. You must use your expertise to design a binary classifier that is specifically tailored for\nPCA detectors, not a model-agnostic classifier. The design should leverage the inherent\ncharacteristics and limitations of PCA to achieve complementarity.\n2. The classifier should focus on capturing anomaly types that PCA fails to detect, particularly\nthose that result in low scores from model.predict_score() (i.e., anomalies with low reconstruction error in PCA). To achieve this, you can first identify \"borderline\" normal training samples\nbased on professional understanding of PCA’s inherent characteristics (not solely relying on\nanomaly scores), then design the classifier to be sensitive to transformations of these samples\nthat PCA cannot detect. The classifier’s decision logic must be specific to PCA’s weaknesses,\nmaking it ineffective as a general classifier for other detectors.\n3. For the PCA model, you can only use the function model.predict_score() to interact with it.\n4. The classifier must be trained on the provided training data and should expose standard\nfit(X, y) and predict_score(X) methods.\n5. The function should allow setting:\n* the trained PCA model (model),\n* training samples (X_train).\nThus the function format is detector_specific_binary_classifiers(model, X_train: np.ndarray)\n6. All package imports must be done inside the function.\nReturn only the complete Python function detector_specific_binary_classifiers(...), with the\npolicy used for designing the classifier and clear comments explaining key steps.\n\n6.18\n\nA NALYSIS OF G ENERATING S YNTHETIC S AMPLES TARGETING M ULTIPLE W EAKNESSES\nOF BASE D ETECTOR\n\nTo explore whether LLMs can identify multiple weaknesses of detectors and whether a mixture of\nsynthetic anomalies targeting all these weaknesses enhances robustness, we modified the prompt in\nthe “Objective” and “Requirements” sections by instructing LLMs to first identify several distinct\nlogical weaknesses of the detector and then generate a mixture of synthetic anomalies targeting each\nweakness. The specific prompt can be found in prompt 6.18. And the example of the generation\npolicy generated by the LLMs is available in Code2. The results are provided in Table 22.\n52\n\n\fPublished as a conference paper at ICLR 2026\n\nTable 22: Performance comparison between the original LLM-DAS and the multi-weakness variant\nLLM-DAS (M-W), which explicitly prompts the LLM to identify and target several challenging\nanomaly patterns per detector.\nPCA\n\n+LLM-DAS (Ours)\n\n+LLM-DAS (M-W)\n\nIForest\n\n+LLM-DAS (Ours)\n\n+LLM-DAS (M-W)\n\nabalone\nannthyroid\nimgseg\nlympho\nmammography\npendigits\npima\nsatellite\nsatimage-2\nshuttle\nvertebral\nvowels\nwilt\nWPBC\nbreastw\ncardio\nWDBC\n\n0.839\n0.566\n0.772\n1.000\n0.417\n0.386\n0.701\n0.778\n0.919\n0.963\n0.138\n0.105\n0.064\n0.394\n0.993\n0.863\n0.983\n\n0.839\n0.660\n0.824\n0.989\n0.579\n0.485\n0.751\n0.792\n0.931\n0.991\n0.143\n0.109\n0.097\n0.408\n0.996\n0.824\n0.980\n\n0.848\n0.582\n0.799\n1.000\n0.431\n0.397\n0.749\n0.794\n0.951\n0.991\n0.141\n0.228\n0.090\n0.400\n0.994\n0.873\n0.982\n\n0.848\n0.615\n0.756\n0.959\n0.333\n0.513\n0.666\n0.858\n0.885\n0.917\n0.134\n0.098\n0.085\n0.376\n0.945\n0.702\n0.975\n\n0.855\n0.620\n0.859\n0.979\n0.571\n0.602\n0.740\n0.808\n0.871\n0.995\n0.269\n0.178\n0.278\n0.399\n0.995\n0.622\n0.994\n\n0.850\n0.623\n0.822\n0.972\n0.453\n0.613\n0.758\n0.867\n0.950\n0.995\n0.138\n0.190\n0.088\n0.405\n0.994\n0.834\n0.980\n\nAverage\n\n0.640\n\n0.670\n\n0.662\n\n0.627\n\n0.684\n\n0.678\n\nExample Prompt for Generating Synthetic Samples Targeting Multiple Weaknesses\nYou are an expert in anomaly detection systems. The training set contains only normal samples.\nWe use a IForest detector, where the anomaly score is computed using model.predict_score().\nThe higher the score, the more anomalous the sample.\nThe description of IForest.\n*XXX.\n*XXX.\n*XXX.\n...(Same as original prompt)\nYour task is to write a Python function generate_hard_anomalies(...) that generates anomalies\nwhich are the most difficult for the IForest detector to detect. This means that you the\ngenerated anomalies should have relatively low anomaly score, thus they are hard to be\ndetected. But these anomalies are helpful to build a more robust detector. Critically, you\nmust first identify multiple distinct logical weaknesses of IForest (not just one), then\ndesign targeted anomaly generation policies for each weakness. The final output should\nbe a mixture of synthetic anomalies targeting all identified weaknesses to maximize\nrobustness. After the function is completed, users can provide it with:\n* A trained IForest model (model) that exposes predict_score(),\n* The training samples (X_train)\nRequirements: Your should strictly follow below requirements:\n1. You must first identify more than one distinct, logical weaknesses of IForest. For\neach weakness, clearly explain the logical basis (how it arises from IForest’s design) in the\nfunction’s comments.\n2. For each identified weakness, design a unique, IForest-specific anomaly generation\npolicy (not model-agnostic). For each policy , you can first find the set of ‘borderline’ normal\ntraining samples based on your unique and professional understanding to IForest, not only\nbased on the anomaly score. Then transform them to anomalies that is tailor-designed for\nIForest. Please note that the transformation function should be specific for IForest, which\nmeans that it is not a general transformation for other detectors.\n*XXX.\n*XXX.\n*XXX.\n...(Same as original prompt)\n\nCode 2: Generated Code for Synthesizing Anomalies Targeting Multiple Weaknesses of IForest\n53\n\n\fPublished as a conference paper at ICLR 2026\n\n1\n\nimport numpy as np\n\n2\n3\n4\n5\n\ndef generate_hard_anomalies(n_samples: int , model , X_train: np.\nndarray):\n\"\"\"\nGenerates anomalies that are difficult for an Isolation Forest\n(IForest) model to detect.\n\n6\n7\n8\n9\n\nThis function operates by first identifying three distinct\nlogical weaknesses of the IForest\nalgorithm , then implementing a targeted generation policy for\neach weakness. The final\noutput is a mixture of synthetic anomalies from all policies.\n\n10\n11\n12\n13\n14\n15\n16\n17\n\nArgs:\nn_samples (int): The total number of hard anomalies to\ngenerate.\nmodel: A trained IForest −like model object that exposes a\n‘predict_score ‘ method.\nThe method should return a score where a higher\nvalue indicates a higher\nlikelihood of being an anomaly.\nX_train (np.ndarray): The training data used to train the\nmodel , containing only\nnormal samples. Shape (\nn_train_samples , n_features).\n\n18\n19\n20\n21\n22\n23\n\nReturns:\nnp.ndarray: An array of generated hard anomalies , with\nshape (n_samples , n_features).\n\"\"\"\n# 1. Package Imports\nimport numpy as np\n\n24\n25\n26\n27\n\n# 2. Pre −computation and Helper Functions\nif n_samples == 0:\nreturn np.array([])\n\n28\n29\n30\n31\n\nn_train , d = X_train.shape\nif d == 0:\nreturn np.zeros((n_samples , 0))\n\n32\n33\n34\n35\n36\n\n# The user −provided ‘model.predict_score()‘ is assumed to\nreturn higher scores for\n# more anomalous samples. We use these scores to stratify the\ntraining data into\n# topological regions as perceived by the IForest model itself\n.\ntrain_scores = model.predict_score(X_train)\n\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n\n# Define quantiles to identify different types of normal\npoints. This is a nuanced\n# way to select ’borderline’ samples based on the model’s own\nperception of the data.\n# − Central points: Deep inside the data cloud (low scores).\n# − Borderline points: On the fringes of dense regions (medium\nscores).\n# − Edge points: Most isolated of the normal points (high\nscores for a normal sample).\nscore_quantiles = np.percentile(train_scores , [25, 75, 95])\ncentral_mask = train_scores &lt;= score_quantiles [0]\nborderline_mask = (train_scores &gt; score_quantiles [0]) &amp; (\ntrain_scores &lt;= score_quantiles [1])\nedge_mask = train_scores &gt;= score_quantiles [2]\n\n54\n\n\fPublished as a conference paper at ICLR 2026\n\n47\n48\n49\n50\n51\n\n# Ensure we have points in each category to draw from.\nX_central = X_train[central_mask] if np.any(central_mask) else\nX_train\nX_borderline = X_train[borderline_mask] if np.any(\nborderline_mask) else X_train\nX_edge = X_train[edge_mask] if np.any(edge_mask) else X_train\n\n52\n53\n54\n55\n56\n57\n58\n\n# Global statistics for transformations\ndata_min = np.min(X_train , axis=0)\ndata_max = np.max(X_train , axis=0)\ndata_range = data_max − data_min\ndata_std = np.std(X_train , axis=0)\ndata_centroid = np.mean(X_train , axis=0)\n\n59\n60\n61\n62\n\n# Avoid division by zero for constant features\ndata_range[data_range == 0] = 1.0\ndata_std[data_std == 0] = 1.0\n\n63\n64\n\n# 3. IForest Weaknesses and Corresponding Anomaly Generation\nPolicies\n\n65\n66\n\ngenerated_anomalies = []\n\n67\n68\n69\n70\n71\n72\n\n# Allocate samples to each policy\nn_policy1 = n_samples // 3\nn_policy2 = n_samples // 3\nn_policy3 = n_samples − n_policy1 − n_policy2\npolicy_allocations = [n_policy1 , n_policy2 , n_policy3]\n\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n\n#\n#\n#\n#\n#\n\n−−−\nPolicy 1: Clustered Anomalies\n−−−\nWeakness ID: \"Masking\" or \"Crowding\" Effect.\nLogical Basis: IForest isolates points. If several anomalies\nare positioned closely\n# together , they form a dense cluster. The algorithm will then\nrequire many splits to\n# isolate any single point within this new cluster , making\nthem appear \"normal\" (i.e.,\n# giving them longer path lengths and thus lower anomaly\nscores). This policy creates\n# such a dense micro −cluster in a sparse area of the feature\nspace.\nif policy_allocations [0] &gt; 0:\n# Step 1: Find a ’borderline’ region by selecting a normal\npoint from a sparse area.\n# We use ’edge’ points as seeds because they are already\nin less dense regions ,\n# making them good candidates for locating our new anomaly\ncluster far from the main data.\nseed_point = X_edge[np.random.randint(0, len(X_edge))]\n\n88\n89\n90\n91\n\n# Step 2: Define the center of the anomaly cluster by\npushing the seed point\n# further away from the data’s centroid.\ncluster_center = data_centroid + 2.0 ∗ (seed_point −\ndata_centroid)\n\n92\n93\n94\n95\n\n# Step 3: Transform by generating a very tight cluster\naround this new center.\n# The small covariance ensures the points are very close ,\nmaximizing the crowding effect.\ncluster_cov = np.diag((data_std / 50.0)∗∗2) # Very small\nvariance\n\n55\n\n\fPublished as a conference paper at ICLR 2026\n\nanomalies_p1 = np.random.multivariate_normal(\nmean=cluster_center , cov=cluster_cov , size=\npolicy_allocations [0]\n)\ngenerated_anomalies.append(anomalies_p1)\n\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n\n#\n#\n#\n#\n\n−−−\nPolicy 2: Diagonal Anomalies\n−−−\nWeakness ID: Inefficiency of Axis −Parallel Splits for\nDiagonal Patterns.\n# Logical Basis: IForest builds trees by splitting on a single\nfeature at a time , creating\n# axis −parallel decision boundaries. It is inefficient at\nisolating anomalies that only\n# become apparent through a combination of features (e.g.,\nlying on a diagonal).\n# Such points require many \"stair −step\" splits to be isolated ,\nincreasing their path\n# length and lowering their anomaly score.\nif policy_allocations [1] &gt; 0:\nanomalies_p2 = []\n# Step 1: Select ’borderline’ normal samples. These are\npoints on the edge of the main\n# data cloud , making them good candidates to be pushed\nslightly further out in a\n# non −obvious , diagonal direction to become hard −to−detect\nanomalies.\nbase_points_indices = np.random.randint(0, len(\nX_borderline), size=policy_allocations [1])\nbase_points = X_borderline[base_points_indices]\n\n117\n\nfor point in base_points:\nanomaly = point.copy()\n# Step 2: IForest −specific transformation. Choose two\nrandom features and push the point’s\n# values along both dimensions simultaneously ,\ncreating a diagonal shift.\nif d &gt; 1:\nf1, f2 = np.random.choice(d, 2, replace=False)\n\n118\n119\n120\n121\n122\n123\n124\n\n# Perturb by a magnitude related to the standard\ndeviation of each feature\nperturbation1 = np.random.choice([−1, 1]) ∗ 2.5 ∗\ndata_std[f1]\nperturbation2 = np.random.choice([−1, 1]) ∗ 2.5 ∗\ndata_std[f2]\n\n125\n126\n127\n128\n\nanomaly[f1] += perturbation1\nanomaly[f2] += perturbation2\nelse: # Handle 1D case gracefully\nanomaly[0] += np.random.choice([−1, 1]) ∗ 2.5 ∗\ndata_std[0]\n\n129\n130\n131\n132\n133\n\nanomalies_p2.append(anomaly)\ngenerated_anomalies.append(np.array(anomalies_p2))\n\n134\n135\n136\n137\n138\n139\n140\n141\n142\n\n#\n#\n#\n#\n#\n\n−−−\nPolicy 3: Subspace Anomalies\n−−−\nWeakness ID: High −Dimensional Feature Sparsity.\nLogical Basis: In high −dimensional spaces , IForest randomly\nselects a feature to split on\n# at each node. If a point is anomalous only within a small\nsubset of features (a subspace),\n\n56\n\n\fPublished as a conference paper at ICLR 2026\n\n# the algorithm is unlikely to select these specific features\nfor splitting early on. It will\n# waste many splits on irrelevant dimensions where the point\nlooks normal , again increasing\n# its path length and making it appear less anomalous.\nif policy_allocations [2] &gt; 0:\nanomalies_p3 = []\n# Step 1: Select ’central’ normal samples. These points\nhave the lowest anomaly scores and\n# are deep within the normal data distribution. Modifying\nthem subtly makes them hard to\n# distinguish from their many legitimate neighbors.\nbase_points_indices = np.random.randint(0, len(X_central),\nsize=policy_allocations [2])\nbase_points = X_central[base_points_indices]\n\n143\n144\n145\n146\n147\n148\n149\n150\n151\n152\n153\n\n# Step 2: Define a small subspace (a few features) to\nperturb.\nnum_perturbed_dims = max(1, int(d ∗ 0.1)) # Perturb ~10%\nof features\n\n154\n155\n156\n\nfor point in base_points:\nanomaly = point.copy()\n# Step 3: Apply the IForest −specific subspace\ntransformation.\nperturbed_dims = np.random.choice(d,\nnum_perturbed_dims , replace=False)\nfor dim in perturbed_dims:\n# Push the value just outside the observed range\nof normal data for that feature.\nepsilon = 0.1 ∗ data_range[dim]\nif np.random.rand() &gt; 0.5:\nanomaly[dim] = data_max[dim] + epsilon\nelse:\nanomaly[dim] = data_min[dim] − epsilon\nanomalies_p3.append(anomaly)\ngenerated_anomalies.append(np.array(anomalies_p3))\n\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n\n# 4. Final Combination and Output\nif not generated_anomalies:\n# Fallback in case n_samples was small and all policies\ngot 0\nreturn np.empty((0, d))\n\n171\n172\n173\n174\n175\n\nfinal_anomalies = np.vstack(generated_anomalies)\n\n176\n177\n\n# Shuffle to mix anomalies from different policies\nnp.random.shuffle(final_anomalies)\n\n178\n179\n180\n\nreturn final_anomalies[:n_samples] # Ensure exact number is\nreturned\n\n181\n\n6.19\n\nH OW WE ENSURE THE ROBUSTNESS OF LLM-DAS?\n\nLLM-DAS relies on the LLM’s ability to interpret a detector’s algorithmic description. However, the\nframework is not brittle and is intentionally designed to remain robust even when the LLM’s analysis\nis imperfect.\n(1) The LLM analyzes a clean, parameter-free, logical description—not raw tabular data. The\nLLM’s task is restricted to summarizing the detector’s high-level mechanism and reasoning about its\nstructural weaknesses. These descriptions (e.g., PCA steps) are symbolic and algorithmic rather than\ndata-dependent, making them significantly easier and more reliable for LLMs to understand.\n57\n\n\fPublished as a conference paper at ICLR 2026\n\n(2) The prompt imposes strict structural and functional constraints. As detailed in Eq.3 of\nSection 3.2, the LLM is required to produce: (i) a detector-aware synthesis policy, (ii) an executable,\ndata-agnostic program, (iii) an explanation of its reasoning. These constraints substantially reduce\nthe risk of superficial reasoning by enforcing explicit, verifiable logic. For example, in Case Study of\nSection 3.2.2, the LLM’s policy for IForest describes two core steps: (i) selecting borderline normal\nsamples using the detector’s own score function, and (ii) performing controlled extrapolation that\npreserves long path lengths. The accompanying explanation clarifies why these operations align\nwith the algorithmic weakness of IForest (i.e., difficulty isolating deep points), making the LLM’s\nintentions transparent and allowing us to verify that the generated code faithfully implements this\nlogic. This level of specificity prevents arbitrary code generation.\n(3) The final detector does not rely solely on the LLM-generated component. After generating\nsynthetic anomalies, we train an enhancement classifier f˜t and combine it with the original detector\nft using a normalized score-level ensemble. This fusion (Eq.7 of Section 3.2.2) ensures that even if\nthe LLM’s synthesis is occasionally suboptimal, the original detector’s behavior remains preserved,\npreventing degradation.\n(4) Extensive empirical evidence demonstrates robustness across detectors, datasets, and LLMs.\nThe results in Table 1 of manuscript indicate that the improvements over the original source detectors\nacross 36 benchmark datasets are statistically significant. The detailed results in Table 4 and Table 5\nof Appendix 6.7 also show that the suboptimal results are occasional. In addition, our experiments\nin Table 8 of Appendix 6.9 further verify that LLM-DAS remains effective across different LLMs,\nincluding GPT-4o, Gemini-2.5-Pro, and Qwen3.\n(5) Boundary refinement after enhancement. Fig. 5(b) of manuscript shows that the synthetic\nanomalies lie close to the normal manifold and receive scores similar to borderline normal samples\nunder the original detector ft . This confirms that the generated samples match the detector-aware\npolicy and are indeed “hard” for the original detector. Crucially, Fig. 5(c) of manuscript demonstrates\nthat after training with LLM-DAS, the enhanced detector exhibits a clear rightward shift of both\nsynthetic and real anomaly score distributions relative to normal data. This tightening of the decision\nboundary shows that the synthesized anomalies not only challenge the detector but meaningfully\nreshape the classifier to produce better separation. This is direct evidence that the LLM-generated\nsamples are of sufficiently high quality to improve the detector’s generalization.\n6.20\n\nO N I SOLATING THE C ONTRIBUTION OF LLM R EASONING\n\nWhat knowledge is LLM actually contributed? Our claim is not that the LLM invents entirely new\nmathematics, but that it performs a contextual, detector-specific reasoning and synthesis task that\ngoes far beyond retrieving a single, static rule.\nThe Ablations Test Specific, Necessary Components: Our ablation studies (Generic/Simple/Random in Fig. 4(b)) are designed to remove specific, instructed capabilities from the LLM:\n• “Generic”: Removes detector-awareness. The LLM cannot perform reasoning conditioned\non the target detector’s algorithm.\n• “Simple”: Removes the capability to generate hard anomalies by denying access to the score\nfunction.\n• “Random”: Removes the borderline heuristic, a key strategic element.\nThe significant performance drop in each variant confirms that each of these instructed reasoning\ncomponents is critical. This shows that the LLM is not just executing a single built-in rule but is\ndynamically combining these elements based on the prompt.\nThe Cross-Detector Experiment is the Key Evidence (Connecting to Table 2): The most compelling evidence against a “universal rule” hypothesis comes from our cross-detector experiment\n(Table 2).\n• If the LLM were simply applying a generic, detector-agnostic heuristic (e.g., “add small\nA\nnoise” or “extrapolate”), then the synthesis policy Sprogram\nfor Detector A should work\nreasonably well when transferred to Detector B.\n58\n\n\fPublished as a conference paper at ICLR 2026\n\n• The results clearly show the opposite: Transferred strategies often perform poorly. This\ndemonstrates that each LLM-generated policy is highly specialized and its effectiveness is\ncontingent on a precise match between the synthesis logic and the target detector’s internal\nmechanics. This specialization is the hallmark of genuine, detector-specific reasoning.\nIn summary, the ablations prove the necessity of key reasoning components, and the cross-detector\nexperiment proves the specificity of the resulting strategies. Together, they robustly isolate and\nvalidate the contribution of the LLM’s contextual reasoning capabilities.\n\n59\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"