论文:Neural Architecture Search With Reinforcement Learning
链接:https://arxiv.org/abs/1611.01578
代码链接:https://github.com/tensorflow/models

这是ICLR2017的文章,讲述如果用强化学习(reinforcement learning)来学习一个最优的网络结构。这篇文章的搜索方式现在看来较为简单粗暴,没有计算资源支持的话基本上跑不起来。这篇文章(可以结合Figure1看)通过一个controller在搜索空间(search space)中得到一个网络结构(child network),然后用这个网络结构在数据集上训练得到准确率,再将这个准确率回传给controller,controller继续优化得到另一个网络结构,如此反复进行直到得到最佳的结果。原文有一句概括写的不错:In this paper, we use a recurrent network to generate the model descriptions of neural networks and train this RNN with reinforcement learning to maximize the expected accuracy of the generated architectures on a validation set. 所以比较新颖的地方就是如何通过controller得到一个child network。

Figure1解释了如何通过一个controller来搜索最优结构并训练网络和优化controller的过程。可以看出最关键的部分就是controller,而作者的controller采用的就是RNN结构。关于为什么可以用RNN结构做controller来搜索最优结构,作者也给出了解释:Our work is based on the observation that the structure and connectivity of a neural network can be typically specified by a variable-length string. It is therefore possible to use a recurrent network – the controller – to generate such string. 因此和其他超参数优化只能在一个fixed-length space中搜索模型不同的是,这里可以在一个variable-length space中搜索模型。训练这个RNN网络则是通过梯度算法去优化的。

了解了controller,那么具体是优化过程是什么样的呢?这部分原文解释得非常清晰,可以结合Figure1一起看:Training the network specified by the string – the “child network” – on the real data will result in an accuracy on a validation set. Using this accuracy as the reward signal, we can compute the policy gradient to update the controller. As a result, in the next iteration, the controller will give higher probabilities to architectures that receive high accuracies. In other words, the controller will learn to improve its search over time.

Figure2表达的是controller如何得到一个child network的示意图,这里训练的搜索空间(search space)包括每一层的Filter尺寸、数量,stride的数值等。

不过Figure2这样的搜索空间只是包含了常规的一些网络结构的元素,而没有包含类似GooleNet和ResNet那样的branching layer和skip connection,因此作者又做了一些工作,具体而言就是:At layer N, we add an anchor point which has N-1 content-based sigmoids to indicate the previous layers that need to be connected. 具体公式如下:

where hj represents the hiddenstate of the controller at anchor point for the j-th layer, where j
ranges from 0 to N-1.
Wprev、Wcurr和v就是模型要训练的参数,所以添加了skip connection的controller就是Figure4这样:

但是skip connection可能会带来一个问题:compilation failures。这是一个比较大的概括的词,包括的内容比如一些层没有输入或者输出、concate的feature map的尺寸不一等问题。具体解决方案作者陈述了如下3点:
1、If a layer is not connected to any input layer then the image is used as the input layer.
2、At the final layer we take all layer outputs that have not been connected and concatenate them before sending this final hiddenstate to the classifier.
3、If input layers to be concatenated have different sizes, we pad the small layers with zeros so that the concatenated layers have the same sizes.
另外在作者的框架中:If one layer has many input layers then all input layers are concatenated in the depth dimension.

那么controller要优化到什么程度才能得到一个网络结构呢(对应Figure1中从红色矩形框到蓝色矩形框的过程)?答案是当层数大于一个特定值的时候,生成网络的过程就会停止,而这个值是随着训练controller的进行而增长的,这个增长策略在CIFAR-10数据集中是从第6层开始,当每搜索1600个samples的时候就增加2层。当controller生成一个网络结构后(文中称这个网络结构为child network),那么就用这个网络结构在训练集上训练,并在验证集上得到准确率。准确率回传给controller,然后用reinforcement learning(强化学习)继续训练controller,如此反复迭代,最终得到最优的controller参数,也就是网络结构。强化学习采用policy gradient method来更新controller的参数。

接下来就要介绍如何生成controller。controller是一个RNN结构,下面这个式子就是一个最简单的RNN层的式子,也就是文中提到的recurrent cell:

因为The computations for basic RNN and LSTM cells can be generalized as a tree of steps that take xt and ht-1 as inputs and produce ht as final output. 因此在Figure5中介绍如何生成recurrent cell的过程也是基于树来介绍。Figure5左边图包含两个leaf node(index 0和index 1)和一个internal node(index 2)。作者在实验中用的是8个leaf node,具体可以参看论文最后的附录A。

原文关于Figure5的介绍比较详细,其中下面这5个step就和Figure5对应。比如Figure5中间图共分成5个部分,就和下面的5个step一一对应。这5个step就构成了recurrent cell,recurrent cell用于构成controller,因此本质上就是所谓controller的search space。

实验结果:
文章主要用到的数据集包括用于图像分类的CIFAR-10和用于语言任务的Penn Treebank。接下来仅介绍下CIFAR-10数据集上的实验结果,更多实验细节可以参看论文。

先来看看用于CIFAR-10的search space:
Our search space consists of convolutional architectures, with rectified linear units as non-linearities (Nair & Hinton, 2010), batch normalization (Ioffe & Szegedy, 2015) and skip connections between layers (Section 3.3). For every convolutional layer, the controller RNN has to select a filter height in [1, 3, 5, 7], a filter width in [1, 3, 5, 7], and a number of filters in [24, 36, 48, 64]. For strides, we perform two sets of experiments, one where we fix the strides to be 1, and one where we allow the controller to predict the strides in [1, 2, 3].

