arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.19490cs.CV
收藏

通过可学习智能体引导与对齐联合训练和剪枝卷积神经网络

Jointly Training and Pruning CNNs via Learnable Agent Guidance and Alignment

University of Maryland College Park(马里兰大学帕克分校);University of Pittsburgh(匹兹堡大学)

Alireza Ganjdanesh, Shangqian Gao, Heng Huang

AI总结:

本文提出一种基于强化学习智能体的CNN结构化剪枝方法,通过联合训练权重与剪枝策略,并利用可学习环境表示应对动态奖励,在CIFAR-10和ImageNet上验证了其有效性。

摘要:

结构化模型剪枝是一种在资源受限设备上部署卷积神经网络(CNN)之前降低其计算成本的重要方法。然而,大多数已有方案在剪枝之前需要一个预训练模型,而获取这样的预训练模型成本高昂。本文提出了一种新颖的结构化剪枝方法,用于联合学习CNN模型的权重并对其架构进行结构化剪枝。该方法的核心是一个强化学习(RL)智能体,其动作决定CNN模型各层的剪枝比例,所得模型的准确率作为其奖励。我们通过迭代训练模型权重和智能体策略来进行联合训练与剪枝,并对模型权重进行正则化,使其与智能体选择的结构保持一致。模型权重的不断演化导致智能体的奖励函数具有动态性,这阻碍了将具有平稳环境假设的主流回合制强化学习方法用于我们的目标。为应对这一挑战,我们设计了一种机制来建模奖励函数复杂的变化动态,并将其表示提供给RL智能体。为此,我们为每个训练轮次引入可学习嵌入,并使用循环模型来计算变化环境的表示。我们利用解码器模型通过重构观测到的奖励来训练循环模型和嵌入。这种设计使我们的智能体能够有效利用回合制观测以及环境表示,学习合适的策略来确定CNN模型中性能良好的子网络。我们在CIFAR-10和ImageNet上使用ResNet和MobileNet进行的大量实验证明了该方法的有效性。

英文摘要:

Structural model pruning is a prominent approach used for reducing the computational cost of Convolutional Neural Networks (CNNs) before their deployment on resource-constrained devices. Yet, the majority of proposed ideas require a pretrained model before pruning, which is costly to secure. In this paper, we propose a novel structural pruning approach to jointly learn the weights and structurally prune architectures of CNN models. The core element of our method is a Reinforcement Learning (RL) agent whose actions determine the pruning ratios of the CNN model's layers, and the resulting model's accuracy serves as its reward. We conduct the joint training and pruning by iteratively training the model's weights and the agent's policy, and we regularize the model's weights to align with the selected structure by the agent. The evolving model's weights result in a dynamic reward function for the agent, which prevents using prominent episodic RL methods with stationary environment assumption for our purpose. We address this challenge by designing a mechanism to model the complex changing dynamics of the reward function and provide a representation of it to the RL agent. To do so, we take a learnable embedding for each training epoch and employ a recurrent model to calculate a representation of the changing environment. We train the recurrent model and embeddings using a decoder model to reconstruct observed rewards. Such a design empowers our agent to effectively leverage episodic observations along with the environment representations to learn a proper policy to determine performant sub-networks of the CNN model. Our extensive experiments on CIFAR-10 and ImageNet using ResNets and MobileNets demonstrate the effectiveness of our method.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