Manuscript Offprint

arXiv:2610.07809

MASKerade: Token-Routed Mask Experts for Dense-to-MoE Upcycling

Mingyuan Zhang, Yue Bai, Zhongruo Wang, Yupin Huang, Yiyang Huang, Hailing Wang, Huimin Zeng, Yun Fu

ABSTRACT

Sparsely activated Mixture-of-Experts (MoE) models increase model capacity without a proportional increase in per-token computation. Dense-to-MoE upcycling reuses pretrained dense models to construct such systems, commonly by copying feed-forward networks (FFNs) into independently trained experts. We introduce MASKerade, a dense-to-MoE training method that instead learns experts as sparse subnetworks of a frozen pretrained FFN. Each expert is defined by a learned binary mask, and a token-level router selects which masked FFNs to execute and combine. The router and mask scores are optimized jointly, while the underlying FFN weight values remain unchanged. This formulation supports neuron-structured, semi-structured, and unstructured experts within the same routing architecture. Our main configuration uses four 2:4 experts with top-2 routing, where two half-dense expert passes have the nominal FFN arithmetic of one dense pass, without requiring independent expert weight matrices. On five vision-language benchmarks with Qwen and Gemma backbones, this configuration achieves the highest performance among the compared baselines. Comparisons across mask granularities, routing interventions, and compute-matched controls distinguish the effects of learned connectivity from expert activation count. These results establish mask learning over frozen weights as a practical alternative for constructing token-routed MoE experts. Codes: https://github.com/Ming-K9/MASKerade.

1 INTRODUCTION

Mixture-of-Experts (MoE) models separate the number of available parameters from per-token computation (Jacobs et al., 1991). A sparsely gated layer selects a small subset of experts and combines their outputs, rather than evaluating every expert for every input (Shazeer et al., 2017; Fedus et al., 2022). Dense-to-MoE upcycling makes this approach accessible from existing pretrained models by converting selected feed-forward networks (FFNs) into routed expert layers, reusing the investment in dense pretraining (Komatsuzaki et al., 2023). This is particularly attractive for multimodal instruction tuning, where a single model must process heterogeneous visual and textual inputs (Lin et al., 2026; Chen et al., 2024a).

An important design decision in upcycling is what constitutes an expert. Replication-based approaches initialize multiple FFNs from the same dense FFN and then learn separate weight values. Some of them partially reinitialize these copies to encourage their differentiation (Nakamura et al., 2025). Other methods construct smaller experts by partitioning or pruning pretrained FFNs (Zhang et al., 2022; Zhu et al., 2024; Feng et al., 2025), or introduce expert-specific adapters and low-rank updates (Wu et al., 2024; Chen et al., 2024a).

We investigate a different parameterization: can experts be learned by selecting connections in a pretrained FFN? Learning a mask can change a network's function without changing its retained weights, as demonstrated by supermask learning and learnable LLM pruning (Ramanujan et al., 2020; Fang et al., 2024; Zhang et al., 2026; 2025). In an MoE, several such masks can coexist over the same weights. The router then chooses among alternative sparse computations. This replaces expert-specific weight adaptation with expert-specific connectivity learning.

We propose MASKerade, which jointly learns a bank of binary expert masks and a token-level router over a frozen FFN. For a given token, the router selects a small subset of masks, executes the corresponding masked FFNs, and combines their outputs using routing weights. Conceptually, this resembles a MASKerade (masquerade, with “qu” replaced by “k”) in which tokens enter the same shared FFN but wear different masks. MASKerade studies a specific combination that consists of direct masking of the frozen pretrained FFN weights, token-level sparse routing, and hard connectivity constraints. We evaluate MASKerade through multimodal instruction tuning of Qwen and Gemma backbones (Yang et al., 2025; Team et al., 2025). MASKerade attains the best performance against the external methods across five benchmarks. Our contributions are:

• We introduce MASKerade, a dense-to-MoE upcycling method that constructs experts as learned binary masks over frozen pretrained FFNs.

• MASKerade jointly optimizes expert masks and token routing under prescribed sparsity constraints, accommodating neuron-structured, semi-structured, and unstructured masks.

• Our experiments and analysis demonstrate that effective dense-to-MoE adaptation can be trained without updating the underlying pretrained FFN weights.

References (38)

  • Sparsellm: Towards global pruning of pre-trained language models
  • Estimating or propagating gradients through stochastic neurons for conditional computation, 2013
  • Llava-mole: Sparse mixture of lora experts for mitigating data conflicts in instruction finetuning mllms, 2024a
  • Unleashing the power of meta-tuning for few-shot generalization through sparse interpolated experts, 2024b
  • Automatic expert discovery in LLM upcycling via sparse interpolated mixture-of-experts
  • Maskllm: Learnable semi-structured sparsity for large language models
  • Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity, 2022
  • DIVE into MoE: Diversity-enhanced reconstruction of large language models from dense into mixture-of-experts
  • MME: A Comprehensive Evaluation Benchmark for Multimodal Large Language Models
  • Mixture-of-experts with gradient conflict-driven subspace topology pruning for emergent modularity, 2026
  • Tomoe: Converting dense large language models to mixture-of-experts through dynamic structural pruning
  • Gqa: A new dataset for real-world visual reasoning and compositional question answering
  • Adaptive mixtures of local experts
  • Sparse upcycling: Training mixture-of-experts from dense checkpoints
  • Visual genome: Connecting language and vision using crowdsourced dense image annotations, 2016
  • Evaluating object hallucination in large vision-language models
  • Moe-llava: Mixture of experts for large vision-language models
  • Microsoft coco: Common objects in context, 2015
  • Visual instruction tuning
  • Masks can be learned as an alternative to experts
  • Learn to explain: Multimodal reasoning via thought chains for science question answering
  • Ocr-vqa: Visual question answering by reading text in images
  • Drop-upcycling: Training sparse mixture of experts with partial re-initialization
  • Learning transferable visual models from natural language supervision, 2021
  • What's hidden in a randomly weighted neural network? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020
  • Outrageously large neural networks: The sparsely-gated mixture-of-experts layer, 2017
  • Towards vqa models that can read
  • Maskmoe: Boosting token-level learning via routing mask in mixture-of-experts, 2024
  • A simple and effective pruning approach for large language models, 2024
  • Parameter-efficient sparsity crafting from dense to mixture-of-experts for instruction tuning on general tasks
  • Qwen3 technical report, 2025
  • Rethinking fine-tuning: Unlocking hidden capabilities in vision-language models, 2025
  • Boosting large language models with mask fine-tuning, 2026
  • MoEfication: Transformer feed-forward layers are mixtures of experts
  • LLaMA-MoE: Building mixture-of-experts from LLaMA with continual pre-training
  • (a) 2:4 Jaccard overlap; (b)-(d) layer-wise sharing of retained connections, normalized by dense weight positions
  • The single-mask case bypasses routing, whereas multi-expert top-1 uses probability-weighted outputs
  • >Qwen3-1.7B</td></tr><tr><td>Argmax + Gumbel</td><td>61.97±0.27</td><td>1309.7±10.6</td><td>86.35±0.10</td><td>63.20±0.45</td><td>52.46±0.23</td></tr><tr><td>Deterministic top-2</td><td>62.00±0.28</td><td>1332.4±11.9</td><td>86.49±0.16</td><td>63.48±0.57</td><td>52.50±0.37</td></tr><tr><td colspan=