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:
- 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). - 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.
- 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
itertoolsTrap: The most striking finding wasn't architectural, but algorithmic. The generator useditertools.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 toAirNet, 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.
- High Success Rate $\neq$ High Accuracy: Some lightweight families like
SqueezeNetboasted a 96.8% training success rate but yielded mediocre accuracy (0.514). Conversely,ResNetmaintained the same high success rate while delivering significantly better accuracy (0.578), making it a superior default choice. - Architectural Dead Ends:
FractalNetproved 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.MNASNetalso 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.
- 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:
ShuffleNetandMobileNetV3emerged 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).
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