NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Building Variable-Sized Models via Learngene Pool

Boyu Shi, Shiyu Xia, Xu Yang, Haokun Chen, Zhiqiang Kou, Xin Geng

Abstract

Deploying deep learning models across diverse hardware—from low-power wearables to high-performance desktops—traditionally requires either manual per-device design or resource-heavy "stitchable" networks. We present the Learngene Pool, a framework that distills a single large ancestry model into a modular pool of "learngenes." These components can be stitched together to create models of arbitrary size, significantly reducing storage overhead by up to 60% and outperforming existing methods like Stitchable Neural Networks (SN-Net) in accuracy and efficiency.

Introduction

Deep learning is increasingly constrained by hardware diversity. A model optimized for a high-end GPU is often unusable on a smartwatch due to memory and battery limitations. Previous attempts to solve this, such as Stitchable Neural Networks (SN-Net), suffer from significant storage bloat because they require multiple large "anchor" models. Furthermore, SN-Net struggles to produce models smaller than its smallest anchor and relies on suboptimal initialization for its connection layers.

The Learngene Pool addresses these challenges by treating neural network blocks as modular units of knowledge—"learngenes"—that can be condensed from a single ancestry model and later expanded or combined into various descendant models.

Comparison of model building strategies: (a) Training from scratch, (b) SN-Net, (c) Learngene, and (d) the proposed Learngene Pool.

Methodology

The Learngene Pool framework utilizes a "distill-and-stitch" pipeline to create a versatile library of model components.

1. Ancestry Distillation and Auxiliary Model Design

The process begins with a large, pre-trained ancestry model (e.g., DeiT-Base). This model is distilled into multiple auxiliary models of varying depths and widths. Design involves reducing the number of blocks and lowering output dimensions to create a spectrum of resource-efficient versions.

2. Dense Distillation

To ensure high-quality feature extraction in smaller models, the framework employs "Dense Distillation." Rather than matching only the final output, intermediate blocks in the auxiliary models are trained to mimic corresponding levels (low, middle, high) of the ancestry model.

3. Pool Construction and Stitching

Each block from the auxiliary models is stored as a "learngene instance" in a centralized pool. To build a new descendant model, specific instances are selected and connected via Stitch Layers. Unlike previous methods that use unlearned initialization, Learngene Pool initializes these layers using Transformation Matrices (TM) learned during the distillation phase, providing a superior starting point for final performance.

The Learngene Pool pipeline: (a) Design of auxiliary models, (b) Dense distillation process, and (c) Stitching instances from the pool.

Experimental Results

The framework was evaluated on the ImageNet-1K dataset using the Data-efficient Image Transformer (DeiT) architecture family.

  • Superior Accuracy: At a parameter count of approximately 44M, the Learngene Pool achieved 75.05% accuracy, a significant improvement over SN-Net's 67.98%.
  • Storage Efficiency: By deriving all components from a single ancestry model, the system reduces storage requirements by 40.1% to 59.6% compared to the multi-anchor approach of SN-Net.
  • Extended Scalability: The pool allows for the creation of ultra-small models (as low as 3.05M parameters), breaking the "floor" problem where previous methods failed to produce functional models for low-resource devices.
  • Reduced Training Cost: The method accelerates the deployment of variable-sized models by 6.75x to 10.13x compared to training each size from scratch.

Conclusion

The Learngene Pool offers a scalable and efficient solution for cross-platform model deployment. By leveraging modular distillation and learned stitch layer initialization, it overcomes the storage and performance limitations of prior stitchable architectures. Future work will explore the application of this framework to other architectures like CNNs and Large Language Models (LLMs), as well as automating the pool selection process through neural architecture search.

Summary updated

BibTeX
@inproceedings{shi2024building,
  author = {Boyu Shi and Shiyu Xia and Xu Yang and Haokun Chen and Zhiqiang Kou and Xin Geng},
  title = {{Building Variable-Sized Models via Learngene Pool}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i13.29415},
}
Figure