Systematic Exploration of 4-Expert Heterogeneous Mixture-of-Experts via Automated Pipeline Search

Yashkumar R Lukhi, Harsh Rameshbhai Moradiya, Radu Timofte, Dmitry IgnatovarXiv 2026

TL;DR

This paper introduces an automated pipeline to systematically construct and evaluate heterogeneous 4-Expert Mixture-of-Experts (MoE4) models from 29 distinct architecture families. Over a 28-day campaign, the pipeline successfully evaluated 1,021 models, but uncovered a critical "itertools trap"—a severe search space coverage bias caused by deterministic alphabetical sorting that anchored every single evaluated model to the AirNet family.

What Problem Does This Paper Address?

Mixture-of-Experts (MoE) architectures typically scale model capacity by routing inputs to specialized sub-networks (experts). While most MoE research uses homogeneous experts (clones of the same architecture with different weights), combining heterogeneous experts—mixing entirely different architectural families like ResNet, MobileNet, and Transformers—can introduce complementary inductive biases.

However, designing these heterogeneous networks manually is impossible at scale. With 29 base model families available in the LEMUR neural network dataset, there are $\binom{29}{4} = 23,751$ possible 4-expert combinations. This paper addresses the challenge of automating the generation, validation, and training of these combinatorially massive heterogeneous MoE spaces without relying on expensive Large Language Model (LLM) calls in the loop.

Methods

The authors developed an open-source automated framework consisting of three main components:

  1. Deterministic Code-Assembly Generator (AlterHeteroMoE4.py): Instead of using an LLM to generate code, this script programmatically fetches expert source code from the LEMUR database, sanitizes class names, merges dependencies, and wraps them into a unified PyTorch model governed by a convolutional gating network (HeterogeneousGate).
  2. Multi-Stage Validation Pipeline: To avoid wasting expensive GPU time, candidates must pass three strict gates: a Python syntax check, a CPU forward-pass probe at full training resolution ($256 \times 256$) to catch dimension mismatches, and an MD5 checksum deduplication check against the database.
  3. Fault-Tolerant Campaign Automation (CampaignMoE4.py): Orchestrates the generate-evaluate loop in batches, persisting state to JSON to allow seamless resumes after SSH disconnects or system crashes.

Datasets

The pipeline draws its expert pool from the LEMUR neural network dataset, a curated repository of trained models used for AutoML benchmarking. All generated MoE4 models were trained and evaluated on CIFAR-10, preprocessed and upscaled to $256 \times 256$ pixels to match the default evaluation transform of the base ecosystem.

Key Insights and Ideas

  • The itertools Trap: The most striking finding wasn't architectural, but algorithmic. The generator used itertools.combinations(sorted(model_names), 4) to explore the search space. Because it sorted alphabetically, the generator evaluated 1,146 combinations—all of which were anchored to AirNet, the very first family alphabetically. This left 95.2% of the theoretical search space completely untouched. The authors note this is a critical cautionary tale for any large-scale Neural Architecture Search (NAS) using deterministic iteration with an early stop condition.
Table 2. Search space coverage statistics.
  • High Success Rate $\neq$ High Accuracy: Some lightweight families like SqueezeNet boasted a 96.8% training success rate but yielded mediocre accuracy (0.514). Conversely, ResNet maintained the same high success rate while delivering significantly better accuracy (0.578), making it a superior default choice.
  • Architectural Dead Ends: FractalNet proved to be a practical failure, achieving a success rate of just 0.7% due to recursive architecture complexities that triggered frequent Out-Of-Memory (OOM) errors and shape mismatches. MNASNet also acted as a consistent accuracy degrader, likely because its latency-optimized design doesn't contribute useful features to a multi-expert ensemble.

Key Results

The 28-day campaign on a single NVIDIA RTX 4090 yielded the following results:

  • Campaign Throughput: Generated 4,463 candidate models, successfully evaluating 1,021 of them.
  • The OOM Bottleneck: Out of 3,429 failures, 99.7% were due to CUDA Out-of-Memory errors, highlighting the massive memory footprint of training four distinct full-scale networks simultaneously at $256 \times 256$ resolution.
