发表在2017 CVPR。

摘要

Recent work has shown that convolutional networks can be substantially deeper, more accurate, and efficient to train if they contain shorter connections between layers close to the input and those close to the output. In this paper, we embrace this observation and introduce the Dense Convolutional Network (DenseNet), which connects each layer to every other layer in a feed-forward fashion. Whereas traditional convolutional networks with L layers have L connections—one between each layer and its subsequent layer—our network has \(\frac{L(L+1)}{2}\) direct connections. For each layer, the feature-maps of all preceding layers are used as inputs, and its own feature-maps are used as inputs into all subsequent layers. DenseNets have several compelling advantages: they alleviate the vanishing-gradient problem, strengthen feature propagation, encourage feature reuse, and substantially reduce the number of parameters. We evaluate our proposed architecture on four highly competitive object recognition benchmark tasks (CIFAR-10, CIFAR-100, SVHN, and ImageNet). DenseNets obtain significant improvements over the state-of-the-art on most of them, whilst requiring less computation to achieve high performance. Code and pre-trained models are available at https://github.com/liuzhuang13/DenseNet.

结论

We proposed a new convolutional network architecture, which we refer to as Dense Convolutional Network (DenseNet). It introduces direct connections between any two layers with the same feature-map size. We showed that DenseNets scale naturally to hundreds of layers, while exhibiting no optimization difficulties. In our experiments, DenseNets tend to yield consistent improvement in accuracy with growing number of parameters, without any signs of performance degradation or overfitting. Under multiple settings, it achieved state-of-the-art results across several highly competitive datasets. Moreover, DenseNets require substantially fewer parameters and less computation to achieve state-of-the-art performances. Because we adopted hyperparameter settings optimized for residual networks in our study, we believe that further gains in accuracy of DenseNets may be obtained by more detailed tuning of hyperparameters and learning rate schedules. Whilst following a simple connectivity rule, DenseNets naturally integrate the properties of identity mappings, deep supervision, and diversified depth. They allow feature reuse throughout the networks and can consequently learn more compact and, according to our experiments, more accurate models. Because of their compact internal representations and reduced feature redundancy, DenseNets may be good feature extractors for various computer vision tasks that build on convolutional features, e.g., [4, 5]. We plan to study such feature transfer with DenseNets in future work.

要点和优点

  • 稠密连接:每一层的输出特征图,都将作为其后所有层的输入。

  • 网络可以深得多,优化难度却很低。

  • 网络参数量更少,所需计算量大幅下降,性能却显著提升。

  • 当提高参数量时,网络泛化能力也很好,不容易过拟合。

黄高老师190919在北航的报告听后感

一年前第一次看这篇文章时,感觉DenseNet无非是ResNet的一种极致扩展。但黄高老师给我提供了一种全新的思考。

我们首先看一个随机深度网络:如下图,在训练时,若干层会随机消失(由恒等变换或短路代替),在测试时再全部用起来。

这个网络的泛化能力得到了显著提升。原因:这种类似于dropout形式的训练,迫使网络不会过于依赖于某一层。因为传统CNN是级联结构,黄老师认为,如果某一层出现问题,那么错误就会被逐级放大。因此这种随机深度+短路的形式,可以提升网络的泛化能力。

总之,我们应该看到以下两个矛盾:

那么,我们应该怎么取得权衡呢?
首先,我们应该保证网络的泛化能力,即引入适当的冗余。冗余不是臃肿,而是让网络不过度依赖某些参数或特征,从而具有一定的健壮性。短连接就是一个很好的方法,因为实验发现,大多数梯度传输都是通过短连接实现的。因此,黄老师就将此发挥到了极致:稠密连接。
其次,我们要尽量降低冗余。由于特征是稠密复用的,因此我们可以适当减少特征图数量,从而减少网络的整体参数量和计算量:我们大幅度减少每一层的特征图数量:


网络加深到121层(实验发现18层没有优势,因为特征图太少),参数量却低得多:

总之,如果我们将DenseNet理解为冗余与计算量的权衡,我们就对DenseNet有了更深层次的认知。

故事背景

