"<!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>Mixture-of-Top-k Attention:\nEfficient Attention via Scalable Fast Weights\n\narXiv:2602.01219v6 [cs.LG] 27 Sep 2026\n\nQishuai Wen, Zhiyuan Huang, Wei He, Xianghan Meng, and Chun-Guang Li\nBeijing University of Posts and Telecommunications\n{wqs, huangzhiyuan, mengxianghan, wei.he, lichunguang}@bupt.edu.cn\n\nAbstract\nThe vanilla self-attention mechanism in Transformers can be viewed as a two-layer\nfast-weight MLP, whose weights are dynamically induced by inputs and whose\nhidden dimension is equal to the sequence length N . As the context extends, the\nexpressive capacity of such an N -width MLP increases, but it becomes unscalable\nfor extremely long sequences. Recently, this fast-weight perspective has motivated\nthe Mixture-of-Experts (MoE) attention mechanism, which partitions the sequence\ninto rigid blocks, treats them as fast-weight experts, and sparsely routes the tokens\nto them. In this paper, we elevate this perspective to a unifying framework for\nefficient attention mechanisms, interpreting them as making fast weights scalable\nthrough either routing or compression, and organizing them into a five-dimensional\ntaxonomy. Then, we propose Mixture-of-Top-k Attention (MiTA), which employs\na small set of landmark queries to gather top-k attended key-value pairs as queryaware and deformable routed experts, while compressing the N -width MLP into\na narrower shared expert. Consequently, our MiTA improves the flexibility of\nprior MoE attention from rigid to deformable fast-weight experts, as well as the\nscalability of prior top-k attention from query-specific set to reusable top-k set. We\nconduct extensive experiments on vision tasks showing the superior effectiveness\nand efficiency of our MiTA, and also uncovering intriguing properties such as an\nemergent token-pruning effect and easy generalization from standard attention.\nCode is available at https://github.com/QishuaiWen/MiTA.\n\n1\n\nIntroduction\n\nAttention is the core operation of Transformers, which underpins today’s success and wide application\nof deep learning. Intuitively, attention learns to store the context as key-value associations and retrieve\nthis short-term memory via queries [1]. However, such an all-to-all lookup paradigm incurs quadratic\ncomputation and memory complexity in the sequence length, thereby hindering its scaling to long\nsequences. To this end, a plethora of efficient attention methods have been explored, albeit still\nlacking a unifying principle [2].\nIn recent years, several lines of work have converged on a promising viewpoint: the parameters of a\ntwo-layer MLP can be viewed as key-value pairs [3], and the key-value pairs in full attention can be\nviewed as the fast (i.e., input-dependent) weights of an MLP [4, 5]. Therefore, pursuing an efficient\nattention can be framed as a fast-weight scaling problem, and draw inspiration from slow-weight\n(i.e., parameter) scaling approaches, such as weight tying [6], model pruning [7], and conditional\ncomputation [8].\nRecent work along this direction has demonstrated that sparse attention inspired by Mixture-ofExperts (MoE) can scale up the effective sequence length, deliver wall-clock speedups, and accommodate large-scale pretraining [9, 10]. In contrast to traditional MoE, whose experts are static and\nstructured model parameters (i.e., slow weights), their experts are input-dependent fast weights [11],\nPreprint.\n\n\fTable 1: A five-dimensional taxonomy for efficient attention methods from the fast-weight scaling perspective.\nWe present expert type and expert count together in the table. A detailed analysis of this taxonomy and how\nMiTA fits into it can be found in Appendix B.\nMethod\n\nScaling strategy\n\nExpert type and count\n\nExpert construction\n\nRouting topology\n\nLinear Attention [2020]\nMHLA [13]\n\nCompression\n\nOne shared linear layer\nm linear layers\n\nKernelization\nLocal prior &amp; kernelization\n\nAll-to-one\nN\nm times m\n-to-one\n\nLinformer [14]\nPVT [15]\n\nCompression\n\nOne shared MLP\n\nLearnable projection\n\nAll-to-one\n\nAgent Attention [16]\n\nCompression\n\nOne shared MLP\n\nLandmark probing\n\nAll-to-one\n\nTTT [17]\nViT3 [5]\n\nCompression\n\nOne shared module\n\nTest-time training\n\nAll-to-one\n\nRouting\n\nN MLPs\nOne shared MLP\n\nOffset predicting\n\nN times one-to-one\nN -to-one\n\nRouting\nRouting\nCompression &amp; Routing\n\nN\nn MLPs\n\nLocality prior\n\nN\nN\nn -to- n\nN\nN -to- n\n\nRouting\n\nN MLPs\n\nLight-weight skim\n\nN times one-to-one\n\nCompression &amp; Routing\n\nm MLPs\n\nLandmark probing\n\nN -to-m\n\nDeformable DETR [2021]\nDAT [19]\nBRA [20]\nMoBA [9]\nNSA [10]\nSpark Attention [21]\nDSA [22]\nMiTA (ours)\n\nmore precisely, subsets of key-value pairs. Routing queries to the fast-weight experts sparsely, MoE\nattention reduces the complexity from quadratic to linear in sequence length N .\nRoughly speaking, the central challenge in scaling the fast weights via MoE is to construct fast-weight\nexperts from unstructured key-value pairs. For example, given the spatial and temporal locality priors\nin many modalities, a straightforward, hardware-friendly, albeit naive, approach is to partition the\nsequence into contiguous, non-overlapping, fixed-size blocks, and regard these blocks as fast-weight\nexperts (i.e., a mixture of blocks or chunks) [9, 10, 23, 24]. After that, routing vectors are obtained\nby aggregating each block into a single vector, e.g., via average pooling or parameterized modules.\nSince splitting the N -width fast-weight MLP into a mixture of such rigid blocks is coarse and\nsuboptimal, subsequent work [25] has sought to improve upon the splitting scheme. Notably, we\nargue that top-k attention [21, 22] can be interpreted as spawning N k-width sub-MLPs from the\nN -width MLP, via gathering top-k key-value pairs attended by each query. Therefore, the rigid\n(fixed-shape) expert in prior MoE attention methods are replaced by top-k attention with top-k\nkey-value pairs. However, instead of the width of the fast-weight MLP in full attention, it is the\nnumber of such sets of top-k key-value pairs that always equals N in their top-k attention, which still\nlimits its scalability.\nOn the other hand, unlike the methods mentioned\nabove that scale fast weights by accessing a subset of them, linear attention [12] and Test-Time\nTraining (TTT) [17] compress the N -width MLP\ninto one (or several [13]) light-weight module(s),\nanalogous to model compression [26] and knowledge distillation [27]. Therefore, from a fastweight scaling perspective, we divide the scaling\napproaches of existing efficient attention methods\ndiscussed in this paper into two general categories:\na) scaling by routing, and b) scaling by compression (see Fig. 1 for an illustration). Scaling by\ncompression alone sacrifices a precise access to\nthe original key-value pairs; whereas scaling by\nrouting alone lacks a global summary of the full\ncontext. Although these two approaches are not\nmutually exclusive, most existing methods typically adopt only one of them.\n\nScaling by Routing\nKey\n\nValue\nExpert 1\n\nFast-Weight Scaling\n\nExpert 2\n\nMixture of Blocks\nQuery\n\nRouter\n\nExpert 3\n\nScaling by Compression\nKey\n\nValue\nSamples\n\nFast-Weight\nModule\nLabels\n\nContext Scaling\n\nTest-time Training\n\nFigure 1: As the context extends, the width of the twolayer fast-weight MLP induced by full attention increases\naccordingly. We categorize efficient fast-weight scaling approaches into two strategies: a) scaling by routing and b)\nscaling by compression, and illustrate each with a representative method: MoBA [9] and TTT [17].\n\nIn this paper, we first elevate the fast-weight scaling perspective into a five-dimensional taxonomy\nthat accommodates a broad spectrum of prior efficient attention methods (see Tab. 1). While such a\ntaxonomy is by no means complete, it paves the way towards a unified framework and serves as a\n2\n\n\fuseful design principle. Then, we propose Mixture-of-Top-k Attention (MiTA), which employs a\nsmall set of landmark queries to gather top-k attended key-value pairs as query-aware and deformable\nrouted experts, while compressing the N -width MLP into a narrower shared expert. Consequently,\nour MiTA improves the flexibility of prior MoE attention from rigid to query-aware and deformable\nexperts, and the scalability of prior top-k attention from N private (i.e., query-specific) to a tunable\nnumber m of reusable top-k sets; and b) combines the two scaling strategies, i.e., , routing and\ncompression, together, thereby addressing the limitations identified within the taxonomy.\nSpecifically, our MiTA queries original key-value pairs using landmark queries to obtain corresponding landmark values. The resulting landmark query-value pairs (i.e., compressed key-value\npairs) form the shared expert, where landmark queries act as keys and landmark values as values.\nMeanwhile, MiTA reorganizes the original key-value pairs into routed experts by gathering the\ntop-k key-value pairs attended by each landmark query. As shown in Fig. 2, for each query, MiTA\nconcatenates these compressed key-value pairs with a routed subset of the original key-value pairs.\nContributions.\n\nThe contributions of this paper are three-fold:\n\n1. Conceptually, we introduce a unified perspective that views efficient attention mechanisms as\nscaling fast weights, systematically organizing existing methods into a five-dimensional taxonomy\nand naturally revealing their limitations: the rigidity of experts, the non-reusability of top-k sets,\nand the need to combine routing and compression.\n2. Technically, we propose a novel efficient attention mechanism, MiTA, which constructs a tunable\nnumber of query-aware, deformable expert (equivalently, reusable and routable top-k sets) and\nachieves scalable fast weights through both routing and compression, thereby addressing these\nlimitations in a principled manner.\n3. Experimentally, we validate the effectiveness and efficiency of MiTA on vision tasks, demonstrating that our MiTA surpasses strong baselines by a large margin while using less wall-clock\ntime, efficiently approaching the expressive capacity of full attention to a remarkable extent.\nFull Attention\n\ncompression\n\nQuery\n\nCompressed\nKey-Value\nPairs\n\nKey\nKey-Value\nPairs\n\nLandmark\nQuery\n\nLandmark\nValue\n\nValue\n\nMiTA\nConcatenation of\nCompressed\nand Routed\nKey-Value Pairs\n\nLandmark\nQuery\n\nQuery\nMixture of\nTop-k\nActivations\n\nLandmark\nQuery\n\nLandmark\nValue &amp; Value\n\nKey\n\nValue\n\nrouting\n\nFigure 2: Illustration for our MiTA. In full attention, each query attends to all key-value pairs. In our MiTA, it\nattends to the concatenation of a small number (i.e., , 3 as shown above) of the compressed key-value pairs and a\nrouted subset of the original key-value pairs (i.e., , 2 as shown above).\n\n2\n\nRelated Work\n\n2.1\n\nFast-Weight Scaling\n\nIn contrast to slow weights (i.e., model parameters that remain unchanged after training and encode\npersistent knowledge), fast weights are input-conditioned and act as temporary parameters. They\ncan be viewed as short-term memory [28], playing an important role in meta-learning [29]. While\nmost scaling efforts have focused on expanding slow weights (e.g., increasing model width and\ndepth) [30, 31], extending Transformers’ sequence length turns out to implicitly scale fast weights.\nFor instance, Test-Time Training (TTT) [17] effectively compresses the N -width two-layer fastweight MLP in full attention into a smaller fast-weight module, likewise for linear attention [12] into\na linear layer [5] and Linformer [14] into a narrower MLP. Rather than scaling by compressing the\nfull fast-weight MLP, MoE attention factorizes it into experts and access them sparsely via routing.\nOur MiTA combines the two strategies mentioned above. It compresses full key-value pairs into a\nsmaller set (a narrower MLP), which offers a coarse yet global summary, and then leverages the top-k\nactivations of the landmark queries to identify underlying experts, which enables precise retrieval.\n3\n\n\f2.2\n\nMoE-Inspired Sparse Attention\n\nPrevious sparse attention methods typically focus on the design of fixed sparse patterns (e.g., the\nlocal window, axial stripe [32], and the vertical-slash pattern [33]) or learnable ones (e.g., hash\nbuckets [34] and k-means clusters [35].) To maintain a global connectivity, shared memory (i.e.,\ntokens that attend to and are attended by all tokens) is also introduced [36]. However, these patterns\nare either task-dependent [37] or too burdensome to achieve wall-clock speedup [38].\nRecently, sparse attention inspired by Mixture-of-Experts (MoE) has been applied to pre-training\nlarge language models, yielding extended effective context with reduced overhead [9, 10]. Its key\nadvantage is the routing mechanism, which enables query-aware selection within the key-value cache.\nConsequently, despite coarse selection granularity (e.g., evenly split, non-overlapping blocks), the\nsparse pattern is highly flexible and can vary across queries.\nIn this paper, we argue that, beyond routing, the experts can also be query-aware and deformable.\nSpecifically, for an arbitrarily long sequence, we can build a fixed, yet configurable number of experts\nby gathering semantically related key-value pairs. A similarly motivated line of research is to replace\nthe fixed, non-overlapping rectangular patchification in ViTs [39] with a deformable, content-adaptive\ntokenization scheme [40].\n2.3\n\nDeformable Attention\n\nMore broadly, conditional computation, the idea underlying MoE, has been explored through the\ndeformable convolution [41] in convolutional neural networks. And deformable attention was\nintroduced for object detection by Zhu et al. [18] and later generalized to Vision Transformers by Xia\net al. [19]. Given a query, while being blind to keys, deformable attention predicts offsets relative\nto a small set of default positions of the keys, thereby inducing a query-aware, deformable sparse\nattention pattern (i.e., a fast-weight expert in our context).\nRecent top-k attention methods, e.g., Spark Attention [21] and DeepSeek Sparse Attention [22],\nwhich have been applied to the training of Gemma 3n and DeepSeek-V3.2, respectively, can also be\nviewed as improved deformable attention. Instead of predicting the spatial positions solely from the\nquery as in prior deformable attention, these methods locate the top-k key-value pairs by allowing\neach query to take a lightweight skim of the full keys, e.g., using partial features [21] or low precision\n(FP8) [22].\nOur MiTA retains the key advantage of top-k attention by constructing deformable experts (i.e.,\nsparse patterns) that depend on both queries and keys. However, unlike the methods discussed above,\nwe replace the per-query offset predicting [18, 19] or light-weight skim [21, 22] with more efficient\nper-query routing to reusable sparse patterns, thereby further improving scalability.\n\n3\n\nMethods\n\n3.1\n\nEfficient Attention as Scaling Fast Weights\n\nThis subsection will first present the mathematical formulation of the fast-weight MLP equivalent\nto full attention, and then reinterpret efficient attention as a fast-weight scaling problem. From this\nperspective, a taxonomy of previous efficient attention methods in terms of how they scale fast\nweights will be given.\nFast-weight MLP. Formally, full attention (i.e., scaled dot-product attention [42]) can be written as:\n\u0010\n√ \u0011\nAtten(q, K, V ) = V softmax K ⊤ q/ d ,\n(1)\nwhere q ∈ Rd is a query, and the columns of K, V ∈ Rd×N are the keys and values, respectively.\nBy contrast, a D-width two-layer MLP, i.e., the feed-forward network (FFN) in Transformers, is:\n\u0010\n\u0011\nMLPσ (x | W 1 ; W 2 ) = W 2 σ W ⊤\n(2)\n1 x + b 1 + b2 ,\nwhere x ∈ Rd is the input vector, W 1 , W 2 ∈ Rd×D are weights, b1 ∈ RD and b2 ∈ Rd are biases1 ,\nand σ(·) is an element-wise activation function (e.g., ReLU). Note that full attention in Eq. (1) is\n1 For notion simplicity, biases are omitted from the argument.\n\n4\n\n\fequivalent to the following MLP:\n\u0010 ⊤ \u0011\nMLPexp (q | K̂; V̂ ) = V̂ exp K̂ q ,\n\u0010\n\u0011\n√\n⊤\nK̂ = K/ d, V̂ = V / exp(K̂ q)⊤ 1N ,\n\n(3)\n(4)\n\nwhere the weights are given by the scaled keys and values, the biases are all zero, and the activation\nfunction is the exponential function exp(·). Therefore, we have demonstrated that full attention in\nEq. (1) is equivalent to the N -width, fast-weight, two-layer MLP in Eq. (3).\nUnbounded fast-weight scaling. Because the hidden dimension of the fast-weight MLP in Eq. (3)\nalways equals to the sequence length N , the per-query overhead grows linearly with N rather than\nfixed as in the slow-weight MLP in Eq. (2). Thus, under the all-to-all lookup paradigm, processing\nN queries incurs an overall O(N 2 ) overhead. This unbounded, rapid growth prevents scaling the fast\nweights to arbitrarily long sequences. While this challenge is commonly described as the quadratic\ncomplexity of full attention in the literature on efficient attention, we refer to it as the unbounded\nfast-weight scaling issue.\nFast-weight scaling taxonomy. Although we have discussed relevant efficient-attention methods in\nSec. 2, they have not been systematically organized into a unified fast-weight scaling perspective.\nWe therefore propose a five-dimensional taxonomy: a) scaling strategy, i.e., scaling the N -width\nfast-weight MLP either by compressing it into a light-weight module or by routing each query to a\nsubset of it; b) expert count, i.e., how many fast-weight experts are constructed (in particular, scaling\nby compression typically yields a single shared expert); c) expert type, i.e., what module each expert\ntakes (e.g., an MLP or a linear layer); d) expert construction, i.e., how experts are formed from the\nkey-value pairs; and e) routing topology, i.e., the query-expert assignment pattern. The mapping of\nexisting methods to this taxonomy is summarized in Tab. 1. We defer the in-depth discussion until\nAppendix B.\n3.2\n\nMixture-of-Top-k Attention (MiTA)\n\nMotivated by the limitations identified through our fast-weight scaling perspective, our method has\ntwo design goals: a) moving from rigid to query-aware, deformable experts, and from private (i.e.,\nquery-specific) to reusable top-k key-value pairs, and b) combining compression and routing. We\nbegin with the second goal, which is simpler, and show that it naturally leads to the first, which is\nmore important.\nNote that both scaling by compression and scaling by routing have the inherent limitations. Compressing the full fast-weight MLP inevitably discards information, although the information loss\ncan be mitigated by adopting milder compression schemes (e.g., piecewise compression [13]) or by\ncompressing into a more expressive module (e.g., via test-time training [17]). In contrast, scaling by\nrouting is faithful and lossless, but it often lacks a global view of the context.\nTo combine the strengths of both strategies, i.e., to\nretain a compact global summary while enabling\nprecise, token-level retrieval, we introduce a small\nset of landmark queries Q̃ ∈ Rd×m with m ≪ N .\nThese landmark queries probe the full key-value\ncache and then, via cross-attention, compress it\ninto a global fast-weight module, while simultaneously forming deformable fast-weight experts\nby gathering the top-k activated (i.e., attended)\nkey–value pairs for each landmark query.\nThis design is motivated by two observations: a)\nregister tokens can attend to distinct semantic\nregions of an image [43]; and b) class embeddings [44] (or object queries [45] and mask embeddings [46]) provide a compact global summary\nfor dense prediction tasks [47] and even image\ngeneration [48]. The landmark queries can be obtained in various ways, e.g., by assigning a set of\n5\n\nKey-value entries within an expert\n\nQueries routed to the expert\n\nFigure 3: Visualization of experts’ gathered keyvalue pairs, and routed queries. The red box marks\nthe local window from which the landmark query is\nobtained via average pooling. The attention heatmap\n(averaged over attention heads) indicates key-value\npairs within each expert (top row) and the queries\nrouted to it (bottom row). Notably, neither the expert’s\nkey–value pairs nor the routed queries are confined to\nthe local window.\n\n\flearnable slow weights or by downsampling the sequence using a convolutional module. In this work,\nwe simply apply average pooling over uniformly spaced, equal-sized windows, as shown in Fig. 3.\nSpecifically, the i-th landmark query q̃ i (among m in total) defines the i-th expert Ei as follows:\nEi (q) = Atten(q, K (i) , V (i) ), i ∈ {1, . . . , m},\nK\n\n(i)\n\n(i)\n\nd×k\n\n= K :,Ii , V = V :,Ii ∈ R\n,\n\u0010\n\u0011\nIi = Topk K ⊤ q̃ i ∈ {1, . . . , N }k ,\n\n(5)\n(6)\n(7)\n\nwhere q is a query routed to expert Ei , and K (i) , V (i) are the top-k key-value pairs activated by q̃ i .\nThis approach effectively reorganizes the full key-value pairs into a mixture of top-k key-value pairs\n(i.e., a mixture of deformable experts). We directly use q̃ i as the routing vector for expert Ei . Then\nthe routing logits from the N queries Q ∈ Rd×N to the m experts is Q⊤ Q̃ ∈ RN ×m . We denote the\nindex of the rank-j expert that a query q is routed to under these logits as ej (q) ∈ {1, . . . , m}.\nMoreover, regarding the compressed global module, which can be viewed as a shared expert [49], we\nextract a set of landmark values Ṽ ∈ Rd×m via cross-attention using the landmark queries. The i-th\nlandmark value corresponding to the i-th landmark query is given by:\nṽ i = Atten(q̃ i , K, V ).\n(8)\nThen, the shared expert Ẽ is defined as:\nẼ(q) = Atten(q, Q̃, Ṽ ),\n(9)\nwhere landmark queries act as the keys in standard attention. Note that the computations in Eqs. (7)\nand (8) can be largely shared, where landmark queries are both querying the keys. Likewise, Eq. (9)\ncan reuse the routing logits. Therefore, the computations of the two scaling strategies are tightly\ncoupled in our MiTA.\nRather than a straightforward MoE implementation, which isolates the computation within each\nexpert and aggregates their outputs via a weighted sum, we concatenate the experts as a single\nstandard attention, as shown in Fig. 2. Therefore, our MiTA can be written as:\n√\n⊤\n(10)\nMiTA(q) = V ⋆ softmax(K ⋆ q/ d),\nK ⋆ = [Q̃, K (e1 (q)) , . . . , K (es (q)) ],\n⋆\n\nV = [Ṽ , V\n⋆\n\n⋆\n\n(e1 (q))\n\n,...,V\n\n(es (q))\n\n],\n\n(11)\n(12)\n\nd×(m+ks)\n\nwhere K , V ∈ R\nare the key-value pairs that a query q attends to in our MiTA, and s is\nthe number of routed experts (not counting the shared expert) per query. Note that, in practice, the\nattention can still be computed expert-wise and then combined, thanks to the online softmax [50], as\nin the FlashAttention [51] implementation of Lu et al. [9].\nImplementations. MiTA is conceptually simple yet effective, but technically non-trivial to realize\nwith actual wall-clock speedups. In particular, we implement our MiTA in Eq. (10) with s = 1 (as in\nLlama 4), i.e., each query is fed to the shared expert and routed to exactly one additional fast-weight\nexpert. The pseudocode of our MiTA is given in Algorithm 1 (Appendix B) which matches queries to\nexperts by sorting queries according to their expert assignments e1 (q). The more general but more\ncomplex case with s &gt; 1 can be implemented via MoBA [9] at the cost of reduced speed.\nComplexity analysis. The computational complexity of Eq. (10) alone is O(N (m + ks)), whereas\nfull attention incurs O(N 2 ); in practice, N ≫ m + ks. Moreover, the cross-attention operations\nin Eqs. (8) and (10) can be accelerated by the FlashAttention family [38, 51, 52]. The primary\nbottleneck comes from the gather operation in Eq. (6): it entails irregular (random) memory access\nand is therefore likely to make the overall pipeline memory-bound. Nonetheless, Deepseek Sparse\nAttention suggests that this limitation can be mitigated via its optimized implementation [22, Fig. 3].\nMoreover, compared with prior top-k attention [21, 22], which instantiate a private fast-weight expert\nper query (N experts in total) without routing, our MiTA uses a fixed (yet tunable) number (i.e., m) of\nfast-weight experts, which is more hardware-friendly, at the cost of an N -to-m routing step, which is\nexplored in MoBA [9]. In summary, the hardware operations required by MiTA have been validated\nby prior engineering-centric work, allowing us to focus on the fast-weight scaling perspective, its\ntaxonomy, the construction of a tunable number of query-aware, deformable fast-weight experts, and\nthe combination of compression and routing.\n6\n\n\fFigure 4: The token pruning effect of MiTA. Each row visualizes, for each layer, the positions of key-value\npairs (aggregated over heads) selected as experts; the leftmost image shows the original input. In later layers,\nmost tokens are effectively “pruned” (i.e., not selected as experts), and attention concentrates on class-relevant\nregions. The examples are sampled from the ImageNet-1K training set.\n\n4\n\nExperiments\n\nTo verify the efficacy of our MiTA, we conduct image classification experiments on ImageNet-1K [53]\nand semantic segmentation experiments on ADE20K [54]. Moreover, we assess the long sequence\nmodeling capability of MiTA on the Long Range Arena benchmark [55], and report its wall-clock\ntraining/inference speed against full attention on extremely long sequences. A detailed ablation\nstudy is provided in Appendix A. Furthermore, we study the robustness (or generalization) of MiTA\nunder varying expert count (m) and width (k) with a fixed trained model, and examine the broader\nalgorithmic generalization of Transformers across attention mechanisms; see Appendix C for details.\nTable 2: Results on ImageNet-1K training from scratch. Bias : using the agent bias [16]; DWC : using depth-wise\n\nconvolution; Gate : adding the attention output to the residual with data-dependent gating. PolaFormer [56],\nMHLA [13], and FLatten [57] are variants of linear attention. BRA [20] and Agent Attention [16] can be viewed\nas degenerate cases of MiTA, scaling by only routing and only compression, respectively.\nMethods\n\n# Params\n\nFLOPs\n\nAcc. (%)\n\nDeiT-T\nLinear-DeiT-T\nPolaFormer-DeiT-T\nMHLA-DeiT-T\nFLatten-DeiT-T\nBRA-DeiT-T\nAgent-DeiT-T\nAgent-DeiT-TBias\nMiTA-DeiT-T\nMiTA-DeiT-TDWC\n\n5.7M\n5.7M\n5.7M\n5.7M\n6.1M\n5.7M\n5.7M\n6.0M\n5.7M\n5.7M\n\n1.2G\n1.1G\n1.2G\n1.1G\n1.1G\n1.1G\n1.1G\n1.2G\n1.1G\n1.1G\n\n72.2\n68.0\n68.1\n69.2\n70.2\n70.2\n70.3\n71.1\n71.1 (-1.1)\n73.4 (+1.2)\n\nDeiT-S\nAgent-DeiT-S\nAgent-DeiT-SBias\nMiTA-DeiT-S\nMiTA-DeiT-SDWC\nMiTA-DeiT-SDWC,Gate\n\n22M\n22M\n23M\n22M\n22M\n22M\n\n4.6G\n4.4G\n4.4G\n4.4G\n4.4G\n4.7G\n\n79.9\n78.5\n79.1\n79.8 (-0.1)\n80.6 (+0.7)\n81.2 (+1.3)\n\nTable 3: Comparison with SOTA and efficient ViTs on ImageNet-1K. We compare against a recent state-ofthe-art ViT variant, ViT-5 [58], as well as strong baselines such as DeiT and DeiT-III [59]. We also include\nefficient ViTs, including sparse models (SViTE [60] and Sparsifiner [61]) and scaling-by-compression models\n(InLine [62] and Agent Attention).\nMethods\nViT-5-S\nDeiT-S\nDeiT-III-S\nSViTE-S\nSparsifiner-S\nInLine-DeiT-S\nAgent-DeiT-SBias,DWC\nMHLA-DeiT-SDWC\nMiTA-ViT-5-S\nMiTA-ViT-5-SDWC\n\n# Params\n\nFLOPs\n\nAcc. (%)\n\n22M\n22M\n22M\n11M\n23M\n17M\n23M\n22M\n22M\n22M\n\n4.7G\n4.6G\n4.6G\n2.5G\n4.5G\n5.0G\n4.4G\n4.2G\n4.5G\n4.5G\n\n82.2\n79.9\n81.4\n79.7\n79.9\n80.2\n80.5\n81.0\n81.3 (-0.9)\n81.7 (-0.5)\n\n7\n\n\fTable 4: Results on ADE20K semantic segmentation. ▽ : the attention mechanism is directly replaced, rather than\nbeing natively pretrained. Mask Transformer is the decoder introduced in the pioneering work Segmenter [44]\nfor Transformer-based segmentation, while DEPICT [47] and CBT [63] are two principled improvements upon\nit.\nBackbones\n\nSeg. head\n\nResolution\n\nFLOPs\n\nmIoU (%)\n\n5122\n\n38.1\n39.3\n39.1\n36.5 (-2.6)\n\nViT-T\nMask Trans.\nViT-T\nDEPICT\nViT-T\nCBT\nMiTA-ViT-T▽\nCBT\n\n5122\n5122\n5122\n\n13G\n13G\n12G\n7G (↓42%)\n\nViT-S\nMask Trans.\nViT-S\nDEPICT\nViT-S\nCBT\nMiTA-ViT-S▽\nCBT\n\n5122\n5122\n5122\n5122\n\n38G\n45.3\n35G\n46.7\n33G\n45.8\n25G (↓24%) 44.5 (-1.3)\n\nViT-B\nMask Trans.\nViT-B\nDEPICT\nViT-B\nCBT\nMiTA-ViT-B▽\nCBT\n\n5122\n5122\n5122\n5122\n\n128G\n48.5\n111G\n49.2\n111G\n49.3\n95G (↓14%) 48.1 (-1.2)\n\nViT-L\nMask Trans.\nViT-L\nDEPICT\nViT-L\nCBT\nMiTA-ViT-L▽\nCBT\n\n6402\n6402\n6402\n6402\n\n667G\n51.8\n628G\n52.9\n622G\n53.3\n508G (↓18%) 50.5 (-2.8)\n\nBaselines. Note that not all methods listed in Tab. 1 are included in our experiments for the\nfollowing reasons: (i) although representative, many have become outdated; and (ii) some are\ndesigned specifically for language tasks and are therefore not directly comparable in our vision\nsetting. Nonetheless, we include comparisons with their vision counterparts that are based on similar\nideas.\n4.1\n\nImage Classification\n\nCurrent advances in efficient attention on ImageNet-1K are typically accompanied by extra components such as depth-wise convolutions, which obscure the expressiveness gap between the proposed\nefficient mechanisms and full attention. To this end, we report a fair comparison in Tab. 2. Specifically,\nwe train all models using the DeiT [64] recipe and vary only the attention mechanism. Meanwhile,\nin Tab. 3, we compare our best-performing ViT variant based on MiTA against state-of-the-art and\nefficient ViTs.\nImplementation details. We use an image size of 224 with a patch size of 16, and set s = 1,\nm = k = 25 for MiTA.2 Under this setting, each query attends to m + ks = 50 key-value pairs.\nResults. As indicated in Tab. 2, without extra components, MiTA outperforms other efficient attention\nby a substantial margin (at least 0.8% and up to 3.1%). Although Agent Attention can narrow the\ngap by using agent bias 3 , it still underperforms MiTA on small-sized models by 0.7%. Moreover,\na severe limitation of this trick is that it is currently not supported by FlashAttention. As shown in\nTab. 3, when equipped with the architectural modifications explored in ViT-5 [58], MiTA outperforms\na range of strong ViT baselines and approaches state-of-the-art performance within a small margin\nwhile using fewer FLOPs.\n4.2\n\nSemantic Segmentation\n\nADE20K [54] is a scene-centric dataset for semantic segmentation, which requires higher image\nresolutions to preserve fine-grained details such as object boundaries. In Tab. 4, we apply MiTA to\nthe backbone for efficient visual encoding and compare against methods with ViT backbones and\nTransformer-based segmentation heads.\n2We set s = 1 throughout this work for a preliminary study. As analyzed in Sec. B, this choice does not fully exploit the\nexpressiveness of MiTA.\n3 An agent bias B ∈ RN ×m is added to attention scores as softmax(K ⊤ Q̃ + B).\n\n8\n\n\fTable 5: Results on LRA benchmark. For each task, we report the accuracy and training throughput (steps/s),\nalong with the average accuracy across tasks and the total training wall-clock time (hours). ‡ : a route-only\nvariant (i.e., the compression or local window branch is removed), where the number of entries attended per\nquery kept unchanged by increasing k.\nMethods\n\nListOps (2K)\n\nText (4K)\n\nRetrieval (4K)\n\nImage (1K)\n\nPathfinder (1K)\n\nAvg. / Tot.\n\nStandard Atten 37.35 / 12.7\n63.63 / 3.8\n79.90 / 1.9\n40.38 / 5.7\n69.68 / 5.7\n58.19 / 10.6\nReformer\n18.55 / 34.1\n65.08 / 16.8\n78.77 / 8.5\n44.04 / 8.3\n69.04 / 8.5\n55.10 / 4.5\nLinformer\n38.05 / 35.0\n56.69 / 24.6\n78.41 / 13.7\n39.56 / 11.9\n67.13 / 11.9\n55.97 / 3.1\nPerformer\n17.84 / 28.0\n65.13 / 16.5\n77.18 / 8.9\n36.64 / 8.1\n70.20 / 8.0\n53.40 / 4.7\nNyströmformer 29.69 / 22.0\n65.84 / 16.7\n79.68 / 8.8\n36.83 / 4.5\n72.50 / 4.5\n56.91 / 7.3\nAgent Atten 36.59 / 40.1\n63.86 / 38.9\n79.98 / 24.3\n38.92 / 19.5\n71.77 / 19.1\n58.22 / 1.9\nMoBA‡\n37.10 / 30.4\n62.35 / 15.8\n76.64 / 8.2\n37.92 / 8.6\n69.67 / 8.4\n56.74 / 4.6\nMiTA‡\n37.20 / 25.4\n64.09 / 22.2\n79.92 / 13.1\n40.17 / 5.3\n72.66 / 6.3\n58.81 / 5.5\nMiTA\n37.20 / 52.5 (×4.1) 63.47 / 37.7 (×9.9) 79.88 / 19.6 (×10.3) 40.72 / 13.6 (×2.4) 73.26 / 15.3 (×2.7) 58.91 / 2.4 (↓77%)\n\nImplementation details. ViT backbones [65] are pretrained on ImageNet-21K with an image size\nof 384 and a patch size of 16. We use a consistent patch size of 16 when training on ADE20K, and\nset s = 1, m = k = 49 for MiTA. Under this setting, each query attends to m + ks = 98 key-value\npairs, while it is 1,024 (for 5122 image resolution) or 1,600 (6402 resolution) in full attention.\nResults. As depicted in Tab. 4, MiTA remarkably reduces the FLOPs (by up to 42%) while achieving\ncomparable segmentation performance. Note that MiTA is not fully exploited here because the\nbackbone is not natively pretrained with it.\n4.3\n\nEvaluation on Long Sequences\n\nAs a preliminary validation for long-sequence modeling, we evaluate MiTA on the Long Range Arena\n(LRA) benchmark [55] and compare against several classical efficient attention methods [34, 14, 66,\n67]. We report their accuracy and training throughput (and wall-clock time) on LRA in Tab. 5, while\nthe inference throughput improvement of MiTA over standard attention is shown in Fig. 5.\nImplementation details. The training configuration follows Xiong et al. [67] and hyperparameters\nare kept consistent across all methods for a fair comparison. Thus, the reported accuracies are not\ntuned to fully exploit the best performance of each approach. We set s = 1 and m = k = 128 for\nMiTA. Throughput and wall-clock time reported in Tab. 5 and Fig. 5 are measured on a 24GB RTX\n4090. Standard attention is implemented with PyTorch’s fused kernel (i.e., FlashAttention). More\nspecifically, results in Fig. 5 are measured on a three-layer Transformer with an embedding dimension\nof 128, and the batch size is tuned for each run to maximize throughput.\n\n5\n\n104\nSamples per sec\n\nResults. As shown in Tab. 5, MiTA achieves accuracy\ncomparable to standard attention, while providing a\nsubstantial speedup that reduces total training time by\n77%. Notably, the route-only variant of MiTA also\nperforms well but is slower, since gathering more\nkey-value pairs incurs higher overhead. This suggest\nthat using a shared, compressed set of key-value pairs\ncan effectively represent thousands of routed original\npairs.\n\n10\n\nInference throughput vs. sequence length\n\n3\n\n×4.7\n\n102\n\n×19\n\n101\n\n×56\n\n100\n\nMiTA (m × k ≈ N4 )\n\n10−1\n\n×159\n\nStandard Attention\n1K\n\n4K\n\n16K\n64K\n256K\nSequence length - N\n\n1024K\n\nFigure 5: Inference throughput.\n\nConclusion\n\nWe adopted fast-weight scaling as a unifying perspective for efficient attention and introduced a fivedimensional taxonomy to identify the limitations of prior methods. Moreover, we proposed a novel\nefficient attention method, termed Mixture-of-Top-k Attention (MiTA), which constructs a tunable\nnumber of query-aware and deformable fast-weight experts and bridges the two different scaling\nstrategies together, thereby addressing their inherent limitations. We provided a detailed analysis of\nboth the taxonomy and our MiTA, suggesting a principled and promising path for developing efficient\nattention from the fast-weight scaling perspective.\n9\n\n\fReferences\n[1] Alberto Bietti, Vivien Cabannes, Diane Bouchacourt, Hervé Jégou, and Léon Bottou. Birth of a transformer:\nA memory viewpoint. In NeurIPS, 2023.\n[2] Jintao Zhang, Rundong Su, Chunyu Liu, Jia Wei, Ziteng Wang, Pengle Zhang, Haoxu Wang, Huiqiang\nJiang, Haofeng Huang, Chendong Xiang, Haocheng Xi, Shuo Yang, Xingyang Li, Yuezhou Hu, Tianyu Fu,\nTianchen Zhao, Yicheng Zhang, Youhe Jiang, Chang Chen, Kai Jiang, Huayu Chen, Min Zhao, Xiaoming\nXu, Jun Zhu, and Jianfei Chen. A survey of efficient attention methods: Hardware-efficient, sparse,\ncompact, and linear attention. 2025.\n[3] Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. Transformer feed-forward layers are key-value\nmemories. In EMNLP, 2021.\n[4] Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight\nprogrammers. In ICML, 2021.\n[5] Dongchen Han, Yining Li, Tianyu Li, Zixuan Cao, Ziming Wang, Jun Song, Yu Cheng, Bo Zheng, and\nGao Huang. ViT3 : Unlocking test-time training in vision. arXiv preprint arXiv:2512.01643, 2025.\n[6] Bohong Wu, Mengzhao Chen, Xiang Luo, Shen Yan, Qifan Yu, Fan Xia, Tianqi Zhang, Hongrui Zhan,\nZheng Zhong, Xun Zhou, et al. Parallel loop transformer for efficient test-time computation scaling. arXiv\npreprint arXiv:2510.24824, 2025.\n[7] Hongrong Cheng, Miao Zhang, and Javen Qinfeng Shi. A survey on deep neural network pruning:\nTaxonomy, comparison, analysis, and recommendations. TPAMI, 46(12):10558–10578, 2024.\n[8] Carlos Riquelme, Joan Puigcerver, Basil Mustafa, Maxim Neumann, Rodolphe Jenatton, André Susano\nPinto, Daniel Keysers, and Neil Houlsby. Scaling vision with sparse mixture of experts. In NeurIPS, 2021.\n[9] Enzhe Lu, Zhejun Jiang, Jingyuan Liu, Yulun Du, Tao Jiang, Chao Hong, Shaowei Liu, Weiran He,\nEnming Yuan, Yuzhi Wang, et al. MoBA: Mixture of block attention for long-context llms. arXiv preprint\narXiv:2502.13189, 2025.\n[10] Jingyang Yuan, Huazuo Gao, Damai Dai, Junyu Luo, Liang Zhao, Zhengyan Zhang, Zhenda Xie, Yuxing\nWei, Lean Wang, Zhiping Xiao, et al. Native sparse attention: Hardware-aligned and natively trainable\nsparse attention. In ACL, 2025.\n[11] Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent\nnetworks. Neural Computation, 4(1):131–139, 1992.\n[12] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are RNNs:\nFast autoregressive transformers with linear attention. In ICML, 2020.\n[13] Kewei Zhang, Ye Huang, Yufan Deng, Jincheng Yu, Junsong Chen, Huan Ling, Enze Xie, and Daquan\nZhou. MHLA: Restoring expressivity of linear attention via token-level multi-head. arXiv preprint\narXiv:2601.07832, 2026.\n[14] Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear\ncomplexity. arXiv preprint arXiv:2006.04768, 2020.\n[15] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and\nLing Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions.\nIn ICCV, 2021.\n[16] Dongchen Han, Tianzhu Ye, Yizeng Han, Zhuofan Xia, Siyuan Pan, Pengfei Wan, Shiji Song, and Gao\nHuang. Agent attention: On the integration of softmax and linear attention. In ECCV, 2024.\n[17] Yu Sun, Xinhao Li, Karan Dalal, Jiarui Xu, Arjun Vikram, Genghan Zhang, Yann Dubois, Xinlei Chen,\nXiaolong Wang, Sanmi Koyejo, Tatsunori Hashimoto, and Carlos Guestrin. Learning to (learn at test time):\nRNNs with expressive hidden states. In ICML, 2025.\n[18] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable DETR: Deformable\ntransformers for end-to-end object detection. In ICLR, 2021.\n[19] Zhuofan Xia, Xuran Pan, Shiji Song, Li Erran Li, and Gao Huang. Vision transformer with deformable\nattention. In CVPR, 2022.\n[20] Lei Zhu, Xinjiang Wang, Zhanghan Ke, Wayne Zhang, and Rynson W. H. Lau. BiFormer: Vision\ntransformer with bi-level routing attention. In CVPR, 2023.\n\n10\n\n\f[21] Chong You, Kan Wu, Zhipeng Jia, Lin Chen, Srinadh Bhojanapalli, Jiaxian Guo, Utku Evci, Jan Wassenberg, Praneeth Netrapalli, Jeremiah J Willcock, et al. Spark transformer: Reactivating sparsity in FFN and\nattention. In NeurIPS, 2025.\n[22] Aixin Liu, Aoxue Mei, Bangcai Lin, Bing Xue, Bingxuan Wang, Bingzheng Xu, Bochao Wu, Bowei\nZhang, Chaofan Lin, Chen Dong, et al. DeepSeek-v3. 2: Pushing the frontier of open large language\nmodels. arXiv preprint arXiv:2512.02556, 2025.\n[23] Jianzong Wu, Liang Hou, Haotian Yang, Xin Tao, Ye Tian, Pengfei Wan, Di Zhang, and Yunhai Tong.\nVMoBA: Mixture-of-block attention for video diffusion models. arXiv preprint arXiv:2506.23858, 2025.\n[24] Shengqu Cai, Ceyuan Yang, Lvmin Zhang, Yuwei Guo, Junfei Xiao, Ziyan Yang, Yinghao Xu, Zhenheng\nYang, Alan Yuille, Leonidas Guibas, et al. Mixture of contexts for long video generation. arXiv preprint\narXiv:2508.21058, 2025.\n[25] Weinan Jia, Yuning Lu, Mengqi Huang, Hualiang Wang, Binyuan Huang, Nan Chen, Mu Liu, Jidong Jiang,\nand Zhendong Mao. MoGA: Mixture-of-groups attention for end-to-end long video generation. arXiv\npreprint arXiv:2510.18692, 2025.\n[26] Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? In NeurIPS, 2014.\n[27] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv\npreprint arXiv:1503.02531, 2015.\n[28] Ali Behrouz, Peilin Zhong, and Vahab Mirrokni. Titans: Learning to memorize at test time. arXiv preprint\narXiv:2501.00663, 2024.\n[29] Louis Kirsch, James Harrison, Jascha Sohl-Dickstein, and Luke Metz. General-purpose in-context learning\nby meta-learning transformers. arXiv preprint arXiv:2212.04458, 2022.\n[30] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray,\nAlec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint\narXiv:2001.08361, 2020.\n[31] Mingxing Tan and Quoc Le. EfficientNet: Rethinking model scaling for convolutional neural networks. In\nICML, 2019.\n[32] Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and\nBaining Guo. CSWin transformer: A general vision transformer backbone with cross-shaped windows. In\nCVPR, 2022.\n[33] Huiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu, Xufang Luo, Surin Ahn, Zhenhua Han,\nAmir H. Abdi, Dongsheng Li, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. MInference 1.0: Accelerating\npre-filling for long-context LLMs via dynamic sparse attention. In NeurIPS, 2024.\n[34] Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In ICLR, 2020.\n[35] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse\nattention with routing transformers. TACL, 9:53–68, 2021.\n[36] Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv\npreprint arXiv:2004.05150, 2020.\n[37] Xunhao Lai, Jianqiao Lu, Yao Luo, Yiyuan Ma, and Xun Zhou. FlexPrefill: A context-aware sparse\nattention mechanism for efficient long-sequence inference. In ICLR, 2025.\n[38] Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. FlashAttention: Fast and memoryefficient exact attention with IO-awareness. NeurIPS, 2022.\n[39] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas\nUnterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and\nNeil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR,\n2021.\n[40] Zhiyang Chen, Yousong Zhu, Chaoyang Zhao, Guosheng Hu, Wei Zeng, Jinqiao Wang, and Ming Tang.\nDPT: Deformable patch-based transformer for visual recognition. In ACMMM, 2021.\n[41] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable\nconvolutional networks. In ICCV, 2017.\n\n11\n\n\f[42] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz\nKaiser, and Illia Polosukhin. Attention is all you need. NeurIPS, 2017.\n[43] Timothée Darcet, Maxime Oquab, Julien Mairal, and Piotr Bojanowski. Vision transformers need registers.\nIn ICLR, 2024.\n[44] Robin Strudel, Ricardo Garcia, Ivan Laptev, and Cordelia Schmid. Segmenter: Transformer for semantic\nsegmentation. In ICCV, 2021.\n[45] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey\nZagoruyko. End-to-end object detection with transformers. In ECCV, 2020.\n[46] Bowen Cheng, Alex Schwing, and Alexander Kirillov. Per-pixel classification is not all you need for\nsemantic segmentation. In NeurIPS, 2021.\n[47] Qishuai Wen and Chun-Guang Li. Rethinking decoders for transformer-based semantic segmentation: A\ncompression perspective. In NeurIPS, 2024.\n[48] Qihang Yu, Mark Weber, Xueqing Deng, Xiaohui Shen, Daniel Cremers, and Liang-Chieh Chen. An\nimage is worth 32 tokens for reconstruction and generation. In NeurIPS, 2024.\n[49] Damai Dai, Chengqi Deng, Chenggang Zhao, R. X. Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding\nZeng, Xingkai Yu, Y. Wu, Zhenda Xie, Y. K. Li, Panpan Huang, Fuli Luo, Chong Ruan, Zhifang Sui, and\nWenfeng Liang. DeepSeekMoE: Towards ultimate expert specialization in mixture-of-experts language\nmodels. In ACL, 2024.\n[50] Maxim Milakov and Natalia Gimelshein. Online normalizer calculation for softmax. arXiv preprint\narXiv:1805.02867, 2018.\n[51] Tri Dao. FlashAttention-2: Faster attention with better parallelism and work partitioning. In ICLR, 2024.\n[52] Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, and Tri Dao. FlashAttention-3:\nFast and accurate attention with asynchrony and low-precision. In NeurIPS, 2024.\n[53] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical\nimage database. In CVPR, 2009.\n[54] Bolei Zhou, Hang Zhao, Xavier Puig, Tete Xiao, Sanja Fidler, Adela Barriuso, and Antonio Torralba.\nSemantic understanding of scenes through the ade20k dataset. IJCV, 127(3):302–321, 2019.\n[55] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang,\nSebastian Ruder, and Donald Metzler. Long range arena : A benchmark for efficient transformers. In ICLR,\n2021.\n[56] Weikang Meng, Yadan Luo, Xin Li, Dongmei Jiang, and Zheng Zhang. PolaFormer: Polarity-aware linear\nattention for vision transformers. In ICLR, 2025.\n[57] Dongchen Han, Xuran Pan, Yizeng Han, Shiji Song, and Gao Huang. FLatten transformer: Vision\ntransformer using focused linear attention. In ICCV, 2023.\n[58] Feng Wang, Sucheng Ren, Tiezheng Zhang, Predrag Neskovic, Anand Bhattad, Cihang Xie, and Alan\nYuille. ViT-5: Vision transformers for the mid-2020s. arXiv preprint arXiv:2602.08071, 2026.\n[59] Hugo Touvron, Matthieu Cord, and Hervé Jégou. DeiT III: Revenge of the ViT. In ECCV, 2022.\n[60] Tianlong Chen, Yu Cheng, Zhe Gan, Lu Yuan, Lei Zhang, and Zhangyang Wang. Chasing sparsity in\nvision transformers: An end-to-end exploration. In NeurIPS, 2021.\n[61] Cong Wei, Brendan Duke, Ruowei Jiang, Parham Aarabi, Graham W Taylor, and Florian Shkurti. Sparsifiner: Learning sparse instance-dependent attention for efficient vision transformers. In CVPR, 2023.\n[62] Dongchen Han, Yifan Pu, Zhuofan Xia, Yizeng Han, Xuran Pan, Xiu Li, Jiwen Lu, Shiji Song, and Gao\nHuang. Bridging the divide: Reconsidering softmax and linear attention. In NeurIPS, 2024.\n[63] Qishuai Wen, Zhiyuan Huang, and Chun-Guang Li. Towards interpretable and efficient attention: Compressing all by contracting a few. In NeurIPS, 2025.\n[64] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé\nJégou. Training data-efficient image transformers &amp; distillation through attention. In ICML, 2021.\n\n12\n\n\f[65] Andreas Peter Steiner, Alexander Kolesnikov, Xiaohua Zhai, Ross Wightman, Jakob Uszkoreit, and Lucas\nBeyer. How to train your ViT? Data, augmentation, and regularization in vision transformers. TMLR, 2022.\n[66] Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane,\nTamás Sarlós, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin\nBelanger, Lucy J. Colwell, and Adrian Weller. Rethinking attention with performers. In ICLR, 2021.\n[67] Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas\nSingh. Nyströmformer: A nyström-based algorithm for approximating self-attention. In AAAI, 2021.\n[68] Daniel Bolya, Cheng-Yang Fu, Xiaoliang Dai, Peizhao Zhang, Christoph Feichtenhofer, and Judy Hoffman.\nToken merging: Your vit but faster. In ICLR, 2023.\n[69] Liang Zhao, Xiachong Feng, Xiaocheng Feng, Weihong Zhong, Dongliang Xu, Qing Yang, Hongtao Liu,\nBing Qin, and Ting Liu. Length extrapolation of transformers: A survey from the perspective of positional\nencoding. In EMNLP, 2024.\n\n13\n\n\fAppendix\nA\n\nAblation Study\n\nIn Tab. 6, we ablate three key design choices in MiTA: 1) the landmark extraction strategy; 2) the\nnumber of experts (m) and the number of key-value pairs per expert (k); and 3) the standalone\neffects of routing and compression. In the following paragraphs, we analyze these results and their\nimplications.\nTable 6: Ablation study under the same setting as Tab. 2.\nSetting\n\n∆\n\nAcc.\nLandmark Extraction\n\nRandom Selection\nLearnable Parameters\n1D Average Pooling\n2D Average Pooling\nConvolution\nDepth-Wise Convolution\nToken Merging [68]\n\n70.6\n66.3\n70.4\n71.1\n67.0\n68.8\n71.3\n\n-0.5\n-4.8\n-0.7\nDefault\n-4.1\n-2.3\n+0.2\n\n70.0\n71.0\n70.5\n71.1\n71.7\n71·2\n71.7\n\n-1.1\n-0.1\n-0.6\nDefault\n+0.6\n+0.1\n+0.6\n\nm×k\n16 × 16\n16 × 25\n25 × 16\n25 × 25\n25 × 36\n36 × 25\n36 × 36\n\nCompression &amp; Routing\nCompress-and-route\nCompress-only\nRoute-only\n\n1\n\n25\n\n71.1\n70.3\n70.8\n\nDefault\n-0.8\n-0.3\n\nNumber of key-value entries per expert - k\n\n69.5\n\n4\n\n9\n\n16\n\n25\n\n36\n\n49\n\n71.0\n\n73.2\n\n74.0\n\n75.0\n\n74.8\n\n75.4\n\nNumber of experts - m\n\n74\n\n16\n\n68.8\n\n70.3\n\n72.0\n\n74.0\n\n74.6\n\n74.9\n\n74.8\n\n9\n\n68.3\n\n69.8\n\n71.1\n\n73.5\n\n74.2\n\n74.6\n\n74.7\n\n4\n\n67.1\n\n68.2\n\n69.8\n\n71.6\n\n73.5\n\n72.9\n\n73.8\n\n1\n\n66.3\n\n66.6\n\n67.0\n\n68.3\n\n68.1\n\n68.9\n\n69.2\n\n72\n\n70\n\n68\n\nFigure 6: Ablation study of m and k on CIFAR-100. Experiments with other (m, k) were not\nconducted due to out-of-memory (OOM).\nLandmark extraction. Our simple default choice — average pooling over evenly split, nonoverlapping rectangular regions — even outperforms parameterized alternatives. This may stem from\nthe fact that landmark queries serve the dual roles of compressed keys and routers, potentially leading\nto gradient conflicts and suggesting a direction for further improving MiTA. We also observe that\nmore advanced methods, such as ToMe [68] can improve MiTA. However, ToMe must be applied\nrepeatedly to achieve aggressive compression, making it a less lightweight and less elegant solution.\nHyperparameters m and k. Performance improves as either m or k increases, which is expected\nsince MiTA more closely approximates full attention with larger m or k, and recovers full attention\nwhen m = k = N . More importantly, we observe that performance is more sensitive to k than to m;\nthat is, increasing k is typically more beneficial than increasing m. This trend is further validated in\nFig. 6. This finding supports our motivation that gathering top-k activations independently for each\n14\n\n\fquery (e.g., as in Spark Attention [21] and DeepSeek Sparse Attention [22]) is redundant, and that\nmany such activations can instead be shared through routing. For practical use, we provide a simple\nrule of thumb: first choose a fixed ratio, m×k\nN ; then start from m = k and explore k &gt; m during\nsubsequent tuning.\nCompression and routing. Routing is more critical than compression. Nevertheless, introducing\ncompression further improves performance while also providing notable acceleration, as shown in\nTab. 5.\nFull Attention\n\nMoE Attention\n\nTop-k Attention\n\nMiTA\nkey-value pairs of an expert\nx\n\n...\n\n...\n\nM rigid routed expert\n\nan arbitrary query\na specific query\n\n...\nOne shared expert\n\nunselected key-value pairs\n\ndeterministic assginment\nM deformable routed expert\n\nN private expert\n\nrouting\n\nFigure 7: Visual comparison of related attention methods.\n\nB\n\nFit MiTA into the Fast-Weight Scaling Taxonomy\n\nWhile MiTA is introduced in Sec. 3.2 from the perspective of combining the two complementary\nscaling strategies, we find that it also enriches the remaining dimensions of the fast-weight scaling\ntaxonomy proposed in Sec. 3.1. This subsection will briefly discuss each of them.\nExpert construction. This core dimension determines the expert type and count, and hence the\nrouting topology. An important consideration is what the construction conditions on: the query\nonly (e.g., DAT [19]), the key-value pairs only (e.g., MHLA [13]), or both. When using key-value\npairs, the construction may be content-dependent and thus deformable (e.g., DSA [22]) or merely\nposition-driven (e.g., MoBA [9]). While most efficient attention methods condition on one of the\nabove aspects, our MiTA conditions on all of them by extracting landmark queries from queries and\nthen probe the full key–value pool. We illustrate a resulting benefit of this design in Fig. 4.\nExpert type and count. Expert types can be categorized in three classes: a) linear layers (e.g.,\nlinear attention), b) MLPs (e.g., sparse attention and PVT [15]), c) arbitrary modules (e.g., test-time\ntraining). The scaling-by-routing branch of MiTA is restricted to MLP experts, as in sparse attention.\nHowever, the scaling-by-compression branch can be implemented through test-time training, thereby\ngeneralizing to other modules. As for the expert count, MiTA controls it via the hyperparameter\nm. One benefit of this design has been discussed in complexity analysis. Another benefit is that it\nenables expert composition through the routing mechanism.\n\nmIoU\n\nRouting topology. In MiTA, there is a fixed number of base sparse patterns (i.e., fast-weight experts),\nwhich is a substantial improvement over efficient attention with only a single expert, yet is still far\nfewer than prior top-k attention [21, 22], which has N experts. Crucially, to compensate for this\nlimitation, MiTA can resort to the routing mechanism to compose these m base experts: when routing\neach query to s experts,\nthe number of effective sparse patterns (i.e., the combinatorial number\n\u0001\nof experts) is m\ns . In particular, when s = 1, routing may degenerate into clustering, restricting\ninformation flow within each cluster. We thus quantify the positional overlap between an expert’s\ngathered key–value pairs and the queries routed to it. As shown in Fig. 8, the overlap remains\nconsistently modest across layers, suggesting that MiTA with s = 1 performs routing rather than\nhard clustering.\nLayer-wise gather-routing overlap\n0.6\n0.5\n0.4\n0.3\n0.2\n0.1\n0.0\n\nmIoU\nMin max range\n\n1\n\n2\n\n3\n\n4\n\n5\n\n6\n\n7\n\nLayer index\n\n8\n\n9\n\n10\n\n11\n\n12\n\nFigure 8: The layer-wise positional overlap (between the key–value pairs gathered by an expert and\nthe queries routed to it) is quantified by mIoU, averaged over experts and attention heads.\n\n15\n\n\fAlgorithm 1 Mixture-of-Top-k Attention (MiTA)\nRequire: Query, key, value matrices Q, K, V ∈ Rd×N ; the number of landmark queries m; the\nwidth of each fast-weight expert k; each query is routed to the shared expert and to s = 1\nadditional expert.\n1: // Obtain landmark queries\n2: Q̃ = AdaptiveAvgPool(Q, output_size=m)\n// [d, m]\n3: // Lookup key-value\npairs\nvia\nlandmark\nqueries\n√\nkv\n4: S\n= K ⊤ Q̃/ d\n// [N, m]\n5: // Gather the top-k activated key-value pairs\nkv\n6: I kv = Flatten(TopK(S ⊤ , k, dim=1))\n// [m*k]\nexpt\nexpt\nkv\n7: K\n,V\n= K[:, I ], V [:, I kv ]\n// [d, m*k]\n8: // Obtain landmark values (construct the shared expert)\n9: Ṽ = V softmax(Skv )\n// [d, m]\n10: // Always route queries to the shared expert\nshare\n11: O\n= FlashAttention(Q, Q̃, Ṽ )\n12: // Sparsely route queries to other experts\n13: I expt = ArgSort(ArgMax(Q̃⊤ Q, dim=0))\n// [N]\nexpt\n14: O\n= FlashAttention(Q[:, I expt ], K expt , V expt ,\ncu_seqlens_q= CumSum(BinCount(I expt )), cu_seqlens_k=[0, k, 2k, . . . , mk])\n15: // Combine results via online softmax\nshare\n16: O = Combine(O\n, O expt )\n// [d, N]\n17: return O\nMiTA\n\nStandard\n\n72.1\n\n13.2\n\n66.6\n\nAgent\n\n44.2\n\n60\n50\n\n70.3\n\n56.2\n\n40\n\nStandard\n\nAgent\n\nMiTA\n\n80.0\n\n42.8\n\n76.7\n\nAgent\n\nAgent\n\nStandard\n\nStandard\n\n35.1\n\n75\n70\n65\n60\n78.5\n\n64.5\n\n55\n50\n\n30\n14.0\n\n71.1\n\n45\n\nMiTA\n\nMiTA\n\n58.7\n\n20\n\n71.3\n\n43.6\n\n(a) DeiT-T models\n\n79.8\n\n40\n\n(b) DeiT-S models\n\nFigure 9: Evaluation with a different inference attention. The x-axis indexes the training attention,\nwhile the y-axis indexes the inference attention. We omit the diagonal entries from the heatmap since\nthey are not of interest. Currently, only standard attention, Agent Attention, and MiTA are included.\nNumber of key-value entries per expert - k\n9\n\n16\n\n25\n\n36\n\n49\n\n64\n\n81\n\n100\n\n4\n\n9\n\n16\n\n25\n\n36\n\n49\n\n64\n\n81\n\n100\n\n42.4\n\n64.6\n\n71.7\n\n74.3\n\n75.4\n\n75.9\n\n76.0\n\n75.8\n\n75.5\n\n75.2\n\n100\n\n74.5\n\n83.4\n\n84.8\n\n85.3\n\n85.4\n\n85.4\n\n85.5\n\n85.4\n\n85.4\n\n85.3\n\n81\n\n44.2\n\n65.8\n\n72.7\n\n75.1\n\n76.2\n\n76.5\n\n76.5\n\n76.4\n\n76.1\n\n75.8\n\n81\n\n73.7\n\n83.3\n\n84.8\n\n85.3\n\n85.5\n\n85.6\n\n85.5\n\n85.5\n\n85.4\n\n85.4\n\n64\n\n46.6\n\n67.0\n\n73.5\n\n76.0\n\n76.8\n\n77.2\n\n77.1\n\n77.0\n\n76.6\n\n76.3\n\n64\n\n72.7\n\n83.0\n\n84.8\n\n85.4\n\n85.5\n\n85.6\n\n85.6\n\n85.6\n\n85.5\n\n85.5\n\n49\n\n45.7\n\n66.9\n\n73.9\n\n76.3\n\n77.3\n\n77.5\n\n77.4\n\n77.3\n\n77.0\n\n76.6\n\n49\n\n72.3\n\n83.4\n\n85.1\n\n85.6\n\n85.6\n\n85.7\n\n85.7\n\n85.7\n\n85.6\n\n85.5\n\n36\n\n44.3\n\n65.9\n\n73.5\n\n76.2\n\n77.4\n\n77.7\n\n77.6\n\n77.5\n\n77.2\n\n76.8\n\n36\n\n65.5\n\n81.3\n\n84.5\n\n85.3\n\n85.6\n\n85.6\n\n85.6\n\n85.6\n\n85.5\n\n85.5\n\n25\n\n40.1\n\n64.4\n\n72.9\n\n75.9\n\n77.1\n\n77.6\n\n77.6\n\n77.5\n\n77.2\n\n76.8\n\n25\n\n59.4\n\n79.3\n\n83.7\n\n84.9\n\n85.4\n\n85.6\n\n85.7\n\n85.6\n\n85.6\n\n85.5\n\n16\n\n33.5\n\n59.1\n\n69.5\n\n73.5\n\n75.5\n\n76.3\n\n76.6\n\n76.5\n\n76.5\n\n76.1\n\n16\n\n50.1\n\n75.9\n\n82.4\n\n84.5\n\n85.1\n\n85.4\n\n85.5\n\n85.6\n\n85.6\n\n85.6\n\n9\n\n18.9\n\n47.4\n\n61.6\n\n67.2\n\n70.3\n\n72.0\n\n72.9\n\n73.5\n\n73.9\n\n73.9\n\n9\n\n34.7\n\n66.8\n\n78.6\n\n82.7\n\n84.3\n\n84.9\n\n85.3\n\n85.5\n\n85.5\n\n85.5\n\n4\n\n7.1\n\n24.6\n\n37.8\n\n44.6\n\n49.3\n\n52.8\n\n56.0\n\n59.2\n\n62.0\n\n64.5\n\n4\n\n14.4\n\n44.7\n\n66.5\n\n76.5\n\n81.1\n\n83.2\n\n84.2\n\n84.9\n\n85.3\n\n85.5\n\n1\n\n4.2\n\n16.3\n\n29.5\n\n46.0\n\n61.0\n\n70.6\n\n76.5\n\n80.1\n\n82.3\n\n83.7\n\n1\n\n1\n\nNumber of key-value entries per expert - k\n\n4\n\n100\n\nNumber of experts - m\n\nNumber of experts - m\n\n80\n\n70\n\n60\n\n50\n\n70\n\n60\n\n50\n\n40\n\n40\n1\n\n1.6\n\n5.3\n\n12.1\n\n17.2\n\n21.4\n\n24.9\n\n27.6\n\n30.7\n\n33.4\n\n36.3\n\n30\n20\n\n(a) MiTA-ViT-T @512\n\n30\n20\n\n(b) MiTA-ViT-L @224\n\nFigure 10: MiTA’s generalization across m and k. The red box marks the training (or finetuning)\n(m, k) and the corresponding baseline accuracy on ImageNet-1K. The orange boundary marks the\ninference (m, k) configurations that exceed the baseline accuracy, and the blue boundary marks those\nachieve 99% of the baseline accuracy. Best viewed when zoomed in.\n\n16\n\n\fC\n\nAlgorithmic Generalization\n\nBroadly, generalization typically refers to performance beyond the training data, e.g., from the\ntraining set to the validation set, length extrapolation [69] (from the training resolution to a new one).\nMotivated by the unifying perspective for efficient attention, this work investigate a new dimension\nof generalization: algorithmic generalization, i.e., performance beyond the training algorithm (e.g.,\nattention mechanism).\nIn Fig. 10, we study MiTA’s generalization across hyperparameters: the expert count m and expert\nwidth k. Note that changing an algorithm’s hyperparameters is analogous to changing the input\nresolution. Moreover, in Fig. 9, we study how an attention mechanism generalizes to others. Specifically, given a model trained with one attention mechanism (training attention), we replace it with a\ndifferent mechanism (inference attention) at test time. Beyond the generalization setting, where model\nparameters are fixed, we also finetune models pretrained on a large-scale dataset with a different\nfinetuning attention in Tab. 7.\nImplementation details. ViTs [65] in Tab. 4 are pretrained on ImageNet-21K with an image size\nof 224 and a patch size of 16. We finetune them for 50 epochs with the AdamW optimizer, using\nthe listed attention mechanisms (including standard attention). The model in Fig. 10(a) is similarly\nfinetuned, but starts from a ViT pretrained with an image size of 384. Models in Fig. 9 are the same\nas those in Tab. 2.\nResults. Fig. 10 suggests that MiTA generalizes well when scaling up the expert count and width:\nmany configurations exceeds the original result. This indicates a promising strategy: train MiTA\nwith smaller m and k for efficiency, then increase m or k at inference to obtain gains. In Fig. 9, we\nobserve that standard attention and MiTA generalize to each other better than other pairs, especially\nwhen training with standard attention and testing with MiTA, which retains over 95% of the original\nperformance with linear complexity. Regarding finetuning, Tab. 7 shows that parameters pretrained\nwith standard attention transfer more easily to MiTA, while Agent Attention struggles to narrow this\ngap even when increasing the number of agent tokens.\nTable 7: Finetuning results. We finetune ImageNet-21K pretrained ViTs [65] on ImageNet-1K,\nreplacing the standard attention with Agent Attention or MiTA Attention. † : the number of agent\ntokens (i.e., landmark queries) is increased from 49 (default) to 64.\nMethods\n\nTiny\n\nSmall\n\nBase\n\nLarge\n\nStandard Attention\n76.9\n81.2\n84.4\n85.9\nLinear Attention\n73.2\n78.6\n79.8\n80.7\nAgent Attention\n74.6\n79.7\n81.4\n83.5\nAgent Attention†\n74.7\n79.9\n81.5\n83.8\nMiTA Attention\n75.6 (-1.3) 80.9 (-0.3) 82.8 (-1.6) 85.5 (-0.4)\n\nD\n\nLimitations\n\nThis work primarily focuses on the vision domain, and we do not evaluate the proposed method in\nthe decoding phase of LLMs. This choice is mainly due to our limited computational resources. That\nsaid, the method and related work are presented in a modality-agnostic manner, and we discuss their\napplicability beyond vision. We consider the application to LLMs as an important direction for future\nwork. The main contribution of this paper is conceptual, namely a unified perspective that facilitates\nprincipled improvements, rather than a domain-specific instantiation.\n\n17\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"