Paper: 2605.06663 Authors: Ryan Wang, Akshita Bhagia, Sewon Min Institutions: UC Berkeley, Allen Institute for AI Categories: cs.CL Resources:

Abstract

Large language models are typically deployed as monolithic systems, requiring the full model even when applications need only a narrow subset of capabilities (e.g., code, math, or domain-specific knowledge). While Mixture-of-Experts (MoEs) activate only a subset of experts per input, restricting inference to expert subsets for a given domain leads to severe performance degradation in practice. This paper introduces EMO, an MoE designed for modularity—the independent use and composition of expert subsets—without requiring human-defined priors. By encouraging tokens from similar domains to rely on similar experts through document-level expert pool constraints, EMO enables coherent expert groupings to emerge during pretraining. A 1B-active, 14B-total parameter EMO trained on 1T tokens matches standard MoE performance while enabling selective expert use: retaining only 25% (12.5%) of experts incurs just 1% (3%) absolute performance drop, whereas standard MoEs break under the same constraints.

Key Contributions

  • Emergent Modularity: Introduces a training approach where modular expert structure emerges from data without human-defined domain labels, using only document boundaries as grouping signals.

  • Document-Level Expert Pooling: Constrains all tokens within a document to select experts from a shared pool, encouraging domain-coherent expert specialization while allowing different documents to use different pools.

  • Practical Memory Efficiency: Enables deployment of only 25% of experts with just 1% performance drop, making large sparse MoEs viable in memory-constrained settings—a critical advantage as models grow larger and sparser.

  • Semantic-Level Specialization: Expert subsets specialize at semantic levels (domains like math, code, biomedical) rather than the low-level syntactic patterns (prepositions, punctuation) observed in standard MoEs.

  • Composable Architecture: Transforms a single model into a composable system where expert subsets can be independently used and combined, enabling flexible deployment and targeted updates.

Methodology

The Modularity Problem

Standard MoEs face a fundamental limitation:

  • Tokens within the same input activate different experts
  • Most or all experts are used over the course of a task
  • Experts specialize in low-level lexical patterns (e.g., prepositions, punctuation)
  • This prevents expert subsets from being usable independently
  • Memory-constrained deployment becomes impractical as models grow larger

EMO’s Key Insight

Core Intuition: Tokens from similar domains should activate similar subsets of experts.

Implementation: Since tokens within a document tend to share a domain, EMO restricts all tokens in a document to select their active experts from a shared pool.

Architecture Design

For an MoE with 128 total experts and 8 active experts per token:

  • Standard MoE: Each token independently selects 8 experts from all 128
  • EMO: All tokens in a document select their 8 active experts from a shared pool of 32 experts

Key properties:

  • Different documents may use different expert pools
  • No predefined task or domain labels required
  • Expert subsets emerge in a self-supervised way
  • Document boundaries provide the only grouping signal

Training Configuration

  • Model Size: 1B active parameters, 14B total parameters
  • Training Data: 1 trillion tokens
  • Expert Configuration: 128 total experts, 8 active per token
  • Pool Size: 32 experts per document (4x the active count)

Results

Performance with Expert Subsets

EMO enables dramatic memory reduction with minimal performance loss:

Expert RetentionEMO Performance DropStandard MoE Drop
100% (full model)0% (baseline)0% (baseline)
25% (32 experts)1% absolute10% absolute
12.5% (16 experts)3% absolute15% absolute

Full Model Performance

As a complete model, EMO matches standard MoE performance across benchmarks, demonstrating that modularity constraints do not sacrifice overall capability.

Domain-Specific Deployment

Across MMLU and MMLU-Pro domain subsets (math, physics, biology, social sciences):

  • Identifying and deploying only relevant experts preserves performance
  • Memory-accuracy tradeoff significantly improved over standard MoEs
  • Expert subsets outperform even fixed-budget models trained from scratch

Expert Specialization Analysis

EMO Expert Specialization:

  • Semantic-level: domains and topics (math, code, biomedical)
  • Higher-level conceptual patterns
  • Coherent groupings aligned with human-interpretable domains

Standard MoE Expert Specialization:

  • Syntactic-level: prepositions, punctuation, formatting
  • Lower-level lexical patterns
  • Fragmented across many experts for any given domain

This qualitative difference in specialization underlies EMO’s modularity and enables selective deployment.

Takeaways

  • Modularity as First-Class Objective: EMO demonstrates that modularity can be built into large language models during pretraining, not just as a post-hoc optimization but as a core architectural principle.

  • Memory-Constrained Deployment: The ability to deploy only 25% of experts with 1% performance loss has immediate practical implications for serving large sparse models in production, especially on edge devices or memory-limited environments.

  • Self-Supervised Domain Discovery: EMO’s approach of using document boundaries alone to induce modular structure is elegant and scalable—no manual domain labeling or task-specific engineering required.

  • Semantic vs Syntactic Specialization: The shift from syntactic to semantic expert specialization suggests a fundamentally different learning dynamic, with experts capturing higher-level abstractions rather than surface patterns.

  • Composable AI Systems: EMO opens a path toward more flexible AI architectures where capabilities can be independently updated, extended, or composed—imagine updating only the “code” experts without retraining the entire model.

  • Interpretability and Control: Semantic-level expert specialization makes models more interpretable and potentially easier to debug, regulate, or align with specific requirements.

  • Scaling Implications: As models grow larger and sparser (e.g., DeepSeek-V3 with hundreds of experts), EMO’s approach becomes increasingly valuable for managing memory bottlenecks while maintaining performance.

  • Beyond Monolithic Models: This work challenges the monolithic LLM paradigm and demonstrates a viable path toward modular, composable language models that can be tailored to specific deployment contexts.

