将卷积神经网络分解为可重用和可替换的模块
Decomposing Convolutional Neural Networks into Reusable and Replaceable Modules
摘要:
从头开始训练是构建基于卷积神经网络(CNN)的模型的最常见方法。如果我们可以通过重用以前构建的CNN模型的部分来构建新的CNN模型,那会怎么样?如果我们可以通过用其他部分替换(可能有故障的)部分来改进CNN模型,会怎么样?在这两种情况下,我们是否可以识别负责模型中每个输出类(模块)的部分,并重用或仅替换所需的输出类来构建模型?之前的工作提出了将密集网络分解为模块(每个输出类一个),以实现各种场景中的可重用性和可替换性。然而,这项工作仅限于密集层,并且基于连续层中节点之间的一对一关系。由于CNN模型中的共享架构,先前的工作不能直接适应。在本文中,我们建议将用于图像分类问题的CNN模型分解为每个输出类的模块。这些模块可以进一步重复使用或替换以构建新模型。我们使用CIFAR-10、CIFAR-100和ImageNet小数据集以及三种ResNet模型对我们的方法进行了评估,发现启用分解的成本很小(前1和前5的准确率分别为1.77%和0.85%)。此外,通过重用或替换模块来构建模型的平均精度损失为2.3%和0.5%。此外,与从头开始训练模型相比,重复使用和替换这些模块可将二氧化碳排放量减少约37倍。
英文摘要:
Training from scratch is the most common way to build a Convolutional Neural Network (CNN) based model. What if we can build new CNN models by reusing parts from previously build CNN models? What if we can improve a CNN model by replacing (possibly faulty) parts with other parts? In both cases, instead of training, can we identify the part responsible for each output class (module) in the model(s) and reuse or replace only the desired output classes to build a model? Prior work has proposed decomposing dense-based networks into modules (one for each output class) to enable reusability and replaceability in various scenarios. However, this work is limited to the dense layers and based on the one-to-one relationship between the nodes in consecutive layers. Due to the shared architecture in the CNN model, prior work cannot be adapted directly. In this paper, we propose to decompose a CNN model used for image classification problems into modules for each output class. These modules can further be reused or replaced to build a new model. We have evaluated our approach with CIFAR-10, CIFAR-100, and ImageNet tiny datasets with three variations of ResNet models and found that enabling decomposition comes with a small cost (1.77% and 0.85% for top-1 and top-5 accuracy, respectively). Also, building a model by reusing or replacing modules can be done with a 2.3% and 0.5% average loss of accuracy. Furthermore, reusing and replacing these modules reduces CO2e emission by ~37 times compared to training the model from scratch.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。