"<!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>SINDER: Repairing the Singular Defects of\nDINOv2\nHaoqi Wang1 , Tong Zhang1 , and Mathieu Salzmann1,2\n\narXiv:2407.16826v1 [cs.CV] 23 Jul 2024\n\n1\n\nSchool of Computer and Communication Sciences, EPFL, Switzerland\n2\nSwiss Data Science Center, Switzerland\n{haoqi.wang, tong.zhang, mathieu.salzmann}@epfl.ch\n\nAbstract. Vision Transformer models trained on large-scale datasets,\nalthough effective, often exhibit artifacts in the patch token they extract.\nWhile such defects can be alleviated by re-training the entire model with\nadditional classification tokens, the underlying reasons for the presence\nof these tokens remain unclear. In this paper, we conduct a thorough\ninvestigation of this phenomenon, combining theoretical analysis with\nempirical observations. Our findings reveal that these artifacts originate\nfrom the pre-trained network itself, specifically stemming from the leading left singular vector of the network’s weights. Furthermore, to mitigate these defects, we propose a novel fine-tuning smooth regularization\nthat rectifies structural deficiencies using only a small dataset, thereby\navoiding the need for complete re-training. We validate our method on\nvarious downstream tasks, including unsupervised segmentation, classification, supervised segmentation, and depth estimation, demonstrating\nits effectiveness in improving model performance. Codes and checkpoints\nare available at https://github.com/haoqiwang/sinder.\nKeywords: DINOv2 · Singular Defect · Unsupervised Segmentation\n\n1\n\nIntroduction\n\nSelf-supervised learning (SSL) has emerged as a highly effective method for network pre-training [19], producing features beneficial across a wide spectrum of\ndownstream tasks. SSL significantly accelerates large-scale training for vision\nmodels, exemplified by recent advancements such as DINOv2 [19]. While SSL\nmodels excel in image classification tasks, their use for comprehensive image\nunderstanding, e.g., segmentation, is significantly challenged by the presence of\ndefective patch tokens, as depicted in Figure 1. These anomalies materialize as\nhigh-norm tokens in the feature maps of vision transformers. Despite research\nefforts to understand this phenomenon [8], explanations remain in their infancy.\nCurrent observations indicate that these flawed patches offer minimal local information, suggesting a tendency for large and deep vision transformers to recycle\nredundant patch tokens to store more useful information. To this day, the only\napproach to addressing this issue [8] requires re-training the network from scratch\nwith additional register tokens on vast amounts of data, which is typically prohibitive and offers limited explanations of the underlying phenomenon.\n\n\f2\n\nH. Wang et al.\n\nIn this paper, we aim to bridge the understanding gap of these defects by providing mathematical explanations. In contrast to previous work attributing the\ndefects to the image classification token, we discover that these defects inherently\nexist and share high similarity across the entire dataset. To further explore and\ndevelop theoretical foundations, we linearize the weights of each network block.\nOur analysis reveals a strong correlation between the defects in each layer and\nthe corresponding leading left singular vector of the linearized operations. We\nthus term this phenomenon singular defects. Importantly, our analysis evidences\nthat such singular defects depend solely on the pre-trained network weights, and\nnot on the inputs.\nTo mitigate these singular defects, we propose a method based on fine-tuning\nthe singular values of linear layers in the network. Specifically, we impose a\nsmoothness regularization on the detected defective tokens to rectify them and\nrestrict the number of learnable parameters to as few as possible to retain the\noriginal feature quality. Our approach can fine-tune pre-trained large-scale models using only a small dataset without the need for labeled data. Our experimental results demonstrate that our method effectively rectifies these defects and\nenhances performance in semantic segmentation tasks, particularly in the unsupervised setting, while maintaining performance in classification tasks. Compared to the existing solution of [8], which requires retraining networks on private\nLVD-142M data [19], our method offers advantages in terms of reduced carbon\nemissions, memory footprint, and time consumption. Considering the limited\navailability of proprietary large-scale datasets, our approach offers a viable and\neconomical-friendly solution for deploying large-scale models.\nIn a nutshell, our contributions can be summarized as follows:\n– We unveil the correlation between the leading left singular vector and the direction of defects, enabling us to theoretically predict the direction of defects\nfor each layer.\n– We introduce a data-efficient fine-tuning technique to address the singular\ndefects of DINOv2 without necessitating access to large-scale datasets.\n– We conduct extensive experiments to study the properties of the defects\nand show that our proposed solution not only retains the feature quality for\ndownstream classification tasks but also improves the pixel-level prediction\ntasks such as unsupervised segmentation.\n\n2\n\nMotivation\n\nA prominent characteristic of the defective patch tokens in the last layer is\ntheir high norm, a phenomenon that was also observed in previous work [8]. We\nillustrate the norms of the patch tokens of several images in Figure 1. The norm\nof the defective tokens is much larger than that of normal tokens. For example,\non 500 randomly selected natural images from the validation set of ImageNet-1K,\ntheir average norms are 434.0 vs. 57.6, respectively.\n\n\fSINDER\n\n3\n\nFig. 1: Visualization of singular defects in the feature map of the last layer of DINOv2.\nThe images are resized to have height 896 when input into the networks. The color of\nthe PCA visualization comes from the three principal components of the patch tokens.\n\nThe second characteristic of defective patch tokens is that their directions\nare largely image-independent. Firstly, the feature directions of the defective\npatch tokens within each image are almost the same. This can be intuitively\nseen from Figure 1, whose second column depicts a PCA representation of the\ntokens. High-norm tokens in the same image have the same color, indicating that\ntheir directions are close to each other. To quantify this, we compute the average\npair-wise angles between the defects within each of the 500 images. Their mean\nis 3.1 degrees. By contrast, the statistics of the average pair-wise angles between\nall patch tokens within each image is 72.8 degrees.\nSecondly, the defective patch tokens are almost the same across different\nimages. To see this, we calculate the average defective tokens for each image\nand then compute the average pair-wise angles between them. The mean is 5.5\ndegrees. This confirms that the defect direction in the last layer is in essence input\nimage agnostic. This observation differs from that in [8], where high-norm tokens\nwere claimed to contain image-wise global information. Based on our statistics,\nthese high-norm tokens primarily contain no input information, regardless of\nlocal or global. It thus seems natural to ask, can the defect directions be directly\ninferred from the pre-trained weights without knowing the input image?\nThese two observations of defects remind us of the power method [25] in\nlinear algebra, where a vector is recursively multiplied by a square matrix; the\nvector converges to the leading eigenvector, regardless of its initial direction,\nand its norm explodes if the largest eigenvalue is larger than 1. This motivates\nus to approach the problem of defects from the perspective of singular value\ndecomposition, which will be the central topic of Section 3.\nAs a sanity check, we clamp the singular values of the weights of all the\nlinear layers in DINOv2 to a smaller value and found that the high-norm defects\nare reduced (visualizations can be found in the Appendix). Encouraged by this,\nin Section 4, we design a regularization strategy to limit the magnitude of the\nsingular values and thus the defective patch tokens.\n\n\f4\n\nH. Wang et al.\n\n3\n\nSingular Defect Direction\n\nNow we delve into the origin of singular defects, focusing on the DINOv2 giant\nmodel. The DINOv2 giant is a Vision Transformer (ViT) model comprising 40\ntransformer layers, each containing an Attention Block and an MLP Block. These\nblocks act as residuals, with an identity path connecting their input and output.\nOur objective is to analyze the influence of each block on the defective tokens\nand to predict defective token directions theoretically solely from the pre-trained\nweights of the network, in an input-agnostic manner.\nTo evaluate the quality of our theoretical predictions, we manually extract\nthe defect directions of 500 images from the ImageNet validation set. For each\nlayer, we compute the average defect direction across these images, termed the\nempirical defect direction. Since evident defects on feature maps only manifest\nafter the 15th layer, we focus solely on gathering defect directions from the 15th\nlayer onwards. A good theoretical estimation of the defect direction is expected\nto closely align with this empirical defect direction.\nIt’s worth noting that to facilitate tractability in our analysis, we consider the\nsimplified scenario where there is only one input token. Under this assumption,\nthe transformer layer can be approximated by linear transformations, as we will\ndemonstrate below, rendering theoretical analysis feasible. Although the analysis\nis conducted in a simplified setting, we confirmed that the theoretical predictions\nof the singular defects are accurate.\n3.1\n\nLinear Approximation of an Attention Block\n\nFor an input token x \\in \\mathbb {R}^D , the computation of the Attention Block is\nx\n\nlayer norm\n\nmulti-head attention\n\nlayer scale\n\noutput.\n\nUnder the single-token assumption, we will show that we can approximate these\noperations as linear transformations. Let us first study the layer norm. This operation is non-linear because of the division by the standard deviation. However,\nif we ignore this rescaling, the rest is linear and can be written as A_1(A_0x)+b_1 ,\nwhere A_0=I-\\frac {1}{D}\\mathbb {1}_{D\\times D} is the centering, A_1=\\diag (w) is the diagonal matrix\nof scaling parameters, and b_1 contains the bias parameters.\nFor the multi-head attention, as we analyze for a single token case, the\nsoftmax over a singleton is a constant 1. Hence, we only need to consider the\nvalue parameters. Let the weights concatenated over all value heads be\nA_2\\in \\mathbb {R}^{D\\times D}\n, the concatenated biases from all heads be b_2\\in \\mathbb {R}^D , and the weights and\nbiases of the output projection be A_3 and b_3 , respectively, then the multi-head\nattention can be written as A_3(A_2x+b_2)+b_3 .\nFinally, we rewrite the layer scale as A_4x, where A_4=\\diag (w) is the\ndiagonal matrix of scaling parameters.\nCombining the above operations, the Attention Block can be approximated\nas a series of linear transformations,\n  \\mathrm {Attention}(x) \\approx A_4(A_3(A_2(A_1(A_0x)+b_1)+b_2)+b_3):=Ax+b. \n\n(1)\n\n\fSINDER\n\n(a) Attention Block with Identity I+A\n\n(b) MLP Block with Identity I+C\n\n(c) Layer: Attention and MLP Block E\n\n(d) Composed multiple layers G\n\n5\n\nFig. 2: Angle between theoretical and empirical defect directions. Blue lines\nare the angle between the empirical defect direction and the leading left singular vector\nof I+A, I+C, E, G, respectively. Angles between the leading left singular vectors\nand all the patch tokens in each layer are shown as violin plots. The x-axis is the layer\nindex, and the y-axis is the acute angle in degrees. The villa image in Figure 1 is used.\n\nDrawing inspiration from the power method, we relate the empirical defect\ndirections with the leading left singular vector corresponding to the largest singular value of I+A. In Figure 2a, we depict the angles between the leading left\nsingular vector and the empirical defective tokens for each layer as a blue line.\nIt is evident that after layer 19, these angles converge, with values consistently\nbelow 40 degrees. Additionally, we present the angles between the leading left\nsingular vector and all patch tokens of an image as violin plots. The defective\ntokens are identifiable as isolated points within the violin plots (more visualizations in the Appendix). These findings suggest that the angles between the\nleading left singular vector and the patch tokens serve as a reliable metric for\ndetecting defective tokens.\n\n3.2\n\nLinear Approximation of an MLP Block\n\nThe computation graph for an MLP Block is\nx\n\nlayer norm\n\nmlp\n\nlayer scale\n\noutput,\n\nwhere layer norm and layer scale can be processed in the same manner\nas in the Attention Block. However, the mlp layer is non-linear, expressed as\nC_3(\\mathrm {silu}(W_1x+h_1)\\odot (W_2x+h_2))+d_3 , where \\odot  is the element-wise product, C_3 ,\nW_1 , W_2 are weights, and h_1 , h_2 , d_3 are the biases. We approximate the mlp using\nleast squares. Specifically, we sample 100,000 random inputs X\\in \\mathbb {R}^{D\\times 100,000} and\ncompute their outputs Y=\\mathrm {silu}(W_1X+h_1)\\odot (W_2X+h_2)\\in \\mathbb {R}^{M\\times 100,000} , where\nM is the output dimension of W_1 . We solve the least-square problem C_2X=Y ,\nand obtain the linear approximation with matrix C_2\\in \\mathbb {R}^{M\\times D}  .\n\n\f6\n\nH. Wang et al.\n\nUltimately, we can approximate the MLP Block as\n  \\mathrm {MLP}(x) \\approx C_4(C_3(C_2(C_1(C_0x)+d_1))+d_3):=Cx+d, \n\n(2)\n\nwhere C_0=I-\\frac {1}{D}\\mathbb {1}_{D\\times D} is the centering of the layer norm, C_1 is the diagonal\nmatrix of the layer norm scaling weights, d_1 is the bias of the layer norm, and\nC_4 is the diagonal matrix of the layer scale scaling weights. The angles between the leading left singular vector of I+C and the empirical defect directions\nare shown in Figure 2b.\n3.3\n\nCombining Attention and MLP Blocks\n\nBased on our previous approximations, we can combine the linearized Attention\nBlock and MLP Block as follows,\n  \\mathrm {Layer}(x) \\approx x+Ax+b+C(x+Ax+b)+d := Ex + f, \n\n(3)\n\nwhere the identity path is incorporated. We plot the effect of the leading left\nsingular vector of E in Figure 2c, which resembles both Figure 2a and Figure 2b.\n3.4\n\nPredicting Defective Token Direction for Each Layer\n\nWe can further improve the prediction of defect direction by composing the linear\napproximations from layer 0 to layer i, where the matrix multiplied with x is\n  G_i := E_iE_{i-1}\\cdots E_0. \n\n(4)\n\nThe result of the leading left singular vector of G_i is shown in Figure 2d. We\nfind that after layer 20, the leading left singular vectors are very close to the\nempirical defect directions, and from layers 15 to 19, the result is also better\nthan previous attempts. Thus, we define the leading left singular vector of G_i as\nthe theoretical singular defect direction 3 for layer i. Figure 2d demonstrates that\nwe can accurately predict the empirical defect direction by the singular defect\ndirection. So we had referred to this type of defective tokens as singular defects.\nNote that the definition of singular defect direction originates solely from the\npre-trained network weights; it does not depend on the input image in inference.\n\n4\n\nRepairing Singular Defects\n\nHaving identified the connection between the singular defect direction and the\nempirical defect direction, we next aim to repair the singular defects of the\nnetwork with minimum modifications to the network parameters. A key requirement of such repairs is that they should maintain the feature quality of the\noriginal network. Without the defective tokens, we expect a spatially smooth\n3\n\nWe do not differentiate between a singular defect direction and its negative direction.\n\n\fSINDER\n\n7\n\nand coherent feature map, thus leading to stronger performance for dense prediction downstream tasks. We identify two key aspects that contribute to this\ngoal. First, imposing smooth regularization suffices to ensure the resulting network produces spatially smooth and coherent feature maps. Second, to maintain\nthe feature quality, the algorithm should modify as few parameters as possible,\nrefraining from overtraining the network.\nBased on these observations, we design an algorithm called Singular Defect\nRepairing (SINDER, Algorithm 1). In essence, SINDER aims to repair the first\ndefective layer encountered in the forward pass using a smooth regularization, by\nmodifying a few parameters. We describe the corresponding loss in Section 4.1\nand discuss the importance of limiting the number of learnable parameters in\nSection 4.2.\nAlgorithm 1 Singular Defect Repairing (SINDER)\nInput: A pre-trained network, a finetune dataset, termination threshold \\rho =25\\%,\nM=500, skip threshold \\sigma =3, mask threshold \\mu =4, learnable layers \\lambda =10\n1: Compute singular defect direction νi for each layer i of the pre-trained network\n2: while more than \\rho  of recent M images are not clear do\n3:\nSample an image\n4:\nfor all layers i do\n5:\nFind defective tokens of layer i using νi\n\\triangleright  See Equation (5)\n6:\nif the number of defective tokens is less than \\sigma  then\n\\triangleright  Skip the current layer\n7:\ncontinue\n8:\nend if\n9:\nCompute loss using Equation (8)\n10:\nBackward and update the parameters from layer i − λ to layer i\n11:\nbreak\n\\triangleright  Skip remaining layers\n12:\nend for\n13: end while\n\n4.1\n\nLoss Design\n\nThe core idea underlying our method is to first identify the defective tokens and\nthen apply a spatial smoothness prior to regularizing them. Let the patch tokens\nof a layer be xt , t = 1, . . . , T , where T = H × W is the number of tokens, and let\nthe singular defect direction of the ith layer of the network be νi . We identify\nthe defective tokens as follows. First, define the logit lt as the absolute value of\nthe inner product between the normalized patch token and νi , i.e.,\n \\label {eq:equation5} l_t = \\left |\\frac {x_t}{\\|x_t\\|}\\cdot \\nu _i \\right |. \n\n(5)\n\nThen, we take the set of defective tokens D to be those that deviate from the\nmean logit by more than the mask threshold \\mu =4 times the standard deviation.\n\n\f8\n\nH. Wang et al.\n\nFor a defective token x_t \\in \\mathcal {D}, we define its learning target based on the\nweighted average of its 3\\times 3 spatially neighboring tokens \\protect \\mathcal  {N}_t . Let token xt′ ∈ Nt\nbe a neighboring token of x_t . Then, we compute the coefficient\n  c_{tt'} = \\frac {\\exp (-l_{t'}/\\tau )}{\\sum _{s\\in \\mathcal {N}_t} \\exp (-l_s/\\tau )}, \n\n(6)\n\nwhere τ is a temperature hyperparameter. Additionally, we multiply ctt′ with\na 3 × 3 Gaussian kernel and re-normalize the resulting coefficients. This step\nassigns greater weight to closer neighbors compared to farther ones. Finally, we\nutilize the resulting coefficients, denoted as c̃tt′ , to linearly combine the 3 × 3\nneighboring tokens into the learning target of each defective token xt as\n  \\tilde {x}_t = \\sum _{t' \\in \\mathcal {N}_t} {\\tilde {c}}_{tt'}x_{t'}. \n\n(7)\n\nWe define our loss function L as the average distance between the defective\ntokens and their respective learning targets, which can be expressed as\n \\label {eq:loss} L = \\frac {1}{|\\mathcal {D}|}\\sum _{t\\in \\mathcal {D}}\\|x-\\tilde {x}_t\\|. \n\n(8)\n\nIf the number of defects for every layer is less than the skip threshold \\sigma , then\nwe call this image clear.\n4.2\n\nLimiting the Number of Learnable Parameters\n\nGiven the fact that we fine-tune the model with significantly fewer images compared to the original training set, it becomes imperative to control the number\nof trainable parameters to avoid compromising the model’s generalization ability in downstream tasks. Our observation of a profound connection between the\nleading left singular vector of network operations and the empirical defect directions serves as the foundation for our approach. Based on the intuition from the\npower method, the high norm of defects is related to the corresponding leading\nsingular value. We thus propose to constrain learning to singular values only.\nSpecifically, we decompose the weight of every linear layer in DINOv2 as USV^T\nusing SVD and freeze the parameters U and V during fine-tuning. This greatly\nreduces the number of learnable parameters.\nFurthermore, our experiments reveal that further restricting the number of\nlearnable parameters benefits feature quality preservation. Consequently, we opt\nto completely freeze most layers during fine-tuning. As illustrated in line 10 of\nAlgorithm 1, only the 10 layers preceding the first defective layer are trainable in\neach iteration. The effectiveness of this approach will be validated in Section 5.5.\n\n5\n\nExperiments\n\nIn this section, we first demonstrate the improvement resulting from our approach in the downstream task of unsupervised segmentation (Section 5.1). We\n\n\fSINDER\n\n9\n\nTable 1: Results on unsupervised segmentation using STEGO. Backbones are frozen.\nThe unsupervised results are shown in the Cluster columns. The Linear probe results\nare supervised and used for reference only.\n\nBackbone for\nSTEGO\n\nCityscapes\nLinear\n\nCluster\nmIoU\n\nAcc\n\nPotsdam-3\n\nmIoU\n\nAcc\n\nCluster\nmIoU\n\nAcc\n\nLinear\nmIoU\n\nAcc\n\nDINOv2\n19.38 72.54 43.00 91.69 67.01 80.52 76.47 86.72\nDINOv2-Register 18.62 67.00 \\protect \\mathbf  {43.97} 91.66 61.03 75.69 \\protect \\mathbf  {80.03} \\protect \\mathbf  {88.97}\nDINOv2-SINDER \\protect \\mathbf  {21.77} \\protect \\mathbf  {77.39} 43.06 \\protect \\mathbf  {92.05} \\protect \\mathbf  {70.26} \\protect \\mathbf  {82.40} 77.39 87.31\n\nuse two representative unsupervised segmentation methods, STEGO [15] and\nCAUSE [18]. The results of unsupervised segmentation demonstrate the importance of the repaired spatially smooth feature map in dense downstream tasks.\nThen, we verify that our repaired DINOv2 retains feature quality. To this end, we\ntest classification performance on ImageNet-1K [9], which ensures the quality of\nthe cls_token (Section 5.2), as well as supervised segmentation on ADE20k [28]\nand VOC2012 [11] and depth estimation on NYUd [21], which ensures the quality of the patch tokens (Section 5.3). Finally, we study our design choices and\nhyperparameter settings (Section 5.5).\nIn these experiments, we compare 3 models: The official release of DINOv2\ngiant, the DINOv2 giant model trained with registers [8], and our repaired DINOv2 giant model based on the original DINOv2 without registers.\nTraining Setting. We randomly select 30k images from the training set of\nImageNet-1K to fine-tune for one epoch. We use SGD with momentum 0.9 and\nweight decay 0. The batch size is 1, and the learning rate is 0.005. All input\nimages are center-cropped and resized to 518\\times 518. The training procedure follows Algorithm 1, which takes about six hours on a V100 GPU for fine-tuning.\nWe limit the number of learnable layers to \\lambda =10 in each iteration. The loss\nEquation (8) is computed on the first layer that has no less than \\sigma =3 defects. Training stops if, during the latest M=500 iterations, no loss was produced in more than 1-\\rho =75\\% of the iterations. The resulting network checkpoint is benchmarked on various datasets such as Cityscapes [7], Potsdam-3 [17],\nVOC2012 [11], ADE20k [28], etc. in the following sections.\n5.1\n\nUnsupervised Segmentation\n\nAs shown by the PCA visualization in Figure 1, the advantage of the repair is\na spatially smooth feature map. Speculatively, our repaired DINOv2 can thus\nbenefit dense prediction tasks such as unsupervised segmentation because the\nnew feature map has clearer boundaries and more coherent semantics. To verify\nthis intuition, we compare our repaired DINOv2 with the original DINOv2 and\nDINOv2-Register using two representative unsupervised segmentation methods,\n\n\f10\n\nH. Wang et al.\n\nTable 2: Results on unsupervised segmentation using CAUSE. Backbones are frozen.\n\nBackbone for\nCAUSE\n\nCityscapes\nWithout CRF\n\nVOC2012\n\nWith CRF\n\nWithout CRF\n\nWith CRF\n\nmIoU mAP Acc mIoU mAP Acc mIoU mAP Acc mIoU mAP Acc\nDINOv2\n31.4 45.2 85.2 31.5 57.6 89.8 55.8 71.3 91.7 57.5 79.0 93.1\nDINOv2-Register 33.3 51.2 87.6 35.3 71.6 \\protect \\mathbf  {90.7} 48.9 74.8 90.9 51.1 78.8 92.0\nDINOv2-SINDER \\protect \\mathbf  {35.6} \\protect \\mathbf  {54.6} \\protect \\mathbf  {88.4} \\protect \\mathbf  {35.9} \\protect \\mathbf  {72.9} \\protect \\mathbf  {90.7} \\protect \\mathbf  {62.9} \\protect \\mathbf  {85.6} \\protect \\mathbf  {93.6} \\protect \\mathbf  {63.8} \\protect \\mathbf  {88.3} \\protect \\mathbf  {94.1}\nTable 3: Results on ImageNet-1K classification. Backbones are frozen.\nBackbone\nDINOv2\nDINOv2-Register\nDINOv2-SINDER\n\nKNN\n\nLinear\n\nTop1\n\nTop5\n\nTop1\n\nTop5\n\n83.53\n\\protect \\mathbf  {83.69}\n83.51\n\n94.01\n93.12\n\\protect \\mathbf  {94.15}\n\n86.53\n\\protect \\mathbf  {87.10}\n86.29\n\n97.65\n\\protect \\mathbf  {97.95}\n97.61\n\nnamely, STEGO and CAUSE. We follow the training settings and the processing\nof benchmark datasets in their respective papers. Detailed hyper-parameters and\nconfigurations can be found in the Appendix. From Table 1, we observe that,\ncompared with DINOv2, our DINOv2-SINDER improves the mIoU of STEGO\non Cityscapes [7] by +2.39%, and on Potsdam-3 [17] by +3.25% in the unsupervised cluster setting. The performance of the supervised linear setting is used\nfor reference only. From Table 2, we observe that, compared with DINOv2, our\nDINOv2-SINDER improves the mIoU of CAUSE on Cityscapes by +4.2% and\n+4.4% in the without/with CRF settings, respectively. On the VOC2012 [11]\ndataset, the improvements are +7.1% and +6.3%, respectively. The tables also\nshow that our DINOv2-SINDER outperforms the DINOv2-Register. These results confirm that our proposed SINDER is effective on the dense downstream\ntask of unsupervised segmentation.\n5.2\n\nClassification\n\nWe test the classification performance of our repaired DINOv2-SINDER on\nImageNet-1K. We follow the evaluation protocol of [19]. Specifically, we test\nKNN and linear probe on frozen backbones. The top-1 and top-5 accuracies of\nthe three compared models are provided in Table 3. The top-1 and top-5 accuracies of DINOv2-SINDER are on par with the original DINOv2, for both KNN\nand linear probe. Compared with DINOv2-Register, the top-1 accuracy of KNN\nis -0.18% lower, but the top-5 accuracy of KNN is +1.03% higher. The top-1\nand top-5 accuracies for the linear probe are -0.81% and -0.34% lower than the\nDINOv2-Register, which is similar to those of the original DINOv2. Note that\nDINOv2-Register requires full retraining from scratch, whereas our fine-tuning\n\n\fSINDER\n\n11\n\nTable 4: Results on supervised segmentation. Backbones are frozen.\nADE20k\nBackbone\n\nLinear\nmIoU\n\naAcc\n\nVOC2012\n\nMultiscale\nmIoU\n\nLinear\n\naAcc\n\nmIoU\n\naAcc\n\nMultiscale\nmIoU\n\naAcc\n\nDINOv2\n48.83 81.46 53.24 84.00 83.05 96.17 86.01 97.01\nDINOv2-Register 49.03 81.09 53.62 83.90 83.27 96.15 86.54 97.12\nDINOv2-SINDER \\protect \\mathbf  {51.11} \\protect \\mathbf  {82.70} \\protect \\mathbf  {54.78} \\protect \\mathbf  {84.75} \\protect \\mathbf  {84.63} \\protect \\mathbf  {96.57} \\protect \\mathbf  {86.94} \\protect \\mathbf  {97.25}\nTable 5: Results on NYUd depth estimation. Backbones are frozen.\nBackbone\n\nLinear 1\n\nLinear 4\n\nDPT\n\nDINOv2\nDINOv2-Register\nDINOv2-SINDER\n\n0.370\n0.367\n\\protect \\mathbf  {0.337}\n\n0.309\n0.302\n\\protect \\mathbf  {0.294}\n\n0.242\n\\protect \\mathbf  {0.234}\n0.249\n\nuses substantially fewer resources. This comparison validates that our fine-tuned\nmodel maintains the feature quality of the cls_token.\n5.3\n\nSupervised Segmentation\n\nTo verify that the feature quality of the patch tokens is at least equally good,\nwe perform supervised segmentation on ADE20k and VOC2012 using the linear\nprobe with frozen backbones. Two training settings are tested. The linear setting only uses the last feature map, while the multi-scale setting uses the feature\nmaps of the last four layers. The results are provided in Table 4. Compared with\nthe original DINOv2, our repaired version improves the mIoU by +2.28% and\n+1.54%, respectively, for the linear and multi-scale settings on ADE20k, and\n+1.58% and +0.93% on VOC2012. This shows the superiority of our method.\nCompared with DINOv2-Register, our DINOv2-SINDER improves the mIoU by\n+2.08% and +1.16% on ADE20k for the linear and multi-scale settings respectively, and +1.36% and +0.40% on VOC2012. This is surprising considering that\nDINOv2-Register has mitigated the high-norm defects at the cost of full retraining. Although DINOv2-Register is not as performant as our DINOv2-SINDER,\nit is still better than DINOv2. This comparison demonstrates that our method\nnot only retains the quality of the patch tokens but also improves the dense\nprediction downstream task in the supervised setting.\n5.4\n\nDepth Estimation\n\nWe evaluate the patch features using depth estimation on the NYU Depth v2\ndataset, following the testing protocol in [19]. There are three settings. (1)\nLinear 1 uses the last layer feature map from the frozen backbone and concatenates the cls_token to patch tokens. The feature map is bilinear resized to\n\n\f12\n\nH. Wang et al.\nTable 6: Constrained parameter fine-tuning with gradually stronger constraints.\nSetting\nSingular Value and Bias\nSingular Value except QK\nSingular Value except QK in 15 Layers\nSingular Value except QK in 10 Layers\nSingular Value except QK in 5 Layers\n\nKNN (ImageNet)\n\nSeg. (ADE20k)\n\nTop1\n\nTop5\n\nmIoU\n\naAcc\n\n6.64\n80.12\n82.81\n83.51\n\\protect \\mathbf  {83.53}\n\n16.03\n92.82\n92.88\n\\protect \\mathbf  {94.15}\n93.15\n\n13.77\n45.53\n49.85\n\\protect \\mathbf  {51.11}\n50.61\n\n61.91\n80.62\n82.51\n\\protect \\mathbf  {82.70}\n82.65\n\nthe original resolution of the input image. The depth range is uniformly divided\ninto 256 bins and a linear layer predicts which bin the pixel should belong to. (2)\nLinear 4 is similar to Linear 1, except that it concatenates the tokens from\nlayers 9, 19, 29, 39. (3) DPT uses the DPT decoder on features of the frozen backbone. Regression losses are used in the setting. The results are shown in Table 5.\nWe see that SINDER outperforms DINOv2 and DINOv2-Register in the two\nlinear settings, showing that removing defective tokens has a greater benefit for\nsimple head structures. For complicated head DPT, the performance is on par\nwith DINOv2 and slightly worse than DINOv2-Register.\n5.5\n\nAblation Study\n\nConstrained Parameter Fine-tuning. To repair the singular defects while\nkeeping feature quality, we need to strictly constrain the freedom of parameter\nlearning. To show the importance of constrained parameter fine-tuning, we compare five settings with gradually stronger constraints. 1. Learning the singular\nvalues of the weight matrices together with the biases of all linear layers. 2. Only\nlearning the singular values of the weight matrices of the linear layers, except for\nthe query matrices and K matrices in the attention. 3. Further constraining the\nlearnable layers in the second setting to 15 layers in each iteration. 4. Constraining the learnable layers to 10 in each iteration. 5. Constraining the learnable\nlayers to 5 in each iteration. The results are shown in Table 6. A general trend\nis that the fewer learnable parameters, the more the classification accuracy and\nsegmentation performance are preserved. However, in the extreme case of too\nfew learnable parameters, there is no room left for improvement in segmentation.\nAccording to this study, we choose the balanced setting of restricting 10 layers.\nDynamic Layer Loss. To decide which layer to apply the loss to, we experimented with different hyper-parameter values for the skip threshold \\sigma  and the\nlogit mask threshold \\mu . The results are shown in Table 7. A general trend is\nthat if it is easier to skip layers, then stronger KNN performance is preserved.\nHowever, the improvement in segmentation is then limited. This is because more\nskipped layers cause earlier termination according to line 2 of Algorithm 1. For\nthe mask threshold, we find that the value \\mu =4 works well for DINOv2.\n\n\fSINDER\n\n13\n\nTable 7: Comparison of different values of skip threshold \\sigma  and mask threshold \\mu .\nKNN (ImageNet)\n\nSeg. (ADE20k)\n\nTop1\n\nTop5\n\nmIoU\n\naAcc\n\nSkip Less than \\sigma =0\nSkip Less than \\sigma =3\nSkip Less than \\sigma =5\n\n83.33\n83.51\n\\protect \\mathbf  {83.52}\n\n94.12\n\\protect \\mathbf  {94.15}\n93.11\n\n\\protect \\mathbf  {51.19}\n51.11\n50.71\n\n\\protect \\mathbf  {82.80}\n82.70\n82.53\n\nMask Threshold \\mu =3.5\nMask Threshold \\mu =4\nMask Threshold \\mu =4.5\n\n83.33\n\\protect \\mathbf  {83.51}\n83.50\n\n93.10\n\\protect \\mathbf  {94.15}\n93.09\n\n50.93\n\\protect \\mathbf  {51.11}\n50.50\n\n\\protect \\mathbf  {82.72}\n82.70\n82.51\n\nSetting\n\nFig. 3: Visualization of unsupervised segmentation on Cityscapes using STEGO.\n\n6\n\nRelated Work\n\nSelf-supervised Models. The recent surge in SSL methodologies began with\nthe application of the contrastive loss [4] or the cosine loss [14] on Siamese convolutional neural networks. Owing to their multi-modality friendly nature, Vision\nTransformers (ViTs) [10] are swiftly replacing CNNs as the mainstream backbone. Leveraging their global attention property, numerous SSL methods have\nbeen proposed for pre-training these networks. For instance, MoCov3 [5] follows the contrastive setting, MAE [16] reconstructs masked patch tokens, while\niBoT [29] and I-JPEA [1] learn to predict feature vectors of masked or nearby\nregions. Despite achieving promising performance across various downstream\ntasks, DINOv2 [19] advances this direction further by combining the advantages\nof prior arts such as iBoT and DINO [3] in the loss, improving the data curation, and adopting other dedicated engineering efforts. Trained on the large-scale\ndataset LVD-142M [19], DINOv2 exhibits impressive performance and robust\nzero-shot ability, heralding a new era for training foundational vision models.\n\n\f14\n\nH. Wang et al.\n\nAnalyzing Self-supervised Models and Transformers. Given the significance of SSL in various applications, researchers have dedicated efforts to understand its mechanisms. Some studies [23, 24] interpret contrastive learning by\ndissecting the loss function into several interpretable terms, while others analyze\nSSL from an augmentation perspective [22,26,27]. Recently, it has been observed\nthat the object features of iBoT and I-JPEA exhibit coupling [20], thereby impeding their ability to distinguish different objects. Similarly, DINOv2 has been\nfound to possess defective tokens [8], which undermine its performance on dense\nprediction downstream tasks. While proposing re-training ViTs with more tokens, these studies do not explain the underlying phenomenon.\nThe pairwise positive relationships between training samples using spectral\nmethods are investigated in [2]. Notably, they utilize Singular Value Decomposition (SVD) in their analysis, although the decomposition is applied to the\nrepresentation matrix composed of feature maps. Our analysis diverges from\ntheirs as our SVD is applied to the network parameters rather than the features\nthemselves. The work of [13] analyzes transformers based on their interpretation as interacting particle systems. Specifically, they observe the emergence of\nclusters over time. However, their analysis is limited to a simplified ideal transformer architecture, which disregards the MLP block and multi-head attention.\nMoreover, their focus is primarily on the case where Q=K=V=I_d , which\nis not realistic. The work of [12] assumes a fixed V , which is restrictive as it\ndoes not account for the varying semantics learned across different layers. By\ncontrast, our analysis directly examines the pre-trained weights, including the\nlearned parameters of Q, K, and V . Furthermore, we consider the multi-head\nstructure as well as the MLP block in our analysis.\n\n7\n\nLimitation and Social Impact\n\nThis work focuses on repairing existing pre-trained networks. How to avoid singular defects from training is left for future work. We primarily focus on the\nstudy of DINOv2, and we hope our treatment could motivate more research\non the understanding of more transformer-based networks such as GPTs. Our\nmethod of repairing existing networks requires substantially fewer computation\nresources and data consumption, which reduces the carbon emissions and human\nlabor in curating data, compared to the existing approach of fully retraining.\n\n8\n\nConclusion\n\nIn this paper, we have introduced a principled way to connect the high-norm defective tokens in DINOv2 with the leading left singular vector of the pre-trained\nweights. Based on this finding, we propose to repair DINOv2 by fine-tuning using\na smooth prior loss optimized on a restricted number of parameters. Our experiments have shown that our singular defect direction prediction aligns well with\nthe empirical defect direction, and our repaired DINOv2 improves unsupervised\npixel-level prediction downstream tasks while retaining feature quality.\n\n\fSINDER\n\n15\n\nAcknowledgements\nThis work was supported in part by the Swiss National Science Foundation via\nthe Sinergia grant CRSII5-180359.\n\nA\n\nDetails on PCA Visualization\n\nOur PCA visualization in Figures 1 and 3 follows the procedure in [19]. Given\nthe feature map of an image, containing H\\times W patch tokens, we first extract the\nthree leading principal components of these tokens. Each token will become a\ndim-3 vector after the PCA. Then we scale each component to the range 0-255\nand interpret them as the RGB channels. The tokens are reshaped to resolution\nH\\times W , and we get the resulting PCA visualization.\n\nB\n\nVisualization of Clamping Singular Values\n\nAs a sanity check in Section 2, we clamp the singular value of the weights of linear\nlayers in DINOv2 to a smaller value. The PCA visualization is shown in Figure 4.\nFor each linear layer, we decompose the weight matrix using SVD (for example,\nW=USV^T ) and then clamp the singular values S to be less than a threshold\n\\gamma  and get \\protect \\tilde  {S}  . At last, we replace the weight matrix with U\\tilde {S}V . In Figure 4, we\ncompared with \\gamma =2.0, 1.5, and 1.3, respectively. We can see that as \\gamma  decreases,\nthe norms of defective patches also decrease, and the number of defective tokens\nbecomes less. However, when gamma is too small, the semantics of the feature\nmaps seem corrupted. So we would prefer learned optimal singular values rather\nthan trimming them according to some manually designed thresholds.\n\nC\n\nVisualization of Learning Target\n\nWe visualize the learning target defined by Equation (7) in the last row of Figure 5. The feature maps of the 9th, 19th, 29th, and 39th layers for the villa\nimage are illustrated. For demonstrative purposes, we show the learning targets\nfor all pixels, which are visually smooth. However, in real fine-tuning, only pixels\nthat are detected as defective contribute to the loss. The corresponding singular\ndefects using mask threshold \\mu =4 are shown in the third row in Figure 5.\n\nD\n\nVisualization of Angles Between \\nu _i and Patch Tokens\n\nIn Figure 2d, the violin plot of the angles between the theoretical singular defect\ndirections \\nu _i for layer-i and the patch tokens of the villa image are illustrated. To\nshow that the isolated, anomalous points in the violin plot are indeed defective\ntokens, we present the corresponding PCA visualizations and the heatmap of\nangles in the first and second rows of Figure 5. In the angles heatmap, darker\npixels mean that the angles between \\nu _i and the patch tokens are smaller.\n\n\f16\n\nH. Wang et al.\n\nFig. 4: Visualization after clamping the singular values of linear layers. The results of\nthe two images are illustrated. The first and third columns are the PCA visualization\nof the feature map in the last layer. The second and fourth columns are the violin plots\nof the norm of the corresponding tokens.\n\nE\n\nVisualization of the Learned Singular Values\n\nWe show the difference between the learned singular values and the original\nsingular values in Figure 6. We observe that the differences are more striking\nfor layers 5–25, and changes in other layers are modest. Generally speaking, the\nlearned singular values are smaller than the original values.\n\n\fSINDER\n\n17\n\nFig. 5: The violin plot is the visualization of angles between the theoretical singular\ndefect direction \\nu _i and patch tokens. The first row below the violin plot is the PCA\nvisualization of patch tokens in the 9th, 19th, 29th, and 39th layers. The second row\nis the heat map of the angle between \\nu _i and patch tokens. The darker the color, the\nsmaller the angles. The third row is the defective tokens detected by logits defined\nin Equation (5). The last three rows are the learning target under the temperature\nhyper-parameter \\tau =0.01, 0.1, 1. We use \\tau =0.1 in our experiments.\n\n\f18\n\nH. Wang et al.\n\n(a) Diff of Singular Values of A_2 in the Attention Block\n\n(b) Diff of Singular Values of A_3 in the Attention Block\n\nFig. 6: Difference between the learned singular values and the original singular values.\nChanges in the remaining singular values are relatively small compared to the leading\nones. So, only the first three leading singular values are shown to avoid cluttering the\nfigure. The x-axis is the layer index.\n\nFig. 7: The violin plot of angles between a random direction and the patch tokens of\nthe villa image. The x-axis is the layer index.\n\n\fSINDER\n\nF\n\n19\n\nVisualization of Angles between Random Direction\nand Patch Tokens\n\nTo complement Figure 2, we show the violin plot of angles between a random\ndirection and the patch tokens of the villa image in Figure 7. We can see that\nthe pattern of the violin plot using a random direction is drastically different\nfrom the violin plots in Figure 2, which uses the leading left singular vectors.\nThis shows that a random direction cannot be used to detect defective tokens.\n\nG\n\nDetailed Configurations of Experiments\n\nG.1\n\nSTEGO\n\nDataset We follow STEGO [15] to process the datasets, specifically, 27 classes\nof Cityscapes [7], and 3 classes of Potsdam-3 [17] are evaluated. We resize the\nimages to 392\\times 392 with center crop in training and 560\\times 560 in testing. The\ntraining images are five-cropped.\nHyper-parameter We extended the STEGO’s official codebase to support\nDINOv2 backbones. We use the hyper-parameters in STEGO’s official repository,\nexcept for the backbone- and dataset-sensitive parameters, which are listed in\nTable 8. The hyper-parameters of STEGO used in the results of Table 1 are\nlisted in Table 8.\nG.2\n\nCAUSE\n\nDataset We follow CAUSE [18] to process the datasets, specifically, 27 classes\nof Cityscapes, and 21 classes of PASCAL-VOC [11] are evaluated. Both training\nand testing resolution are 322\\times 322.\nHyper-parameter We use the official codebase in CAUSE and adopt the default settings for all our experiments. specifically, we use the setting of CAUSETR.\nTable 8: Hyper-parameters of STEGO.\nDataset\n\nBackbone\n\nCityscapes DINOv2\nCityscapes DINOv2-Register\nCityscapes DINOv2-SINDER\nPotsdam-3 DINOv2\nPotsdam-3 DINOv2-Register\nPotsdam-3 DINOv2-SINDER\n\nneg inter pos inter pos intra neg inter pos inter pos intra\nweight weight weight\nshift\nshift\nshift\n0.90\n0.80\n0.80\n0.90\n0.90\n0.90\n\n0.60\n0.65\n0.65\n0.60\n0.60\n0.60\n\n1.00\n0.90\n0.90\n1.00\n1.00\n1.00\n\n0.30\n0.30\n0.30\n0.30\n0.30\n0.40\n\n0.20\n0.20\n0.45\n0.20\n0.20\n0.45\n\n0.45\n0.45\n0.60\n0.45\n0.45\n0.45\n\n\f20\n\nH. Wang et al.\n\nG.3\n\nClassification KNN\n\nWe use the KNN implementation in the official codebase of DINOv2. The ImageNet1K [9] dataset is used. The KNN performance on the validation set has been\nreported in Table 3. Specifically, K=10, 20, 100, 200 are tested and the setting\nwith the best top1 was reported.\nG.4\n\nClassification Linear Probe\n\nWe follow the linear probe implementation in the official codebase of DINOv2.\nThe ImageNet-1K dataset is used. The linear probe performance on the validation set is reported in Table 3. The linear layer was trained for 10 epochs under\nlearning rates of 1e-5, 2e-5, 5e-5, 0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01,\n0.02, 0.05, and 0.1, respectively, and the setting with the best top1 was reported.\nG.5\n\nSupervised Segmentation\n\nWe follow the evaluation protocol for supervised segmentation in DINOv2 and\nimplement the training and testing using mmsegmentation [6]. Specifically, a\nlinear layer is trained to predict classes from patch tokens. In the Linear setting,\nboth training and testing images are resized to 512\\times 512. For the Multiscale\nsetting, they are rescaled to 640\\times 640. Moreover, for the Multiscale setting, the\npatch tokens of the last four layers are concatenated, and the multiscale testtime augmentation was used in testing. For both ADE20k [28] and VOC2012,\n40,000 iterations were trained.\n\nReferences\n1. Assran, M., Duval, Q., Misra, I., Bojanowski, P., Vincent, P., Rabbat, M., LeCun,\nY., Ballas, N.: Self-supervised learning from images with a joint-embedding predictive architecture. In: Proceedings of the IEEE/CVF Conference on Computer\nVision and Pattern Recognition. pp. 15619–15629 (2023)\n2. Balestriero, R., LeCun, Y.: Contrastive and non-contrastive self-supervised learning recover global and local spectral embedding methods. Advances in Neural Information Processing Systems 35, 26671–26685 (2022)\n3. Caron, M., Touvron, H., Misra, I., Jégou, H., Mairal, J., Bojanowski, P., Joulin,\nA.: Emerging properties in self-supervised vision transformers. In: Proceedings of\nthe IEEE/CVF international conference on computer vision. pp. 9650–9660 (2021)\n4. Chen, T., Kornblith, S., Norouzi, M., Hinton, G.: A simple framework for contrastive learning of visual representations. In: International Conference on Machine\nLearning. pp. 1597–1607. PMLR (2020)\n5. Chen, X., Xie, S., He, K.: An empirical study of training self-supervised vision\ntransformers. in 2021 ieee. In: CVF International Conference on Computer Vision\n(ICCV). pp. 9620–9629\n6. Contributors, M.: MMSegmentation: Openmmlab semantic segmentation toolbox\nand benchmark. https://github.com/open-mmlab/mmsegmentation (2020)\n\n\fSINDER\n\n21\n\n7. Cordts, M., Omran, M., Ramos, S., Rehfeld, T., Enzweiler, M., Benenson, R.,\nFranke, U., Roth, S., Schiele, B.: The cityscapes dataset for semantic urban scene\nunderstanding. In: Proc. of the IEEE Conference on Computer Vision and Pattern\nRecognition (CVPR) (2016)\n8. Darcet, T., Oquab, M., Mairal, J., Bojanowski, P.: Vision transformers need registers (2024)\n9. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A largescale hierarchical image database. In: 2009 IEEE conference on computer vision\nand pattern recognition. pp. 248–255. Ieee (2009)\n10. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner,\nT., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., Houlsby, N.:\nAn image is worth 16x16 words: Transformers for image recognition at scale. ICLR\n(2021)\n11. Everingham, M., Van Gool, L., Williams, C.K.I., Winn, J., Zisserman, A.:\nThe PASCAL Visual Object Classes Challenge 2012 (VOC2012) Results.\nhttp://www.pascal-network.org/challenges/VOC/voc2012/workshop/index.html\n12. Geshkovski, B., Letrouit, C., Polyanskiy, Y., Rigollet, P.: The emergence of clusters\nin self-attention dynamics. arXiv preprint arXiv:2305.05465 (2023)\n13. Geshkovski, B., Letrouit, C., Polyanskiy, Y., Rigollet, P.: A mathematical perspective on transformers. arXiv preprint arXiv:2312.10794 (2023)\n14. Grill, J.B., Strub, F., Altché, F., Tallec, C., Richemond, P.H., Buchatskaya, E.,\nDoersch, C., Pires, B.A., Guo, Z.D., Azar, M.G., et al.: Bootstrap your own latent:\nA new approach to self-supervised learning. arXiv preprint arXiv:2006.07733 (2020)\n15. Hamilton, M., Zhang, Z., Hariharan, B., Snavely, N., Freeman, W.T.: Unsupervised semantic segmentation by distilling feature correspondences. arXiv preprint\narXiv:2203.08414 (2022)\n16. He, K., Chen, X., Xie, S., Li, Y., Dollár, P., Girshick, R.: Masked autoencoders are\nscalable vision learners. In: Proceedings of the IEEE/CVF Conference on Computer\nVision and Pattern Recognition. pp. 16000–16009 (2022)\n17. Ji, X., Henriques, J.F., Vedaldi, A.: Invariant information clustering for unsupervised image classification and segmentation. In: Proceedings of the IEEE/CVF\ninternational conference on computer vision. pp. 9865–9874 (2019)\n18. Kim, J., Lee, B.K., Ro, Y.M.: Causal unsupervised semantic segmentation. arXiv\npreprint arXiv:2310.07379 (2023)\n19. Oquab, M., Darcet, T., Moutakanni, T., Vo, H.V., Szafraniec, M., Khalidov, V.,\nFernandez, P., HAZIZA, D., Massa, F., El-Nouby, A., et al.: Dinov2: Learning\nrobust visual features without supervision. Transactions on Machine Learning Research (2023)\n20. Qiu, C., Zhang, T., Wu, Y., Ke, W., Salzmann, M., Süsstrunk, S.: Mind your augmentation: The key to decoupling dense self-supervised learning. In: The Twelfth\nInternational Conference on Learning Representations (2023)\n21. Silberman, N., Hoiem, D., Kohli, P., Fergus, R.: Indoor segmentation and support\ninference from rgbd images. In: Fitzgibbon, A., Lazebnik, S., Perona, P., Sato, Y.,\nSchmid, C. (eds.) Computer Vision – ECCV 2012. pp. 746–760. Springer Berlin\nHeidelberg, Berlin, Heidelberg (2012)\n22. Tian, Y., Sun, C., Poole, B., Krishnan, D., Schmid, C., Isola, P.: What makes for\ngood views for contrastive learning? arXiv preprint arXiv:2005.10243 (2020)\n23. Wang, T., Isola, P.: Understanding contrastive representation learning through\nalignment and uniformity on the hypersphere. In: International Conference on\nMachine Learning. pp. 9929–9939. PMLR (2020)\n\n\f22\n\nH. Wang et al.\n\n24. Wang, Y., Zhang, Q., Wang, Y., Yang, J., Lin, Z.: Chaos is a ladder: A new\ntheoretical understanding of contrastive learning via augmentation overlap. arXiv\npreprint arXiv:2203.13457 (2022)\n25. Wikipedia: Power iteration — Wikipedia, the free encyclopedia. http://en.\nwikipedia . org / w / index . php ? title = Power % 20iteration &amp; oldid = 1188380344\n(2024), [Online; accessed 06-March-2024]\n26. Xiao, T., Wang, X., Efros, A.A., Darrell, T.: What should not be contrastive in\ncontrastive learning. arXiv preprint arXiv:2008.05659 (2020)\n27. Zhang, T., Qiu, C., Ke, W., Süsstrunk, S., Salzmann, M.: Leverage your local and\nglobal representations: A new self-supervised learning strategy. In: Proceedings\nof the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp.\n16580–16589 (2022)\n28. Zhou, B., Zhao, H., Puig, X., Fidler, S., Barriuso, A., Torralba, A.: Scene parsing\nthrough ade20k dataset. In: Proceedings of the IEEE conference on computer vision\nand pattern recognition. pp. 633–641 (2017)\n29. Zhou, J., Wei, C., Wang, H., Shen, W., Xie, C., Yuille, A., Kong, T.: ibot: Image\nbert pre-training with online tokenizer. arXiv preprint arXiv:2111.07832 (2021)\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"