论文: 2605.06663 作者: Ryan Wang, Akshita Bhagia, Sewon Min 机构: 加州大学伯克利分校, Allen人工智能研究所 分类: cs.CL 资源:

摘要

大型语言模型通常作为单体系统部署,即使应用程序只需要一小部分能力(例如代码、数学或特定领域知识),也需要完整模型。虽然混合专家(MoE)模型每个输入只激活专家子集,但在实践中,将推理限制在给定领域的专家子集会导致严重的性能下降。本文介绍了EMO,这是一种为模块化设计的MoE——专家子集的独立使用和组合——无需人工定义的先验知识。通过文档级专家池约束鼓励来自相似领域的token依赖相似的专家,EMO使连贯的专家分组在预训练期间涌现。在1T token上训练的1B活跃、14B总参数的EMO匹配标准MoE性能,同时支持选择性专家使用:仅保留25%(12.5%)的专家只会导致1%(3%)的绝对性能下降,而标准MoE在相同约束下会崩溃。

主要贡献

  • 涌现模块化:引入了一种训练方法,其中模块化专家结构从数据中涌现,无需人工定义的领域标签,仅使用文档边界作为分组信号。

  • 文档级专家池:约束文档内的所有token从共享池中选择专家,鼓励领域连贯的专家专门化,同时允许不同文档使用不同的池。

  • 实用的内存效率:仅部署25%的专家只有1%的性能下降,使大型稀疏MoE在内存受限的环境中可行——随着模型变得更大更稀疏,这是一个关键优势。

  • 语义级专门化:专家子集在语义级别(数学、代码、生物医学等领域)专门化,而不是标准MoE中观察到的低级句法模式(介词、标点符号)。

  • 可组合架构:将单个模型转变为可组合系统,其中专家子集可以独立使用和组合,实现灵活部署和针对性更新。

方法论

模块化问题

标准MoE面临根本性限制:

  • 同一输入中的token激活不同的专家
  • 在任务过程中使用大部分或所有专家
  • 专家专门化于低级词汇模式(例如介词、标点符号)
  • 这阻止了专家子集的独立使用
  • 随着模型变大,内存受限的部署变得不切实际

EMO的关键洞察

核心直觉:来自相似领域的token应该激活相似的专家子集。

实现:由于文档内的token往往共享一个领域,EMO限制文档中的所有token从共享池中选择其活跃专家。

架构设计

对于具有128个总专家和每个token 8个活跃专家的MoE:

  • 标准MoE:每个token独立从所有128个专家中选择8个
  • EMO:文档中的所有token从32个专家的共享池中选择其8个活跃专家

关键属性:

  • 不同文档可能使用不同的专家池
  • 不需要预定义的任务或领域标签
  • 专家子集以自监督方式涌现
  • 文档边界提供唯一的分组信号

训练配置

  • 模型大小:1B活跃参数,14B总参数
  • 训练数据:1万亿token
  • 专家配置:128个总专家,每个token 8个活跃
  • 池大小:每个文档32个专家(活跃数量的4倍)

实验结果

专家子集性能

EMO实现了显著的内存减少,性能损失最小:

专家保留率EMO性能下降标准MoE下降
100%(完整模型)0%(基线)0%(基线)
25%(32个专家)1%绝对值10%绝对值
12.5%(16个专家)3%绝对值15%绝对值

完整模型性能

作为完整模型,EMO在各个基准测试中匹配标准MoE性能,证明模块化约束不会牺牲整体能力。

特定领域部署

在MMLU和MMLU-Pro领域子集(数学、物理、生物、社会科学)中:

  • 识别和部署仅相关的专家保留了性能
  • 内存-准确性权衡显著优于标准MoE
  • 专家子集甚至优于从头训练的固定预算模型

专家专门化分析

EMO专家专门化

  • 语义级别:领域和主题(数学、代码、生物医学)
  • 更高级别的概念模式
  • 与人类可解释领域对齐的连贯分组

标准MoE专家专门化

  • 句法级别:介词、标点符号、格式
  • 更低级别的词汇模式
  • 对于任何给定领域在许多专家中碎片化

专门化的这种质的差异是EMO模块化的基础,并支持选择性部署。

要点总结

  • 模块化作为一等目标:EMO证明了模块化可以在预训练期间内置到大型语言模型中,不仅仅是事后优化,而是作为核心架构原则。

  • 内存受限部署:仅部署25%的专家而性能下降1%的能力对在生产中服务大型稀疏模型具有直接的实际意义,特别是在边缘设备或内存受限的环境中。

  • 自监督领域发现:EMO仅使用文档边界来诱导模块化结构的方法既优雅又可扩展——不需要手动领域标记或任务特定的工程。

  • 语义vs句法专门化:从句法到语义专家专门化的转变表明了根本不同的学习动态,专家捕获更高级别的抽象而不是表面模式。

  • 可组合AI系统:EMO开辟了一条通往更灵活AI架构的道路,其中能力可以独立更新、扩展或组合——想象一下仅更新”代码”专家而无需重新训练整个模型。

  • 可解释性和控制:语义级专家专门化使模型更具可解释性,并且可能更容易调试、监管或与特定要求对齐。

  • 扩展影响:随着模型变得更大更稀疏(例如,具有数百个专家的DeepSeek-V3),EMO的方法对于管理内存瓶颈同时保持性能变得越来越有价值。

  • 超越单体模型:这项工作挑战了单体LLM范式,并展示了通往模块化、可组合语言模型的可行路径,这些模型可以针对特定部署环境进行定制。