尽管CNN已经发展了20多年,近期只有Highway Networks和ResNets突破了100层。

网络结构

Dense block

上图是一个示意图。注意,ResNet是将特征逐点求和,再输入下一层或输出,而这里DenseNet是将特征图通道拼接起来。同时注意,最后一层是过渡层(Transition Layer),也算在block内。

对于某个block内的第\(l\)个卷积层,其输入为\(l\)个输入的拼接。如果该block内一共有\(L\)层,那么一共就有\(l + (l-1) + \dots + 1 = (l + 1) \frac{l}{2}\)个连接。

DenseNet

我们看整体网络结构。在本文中,当通道拼接后,会依次执行BN、ReLU和\(3 \times 3\)的卷积。整体网络由多个block组成:

过渡层

还有一个问题。由于需要通道拼接,因此我们要保证特征图的尺寸相同。但显然这是很愚蠢的做法。为此我们有两点改进:

  1. 引入block的概念,每一个block内稠密连接,block之间的尺寸不保证相同。
  2. 为了完成block之间的过渡,作者引入了过渡层(transition layers),其包含BN、\(1 \times 1\)卷积以及\(2 \times 2\)的池化层

在过渡层,我们让特征图数量减半(输出通道数等于输入通道数的一半)。这种设计以DenseNet-BC代替。

成长率

这种稠密连接的结构有一个反直觉的特点:其参数量(可以)非常小(批注:原因上一节我也提到了)。我们先看ResNet,它的参数量很大,原因是每一层的特征图都比较多也比较庞大。而对于DenseNet,每一层的特征图只限定为很小的数目,比如每层12张。作者称该超参数为成长率(growth rate)\(k\)。实验证明较小的成长率是足够的。

瓶颈层

尽管特征图数量\(k\)不大,但是拼接后的特征图数量还是太大了。为此,我们引入瓶颈层(bottleneck layers),即\(1 \times 1\)卷积层,在保证特征图尺寸不变的条件下,减小特征图数目。具体做法:在拼接后、BN+ReLU-\(3 \times 3\)Conv之前,加入BN+ReLU+\(1 \times 1\)Conv,即最终变成BN - ReLU - Conv (\(1\times 1\)) - BN - ReLU - Conv (\(3 \times 3\))。本文采用DenseNet-B表示这一结构,并通过实验证明其优势。

细节

  • DenseNet中一共有3个dense block,每一个block内的特征图尺寸分别是\(32 \times 32\)、\(16 \times 16\)和\(8 \times 8\)。

  • 在最开始,\(3 \times 3\)的卷积作用于输入图像,得到16通道的特征图,再输入第一个dense block。

  • 对于\(3 \times 3\)卷积,两侧分别插一个零,保证特征图尺寸不变。

  • 在过渡层,\(1 \times 1\)卷积搭配\(2 \times 2\)平均池化,如上图。

  • 一个全局平均池化和softmax分类器搭载在最后一层之上,得到分类结果。

  • 作者尝试了40层+成长率12、100层+成长率24、250层+成长率24等。

在ImageNet上的实验,作者采用的网络配置如下:

实验

我们主要看这个图:

这表明:

  • 稠密连接+瓶颈处理+过渡层压缩性能最佳。

  • 与ResNet相比,DenseNet-BC不仅性能更好,参数量需求也更低。

  • DenseNet泛化能力更好。虽然训练误差比ResNet高,但是测试效果是几乎一致的(在相同epoch条件下,与ResNet-1001相比)。