另外对于learning rate、weight decay、batchnorm epsilon、what epoch to decay the learning rate则采用grid search的方法来调,然后就得到了下面这个Table1的结果。不得不说有机器资源就是任性啊。

Table1中的倒数第4个:Neural Architecture Search v1 no stride or pooling的结构如下Figure7所示,看起来有点抓狂。注意几个点:在越靠近最后的softmax层的时候卷积核的尺寸反而更大一些,而且整体上来看,有不少卷积核是长方形,而不是常见的正方形。这些结论或许可以作为人工设计网络的一个参考。

自学网络结构(一):Neural Architecture Search With Reinforcement Learning相关推荐

  1. [RelativeNAS] Relative Neural Architecture Search via Slow-Fast Learning

    Relative Neural Architecture Search via Slow-Fast Learning First author:Tan Hao [PDF] NAS: Neural Ar ...

  2. 【读点论文】FBNetV2:Differentiable Neural Architecture Search for Spatial and Channel D扩大搜索空间,复用featuremap

    FBNetV2: Differentiable Neural Architecture Search for Spatial and Channel Dimensions Abstract 可微分神经 ...

  3. 神经网络架构搜索(Neural Architecture Search)杂谈

    一.背景 机器学习从业者被戏称为"调参工"已经不是一天两天了.我们知道,机器学习算法的效果好坏不仅取决于参数,而且很大程度上取决于各种超参数.有些paper的结果很难重现原因之一就 ...

  4. 神经网络架构搜索(Neural Architecture Search, NAS)笔记

    目录 (一)背景 (二)NAS流程 2.1 定义搜索空间 2.2 搜索策略 (三)加速 (四)变体及扩展 4.1 扩展到其他任务 4.2 扩展到其他超参数 (一)背景 机器学习从业者被戏称为" ...

  5. NEURAL ARCHITECTURE SEARCH(NAS)

    NEURAL ARCHITECTURE SEARCH WITH REINFORCEMENT LEARNING(NAS) 本文讨论的主要问题是 At the moment, neural network ...

  6. 【读点论文】FBNet:Hardware-Aware Efficient ConvNet Design via Differentiable Neural Architecture Search可微分

    FBNet: Hardware-Aware Efficient ConvNet Design via Differentiable Neural Architecture Search Abstrac ...

  7. 神经架构搜索(Neural Architecture Search,NAS)介绍

    神经架构搜索Neural Architecture Search,NAS介绍 Introduction Intractable Search Space Non transferable optima ...

  8. 渐进式神经网络结构搜索技术(Progressive Neural Architecture Search)(2018年最强最智能的图像分类)详解

    转发地址为:https://yq.aliyun.com/articles/622265?spm=a2c4e.11155472.0.0.402c3fa6VbJvBH 神经网络结构搜索是谷歌的AutoML ...

  9. 2021年 ICCV / NeurIPS / AAAI 中Neural Architecture Search (NAS) 神经网络结构搜索相关论文汇总

    这里写自定义目录标题 ICCV (35篇) NeurIPS / NIPS (28篇) AAAI (31篇) ICCV (35篇) Learning Latent Architectural Distr ...

最新文章

  1. c++ 暂停功能_app下载功能背后的逻辑
  2. C#获取文件的MD5码
  3. MATLAB实现批量处理图像图片的两种方法
  4. VS2010中添加lib库引用
  5. 如何腾出计算机内存,win7系统(取消)删除虚拟内存让硬盘空间轻松腾出来
  6. iOS捕获异常的处理
  7. 笨办法学python 3 48题_附录练习 8-10 笨办法学Python3
  8. Python 编写规范
  9. Java对图片Base64转码--HTML对Base64解码
  10. PB:玉米气生根分泌物支持的高效生物固氮
  11. 结果导向的前提是过程控制
  12. LCD显示屏和OLED显示屏的区别
  13. 海外问卷调查项目分为哪几种?
  14. arduino安装+esp32+esp8266安装
  15. 内边距(padding)
  16. 恶意软件的历史和应对措施
  17. python实现电子邮件附件指定时间段,批量下载以及C#小程序集成实现
  18. codeforces 348A Mafia
  19. VSCode撸猫插件vscode-cats它来了,一起来云撸猫吧
  20. for(int a:b)的用法

热门文章

  1. 系统架构设计——伸缩性架构
  2. 昆石VOS3000/VOS2009 V2.1.7.01/V2.1.7.03 操作指南
  3. OpenCV4学习笔记(57)——基于GrabCut图像分割算法实现背景替换与背景虚化效果
  4. 虚化背景(深度映射篇)
  5. 伤害世界稳定服务器,伤害世界哪个服务器好_伤害世界怎么选服务器_牛游戏网...
  6. HP笔记本HDMI检测不到外接显示器
  7. 电子工程师自学成才pdf_给新开发人员的最佳建议:自学成才的软件工程师的建议...
  8. 读jQuery 权威指南[5]-插件
  9. 成长了,记录一下,增值税发票识别写入excel文件里
  10. ASF网站自带python脚本完成sentinel-1数据自动下载