"<!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>Bi-Level Optimization for Self-Supervised AI-Generated Face Detection\nMian Zou1,2 , Nan Zhong2 , Baosheng Yu3 , Yibing Zhan4 , and Kede Ma2, *\n1\nJiangxi University of Finance and Economics 2 City University of Hong Kong\n3\nNanyang Technological University 4 Yunnan United Vision Technology\nmianzou2-c@my.cityu.edu.hk, {nzhong, kede.ma}@cityu.edu.hk,\n\narXiv:2507.22824v1 [cs.CV] 30 Jul 2025\n\nbaosheng.yu@ntu.edu.sg, zybjy@mail.ustc.edu.cn\nhttps://github.com/MZMMSEC/AIGFD_BLO\n\nAbstract\n\nAs new generators emerge, the urgent need for robust detectors of AI-generated faces has never been greater.\nMost existing detectors rely on supervised learning,\ntreating the problem as end-to-end feature learning and binary classification between photographic and AI-generated1\nfaces [7, 10, 12, 15, 32, 34, 47, 52, 53]. Unfortunately,\nthese methods latch onto artifacts specific to the generators seen during training, and thus struggle to adapt to\nnovel generative techniques. An alternative line of work\nseeks model-agnostic cues, e.g., physiological inconsistencies in head poses [57], pupil shapes [18], or corneal highlights [22]. However, handcrafted features may miss the\nsubtle statistical differences introduced by state-of-the-art\ngenerators. More recently, self-supervised features learned\nsolely from photographic images [8, 38] have demonstrated\nbetter cross-generator performance. Yet, because their pretext tasks are not explicitly tailored to AI-generated face detection, these approaches can still fall short of optimal.\nTo bridge this gap, we build on the prior work [66]\nby introducing a bi-level optimization scheme [9] that explicitly aligns self-supervised pretraining with AI-generated\nface detection. In the inner loop, we train a vision encoder on face photographs using a linearly weighted combination of pretext tasks, including 1) classification of categorical exchangeable image file format (EXIF) tags (e.g.,\nwhite balance mode and flash), 2) ranking of ordinal EXIF tags (e.g., ISO speed and aperture), and\n3) detection of artificial face manipulations (e.g., flipped or\naffine-warped regions). In the outer loop, we dynamically\nadjust the relative task weights to refine the feature space\nfor coarse-grained manipulated face detection. This proxy\ntask enables us to better identify AI-generated faces without\never incorporating them during self-supervision.\nOnce pretraining is complete, the encoder is frozen.\nAI-generated faces can then be uncovered either by treat-\n\nAI-generated face detectors trained via supervised learning\ntypically rely on synthesized images from specific generators, limiting their generalization to emerging generative\ntechniques. To overcome this limitation, we introduce a selfsupervised method based on bi-level optimization. In the inner loop, we pretrain a vision encoder only on photographic\nface images using a set of linearly weighted pretext tasks:\nclassification of categorical exchangeable image file format\n(EXIF) tags, ranking of ordinal EXIF tags, and detection of\nartificial face manipulations. The outer loop then optimizes\nthe relative weights of these pretext tasks to enhance the\ncoarse-grained detection of manipulated faces, serving as a\nproxy task for identifying AI-generated faces. In doing so,\nit aligns self-supervised learning more closely with the ultimate goal of AI-generated face detection. Once pretrained,\nthe encoder remains fixed, and AI-generated faces are detected either as anomalies under a Gaussian mixture model\nfitted to photographic face features or by a lightweight twolayer perceptron serving as a binary classifier. Extensive experiments demonstrate that our detectors significantly outperform existing approaches in both one-class and binary\nclassification settings, exhibiting strong generalization to\nunseen generators.\n\n1. Introduction\nThe synthesis of human faces by modern generative\nmodels—ranging from generative adversarial networks\n(GANs) [13, 27] to diffusion models [1, 39, 44, 46,\n55, 58]—has reached a level of realism that renders AIgenerated faces virtually indistinguishable from “real” face\nphotographs [37]. While this progress unlocks enormous\ncreative and practical potential, it also amplifies risks related to misinformation, privacy breaches, and cybercrime.\n\n1 In this paper, we refrain from using the terms “real” and “fake,” since\nit is challenging to operationalize a precise definition of “a real face” in the\ncontext of image generation [65].\n\n* Corresponding author.\n\n1\n\n\fing them as anomalies under a Gaussian mixture model\n(GMM) fitted to photographic face features, or by training a lightweight two-layer perceptron on the learned representations. Through extensive experiments in both oneclass and binary classification settings, our Bi-Level AIgenerated face DEtector with Self-supervision (BLADES)\nsignificantly outperforms prior approaches and generalizes\nto unseen generators.\nIn summary, our contributions are threefold.\n• We present BLADES, a bi-level optimization scheme that\nexplicitly steers self-supervised pretraining toward AIgenerated face detection.\n• We implement BLADES using joint embedding [64] that\nincorporates EXIF-based and manipulation-based pretext/surrogate tasks to detect AI-generated faces.\n• We demonstrate state-of-the-art performance in both oneclass and binary classification evaluations, with strong\ncross-generator generalization.\n\nrogate tasks, e.g., rotation prediction [16], jigsaw puzzles [17], contrastive learning [41], and masked image modeling [21]. Such methods have driven advances across face\nparsing [62], object segmentation [63] and detection [56],\nand forensic analysis [61]. Yet, a critical gap remains: conventional self-supervised learning pipelines do not explicitly align their pretext losses with downstream tasks, leading to suboptimal specialization.\nTo address this, recent work has explored task-aware\npretext design [23], fine-tuning initialization [54], modular\npretraining [29], and progressive domain adaptation [42].\nHowever, multi-stage training schemes often depend on\nad hoc heuristics. By contrast, bi-level optimization [4,\n45, 59], as employed in this paper, provides a principled\nand mathematically grounded approach for steering selfsupervised pretraining end-to-end toward the downstream\nobjective.\n\n2. Related Work\n\nA promising yet under-explored source of supervisory signal is EXIF metadata—the standardized camera tags embedded in image files. Originally used for camera calibration [60], EXIF information has since supported image\nquality assessment [14] and image splicing detection [23].\nRecent work has shown that encoding EXIF metadata as\na linguistic modality and jointly embedding it with images\nyields representations that transfer to forgery detection [61].\nHere, we extend the prior EXIF-based learning [66] by incorporating a richer set of categorical and ordinal tags, integrating face manipulation tasks, and employing bi-level\noptimization to align these pretext objectives with a surrogate task of AI-generated face detection.\n\n2.3. EXIF Metadata for Computer Vision\n\nIn this section, we provide a concise overview of AIgenerated face detection, self-supervised learning, and\nEXIF metadata for computer vision.\n\n2.1. AI-Generated Face Detection\nModel-Dependent Detectors exploit characteristic artifacts introduced by specific generators, e.g., spatial textures inconsistencies [34], frequency distortions from upsampling [7, 10, 12, 15, 32], or reconstruction errors in\ndiffusion models [36, 53]. While highly effective against\nknown generative methods, these approaches tend to overfit to the model peculiarities they have been trained on, and\nthus struggle to generalize as new generators emerge.\nModel-Agnostic Detectors seek cues that transfer across\ngenerators. Early work framed AI-generated image detection as a one-class classification (also known as anomaly\ndetection) problem [19], leveraging physiological markers\nsuch as implausible head poses [57], pupil shape anomalies [18], and corneal specular highlights [22]. More recently, self-supervised representations learned from purely\nphotographic images—via pretext tasks like image-text\nalignment [38], denoising [31], super-resolution [8], and\nEXIF-based ordinal ranking [66]—have shown stronger\ncross-generator performance. However, because these pretext tasks are designed without explicit regard for the end\ngoal of AI-generated face detection, they are bound to be\nsuboptimal. Here, we present BLADES that leverages\nbi-level optimization to tailor pretext tasks to the detection\nobjective, relying exclusively on face photographs.\n\n3. Proposed Method: BLADES\nThis section presents in detail the proposed BLADES,\nwhose system diagram is shown in Fig. 1.\n\n3.1. Problem Formulation\nWe seek to learn a vision encoder that, without ever seeing\nsynthesized faces, produces representations tailored for AIgenerated face detection.\nGiven a training minibatch of face photographs Btr for\nself-supervision and a separate validation minibatch Bval ,\nwe formulate a bi-level optimization problem:\nX\nmin\nℓ1 (x; θ ⋆ )\n(1a)\nλ\n\nx∈Bval\n\ns.t. θ ⋆ = arg min\nθ\n\n2.2. Self-Supervised Learning\n\nK\nX X\n\nλi ℓi (x; θ).\n\n(1b)\n\nx∈Btr i=1\n\nHere ℓ1 denotes the loss for a surrogate primary task for\nAI-generated face detection and ℓi , for i = 2, . . . , K,\n\nSelf-supervised learning has proven a powerful paradigm\nfor acquiring transferable visual features by solving sur2\n\n\fInner Loop\n\n“A photo of a face\nwith a manipulated\n{mouth} region”\n\nTextual\nTextual\nTextual\nTextual\nFeatures\nFeatures\n\nText\nEncoder\n\nFeatures\nFeatures\n\nText Templates\nVisual\nFeatures\n\nVision\nEncoder\nPhotographic\nFace Image\n\nJoint Embedding\n\n“A photo of a face\ncaptured using the\n{low} ISO speed ”\n\nCategorical EXIF\nTag Probabilities\nOrdinal EXIF\nTag Probabilities\n\nFocal\nWeighting\nWeighted\nSummation\n\nRanking\nScore\n\nLoss\nFunctions\n\nThurstone’s\nModel\n\nBi-Level\nOptimization\n\nFace Manipulation\nProbabilities\n\nFeedforward Computation\n\nBackpropagation\n\nTask\nWeights\n\nTrainable Parameters\n\nOuter Loop\n\nFigure 1. System diagram of the proposed BLADES for AI-generated face detection.\n\nrepresents the self-supervised pretext losses. The vector\nλ = [λ1 , . . . , λK ] weights each task, while θ comprises\nall learnable parameters. By alternating updating θ (in the\ninner loop) and λ (in the outer loop), the optimization automatically prioritizes those pretext objectives most beneficial\nto downstream detection.\n\n(a)\n\nTo endow our vision encoder with the ability to distinguish AI-generated faces without direct exposure, we define\na suite of self-supervised tasks—integrated via joint imagetext embedding [41]—that capture both camera-specific\ncharacteristics and face-centric alterations. Concretely,\nwe organize our tasks into four sets: 1) a surrogate primary task that approximates AI-generated face detection\nthrough coarse-grained face manipulation detection, 2) categorical EXIF tag classification [23], 3) ordinal EXIF tag\nranking [66], and 4) fine-grained face manipulation detection [2]. Each introduces a dedicated loss, and their\nweighted sum drives the inner-loop pretraining in Eq. (1b).\nJoint Embedding. We embed each face image x and text\ntemplate t into a shared RN space [64] using a vision encoder fϕ and a text encoder fφ , computing\n⟨fϕ (x), fφ (t)⟩\n,\nτ\n\n(c)\n\n(d)\n\n(e)\n\nFigure 2. Visualization of artificially manipulated face photographs by (a) horizontal eye flipping, (b) horizontal mouth flipping, (c) vertical mouth flipping, and (d) global affine transformation, respectively. (e) The original face is also shown as reference.\n\n3.2. Task Definition and Implementation\n\ns(x, t) =\n\n(b)\n\nwhere p(g|x) = 1 if x is a manipulated face and zero otherwise, and the model’s predicted probability p̂(g|x) is obtained by applying a softmax over the similarity scores:\nexp (s(x, tg ))\n.\n′\ng ′ ∈G exp (s(x, tg ))\n\np̂(g|x) = P\n\n(4)\n\nTask 2: Categorical EXIF Tag Classification. To equip\nour encoder with camera-specific priors, we treat the prediction of each selected categorical EXIF tag (e.g., makes)\nas a self-supervised classification task. Given the i-th categorical tag with label set Ci , we structure the text template\nti,c as “A photo of a face captured using the {c} {i-th categorical tag},” where c ∈ Ci , and embed both the image\nx and ti,c into our shared vision-language space. We then\nconvert the resulting similarity scores into a class probability distribution via softmax (same way as Eq. (4)). This\nyields p̂i (c|x), the model’s predicted probability that the ith EXIF tag of image x was set to the value c.\nIn practice, EXIF tag values exhibit long-tailed distributions (e.g., Canon images may outnumber Apple by\n10×), which can bias training toward majority classes.\nThus, we employ a focal version [30] of the multi-class fidelity loss that down-weights well-classified samples:\n!\nXp\nγ\npi (c|x)p̂i (c|x) ,\nℓi (x) = (1 − p̂i (y|x)) 1 −\n\n(2)\n\nwhere ⟨·, ·⟩ represents the inner product, and τ is a learnable\ntemperature. All tasks leverage these similarity scores to\nproduce probability estimates for their respective labels.\nTask 1: Coarse-Grained Face Manipulation Detection.\nAs a proxy for AI-generated face detection, we generate manipulated faces via local flips and global affine\ntransforms [66] (see Fig. 2). The text template is defined as tg : “A photo of a {g} face,” where g ∈ G =\n{manipulated, photographic}. We apply a fidelity\nloss [49, 64]:\nXp\nℓ1 (x) = 1 −\np(g|x)p̂(g|x),\n(3)\n\nc∈Ci\n\n(5)\n\ng∈G\n\n3\n\n\fwhere y is the ground-truth label, and pi (c|x) = I{c = y}.\nTask 3: Ordinal EXIF Tag Ranking. Because raw numerical EXIF values (e.g., ISO 100 vs. ISO 200) may\nbe poorly handled by text tokenizers—which tend to fragment or ignore numeric relationships—we first represent\nthe j-th ordinal tag using one of three textual levels L =\n{low, medium, high}. This gives rise to the text template\ntl : “A photo of a face captured using the {l} {j-th ordinal\ntag},” where l ∈ L. Each image x is paired with these\nlevel-specific text templates and embedded into the joint\nfeature space. To recover a continuous estimate of the original EXIF value, we compute a probability-weighted sum\nover these discretized levels:\nX\nr̂j (x) =\np̂j (l|x) × d(l),\n(6)\n\np(m|x) = 1 if region m of x is manipulated and zero otherwise, we then measure a fidelity loss for each region:\np\nℓm (x) =1 − p(m|x)p̂(m|x)\np\n− (1 − p(m|x)) (1 − p̂(m|x)).\n(10)\nBy including coarse- and fine-grained pretext tasks, the bilevel optimization scheme is guided to learn a photographic\nface feature space that aligns AI-generated face detection\nwith EXIF-based supervision.\n\n3.3. Bi-Level Task Alignment\nTo explicitly steer self-supervised pretraining toward AIgenerated face detection, we employ a bi-level optimization strategy that alternately updates the encoder parameters\nθ = {ϕ, φ, τ } and task weights λ in each iteration [33].\nInner-Loop Update (Feature Learning). We update the\nencoder parameters θ by minimizing the weighted sum of\nall pretext losses on a training minibatch Btr :\n\nl∈L\n\nwhere p̂j (l|x) is again computed from the similarity scores\nin Eq. (2) via softmax, and\n\n\n1 if l = low\n(7)\nd(l) = 2 if l = medium\n\n\n3 if l = high\n\nθ ′ = θ − α∇θ\n\nK\nX X\n\nλi ℓi (x; θ),\n\n(11)\n\nx∈Btr i=1\n\nwhere α is the inner-loop learning rate.\nOuter-Loop Update (Task Weighting). We adjust the task\nweight vector λ to minimize the surrogate primary loss ℓ1\non a validation minibatch Bval :\nX\nλ ← λ − β∇λ\nℓ1 (x; θ ′ (λ)),\n(12)\n\nis the corresponding numerical level. This preserves finegrained ordinal information while leveraging the strengths\nof our joint embedding architecture.\nTo enforce the correct ordering of EXIF tags, we perform\npairwise ranking. Given two images (x, x′ ), the groundtruth relation is pj (x, x′ ) = 1 if tagj (x) ≥ tagj (x′ ) and\nzero otherwise. Under the Thurstone’s model [48], the predicted probability that the value of the j-th EXIF tag of image x is greater than that of x′ is\n\u0013\n\u0012\nr̂j (x) − r̂j (x′ )\n√\n,\n(8)\np̂j (x, x′ ) = Φ\n2\n\nx∈Bval\n\nwhere β is the outer-loop learning rate, and we make explicit the dependence of θ ′ on λ. This step dynamically\nemphasizes those pretext objectives that most improve the\nsurrogate detection task.\nInner-Loop Refinement. Finally, we re-optimize θ using\nthe updated λ, further aligning the learned representations\nwith the detection objective:\n\nwhere Φ(·) is the standard normal cumulative distribution\nfunction. Similarly, we minimize a fidelity-based ranking\nloss for each tag:\nq\nℓj (x, x′ ) =1 − pj (x, x′ )p̂j (x, x′ )\nq\n− (1 − pj (x, x′ )) (1 − p̂j (x, x′ )). (9)\n\nθ ← θ − α∇θ\n\nK\nX X\n\nλi ℓi (x; θ).\n\n(13)\n\nx∈Btr i=1\n\n3.4. AI-Generated Face Detection\n\nTask 4: Fine-Grained Face Manipulation Detection. To\nimprove the encoder’s sensitivity to localized tampering,\nwe introduce a fine-grained classification task that identifies which face regions have been manipulated. Let M =\n{eye, mouth, nose} be the set of target regions. For\neach m ∈ M, we define the text template tm : “A photo\nof a face with a manipulated {m} region,” and compute\nthe similarity score s(x, tm ). These scores are converted\ninto region-specific manipulation probabilities p̂(m|x) =\nsigmoid (s(x, tm )). Denoting the ground-truth indicator\n\nAfter self-supervised pretraining, we discard the text encoder fφ and freeze the vision encoder fϕ as a fixed feature\nextractor. We explore two detection paradigms.\nOne-Class Anomaly Detection. We fit a GMM to embeddings of photographic face images. At test time, any sample whose log-likelihood under this GMM falls below a set\nthreshold (e.g., the 5-th percentile of the training distribution) is flagged as AI-generated [66].\nBinary Classification. We train a lightweight two-layer\nperceptron on a small set of photographic and AI-generated\n4\n\n\fMethod\nCNND [52]\nGramNet [34]\nRECCE [3]\nLNP [31]\nLGrad [47]\nDIRE [53]\nOjha23 [38]\nAEROBLADE [43]\nFatFormer [32]\nZou25 [66]\nBLADES-OC (Ours)\nBLADES-BC (Ours)\n\nStyleGAN2\n50.61\n51.16\n66.64\n80.06\n52.94\n72.48\n65.45\n48.69\n98.91\n76.88\n76.75\n94.22\n\nVQGAN\n99.89\n99.92\n100.0\n99.43\n99.99\n69.81\n83.40\n51.99\n98.30\n74.59\n76.78\n97.24\n\nLDM\n53.07\n53.25\n70.91\n67.35\n99.80\n98.92\n70.06\n69.50\n97.82\n93.83\n93.63\n96.95\n\nDDIM\n56.55\n50.09\n73.10\n50.10\n64.91\n77.80\n72.25\n42.53\n95.63\n93.63\n96.05\n94.33\n\nSDv2.1\n50.51\n50.23\n71.62\n54.13\n57.59\n58.84\n72.76\n46.19\n68.88\n78.62\n80.70\n74.83\n\nFreeDoM\n58.62\n51.59\n77.52\n50.06\n66.58\n89.05\n78.55\n90.05\n81.04\n95.31\n96.09\n95.73\n\nHPS\n50.31\n50.26\n64.14\n50.55\n60.14\n62.50\n56.21\n77.40\n90.28\n83.79\n84.82\n84.40\n\nMidjourney\n51.66\n52.91\n62.19\n50.40\n76.59\n90.75\n54.96\n82.16\n88.20\n91.29\n92.79\n95.19\n\nSDXL\n54.49\n53.63\n65.29\n50.59\n74.03\n87.79\n58.01\n81.95\n88.08\n91.71\n94.48\n93.84\n\nAverage\n58.41\n57.00\n72.38\n61.41\n72.43\n78.66\n67.96\n65.61\n89.68\n86.63\n88.01\n91.86\n\nTable 1. Cross-generator detection accuracy (%) of our BLADES-OC and BLADES-BC versus ten competing detectors across nine\ngenerative models. Except for DIRE [53], AEROBLADE [43], Zou25 [66], and our OC variant, all detectors are trained on synthetic\nfaces [13] produced by a CelebA-HQ-trained VQGAN (positive class) and CelebA-HQ face photographs [25] (negative class). DIRE uses\nthe LDM [44] training set; Zou25 and our BLADES-OC rely solely on face photographs; AEROBLADE is training-free. Cells shaded in\ngray denote results on images by the training generator. Boldface and underlining denote first- and second-best results, respectively.\n\nimage embeddings, using a standard cross-entropy loss.\nDuring inference, this classifier outputs the probability of\nan image being AI-generated [38, 47].\n\nMethod\nLGrad [47]\nDIRE [53]\nOjha23 [38]\nFatFormer [32]\nBLADES-BC\n\n4. Experiments\nWe evaluate the proposed BLADES on a variety of benchmarks to demonstrate its effectiveness and generality for\nAI-generated face detection.\n\nPhotographic (%)\n\nAI-generated (%)\n\nTNR↑\n99.98\n99.96\n75.49\n97.61\n94.64\n\nTPR↑\n44.97\n54.37\n60.39\n81.74\n88.97\n\nFPR↓\n0.02\n0.04\n24.51\n2.38\n5.36\n\nFNR↓\n55.03\n45.63\n39.61\n18.26\n11.03\n\nF-score↑\n0.60\n0.65\n0.64\n0.87\n0.91\n\nTable 2. Sensitivity and specificity analysis. For photographic\nfaces, we report true negative rate (TNR) and false positive rate\n(FPR); for AI-generated faces, true positive rate (TPR) and false\nnegative rate (FNR). The F-score summarizes overall detection\nperformance. Results are averaged across all test generators.\n\n4.1. Experimental Setups\nDatasets. For self-supervised pretraining, we assemble\n352, 961 face photographs with rich EXIF metadata from\nthe FDF dataset [24] under CC BY 2.0, filtering nine informative tags2 with 130, 000 faces remaining. For evaluation, we generate synthetic faces using nine state-of-theart models—StyleGAN2 [27], VQGAN [13], LDM [44],\nDDIM [46], Stable Diffusion 2.1 (SDv2.1) [44], FreeDoM [58], HPS [55], Midjourney [1], and SDXL [39]—\nsourced from public repositories [5, 6, 13] or produced on\ndemand. Test face photographs are drawn from the CelebAHQ [25] and FFHQ [26] datasets.\nImplementation Details. We adopt ResNet-50 [20] as the\nvision encoder and GPT-2 [40] as the text encoder within\na CLIP-style joint embedding [41]. During self-supervised\npretraining, the inner loop uses AdamW [35] with decoupled weight decay 10−3 , initial learning rate of 10−5 under\ncosine annealing [51], minibatch size 48, and 20 epochs.\nThe focal-loss parameter γ in Eq. (5) is set to 2 [30]. The\nouter loop initializes all task weights to 1, which are optimized using Adam [28] with a learning rate of 3 × 10−4 .\nInput images are resized to 224 × 224 × 3. In the one-class\n\nclassification (OC) setting, we fit a 10-component GMM\nwith a likelihood threshold that gives a 5% false alarm rate.\nIn the binary classification (BC) setting, we train a twolayer perceptron (i.e., 768 → 1, 536 → 2 with ReLU in\nbetween) with Adam [28] (learning rate 3 × 10−4 and minibatch size 64), using low-likelihood face photographs as\npseudo-outliers to augment AI-generated faces [11]. All experiments run on a single NVIDIA RTX 3090 GPU.\nEvaluation Metrics. We report the accuracy (Acc), area\nunder the ROC curve (AUC), and average precision (AP)\nresults. Sensitivity and specificity are further analyzed via\nthe true positive rate (TPR), true negative rate (TNR), false\npositive rate (FPR), false negative rate (FNR), and F-score.\n\n4.2. Main Results\nCross-Generator Evaluation. We train detectors using\n25, 000 CelebA-HQ face photographs and synthetic face\nimages from a single generator, and then test on the remaining eight. As shown in Table 1, our BLADES-BC\nachieves an average accuracy of 91.86%, outperforming all\ncompeting detectors by a substantial margin. Remarkably,\n\n2 These include aperture,\nexposure mode, exposure\nprogram, exposure time, focal length, ISO speed,\nmakes, metering mode, and white balance mode.\n\n5\n\n\fStyleGAN2\n\nVQGAN\n\nDDIM\n\nLDM\n\nMidjourney\n\nFace\nAs\nprimary\n\nStyleGAN2\n\nVQGAN\n\nDDIM\n\nLDM\n\nStyleGAN2\n\nMidjourney\n\n(a) CLIP [41]\n\nStyleGAN2\n\nVQGAN\n\nDDIM\n\nLDM\n\nMidjourney\n\nStyleGAN2\n\nVQGAN\n\nDDIM\n\nLDM\n\nMidjourney\n\nVQGAN\n\nDDIM\n\nLDM\n\nMidjourney\n\nStyleGAN2\n\nVQGAN\n\n(b) FaRL\nDDIM[62]\n\nLDM\n\nMidjourney\n\nStyleGAN2\n\nVQGAN\n\nDDIM\n\nLDM\n\nMidjourney\n\n(c) EAL [61]\n\n(d) BLADES-OC\n\nFigure 3. t-SNE visualizations [50] of learned features of photographic (yellow) and AI-generated (blue) face images across five generators.\nStyleGAN2\n\nVQGAN\n\nDDIM\n\nLDM\n\nMidjourney\n\nour BLADES-OC, trained exclusively on face photographs,\nsurpasses most supervised detectors despite never being exposed to AI-generated faces. This highlights the effectiveness of our bi-level optimization strategy in aligning pretext tasks with the downstream detection objective. In contrast, GAN-based detectors struggle to generalize to diffusion models, and vice versa. More surprisingly, diffusionbased methods such as DIRE [53] and AEROBLADE [43]\nexhibit poor cross-generator generalization even within the\nsame generative family. This suggests that detectors relying\non model-specific cues (e.g., reconstruction errors [43, 53])\nmay be inherently fragile as generative models evolve.\nSensitivity and Specificity Analysis. Table 2 breaks down\nTPR, TNR, FPR, FNR, and F-score across generators. Prior\nmethods exhibit high specificity (with TNR &gt; 97%) but\nlow sensitivity (with TPR &lt; 82%), indicating overfitting\nto seen generators. In contrast, our BLADES-BC balances\nboth, achieving 94.64% TNR and 88.97% TPR (with an Fscore of 0.91), reflecting robust cross-generator detection.\nCross-Dataset Evaluation. To assess domain transfer, we\ntrain on CelebA-HQ [25] and evaluate using FFHQ [26]\nface photographs and FFHQ-trained generators (i.e., StyleGAN2 [26], VQGAN [13], and LDM [44]). As reported in\nTable 3, the proposed BLADES-BC consistently achieves\nstrong performance, surpassing GAN-based and diffusionbased detectors. These results confirm that BLADES’ selfsupervised features generalize across photographic domains\nand synthesis pipelines.\n\nMethod\n\nStyleGAN2\n\nVQGAN\n\nLDM\n\nAverage\n\nAUC AP AUC AP AUC AP AUC AP\nLGrad [47]\n79.16 81.43 99.80 99.97 97.09 97.13 92.02 92.84\nDIRE [53]\n81.57 94.48 78.95 94.27 94.03 93.99 84.85 94.25\nOjha23 [38]\n90.38 88.62 96.45 96.83 90.90 91.16 92.58 92.20\nFatFormer [32] 87.93 85.70 97.69 97.34 94.85 93.93 93.49 92.32\nBLADES-BC 88.16 87.96 98.52 98.54 96.19 96.14 94.29 94.21\n\nTable 3. Cross-dataset detection results (%). All detectors are\ntrained on CelebA-HQ [25] and CelebA-HQ-trained generators,\nand evaluated using FFHQ [26] face photographs and FFHQtrained generators.\n\nfollow their original classification protocols. As shown in\nTable 4, our method achieves the highest average AUC\nacross nine generators, outperforming all competitors by\na clear margin. The handcrafted features of Hu21 perform poorly, likely due to the unrealistic assumption of visible corneal specular highlights. Learning-based features\nshow better separability [31, 41, 61, 62, 66], with EXIFinduced EAL [61] and Zou25 [66] demonstrating strong\nperformance. Our superior results validate the design of\nour EXIF-based pretext tasks and further highlight the advantage of aligning pretraining objectives with downstream\ndetection via bi-level optimization.\nFig. 3 provides t-SNE visualizations [50] of feature embeddings of photographic (yellow) and AI-generated (blue)\nfaces. Our features yield the most distinct separation, indicating high discriminative capability. In contrast, CLIP\nand FaRL features exhibit greater overlap, suggesting limited suitability of these semantic representations for AIgenerated face detection.\nTask Relationship Analysis. We investigate the relationships among pretext tasks by analyzing their learned\nweights from bi-level optimization. As shown in Fig. 4,\nthese weights, sorted in descending order, offer several insights into task relevance. First, coarse-grained face manipulation detection—used as the surrogate primary task—\n\n4.3. Further Analysis\nFeature Separability Analysis. To assess the effectiveness\nof our learned representations, we compare their separability against those produced by existing one-class detectors—\nHu21 [22], LNP [31], and Zou25 [66], as well as generalpurpose visual features from CLIP [41], FaRL [62], and\nEXIF-as-language (EAL) [61].\nWe conduct one-class classification using a GMM as the\ndefault anomaly detector, except for Hu21 and LNP, which\n6\n\n\fMethod\nCLIP [41]\nFaRL [62]\nEAL [61]\nHu21 [22]\nLNP [31]\nZou25 [66]\nBLADES-OC\n\nStyleGAN2\n\nVQGAN\n\nLDM\n\nDDIM\n\nSDv2.1\n\nFreeDoM\n\nHPS\n\nMidjourney\n\nSDXL\n\nAverage\n\n33.99\n34.35\n69.71\n50.00\n37.55\n85.69\n87.89\n\n60.20\n55.91\n72.41\n49.99\n63.28\n84.31\n88.31\n\n55.49\n47.26\n85.81\n49.99\n71.12\n98.66\n98.24\n\n82.85\n85.10\n84.98\n49.99\n69.54\n97.96\n99.32\n\n90.15\n95.24\n74.21\n49.99\n65.64\n88.29\n91.72\n\n85.39\n79.91\n97.92\n49.99\n66.40\n99.79\n99.92\n\n91.22\n93.97\n87.33\n49.99\n66.64\n91.92\n93.93\n\n92.21\n89.72\n91.65\n50.00\n66.70\n97.07\n97.80\n\n93.66\n94.61\n93.04\n49.99\n67.25\n97.23\n98.36\n\n76.13\n75.12\n84.12\n49.99\n63.79\n93.43\n95.05\n\nTable 4. Feature separability comparison in terms of AUC (%).\nMethod\nFatFormer [32]\nBLADES-BC\n\nStyleGAN2\n\nVQGAN\n\nLDM\n\nDDIM\n\nSDv2.1\n\nFreeDoM\n\nHPS\n\nMidjourney\n\nSDXL\n\nAverage\n\n85.48\n73.10\n\n93.20\n96.87\n\n88.41\n71.54\n\n87.78\n96.10\n\n48.77\n63.35\n\n91.95\n95.94\n\n65.65\n81.70\n\n73.48\n96.97\n\n70.23\n96.79\n\n78.33\n85.82\n\nTable 5. AUC results (%) of the proposed BLADES-BC against FatFormer under mild JPEG compression.\n\n\u0000\u0014\u0000\u0011\u0000\u0017\u0000\u0014\n\nMethod\nFatFormer [32]\nBLADES-BC\n\n\u0000\u0014\u0000\u0011\u0000\u0014\u0000\u0014 \u0000\u0014\u0000\u0011\u0000\u0013\u0000\u001c\n\n\u0000\u0014\u0000\u0011\u0000\u0013\u0000\u001a \u0000\u0014\u0000\u0011\u0000\u0013\u0000\u0018\n\n\u0000\u0014\u0000\u0011\u0000\u0013\u0000\u0015 \u0000\u0014\u0000\u0011\u0000\u0013\u0000\u0014 \u0000\u0014\u0000\u0011\u0000\u0013\u0000\u0013 \u0000\u0013\u0000\u0011\u0000\u001c\u0000\u001c\n\nFLOPs (M)\n51,895\n4,134\n\nInference time (s)\n0.1\n0.005\n\nTable 6. Model complexity comparison during inference. We report the model parameter count, total number of floating-point operations (FLOPs), and inference time per 224 × 224 × 3 image on\nan NVIDIA RTX 3090 GPU.\n\n\u0000\u0013\u0000\u0011\u0000\u001c\u0000\u001b\n\n\u0000U\u0000V\u0000H\n\u0000\u0010\n\u0000)\u0000L\u0000Q \u0000J\u0000U\u0000D\u0000L\u0000Q\n\u0000H\n\u0000\u0003\u00000 \u0000\u0010\u0000J \u0000H\u0000G\n\u0000H\u0000W\u0000H \u0000U\u0000D\u0000L\n\u0000U \u0000Q\n\u0000(\u0000[ \u0000L\u0000Q\u0000J\u0000\u0003\u0000P \u0000H\u0000G\n\u0000(\u0000[ \u0000S\u0000R \u0000R\n\u0000S\u0000R \u0000V\u0000X\u0000U \u0000G\u0000H\n\u0000V\u0000X\u0000U \u0000H\u0000\u0003\u0000W\n\u0000H\u0000\u0003\u0000S \u0000L\u0000P\u0000H\n\u0000U\u0000R\u0000J\n\u0000U\u0000D\n\u00000\u0000D \u0000P\n\u0000N\n\u0000: \u0000) \u0000$\u0000S\u0000H\u0000U \u0000H\u0000V\n\u0000K\u0000L\u0000W \u0000R\u0000F \u0000W\u0000X\n\u0000H\u0000\u0003\u0000E \u0000D\u0000O\u0000\u0003 \u0000U\u0000H\n\u0000D\u0000O\u0000D \u0000O\u0000H\u0000Q\n\u0000Q\u0000F \u0000J\u0000W\u0000K\n\u0000H\u0000\u0003\u0000P\n\u0000,\n\u0000(\u0000[ \u00006\u00002 \u0000R\u0000G\u0000H\n\u0000S\u0000R \u0000\u0003\u0000V\u0000S\n\u0000V\u0000X\u0000U \u0000H\u0000H\u0000G\n\u0000H\u0000\u0003\u0000P\n\u0000R\u0000G\n\u0000H\n\n\u00007\u0000D\u0000V\u0000N\u0000\u0003\u0000:\u0000H\u0000L\u0000J\u0000K\u0000W\n\n\u0000\u0014\u0000\u0011\u0000\u0016\u0000\u0013\n\n#Params (M)\n202\n26\n\n\u0000&amp;\u0000R\n\u0000D\n\noritizes the most informative self-supervised objectives for\nAI-generated face detection.\nRobustness Analysis. We assess the robustness of the proposed BLADES-BC under mild JPEG compression (quality factor 95), a common post-processing operation that\nmay obscure low-level statistical cues. As shown in Table 5, BLADES-BC consistently outperforms FatFormer\nacross most generators, indicating stronger resilience of our\nself-supervised features to compression-induced artifacts.\nNonetheless, we see noticeable performance degradations\n(e.g., accuracy drops from 91.86% to 78.87%).\nModel Complexity Analysis. We further compare the\ncomputational efficiency of BLADES-BC against FatFormer [32] in terms of the model parameter count, total number of floating-point operations (FLOPs), and inference time in Table 6. BLADES-BC achieves a favorable complexity profile, requiring 8× fewer parameters and\n12× fewer FLOPs, and running 20× faster during inference. This demonstrates that BLADES-BC is well-suited\nfor deployment in resource-constrained or latency-sensitive\napplications, without sacrificing detection performance.\n\nFigure 4. Learned loss weights across pretext tasks, where higher\nvalues indicate greater relevance to the primary task (in bold).\n\nreceives the highest weight. This confirms its pivotal role\nin aligning the self-supervised feature space with the downstream goal of AI-generated face detection. Its fine-grained\ncounterpart, which focuses on detecting localized face manipulations, is also assigned substantial importance, indicating that both global and local perturbations provide valuable supervisory signals. Second, among the EXIF-related\ntasks, those associated with exposure settings, including metering mode, exposure time, exposure\nprogram, and aperture, are weighted more heavily\nthan others. This suggests that exposure-related metadata\nmay capture subtle statistical cues that differentiate photographic and AI-generated faces.\nTo assess the discriminative power of the most influential tasks, we retrain BLADES using only the top six pretext tasks ranked by their weights. This streamlined configuration achieves competitive one-class detection performance (87.62% mAcc and 94.80% mAP), only marginally\nlower than the full-task model. These results demonstrate\nthat bi-level optimization not only identifies but also pri-\n\n4.4. Ablation Studies\nModel Structure. We examine the importance of joint\nembedding and text encoder training. One variant omits\njoint embedding entirely, while another freezes the text encoder during pretraining. Table 7a demonstrates that co7\n\n\f(a) Model structure ablation.\nTraining fφ\n✗\n✗\n✓\n\nJoint embedding\n✗\n✓\n✓\n\nmAcc\n85.93\n81.65\n88.01\n\n(b) Training strategy ablation.\nFocal weighting\n✓\n✓\n✗\n✓\n\nmAP\n93.44\n91.89\n95.24\n\nPairwise ranking\n✓\n✗\n✓\n✓\n\n(c) Primary task ablation.\nPrimary task configuration\nBinary classification of photographic vs. AI-generated faces\nFine-grained face manipulation detection\nEqual weighting over all pretext tasks\nCoarse-grained face manipulation detection\n\nBi-level optimization\n✗\n✓\n✓\n✓\n\nmAcc\n86.20\n81.52\n81.87\n88.01\n\nmAP\n93.78\n93.14\n93.14\n95.24\n\nmAcc\n81.80\n86.49\n87.03\n88.01\n\nmAP\n92.13\n93.40\n94.72\n95.24\n\n(d) Pretext task ablation.\nmAcc\n86.75\n87.11\n87.84\n88.01\n\nmAP\n92.66\n95.02\n94.57\n95.24\n\nEXIF\n✓\n✗\n✓\n✓\n\nCoarse-grained\n✗\n✓\n✓\n✓\n\nFine-grained\n✗\n✓\n✗\n✓\n\nTable 7. Ablation studies of key design choices in BLADES for self-supervised pretraining. The default setting is shaded gray .\n\nbased pretext objectives via bi-level optimization. Once\ntrained, the learned representations are shown to be highly\ndiscriminative in both one-class and binary classification\nsettings, achieving state-of-the-art generalization performance across diverse generative models and datasets.\nWhile our focus has been on AI-generated face detection, the underlying principles of BLADES, especially\nthe task-aware self-supervision and bi-level alignment, are\nbroadly applicable. A promising direction for future research is to generalize these ideas to broader natural scenes,\nwhere forged content may be subtler and less structurally\nconstrained. This transition demands new surrogate tasks\nbeyond face manipulations, possibly involving semantic\nconsistency, scene dynamics, or temporal coherence.\nAnother important avenue is to enhance robustness to\nbenign post-processing, such as mild compression, rescaling, or filtering. This could be addressed by reducing overreliance on high-frequency cues, encouraging the modeling of perturbation-invariant features, or incorporating contrastive or augmentation-aware pretext losses during selfsupervised pretraining.\nFinally, we envision enriching interpretability and\ndecision-making through the integration of multimodal\nlarge language models. These models can be used not only\nto describe visual anomalies in natural language but also\nto reason about imperceptible artifacts, provide explanations for decision-making, and even invoke external tools\nor knowledge bases to justify their predictions. Such capabilities would elevate BLADES from a powerful detector to\na transparent and explainable forensic assistant, particularly\nvaluable in high-stakes scenarios involving legal, journalistic, or national security contexts.\n\noptimizing the vision and text encoders significantly enhances performance, validating the necessity of a fully\ntrainable implementation of joint embedding.\nTraining Strategy. We assess the contributions of three\ncore strategies: focal loss weighting to mitigate class imbalance (in Eq. (5)), pairwise ranking of ordinal tags (in\nEqs. (6) to (9)), and bi-level optimization for dynamic task\nweighting (in Eq. (1)). Table 7b shows that disabling any\ncomponent3 leads to performance drops, with the full configuration achieving the highest accuracy and precision.\nPrimary Task Configuration. We investigate different\nchoices for the outer-loop primary task in Eq. (1a), including 1) binary classification of photographic vs. VQGANgenerated faces [13], 2) fine-grained face manipulation detection, 3) equal weighting over all pretext tasks, and 4)\nour default setting—coarse-grained face manipulation detection. Table 7c indicates that our default setting yields the\nbest results, while binary classification of photographic vs.\nAI-generated faces underperforms, likely due to overfitting\non synthesis artifacts.\nPretext Task Composition. We further evaluate the impact\nof different pretext task combinations. Variants exclude one\nor more tasks from the full setting, specifically, coarse- and\nfine-grained face manipulation detection and EXIF-based\ntasks. Table 7d shows that excluding any task degrades performance. The superiority of the full combination shows\nthat EXIF metadata and face manipulations provide complementary cues for robust AI-generated face detection.\n\n5. Conclusion and Discussion\nIn this work, we have introduced BLADES for detecting AIgenerated face images. Our method aligns self-supervised\nfeature learning with the downstream detection task by dynamically weighting a suite of EXIF- and manipulation-\n\nAcknowledgements\nThis work was supported in part by the Hong Kong RGC\nGeneral Research Fund (11220224), the CityU Strategic\nResearch Grants (7005848 and 7005983), and an Industry\nGift Fund (9229179).\n\n3 Disabling focal weighting is done by setting γ = 0 in Eq. (5); dis-\n\nabling pairwise ranking corresponds to direct alignment between images\nand ordinal EXIF tags as done in [61]; disabling bi-level optimization\nrefers to training BLADES using only Eq. (1b) with equal weights.\n\n8\n\n\fReferences\n\n[18] Hui Guo, Shu Hu, Xin Wang, Ming-Ching Chang, and Siwei Lyu. Eyes tell all: Irregular pupil shapes reveal GANgenerated faces. In ICASSP, pages 2904–2908, 2022. 1, 2\n[19] Douglas M. Hawkins. Identification of Outliers. Springer,\n1980. 2\n[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.\nDeep residual learning for image recognition. In CVPR,\npages 770–778, 2016. 5\n[21] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr\nDollár, and Ross Girshick. Masked autoencoders are scalable\nvision learners. In CVPR, pages 16000–16009, 2022. 2\n[22] Shu Hu, Yuezun Li, and Siwei Lyu. Exposing GANgenerated faces using inconsistent corneal specular highlights. In ICASSP, pages 2500–2504, 2021. 1, 2, 6, 7, 12\n[23] Minyoung Huh, Andrew Liu, Andrew Owens, and Alexei A.\nEfros. Fighting fake news: Image splice detection via\nlearned self-consistency. In ECCV, pages 101–117, 2018.\n2, 3\n[24] Håkon Hukkelås, Rudolf Mester, and Frank Lindseth.\nDeepPrivacy: A generative adversarial network for face\nanonymization. In ISVC, pages 565–578, 2019. 5\n[25] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen.\nProgressive growing of GANs for improved quality, stability,\nand variation. In ICLR, pages 1–26, 2018. 5, 6, 12\n[26] Tero Karras, Samuli Laine, and Timo Aila. A style-based\ngenerator architecture for generative adversarial networks. In\nCVPR, pages 4401–4410, 2019. 5, 6, 12\n[27] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten,\nJaakko Lehtinen, and Timo Aila. Analyzing and improving\nthe image quality of StyleGAN. In CVPR, pages 8110–8119,\n2020. 1, 5, 12\n[28] Diederik Kingma and Jimmy Ba. Adam: A method for\nstochastic optimization. In ICLR, pages 1–15, 2015. 5\n[29] Ming Li, Jie Wu, Xionghui Wang, Chen Chen, Jie Qin, Xuefeng Xiao, Rui Wang, Min Zheng, and Xin Pan. AlignDet:\nAligning pre-training and fine-tuning in object detection. In\nICCV, pages 6866–6876, 2023. 2\n[30] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and\nPiotr Dollár. Focal loss for dense object detection. In ICCV,\npages 2980–2988, 2017. 3, 5\n[31] Bo Liu, Fan Yang, Xiuli Bi, Bin Xiao, Weisheng Li, and\nXinbo Gao. Detecting generated images by real images. In\nECCV, pages 95–110, 2022. 2, 5, 6, 7, 11\n[32] Huan Liu, Zichang Tan, Chuangchuang Tan, Yunchao Wei,\nJingdong Wang, and Yao Zhao. Forgery-aware adaptive\nTransformer for generalizable synthetic image detection. In\nCVPR, pages 10770–10780, 2024. 1, 2, 5, 6, 7, 12\n[33] Shikun Liu, Stephen James, Andrew J. Davison, and Edward\nJohns. Auto-Lambda: Disentangling dynamic task relationships. arXiv preprint arXiv:2202.03091, 2022. 4\n[34] Zhengzhe Liu, Xiaojuan Qi, and Philip H.S. Torr. Global\ntexture enhancement for fake face detection in the wild. In\nCVPR, pages 8060–8069, 2020. 1, 2, 5, 11\n[35] Ilya Loshchilov and Frank Hutter. Decoupled weight decay\nregularization. In ICLR, pages 1–10, 2019. 5\n[36] Yunpeng Luo, Junlong Du, Ke Yan, and Shouhong Ding.\nLaRE2 : Latent reconstruction error based method for\n\n[1] Midjourney. https://www.midjourney.com. Accessed: Jul 30, 2025. 1, 5, 12\n[2] Matyáš Boháček and Hany Farid. A geometric and photometric exploration of GAN and diffusion synthesized faces.\nIn CVPRW, pages 874–883, 2023. 3\n[3] Junyi Cao, Chao Ma, Taiping Yao, Shen Chen, Shouhong\nDing, and Xiaokang Yang. End-to-end reconstructionclassification learning for face forgery detection. In CVPR,\npages 4113–4122, 2022. 5, 11\n[4] Can Chen, Jingbo Zhou, Fan Wang, Xue Liu, and Dejing\nDou. Structure-aware protein self-supervised learning. arXiv\npreprint arXiv:2022.04213v4, 2022. 2\n[5] Zhongxi Chen, Ke Sun, Ziyin Zhou, Xianming Lin, Xiaoshuai Sun, Liujuan Cao, and Rongrong Ji. DiffusionFace:\nTowards a comprehensive dataset for diffusion-based face\nforgery analysis. arXiv preprint arXiv:2403.18471, 2024. 5\n[6] Harry Cheng, Yangyang Guo, Tianyi Wang, Liqiang Nie, and\nMohan Kankanhalli. Diffusion facial forgery detection. In\nACM MM, pages 5939–5948, 2024. 5\n[7] Riccardo Corvi, Davide Cozzolino, Giovanni Poggi, Koki\nNagano, and Luisa Verdoliva. Intriguing properties of synthetic images: From generative adversarial networks to diffusion models. In CVPRW, pages 973–982, 2023. 1, 2\n[8] Davide Cozzolino, Giovanni Poggi, Matthias Nießner, and\nLuisa Verdoliva. Zero-shot detection of AI-generated images. In ECCV, pages 54–72, 2024. 1, 2\n[9] Stephan Dempe. Foundations of Bilevel Programming.\nSpringer Science &amp; Business Media, 2002. 1\n[10] Chengdong Dong, Ajay Kumar, and Eryun Liu. Think\ntwice before detecting GAN-generated fake images from\ntheir spectral domain imprints. In CVPR, pages 7865–7874,\n2022. 1, 2\n[11] Xuefeng Du, Zhaoning Wang, Mu Cai, and Yixuan Li. VOS:\nLearning what you don’t know by virtual outlier synthesis.\nIn ICLR, pages 1–21, 2022. 5\n[12] Ricard Durall, Margret Keuper, and Janis Keuper. Watch\nyour up-convolution: CNN based generative deep neural\nnetworks are failing to reproduce spectral distributions. In\nCVPR, pages 7890–7899, 2020. 1, 2\n[13] Patrick Esser, Robin Rombach, and Bjorn Ommer. Taming\nTransformers for high-resolution image synthesis. In CVPR,\npages 12873–12883, 2021. 1, 5, 6, 8, 12\n[14] Yuming Fang, Hanwei Zhu, Yan Zeng, Kede Ma, and Zhou\nWang. Perceptual quality assessment of smartphone photography. In CVPR, pages 3677–3686, 2020. 2\n[15] Joel Frank, Thorsten Eisenhofer, Lea Schönherr, Asja Fischer, Dorothea Kolossa, and Thorsten Holz. Leveraging frequency analysis for deep fake image recognition. In ICML,\npages 3247–3258, 2020. 1, 2\n[16] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018. 2\n[17] Priya Goyal, Dhruv Mahajan, Abhinav Gupta, and Ishan\nMisra. Scaling and benchmarking self-supervised visual representation learning. In ICCV, pages 6391–6400, 2019. 2\n\n9\n\n\fent descent with warm restarts. In ICLR, pages 1–13, 2017.\n5\n[52] Sheng-Yu Wang, Oliver Wang, Richard Zhang, Andrew\nOwens, and Alexei A. Efros. CNN-generated images are surprisingly easy to spot...for now. In CVPR, pages 8695–8704,\n2020. 1, 5, 11\n[53] Zhendong Wang, Jianmin Bao, Wengang Zhou, Weilun\nWang, Hezhen Hu, Hong Chen, and Houqiang Li. DIRE for\ndiffusion-generated image detection. In ICCV, pages 22445–\n22455, 2023. 1, 2, 5, 6, 11\n[54] Chuhan Wu, Fangzhao Wu, Tao Qi, Yongfeng Huang, and\nXing Xie. NoisyTune: A little noise can help you finetune pretrained language models better. arXiv preprint\narXiv:2202.12024, 2022. 2\n[55] Xiaoshi Wu, Keqiang Sun, Feng Zhu, Rui Zhao, and Hongsheng Li. Better aligning text-to-image models with human\npreference. In ICCV, pages 2096–2105, 2023. 1, 5, 12\n[56] Ceyuan Yang, Zhirong Wu, Bolei Zhou, and Stephen Lin. Instance localization for self-supervised detection pretraining.\nIn CVPR, pages 3987–3996, 2021. 2\n[57] Xin Yang, Yuezun Li, and Siwei Lyu. Exposing Deep Fakes\nusing inconsistent head poses. In ICASSP, pages 8261–8265,\n2019. 1, 2\n[58] Jiwen Yu, Yinhuai Wang, Chen Zhao, Bernard Ghanem, and\nJian Zhang. FreeDoM: Training-free energy-guided conditional diffusion model. In ICCV, pages 23174–23184, 2023.\n1, 5, 12\n[59] Gustav Wagner Zakarias, Lars Kai Hansen, and Zheng-Hua\nTan. BiSSL: Bilevel optimization for self-supervised pretraining and fine-tuning. arXiv preprint arXiv:2410.02387,\n2024. 2\n[60] Zhengyou Zhang. A flexible new technique for camera calibration. IEEE TPAMI, 22(11):1330–1334, 2000. 2\n[61] Chenhao Zheng, Ayush Shrivastava, and Andrew Owens.\nEXIF as language: Learning cross-modal associations between images and camera metadata. In CVPR, pages 6945–\n6956, 2023. 2, 6, 7, 8, 12\n[62] Yinglin Zheng, Hao Yang, Ting Zhang, Jianmin Bao, Dongdong Chen, Yangyu Huang, Lu Yuan, Dong Chen, Ming\nZeng, and Fang Wen. General facial representation learning\nin a visual-linguistic manner. In CVPR, pages 18697–18709,\n2022. 2, 6, 7, 11, 12\n[63] Adrian Ziegler and Yuki M. Asano. Self-supervised learning\nof object parts for semantic segmentation. In CVPR, pages\n14502–14511, 2022. 2\n[64] Mian Zou, Baosheng Yu, Yibing Zhan, Siwei Lyu, and Kede\nMa. Semantics-oriented multitask learning for DeepFake detection: A joint embedding approach. IEEE TCSVT, to appear, 2025. 2, 3\n[65] Mian Zou, Baosheng Yu, Yibing Zhan, Siwei Lyu, and Kede\nMa. Semantic contextualization of face forgery: A new definition, dataset, and detection method. IEEE TIFS, 20:4512–\n4524, 2025. 1\n[66] Mian Zou, Baosheng Yu, Yibing Zhan, and Kede Ma.\nSelf-supervised learning for detecting AI-generated faces as\nanomalies. In ICASSP, pages 1–5, 2025. 1, 2, 3, 4, 5, 6, 7,\n12\n\ndiffusion-generated image detection.\nIn CVPR, pages\n17006–17015, 2024. 2\n[37] Sophie J. Nightingale and Hany Farid. AI-synthesized faces\nare indistinguishable from real faces and more trustworthy.\nPNAS, 119(8):1–3, 2022. 1\n[38] Utkarsh Ojha, Yuheng Li, and Yong Jae Lee. Towards universal fake image detectors that generalize across generative\nmodels. In CVPR, pages 24480–24489, 2023. 1, 2, 5, 6, 12\n[39] Dustin Podell, Zion English, Kyle Lacey, Andreas\nBlattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and\nRobin Rombach. SDXL: Improving latent diffusion models\nfor high-resolution image synthesis. In ICLR, pages 1–13,\n2024. 1, 5, 12\n[40] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario\nAmodei, and Ilya Sutskever. Language models are unsupervised multitask learners. https://openai.com/\nindex/better-language-models/. Accessed: Jul\n30, 2025. 5\n[41] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya\nRamesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,\nAmanda Askell, Pamela Mishkin, Jack Clark, Gretchen\nKrueger, and Ilya Sutskever. Learning transferable visual\nmodels from natural language supervision. In ICML, pages\n8748–8763, 2021. 2, 3, 5, 6, 7, 12\n[42] Colorado J. Reed, Xiangyu Yue, Ani Nrusimha, Sayna\nEbrahimi, Vivek Vijaykumar, Richard Mao, Bo Li, Shanghang Zhang, Devin Guillory, Sean Metzger, Kurt Keutzer,\nand Trevor Darrell. Self-supervised pretraining improves\nself-supervised pretraining. In WACV, pages 2584–2594,\n2022. 2\n[43] Jonas Ricker, Denis Lukovnikov, and Asja Fischer. AEROBLADE: Training-free detection of latent diffusion images using autoencoder reconstruction error. In CVPR, pages 9130–\n9140, 2024. 5, 6, 12\n[44] Robin Rombach, Andreas Blattmann, Dominik Lorenz,\nPatrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In CVPR, pages 10684–\n10695, 2022. 1, 5, 6, 12\n[45] Sai Ashish Somayajula, Lifeng Jin, Linfeng Song, Haitao\nMi, and Dong Yu. Bi-level finetuning with task-dependent\nsimilarity structure for low-resource training. In ACL Findings, pages 8569–8588, 2023. 2\n[46] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In ICLR, pages 1–20, 2021. 1,\n5, 12\n[47] Chuangchuang Tan, Yao Zhao, Shikui Wei, Guanghua Gu,\nand Yunchao Wei. Learning on gradients: Generalized artifacts representation for GAN-generated images detection. In\nCVPR, pages 12105–12114, 2023. 1, 5, 6, 11\n[48] Louis L. Thurstone. A law of comparative judgment. Psychol. Rev., 34:273–286, 1927. 4\n[49] Ming-Feng Tsai, Tie-Yan Liu, Tao Qin, Hsin-Hsi Chen, and\nWei-Ying Ma. FRank: A ranking method with fidelity loss.\nIn ACM SIGIR, pages 383–390, 2007. 3\n[50] Laurens van der Maaten and Geoffrey Hinton. Visualizing\ndata using t-SNE. JMLR, 9(86):2579–2605, 2008. 6\n[51] Ilya Loshchilov and Frank Hutter. SGDR: Stochastic gradi-\n\n10\n\n\fBi-Level Optimization for Self-Supervised AI-Generated Face Detection\nSupplementary Material\nA. Computation of Bi-level Optimization\n\nB. EXIF Tag Selection\n\nIn solving the bi-level optimization Problem (1), parameters\nθ and λ are updated alternately:\n\nThis section details the procedure for selecting EXIF tags\nused in our self-supervised pretraining.\nWe begin by identifying all EXIF tags that appear in\nmore than 50% of the collected photographic face images\nfrom the FDF dataset [62]. Table 8 lists their frequencies\nand representative values. To ensure that the selected tags\noffer meaningful supervisory signals, we apply three empirical filtering criteria:\n• Relevance to Digital Imaging: The chosen tag must encode semantically or physically interpretable imaging attributes (e.g., exposure settings and camera make).\n• Information Richness: Tags dominated by unknown entries or a single category are excluded to avoid degenerate\nsupervision.\n• Semantic Redundancy Removal: Tags whose semantics largely overlap with others (e.g., F-number with\naperture) are removed for parsimony.\nFor example, tags such as date/time, EXIF version,\nresolution unit, and scene capture type are\nexcluded due to irrelevance to image formation. Likewise,\nflash is excluded because approximately ∼ 75% of its\nvalues are missing or unknown.\nAfter refinement, we retain nine EXIF tags for pretraining: aperture, exposure mode, exposure\nprogram,\nexposure time,\nfocal length,\nISO speed, makes, metering mode, and white\nbalance mode.\n\nK\nX X\n\n′\n\nθ = θ − α∇θ\n\nλi ℓi (x; θ)\n\n(14a)\n\nℓ1 (x; θ ′ (λ))\n\n(14b)\n\nx∈Btr i=1\n\nλ ← λ − β∇λ\n\nX\nx∈Bval\n\nθ ← θ − α∇θ\n\nK\nX X\n\nλi ℓi (x; θ),\n\n(14c)\n\nx∈Btr i=1\n\nwhere α and β are the inner- and outer-loop learning rates,\nrespectively. To compute ∇λ ℓ1 (x; θ ′ (λ)), we apply the\nchain rule, yielding\n∇λ ℓ1 (x; θ ′ (λ)) = ∇λ θ ′ (λ)∇θ′ ℓ1 (x; θ ′ (λ)) .\n\n(15)\n\nMaking use of Eq. (14a) and defining ℓpre (θ, λ) =\nP\nPK\nx∈Btr\ni=1 λi ℓi (x; θ), we have the Jacobian:\n∇λ θ ′ (λ) = ∇λ (θ − α∇θ ℓpre (θ, λ))\n\n(16)\n\n= −α∇2θ,λ ℓpre (θ, λ)⊺ .\nSubstituting it into Eq. (15), we obtain the final expression:\n∇λ ℓ1 (x; θ ′ (λ)) = −α∇2θ,λ ℓpre (θ, λ)⊺ ∇θ′ ℓ1 (x; θ ′ (λ)) .\n(17)\nFinite Difference Approximation. Direct computation of\nthe mixed second-order derivative ∇2θ,λ ℓpre (θ, λ) is computationally intensive. To circumvent this, we employ\na finite difference scheme [A1, A2] to approximate the\nJacobian-vector product required in the outer-loop gradient.\nLet v = ∇θ′ ℓ1 (x; θ ′ (λ)) denotes the gradient of the outerloop loss with respect to the updated parameters. Define\nthe gradient of the inner-loop objective with respect to λ as\na function of θ, i.e., F (θ) = ∇λ ℓpre (θ, λ). We apply a\nsecond-order central difference approximation of the directional derivative of F along v:\n\nC. Competing Detectors\nThis section briefly summarizes all competing detectors\nused for comparison.\nCNND [52] trains a ResNet-50 classifier with standard data\naugmentations such as JPEG compression, Gaussian blurring as a way of improving generalizability.\nGramNet [34] identifies AI-generated faces by capturing\nglobal texture statistics.\nRECCE [3] learns to reconstruct face photographs. It is\noriginally designed for face forgery detection, but is extended here to detect AI-generated faces.\nLNP [31] extracts noise patterns using a pretrained denoising network, and fits a one-class support vector machine [A3] to detect AI-generated faces as anomalies.\nLGrad [47] feeds gradient maps from a pretrained network\nas input to a detector to capture generative artifacts.\nDIRE [53] assumes that diffusion models reconstruct synthetic images more accurately. Detection is based on reconstruction errors as input to a ResNet-50.\n\n∇2θ,λ ℓpre (θ, λ)⊺ ∇θ′ ℓ1 (x; θ ′ (λ))\n= ∇θ F (θ)⊺ v\nF (θ + ϵv) − F (θ − ϵv)\n2ϵ\n∇λ ℓpre (θ + , λ) − ∇λ ℓpre (θ − , λ)\n,\n=\n2ϵ\n\n≈\n\n(18)\n\nwhere\nθ ± = θ ± ϵv,\n\n(19)\n\nand ϵ is a small constant.\n11\n\n\fEXIF tag\nAperture\nExposure Mode\nExposure Program\nExposure Time\nFocal Length\nISO Speed\nMakes\nMetering Mode\nWhite Balance Mode\nCustom Rendered\nDate/Time\nDate/Time Digitized\nDate/Time Original\nEXIF Version\nFlash\nF-Number\nResolution Unit\nScene Capture Type\nShutter Speed\nX Resolution\nY Resolution\n\nExample value\nF2.8, F4, F5.6, F3.5\nAuto, Auto-bracketing, Program, Manual\nManual Control, Normal Program, Portrait Mode\n1/60 sec, 1/125 sec, 1/250 sec\n18.0 mm, 50.0 mm, 6.3 mm\n100, 200, 400, 800\nCanon, Apple, Sony, Nikon\nCenter-weighted, Average, Partial, Spot\nAuto, Manual\nCustom Process, Normal Process, Unknown\n2013:03:28 04:20:46\n2013:03:28 04:20:46\n2013:03:28 04:20:46\n2.21, 2.20, 2.30\nUnfired, Fired, Unknown, Fired Auto\nF2.8, F4, F5.6, F3.5\nInch, Cm, No Unit, Unknown\nStandard, Portrait, Nightscene, Landscape, Unknown\n1/60 sec, 1/125 sec, 1/250 sec\n72 dots per inch\n72 dots per inch\n\n#Unique entries\n152\n7\n6\n1,745\n858\n269\n10\n8\n2\n3\n96,568\n96,447\n96,827\n11\n4\n111\n4\n5\n1,195\n107\n108\n\nCount\n198,448\n194,666\n176,787\n198,488\n198,488\n198,488\n198,247\n196,340\n193,279\n180,667\n196,639\n197,521\n198,227\n197,673\n198,317\n197,501\n193,347\n192,638\n196,970\n193,173\n193,173\n\nTable 8. Overview of EXIF tags appearing in more than 50% of the collected photographic face images. The upper section lists the nine\ntags retained for pretraining based on relevance, informativeness, and non-redundancy.\n\nOjha23 [38] employs CLIP’s frozen visual encoder to extract features for binary classification of photographic vs.\nAI-generated images.\nAEROBLADE [43] is a training-free approach that calculates LPIPS [A4] reconstruction errors of latent diffusion\nautoencoders, leveraging the similar observation that synthetic images are reconstructed more faithfully.\nFatFormer [32] fine-tunes CLIP with a forgery-aware\nTransformer adapter, integrating spatial and frequency cues.\nZou25 [66] casts ordinal EXIF-tag ranking as a pretext task,\nand employs one-class anomaly detection for inference.\nCLIP [41] is a vision-language model pretrained on largescale image-text pairs. Its general-purpose features can be\nadapted for identifying AI-generated content.\nFaRL [62] jointly learns signal-level and semantic-level\nface representations from photographic images via contrastive and masked modeling. Due to its transferable features, we tailor it for detecting AI-generated faces.\nEAL [61] aligns EXIF metadata (as text prompts) with images, aiming to learn imaging-specific representations.\nHu21 [22] detects GAN-generated faces by analyzing inconsistencies in corneal specular highlights, which are typically stable in human eyes but erratic in synthetic imagery.\n\n• Training Set: Fig. 5(a) displays face photographs drawn\nfrom the CelebA-HQ dataset [25].\n• Cross-Generator Evaluation: Figs. 5(b)-(j) show synthetic face images generated by nine representative\nmodels: StyleGAN2 [27], VQGAN [13], LDM [44],\nDDIM [46], SDv2.1 [44], FreeDoM [58], HPS [55], Midjourney [1], and SDXL [39].\n• Cross-Dataset Evaluation: Fig. 6 presents additional\nsamples for domain transfer experiments. Specifically,\nthe evaluation involves testing on FFHQ photographs and\nsynthetic images generated by StyleGAN2, VQGAN, and\nLDM trained on FFHQ [26]. This setup assesses the robustness of the learned representations to variations in\ndata distribution and image source.\nThese samples qualitatively demonstrate the visual similarity between photographic and AI-generated faces, highlighting the challenges of reliable detection and the necessity of learning discriminative, generalizable features.\n\nReferences\n[A1] Chelsea Finn, Pieter Abbeel, and Sergey Levine.\nModel-agnostic meta-learning for fast adaptation of\ndeep networks. in ICML, pages 1126–1135, 2017. 11\n[A2] Hanxiao Liu, Karen Simonyan, and Yiming Yang.\nDARTS: Differentiable architecture search. arXiv\npreprint arXiv:1806.09055, 2018. 11\n[A3] Bernhard Schölkopf, Robert C. Williamson, Alex\nSmola, John Shawe-Taylor, and John Platt. Support\n\nD. Visual Samples\nTo illustrate the diversity and practical relevance of our evaluation setups, we provide representative face images used\nduring training and testing.\n12\n\n\f(a) CelebA-HQ\n\n(b) StyelGAN2\n\n(c) VQGAN\n\n(d) LDM\n\n(e) DDIM\n\n(f) SDv2.1\n\nFigure 5. Representative face images used in cross-generator evaluation. (Part 1 of 2).\n\nvector method for novelty detection. In NeurIPS,\npages 582–588, 1999. 11\n\n[A4] Richard Zhang, Phillip Isola, Alexei A. Efros, Eli\nShechtman, and Oliver Wang. The unreasonable ef-\n\n13\n\n\f(g) FreeDoM\n\n(h) HPS\n\n(i) Midjourney\n\n(j) SDXL\n\nFigure 5. Representative face images used in cross-generator evaluation. (Part 2 of 2).\n\nfectiveness of deep features as a perceptual metric. In\nCVPR, pages 586–595, 2018. 12\n\n14\n\n\f(a) FFHQ\n\n(b) StyleGAN2\n\n(c) VQGAN\n\n(d) LDM\n\nFigure 6. Representative face images used in cross-dataset evaluation.\n\n15\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"