Paper | Densely Connected Convolutional Networks的更多相关文章

  1. Densely Connected Convolutional Networks 论文阅读

    毕设终于告一段落,传统方法的视觉做得我整个人都很奔溃,终于结束,可以看些搁置很久的一些论文了,嘤嘤嘤 Densely Connected Convolutional Networks 其实很早就出来了 ...

  2. Deep Learning 33:读论文“Densely Connected Convolutional Networks”-------DenseNet 简单理解

    一.读前说明 1.论文"Densely Connected Convolutional Networks"是现在为止效果最好的CNN架构,比Resnet还好,有必要学习一下它为什么 ...

  3. 深度学习论文翻译解析(十五):Densely Connected Convolutional Networks

    论文标题:Densely Connected Convolutional Networks 论文作者:Gao Huang Zhuang Liu Laurens van der Maaten  Kili ...

  4. 【Network Architecture】Densely Connected Convolutional Networks 论文解析

    目录 0. Paper link 1. Overview 2. DenseNet Architecture 2.1 Analogy to ResNet 2.2 Composite function 2 ...

  5. Densely Connected Convolutional Networks(緊密相連卷積網絡)

    - Dense blocks where each layer is connected to every other layer in feedforward fashion(緊密塊是指每一個層與每 ...

  6. DenseNet——Densely Connected Convolutional Networks

    1. 摘要 传统的 L 层神经网络只有 L 个连接,DenseNet 的结构则有 L(L+1)/2 个连接,每一层都和前面的所有层进行连接,所以称之为密集连接的网络. 针对每一层网络,其前面所有层的特 ...

  7. 【文献阅读】Densely Connected Convolutional Networks-best paper-CVPR-2017

    Densely Connected Convolutional Networks,CVPR-2017-best paper之一(共两篇,另外一篇是apple关于GAN的paper),早在去年八月 De ...

  8. (转)ResNet, AlexNet, VGG, Inception: Understanding various architectures of Convolutional Networks

    ResNet, AlexNet, VGG, Inception: Understanding various architectures of Convolutional Networks by KO ...

  9. VGGNet论文翻译-Very Deep Convolutional Networks for Large-Scale Image Recognition

    Very Deep Convolutional Networks for Large-Scale Image Recognition Karen Simonyan[‡] & Andrew Zi ...

随机推荐

  1. springboot+mybatisplus+sharding-jdbc分库分表实例

    项目实践 现在Java项目使用mybatis多一些,所以我也做了一个springboot+mybatisplus+sharding-jdbc分库分表项目例子分享给大家. 要是用的springboot+ ...

  2. PHP实现Redis分布式锁

     锁在我们的日常开发可谓用得比较多.通常用来解决资源并发的问题.特别是多机集群情况下,资源争抢的问题.但是,很多新手在锁的处理上常常会犯一些问题.今天我们来深入理解锁. 一.Redis 锁错误使用之一 ...

  3. php获取url中的参数

    // 获取url参数值function is_set_param($param){ $current_url = $_SERVER["QUERY_STRING"]; $arr = ...

  4. Unity Settings Deamon crash in 16.04 every time after boot

    安装ubuntu 16.04的时候,出现这样一个错误: unity-settings-deamon crashed with SIGSEGV in up_exported_dae (can't rea ...

  5. HTML+css基础 标签

    图片标签:<img src="./imgs/1.jpg" alt=“一种对图片解释说明的” /> HTML   超文本标记语言   英文名称: hyper  text  ...

  6. python-3.8.0 新特性之赋值表达式

    [python-3.8.0 新特性之赋值表达式] 赋值表达式的语法是这样的“ name := expression ”,形式上看和赋值语句 “ = ” 差不多,就作用上来看也雷同.也就是说 “:=” ...

  7. JavaScript判断对象和数组

    在调用后端接口时,由于后端接口的不规范统一,接口最外层在没有数据时返回的是空数组(其实更想要的是空json对象,接口返回的data数据应该统一返回json对象,便于扩展),而在有数据时返回的是json ...

  8. C++ getline函数用法详解

    转载自http://c.biancheng.net/view/1345.html 虽然可以使用 cin 和 >> 运算符来输入字符串,但它可能会导致一些需要注意的问题. 当 cin 读取数 ...

  9. Java开发桌面程序学习(四)——常用应用布局模板和简单分析

    布局 前言 刚开始的时候,不知道使用什么布局,发现SceneBuilder其实有8.5版本的,里面就是有提供一个简单的桌面程序模板,8.5可以去官网下载,不过网速好像有点慢,慢慢等吧,官网下载地址 布 ...

  10. Python爬取前程无忧网站上python的招聘信息

    前言 文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者: 我姓刘却留不住你的心 PS:如有需要Python学习资料的小伙伴可以 ...