FastMMoE: Accelerating Multimodal LLMs via Dynamic Expert Activation & Routing-Aware Token Pruning

1. 研究背景 (Background)

MoE-based Multimodal LLM(如 InternVL3.5、DeepSeek-VL2)在性能上已达到 SOTA,但存在两个关键瓶颈:

  • 高分辨率图像 → 大量视觉 tokens → 推理开销巨大
  • MoE结构虽然理论上稀疏,但视觉 token 仍触发较多 expert → 未充分利用稀疏性

已有方法(FastV / SparseVLM)主要针对 dense MLLM,仅基于 attention 进行 token pruning,忽略 MoE routing 信息

MoE 架构基础

在 MoE(Mixture-of-Experts)大模型中,每个 MoE 层由 个专家(Expert FFN)组成,配备一个路由器(Router)。对于输入 token ,路由器输出各专家的概率分布,并按 Top- 选择激活的专家:

其中 ,即每个 token 只激活少数专家,这赋予 MoE 稀疏计算的优势。

MoE的routing行为:

在 MoE 里,每个 token 进入某一层时,并不是所有 FFN/expert 都参与计算。
模型里有一个 router / gate,会给这个 token 计算一组分数或概率,表示:

  • 这个 token 更适合交给哪些 experts 处理
  • 每个 expert 应该分到多大权重

通常最后只选 top-k experts 来真正计算。

routing 本质上就是:

“token → 哪些 experts → 以多大权重处理” 的分配过程。

InternVL3.5

“dynamic cropping strategy that splits a high-resolution image into multiple sub-images while also processing a downsampled global thumbnail”  动态裁剪策略,将高分辨率图像分割成多个子图像,同时处理下采样的全局缩略图

Key Oberservations

  1. “experts with lower activation weights tend to carry more redundant information”  激活权重较低的专家往往携带更多冗余信息

  2. “visual modality expert outputs exhibit norm concentration, meaning that after re-normalizing outputs following expert reduction, vector norm changes remain small.”  视觉模态专家输出表现出范数集中性,这意味着在专家缩减后重新标准化输出后,矢量范数变化仍然很小。

  3. “Tokens that activate the same experts tend to be more semantically similar”  激活相同专家的令牌往往在语义上更加相似

  4. 在shallow层连续视觉tokens的routing概率分布cosine相似度超过95%

观察4.motivates一种基于窗口的视觉标记修剪的分组和融合策略

研究意义:
探索 MoE结构 + token冗余联合优化,实现真正面向 MoE-VLM 的高效推理。


2. 拟解决的问题 (Problem)

目标:在training-free 或 minimal modification条件下:

  • 降低视觉 token 带来的计算开销
  • 采取sparser的专家激活(减少 MoE expert activation)
  • 同时保持模型性能

核心难点:

  1. token pruning 过强 → 破坏细粒度视觉理解(OCR / reasoning)
  2. MoE结构复杂:
    • 每个 token → routing → 多个 experts
    • token冗余 ≠ expert冗余
  3. 如何同时利用:
    • token-level redundancy
    • expert activation redundancy

贡献 (Contributions)

(1) Dynamic Expert Activation Reduction

  • 首次系统分析:视觉 token 的 expert activation 可大幅减少
  • 提出仅对 vision tokens 做 top-k expert selection

(2) Routing-aware Token Pruning

  • 不再只依赖 attention
  • 引入 routing probability similarity
  • 定义 token redundancy:

    高 routing 相似 + 低 attention → 可剪

(3) MoE-VLM专用加速框架

  • 同时优化:
    • token 数量
    • expert 激活数量
  • 达到:
    • 最高 55% FLOPs reduction
    • ≈95% 性能保持

3. Method一:Expert Activation Reduction

3.1 核心思想

标准 MoE 对所有 token 统一使用 Top- 选择。FastMMoE 提出:从某一指定层 开始,对视觉 token 将激活专家数从 降低至 ),而文本 token 保持不变。

其中 专家保留比例(expert retention ratio),为可调超参数。

3.2 稀疏化策略

对于视觉 token ,在第 层,重新定义激活专家集合为:

此时 MoE 层计算变为:

其中 是在 Top- 集合上重新归一化的路由概率:

3.3 起始层选择

作者发现浅层的路由选择对模型输出影响更大,因此推荐从中层开始施加激活缩减(即 为总层数),在靠前的层保留完整的 Top- 激活以维持语义质量。

3.4 计算节省分析

设原本每个视觉 token 激活 个专家,每个专家 FFN 的计算量为 ,减少后每个 token 节省:

对于 个视觉 token 和 个受影响层,总节省为:


Mothod2. Routing-Aware Token Pruning

4.1 核心思想

若两个视觉 token 的路由概率分布高度相似,说明它们在 MoE 层中被相似的专家以相似的权重处理,因此携带近似冗余的信息,可以将其中一个安全剪枝。

4.2 路由相似度度量

对于第 层中的两个视觉 token ,其路由概率向量分别为 ,定义路由相似度分数为对称 KL 散度的负值(值越大越相似):

或等价地使用余弦相似度:

4.3 滑动窗口剪枝(Sliding-Window Pruning)

为避免全局两两比较带来的 复杂度,FastMMoE 采用滑动窗口策略:在长度为 的局部窗口内评估相邻 token 之间的路由相似度。

对每个窗口 ,计算窗口内每对相邻 token 的相似度,并对相似度最高的 token 打上冗余标记。

4.4 注意力引导(Attention Guidance)

仅凭路由相似度可能剪掉语义上重要但恰好路由相似的 token。为此,FastMMoE 引入注意力分数作为补充信号,对每个视觉 token 计算其被文本 token 关注的聚合注意力分数:

其中 为文本 token 集合。综合冗余分数定义为:

  • :token 在滑动窗口内与邻居的平均路由相似度(越高表示越冗余)
  • :归一化后的注意力分数(越高表示越重要)
  • :平衡两者的超参数

对所有视觉 token 按 降序排列,剪掉得分最高的 个 token,保留比例为

4.5 剪枝时机

Token 剪枝在特定层 执行一次(通常在浅到中间层),之后的所有层只处理剩余的 个视觉 token,从而在剩余层中获得持续的计算加速:


5. 实验 (Experiments)

模型

  • InternVL3.5
  • DeepSeek-VL2

Benchmark

  • MMMU
  • MMBench
  • SQA
  • OCRBench
  • AI2D
  • HallusionBench

核心结果

(1) FLOPs vs Accuracy

  • 75% token + expert reduction:
    • FLOPs ↓ 44.65%
    • Accuracy ≈ 原模型

(2) 最大压缩

  • FLOPs ↓ 55%
  • Performance ≈ 95.5%

关键分析

(1) Expert Activation

  • 减半 vision expert → 性能 ≈ 99%
  • ⇒ 存在大量 expert 冗余

(2) Shared Experts

  • 剪 shared experts → OCR性能大幅下降 结论:
  • shared experts = 通用能力核心
  • routed experts = 可压缩部分

6. Key Insights

Insight 1:Token pruning 应该 routing-aware

  • 不要只用 attention
  • routing similarity 是关键信号

Insight 2:Vision token 更适合剪枝

  • expert activation 冗余更高
  • 更安全

Insight 3:Expert 不同角色要区分

  • shared expert → 保留
  • routed expert → 优先剪

Insight 4:Token pruning ≈ Expert pruning 的 proxy

  • 相似 routing → 相似 expert usage
  • ⇒ 可以联合优化

7. 一句话总结

FastMMoE 的核心贡献是:

把 token pruning 从 attention-only 推进到 routing-aware,从而真正适配 MoE-VLM。