Saved in:
Bibliographic Details
Main Authors: Bi, Xiaohan, Qi, Binhang, Sun, Hailong, Gao, Xiang, Yu, Yue, Liang, Xiaojun
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2508.11348
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909737655730176
author Bi, Xiaohan
Qi, Binhang
Sun, Hailong
Gao, Xiang
Yu, Yue
Liang, Xiaojun
author_facet Bi, Xiaohan
Qi, Binhang
Sun, Hailong
Gao, Xiang
Yu, Yue
Liang, Xiaojun
contents With the growing incorporation of deep neural network (DNN) models into modern software systems, the prohibitive construction costs have become a significant challenge. Model reuse has been widely applied to reduce training costs, but indiscriminately reusing entire models may incur significant inference overhead. Consequently, DNN modularization has gained attention, enabling module reuse by decomposing DNN models. The emerging modularizing-while-training (MwT) paradigm, which incorporates modularization into training, outperforms modularizing-after-training approaches. However, existing MwT methods focus on small-scale CNN models at the convolutional kernel level and struggle with diverse DNNs and large-scale models, particularly Transformer-based models. To address these limitations, we propose NeMo, a scalable and generalizable MwT approach. NeMo operates at the neuron level fundamental component common to all DNNs-ensuring applicability to Transformers and various architectures. We design a contrastive learning-based modular training method with an effective composite loss function, enabling scalability to large-scale models. Comprehensive experiments on two Transformer-based models and four CNN models across two classification datasets demonstrate NeMo's superiority over state-of-the-art MwT methods. Results show average gains of 1.72% in module classification accuracy and 58.10% reduction in module size, demonstrating efficacy across both CNN and large-scale Transformer-based models. A case study on open-source projects shows NeMo's potential benefits in practical scenarios, offering a promising approach for scalable and generalizable DNN modularization.
format Preprint
id arxiv_https___arxiv_org_abs_2508_11348
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle NeMo: A Neuron-Level Modularizing-While-Training Approach for Decomposing DNN Models
Bi, Xiaohan
Qi, Binhang
Sun, Hailong
Gao, Xiang
Yu, Yue
Liang, Xiaojun
Machine Learning
Artificial Intelligence
With the growing incorporation of deep neural network (DNN) models into modern software systems, the prohibitive construction costs have become a significant challenge. Model reuse has been widely applied to reduce training costs, but indiscriminately reusing entire models may incur significant inference overhead. Consequently, DNN modularization has gained attention, enabling module reuse by decomposing DNN models. The emerging modularizing-while-training (MwT) paradigm, which incorporates modularization into training, outperforms modularizing-after-training approaches. However, existing MwT methods focus on small-scale CNN models at the convolutional kernel level and struggle with diverse DNNs and large-scale models, particularly Transformer-based models. To address these limitations, we propose NeMo, a scalable and generalizable MwT approach. NeMo operates at the neuron level fundamental component common to all DNNs-ensuring applicability to Transformers and various architectures. We design a contrastive learning-based modular training method with an effective composite loss function, enabling scalability to large-scale models. Comprehensive experiments on two Transformer-based models and four CNN models across two classification datasets demonstrate NeMo's superiority over state-of-the-art MwT methods. Results show average gains of 1.72% in module classification accuracy and 58.10% reduction in module size, demonstrating efficacy across both CNN and large-scale Transformer-based models. A case study on open-source projects shows NeMo's potential benefits in practical scenarios, offering a promising approach for scalable and generalizable DNN modularization.
title NeMo: A Neuron-Level Modularizing-While-Training Approach for Decomposing DNN Models
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2508.11348