PTMO: Enable Neural Network for Elastic Matryoshka Inference at Low-Cost
Elastic Matryoshka inference allows a single deep neural network to activate subnetworks of different widths in a nested manner to accommodate varying serving budgets. However, constructing such nested networks typically requires costly specialized training. We introduce Post-Training Matryoshka Optimization (PTMO), a framework that reparameterizes pretrained neural networks into Matryoshka-friendly representations without additional training. PTMO comprises three dedicated algorithmic components: (i) identifying and partitioning the network variables into groups that admit function-preserving permutations or orthogonal transformations (MPIGs); (ii) applying composed importance-based transformation to MPIGs; and (iii) allocating heterogeneous widths across MPIGs via budget orchestration to construct nested subnetworks for multiple serving budgets. PTMO supports two complementary use cases. When the resulting subnetworks have meet the desired quality targets, they can be used directly for nested-width inference. When further adaptation is needed, PTMO provides a favorable initialization to accelerate the convergence of Matryoshka-aware training (MAT). Evaluations of convolutional…
- arXiv
- 2612.05351
- Authors
- Tianyi Chen, Christina Huang, Jiachen Sun, Anil Ramakrishna, Daqi Sun and 16 more
- Categories
- cs.AI