Table 1. MoE4 campaign summary statistics.
  • Top Performer: Despite being trained for only a single epoch to maximize pipeline throughput, the best model—AirNet + AlexNet + DPN68 + ResNet—achieved an impressive 68.0% Top-1 accuracy on CIFAR-10.
  • Synergistic Experts: ShuffleNet and MobileNetV3 emerged as the strongest co-experts within the AirNet-anchored scope, consistently producing the highest-accuracy ensembles (mean accuracies of 0.632 and 0.621, respectively).
Figure 2. Mean and median accuracy per expert family in success- ful MoE4 models (families with ≥40 appearances; bars = mean, diamonds = median, whiskers = ±1 SD).

Limitations and Future Work

The primary limitation of this study is its conditioning: due to the alphabetical coverage bias, every single successful model included AirNet. Therefore, family-level performance claims cannot be fully decoupled from AirNet's presence. Additionally, models were only screened for a single training epoch.

Future work will deploy the authors' proposed fix—shuffling the combination list before iteration—to run an unbiased campaign across the remaining 95.2% of the search space. The authors also plan to implement memory-aware pre-filtering and adaptive pooling layers to mitigate the dominant CUDA OOM failure mode.

Summary updated

Abstract

We present an automated large-scale search pipeline for heterogeneous 4-Expert Mixture-of-Experts (MoE4) architectures within the LEMUR neural network dataset ecosystem. Building on a hand-crafted heterogeneous MoE reference model, we replace manual design with a deterministic code-assembly generator that systematically combines base architecture families drawn from the LEMUR database into MoE4 ensembles, each governed by a convolutional gating network with temperature scaling, mixup augmentation, and cosine-annealed learning rate scheduling. Over a 28-day campaign on an NVIDIA RTX 4090, the pipeline generated 4,463 candidate models across 197 batches, of which 1,021 were evaluated successfully. A critical finding emerged from the campaign: due to alphabetical enumeration via itertools.combinations, the entire explored search space (4.8% of the theoretical 23,751 possible 4-family combinations) is anchored to a single family, AirNet. We characterise this coverage bias precisely, identify the root cause in the generator, and propose a stratified random sampling fix. Within the AirNet anchored scope, ShuffleNet and MobileNetV3 consistently co-produce the highest-accuracy ensembles (mean accuracy up to 0.632), while FractalNet and MNASNet are identified as low-yield families warranting exclusion in future campaigns. The pipeline, analysis artefacts, and corrected generator are released as part of the open-source NNGPT project at https://github.com/ABrain-One/nn-gpt

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
LEMUR · 4-family search space (29 architecture familiesSorted deterministic MoE4 searchSearch space coverage4.8%anchor=AirNet · search_space=29 architecture families · combinations_attempted=1146 · theoretical_combinations=23751
Source quote
L409: Search space coverage │ 4.8%
CIFAR-10AirNet + AlexNet + DPN68 + ResNet MoE4Top-1 accuracy0.6801epochs=1 · ensemble=AirNet + AlexNet + DPN68 + ResNet · search_scope=AirNet-anchored
Source quote
L475: 0.6801 │ AirNet + AlexNet + DPN68 + ResNet
CIFAR-10ShuffleNet-containing MoE4 ensemblesMean accuracy0.632epochs=1 · search_scope=AirNet-anchored · ensemble_component=ShuffleNet
Source quote
L513: ShuffleNet │ 0.632 │ 96.7% │ 92
CIFAR-10MobileNetV3-containing MoE4 ensemblesMean accuracy0.621epochs=1 · search_scope=AirNet-anchored · ensemble_component=MobileNetV3
Source quote
L514: MobileNetV3 │ 0.621 │ 96.4% │ 84
CIFAR-10MNASNet-containing MoE4 ensemblesMean accuracy0.218epochs=1 · search_scope=AirNet-anchored · ensemble_component=MNASNet
Source quote
L522: MNASNet │ 0.218 │ 70.1% │ 134
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10 · MoE4 campaignFractalNet baselineTraining success rate0.7%resolution=256×256 · architecture=FractalNet · search_scope=AirNet-anchored
Source quote
L542: of only 0.7% (23 successful evaluations).
BibTeX
@misc{lukhi2026systematic,
  author = {Yashkumar R Lukhi and Harsh Rameshbhai Moradiya and Radu Timofte and Dmitry Ignatov},
  title = {{Systematic Exploration of 4-Expert Heterogeneous Mixture-of-Experts via Automated Pipeline Search}},
  year = {2026},
  eprint = {2606.23739},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.23739},
}
Figure