[论文解读] Do We Need Fully Connected Output Layers in Convolutional Networks?
本文提出通过直接使用全局平均池化从最终卷积特征图计算分类得分,从而消除卷积神经网络中的全连接输出层。该方法在ImageNet-1K、CIFAR-100、Stanford Cars-196和Oxford Flowers-102数据集上实现了与标准模型相当的准确率,同时将参数量减少高达75%,证明了学习得到的全连接层在分类任务中既低效又非必要。
Traditionally, deep convolutional neural networks consist of a series of convolutional and pooling layers followed by one or more fully connected (FC) layers to perform the final classification. While this design has been successful, for datasets with a large number of categories, the fully connected layers often account for a large percentage of the network's parameters. For applications with memory constraints, such as mobile devices and embedded platforms, this is not ideal. Recently, a family of architectures that involve replacing the learned fully connected output layer with a fixed layer has been proposed as a way to achieve better efficiency. In this paper we examine this idea further and demonstrate that fixed classifiers offer no additional benefit compared to simply removing the output layer along with its parameters. We further demonstrate that the typical approach of having a fully connected final output layer is inefficient in terms of parameter count. We are able to achieve comparable performance to a traditionally learned fully connected classification output layer on the ImageNet-1K, CIFAR-100, Stanford Cars-196, and Oxford Flowers-102 datasets, while not having a fully connected output layer at all.
研究动机与目标
- 探究在现代CNN中进行图像分类时,全连接输出层是否为必要组件。
- 减少模型参数量与内存占用,尤其适用于移动设备与嵌入式应用。
- 评估固定分类器层与完全移除输出层方法的有效性。
- 确定从最终卷积层提取的全局平均池化是否可在不损失性能的前提下替代学习得到的全连接层。
- 为大规模分类任务提出一种更简单、参数更高效的替代固定分类器方法。
提出的方法
- 用应用于最终卷积特征图的全局平均池化替代最终的全连接层。
- 使用标准反向传播算法端到端训练网络,直接对最终卷积层进行分类优化。
- 使用固定的单位矩阵作为分类器,从而消除输出层中可学习权重的需求。
- 在全局平均池化后的特征上应用标准训练协议与交叉熵损失。
- 将性能与参数量与采用学习全连接层的模型及固定分类器基线模型进行对比。
- 在多个数据集(ImageNet-1K、CIFAR-100、Stanford Cars-196、Oxford Flowers-102)和架构(MobileNet-v2、ShuffleNet-v2等)上进行评估。
实验结果
研究问题
- RQ1在大规模图像数据集上,移除全连接输出层是否会降低分类性能?
- RQ2从最终卷积层提取的全局平均池化能否实现与学习全连接层相当的性能?
- RQ3在参数效率方面,采用学习全连接层的模型、固定分类器层的模型与完全无输出层的模型之间有何差异?
- RQ4为何固定分类器方法无法超越完全移除输出层的所提方法?
- RQ5最终分类器层对整体模型准确率的贡献有多大?
主要发现
- 所提方法在ImageNet-1K、CIFAR-100、Stanford Cars-196和Oxford Flowers-102上实现了与标准模型相当的top-1准确率,且未使用全连接层。
- 在ShuffleNet-v2 x0.5中,参数量减少高达75%(从130万降至30万),ImageNet-1K准确率仅出现小幅下降。
- 在ImageNet-100上,该方法未出现性能下降,表明在ImageNet-1K上准确率的下降源于模型规模,而非缺少分类器层。
- 固定分类器方法(包括使用Hadamard或单纯形基矩阵的方法)均被简单移除输出层的方法所超越。
- 尽管全连接层占用了大量参数(尤其在MobileNet-v2中占37%),但其对分类准确率的贡献却微乎其微。
- 该方法受限于数据集类别数不得超过最终卷积层通道数,但此限制与固定分类器基线方法相同。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。