进化计算在深度学习中的应用 | 附多篇论文解读
隨著當(dāng)今計(jì)算能力的大幅度提升和大數(shù)據(jù)時(shí)代的到來,深度學(xué)習(xí)在幫助挖掘海量數(shù)據(jù)中蘊(yùn)含的信息和完成一些人工智能任務(wù)中,展現(xiàn)出了非凡的能力。然而目前深度學(xué)習(xí)領(lǐng)域還有許多問題亟待解決,其中算法參數(shù)和結(jié)構(gòu)的優(yōu)化尤為困難。而進(jìn)化優(yōu)化作為一種通用的優(yōu)化方法,逐漸受到學(xué)術(shù)界的一些關(guān)注和應(yīng)用,以期能解決以上難題。
基于遺傳規(guī)劃的自動(dòng)機(jī)器學(xué)習(xí)
自動(dòng)機(jī)器學(xué)習(xí)(Automated/Automatic Machine Learning, AutoML)作為近年來逐漸興起的熱門研究領(lǐng)域,旨在降低機(jī)器學(xué)習(xí)的門檻,使其更加易用。
一般而言,一個(gè)完整的機(jī)器學(xué)習(xí)(特別是監(jiān)督式機(jī)器學(xué)習(xí))工作流通常包含以下部分,數(shù)據(jù)清洗,特征工程,模型選擇,訓(xùn)練測(cè)試以及超參數(shù)調(diào)優(yōu)。每一道工序都有相當(dāng)多的實(shí)現(xiàn)選項(xiàng),且工序之間相互影響,共同決定最終的模型性能。
對(duì)于機(jī)器學(xué)習(xí)使用者而言,針對(duì)具體任務(wù)設(shè)計(jì)實(shí)現(xiàn)合適的工作流并不容易,在很多情況下可能會(huì)耗費(fèi)大量的時(shí)間進(jìn)行迭代。AutoML 的目標(biāo)便是盡可能地使以上的過程自動(dòng)化,從而降低使用者的負(fù)擔(dān)。
本次我們要同大家分享的是近年來在 AutoML 領(lǐng)域內(nèi)比較有影響力的一個(gè)工作,基于樹表示的工作流優(yōu)化(Tree-based Pipeline Optimization Tool, TPOT)。
TPOT 的作者為 Randal S. Olson 等人,相關(guān)文獻(xiàn)為?[1] (2016 EvoStar Best Paper) 和 [2] (2016 GECCO Best Paper),我們?cè)谶@里將兩篇文獻(xiàn)的內(nèi)容統(tǒng)一為大家作介紹。
▲?圖1:機(jī)器學(xué)習(xí)工作流中被TPOT優(yōu)化的部分
如圖 1 所示,TPOT 希望從整體上自動(dòng)優(yōu)化機(jī)器學(xué)習(xí)的工作流 。在 TPOT 中,一個(gè)工作流被定義為一棵樹,樹上每一個(gè)非葉子節(jié)點(diǎn)為操作(Operator)節(jié)點(diǎn),葉子節(jié)點(diǎn)則為數(shù)據(jù)節(jié)點(diǎn)。數(shù)據(jù)集從葉子節(jié)點(diǎn)流入,經(jīng)過操作節(jié)點(diǎn)進(jìn)行變換,最終在根節(jié)點(diǎn)處進(jìn)行分類/回歸,圖 2 給出了一個(gè)例子。
▲?圖2:基于樹表示的工作流的一個(gè)例子
TPOT 一共定義了 4 種操作節(jié)點(diǎn)類型(見圖 3),分別是預(yù)處理、分解/降維、特征選擇以及學(xué)習(xí)模型。這些操作的底層實(shí)現(xiàn)均是基于 Python 的機(jī)器學(xué)習(xí)庫 scikit-learn。
▲?圖3:TPOT操作節(jié)點(diǎn)類型
有了以上基于樹的表示,TPOT 直接利用遺傳規(guī)劃(具體來說,是 Python 庫 DEAP 中的 GP 實(shí)現(xiàn))對(duì)工作流進(jìn)行優(yōu)化。在搜索過程中,任一工作流首先在訓(xùn)練集上訓(xùn)練,然后在獨(dú)立的驗(yàn)證集上評(píng)估(另一種更為耗時(shí)的選項(xiàng)是交叉驗(yàn)證)。在搜索結(jié)束后,TPOT 將返回最好的工作流所對(duì)應(yīng)的代碼。
TPOT 的一個(gè)潛在問題在于可能會(huì)產(chǎn)生過于復(fù)雜的工作流,從而導(dǎo)致過擬合。針對(duì)這個(gè)問題,論文 [2] 對(duì) TPOT 作出了拓展,將工作流復(fù)雜度(即包含的操作節(jié)點(diǎn)個(gè)數(shù))作為第二個(gè)優(yōu)化目標(biāo),提出了 TPOT-Pareto,其使用了類似于 NSGA 中所采用的選擇算子。
▲?圖4:部分實(shí)驗(yàn)結(jié)果
論文 [1] 和 [2] 在很多任務(wù)上對(duì) TPOT 和 TPOT-Pareto 進(jìn)行了評(píng)估,實(shí)驗(yàn)結(jié)果(圖 4 給出了在 UCI 數(shù)據(jù)集上的部分實(shí)驗(yàn)結(jié)果,其中 Random Forest 包含了 500 棵決策樹,TPOT-Random 采用了隨機(jī)搜索而不是 GP)表明了 TPOT 系的方法在很多任務(wù)上都能取得不錯(cuò)的效果。
▲?圖5:工作流復(fù)雜度對(duì)比
圖 5 給出了不同方法得到的模型的復(fù)雜度,可以看出 TPOT-Pareto 確實(shí)能得到更為精簡(jiǎn)的工作流。一個(gè)比較有趣的問題是采用隨機(jī)搜索的 TPOT-random 在很多任務(wù)上(以更高的工作流復(fù)雜度)也能夠達(dá)到 TPOT 以及 TPOT-Pareto 相當(dāng)?shù)男Ч?
TPOT 項(xiàng)目已經(jīng)開源,且仍在開發(fā)迭代中,目前整個(gè)社區(qū)相當(dāng)活躍,已經(jīng)有了 4000+ 的 star 和 680+ 的 fork。
TPOT項(xiàng)目地址:
https://github.com/EpistasisLab/tpot
參考文獻(xiàn)
[1] Olson, Randal S., et al. “Automating biomedical data science through tree-based pipeline optimization.” European Conference on the Applications of Evolutionary Computation. Springer, Cham, 2016.?
[2] Olson, Randal S., et al. “Evaluation of a tree-based pipeline optimization tool for automating data science.” Proceedings of the Genetic and Evolutionary Computation Conference 2016. ACM, 2016.
多目標(biāo)演化優(yōu)化深度神經(jīng)網(wǎng)絡(luò)
本文主要側(cè)重于分享近期基于多目標(biāo)演化優(yōu)化深度神經(jīng)網(wǎng)絡(luò)的工作。由于筆者能力有限,如果分享過程中存在疏忽,還請(qǐng)大家不吝賜教與指正。
第一個(gè)工作發(fā)表于 IEEE Transaction on Neural Networks and Learning Systems 2016,來自 Chong Zhang,Pin Lim,K. Qin 和 Kay Chen Tan 的文章 Multiobjective Deep Belief Networks Ensemble for Remaining Useful Life Estimation in Prognostics,本文為預(yù)估系統(tǒng)剩余使用周期設(shè)計(jì)了多目標(biāo)深度網(wǎng)絡(luò)集成算法(Multiobjective Deep Belief Networks Ensemble,MODBNE)。
MODBNE 是一個(gè)集成學(xué)習(xí)模型,其以單個(gè) DBN(Deep Belief Networks)模型的準(zhǔn)確性和多樣性作為優(yōu)化目標(biāo),使用 MOEA/D 算法對(duì) DBN 模型進(jìn)行優(yōu)化,將最終獲得的一系列占優(yōu)的 DBN 模型用于集成學(xué)習(xí)模型。
其中,演化種群中的每一個(gè)個(gè)體代表一個(gè) DBN 模型,其決策空間由 DBN 模型的隱藏神經(jīng)元數(shù)量、神經(jīng)網(wǎng)絡(luò)中的權(quán)重以及推理過程中需要的學(xué)習(xí)率構(gòu)成,這意味著每一個(gè)個(gè)體都代表著不同結(jié)構(gòu)的 DBN 模型。
最后,通過以平均學(xué)習(xí)錯(cuò)誤率為目標(biāo)的單目標(biāo) DE 算法優(yōu)化集成學(xué)習(xí)模型中各個(gè)模型的比重。
MODBNE 在 NASA 的 C-MAPSS 數(shù)據(jù)集上進(jìn)行實(shí)驗(yàn),結(jié)果表明該算法明顯優(yōu)于其他現(xiàn)有的算法。
第二個(gè)工作發(fā)表于 IEEE Transaction on Neural Networks and Learning Systems 2017,來自 Jia Liu,Maoguo Gong,Qiguang Miao,Xiaogang Wang 和 Hao Li 的文章 Structure Learning for Deep Neural Networks Based on Multiobjective Optimization,論文提出一種使用多目標(biāo)優(yōu)化算法優(yōu)化深度神經(jīng)網(wǎng)絡(luò)的連接結(jié)構(gòu)的方法。
首先,將多層神經(jīng)網(wǎng)絡(luò)看成多個(gè)單層的神經(jīng)網(wǎng)絡(luò),逐層優(yōu)化。在優(yōu)化每一層的時(shí)候,以神經(jīng)網(wǎng)絡(luò)的表達(dá)能力(Representation Ability)和神經(jīng)網(wǎng)絡(luò)連接的稀疏性作為優(yōu)化目標(biāo),使用 MOEA/D 算法進(jìn)行優(yōu)化。
其中,演化種群中的每一個(gè)個(gè)體代表單層神經(jīng)網(wǎng)絡(luò)的一種配置,神經(jīng)網(wǎng)絡(luò)的表達(dá)能力用觀測(cè)數(shù)據(jù)的 PoE(Products of Experts)評(píng)估,稀疏性由神經(jīng)節(jié)點(diǎn)之間連接的個(gè)數(shù)表示。
通過用該算法優(yōu)化單層神經(jīng)網(wǎng)絡(luò)、多層神經(jīng)網(wǎng)絡(luò)以及一些應(yīng)用層面的神經(jīng)網(wǎng)絡(luò)進(jìn)行測(cè)試,實(shí)驗(yàn)驗(yàn)證該方法可以大幅提升深度神經(jīng)網(wǎng)絡(luò)的效率。
演化深度神經(jīng)網(wǎng)絡(luò)
演化算法和人工神經(jīng)網(wǎng)絡(luò)都可以看作是對(duì)某些自然過程的抽象。早在上世紀(jì) 90 年代早期,就有研究試圖將二者結(jié)合起來,并最終形成了演化人工神經(jīng)網(wǎng)絡(luò)(Evolutionary Artificial Neural Networks,EANN)這一分支。
EANN 旨在利用演化算法強(qiáng)大的搜索能力在神經(jīng)網(wǎng)絡(luò)的多個(gè)層面上(全局參數(shù)如學(xué)習(xí)率,網(wǎng)絡(luò)拓?fù)浣Y(jié)構(gòu),局部參數(shù)如連接權(quán)值)尋優(yōu)。
在實(shí)際中,這種利用工具來自動(dòng)設(shè)計(jì)算法的思路可以在很大程度上減輕算法設(shè)計(jì)者的負(fù)擔(dān)。同時(shí),在計(jì)算資源充足的條件下,針對(duì)給定的任務(wù),演化算法往往能成功地發(fā)現(xiàn)有效的神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)。
近年來,計(jì)算能力的大幅提升和大數(shù)據(jù)時(shí)代的到來助推了深度學(xué)習(xí)的興起,在此期間各種深度神經(jīng)網(wǎng)絡(luò)(Deep Neural Networks,DNN)被相繼提出。然而即使在今天,針對(duì)特定問題設(shè)計(jì)有效的深度神經(jīng)網(wǎng)絡(luò)仍然是一項(xiàng)非常困難的任務(wù)。
以此為背景,利用自動(dòng)化工具(比如演化算法)來設(shè)計(jì)深度神經(jīng)網(wǎng)絡(luò)逐漸受到了學(xué)術(shù)界的一些關(guān)注。本文將同大家分享演化深度神經(jīng)網(wǎng)絡(luò)的一項(xiàng)近期工作。由于筆者能力有限,如果分享過程中存在疏忽,還請(qǐng)大家不吝賜教與指正。?
由于 DNN 連接數(shù)巨大,利用演化算法直接優(yōu)化 DNN 權(quán)值的計(jì)算代價(jià)太高。因此一般采用兩層(bilevel)策略對(duì) DNN 進(jìn)行優(yōu)化,其頂層由演化算法優(yōu)化 DNN 的結(jié)構(gòu)和全局參數(shù),其底層依然采用隨機(jī)梯度下降的方法訓(xùn)練連接權(quán)值。
發(fā)表在 ICML 2017,來自 Google Brain 的 Esteban Real,Sherry Moore,Andrew Selle,Saurabh Saxena,Yutaka Leon Suematsu,Quoc Le,Alex Kurakin 的文章 Large-Scale Evolution of Image Classifiers,提出了一種針對(duì)圖像分類的 DNN 的分布式演化算法。
▲?圖1:文章提出的分布式演化算法
算法的流程如圖 1 所示,該算法維護(hù)了一個(gè) DNN 種群,種群中每一個(gè)個(gè)體都是一個(gè)已經(jīng)訓(xùn)練好的 DNN 模型,其適應(yīng)度即為該模型在驗(yàn)證集上的準(zhǔn)確率。
大量的計(jì)算節(jié)點(diǎn)(worker)被用來對(duì) DNN 種群進(jìn)行演化。具體而言,所有的 worker 處在分布式環(huán)境下,共享存儲(chǔ) DNN 種群的文件系統(tǒng),并以異步的方式工作。
每一個(gè)當(dāng)前空閑的 worker 都會(huì)從 DNN 種群中隨機(jī)選取兩個(gè) DNN 模型,然后將較差的 DNN 直接從種群中刪除,并基于較好的 DNN 變異生成一個(gè)子代個(gè)體加入 DNN 種群。
整個(gè)過程中個(gè)體的編碼是圖,圖上每一個(gè)頂點(diǎn)表示一個(gè)三階張量(比如卷積層)或者一個(gè)激活函數(shù),每一條邊則表示恒等連接(identity connection)或者卷積。變異操作則包括重置權(quán)值,插入刪除神經(jīng)層,插入刪除神經(jīng)層之間的連接等等。
實(shí)驗(yàn)中,種群規(guī)模被設(shè)置為 1000,并有 250 個(gè) worker 參與,在 CIFAR-10 和 CIFAR-100 數(shù)據(jù)集上的實(shí)驗(yàn)結(jié)果如圖 2 所示,相比于手工設(shè)計(jì)的 DNN,用此分布式演化算法得到的 DNN 能夠取得有競(jìng)爭(zhēng)力的結(jié)果。
▲?圖2:在CIFAR-10和CIFAR-100上的測(cè)試結(jié)果
更多論文推薦
最后,再附上 Github 上幾篇進(jìn)化計(jì)算在 AutoML 上的應(yīng)用論文。
■?論文 | Evolving Neural Networks through Augmenting Topologies
■ 鏈接 | https://www.paperweekly.site/papers/1979
■ 作者 |?Kenneth O. Stanley / Risto Miikkulainen
Abstract
An important question in neuroevolution is how to gain an advantage from evolving neural network topologies along with weights. We present a method, NeuroEvolution of Augmenting Topologies (NEAT), which outperforms the best fixed-topology method on a challenging benchmark reinforcement learning task. We claim that the increased efficiency is due to (1) employing a principled method of crossover of different topologies, (2) protecting structural innovation using speciation, and (3) incrementally growing from minimal structure. We test this claim through a series of ablation studies that demonstrate that each component is necessary to the system as a whole and to each other. What results is significantly faster learning. NEAT is also an important contribution to GAs because it shows how it is possible for evolution to both optimize and complexify solutions simultaneously, offering the possibility of evolving increasingly complex solutions over generations, and strengthening the analogy with biological evolution.
■?論文 | Autostacker: A Compositional Evolutionary Learning System
■ 鏈接 | https://www.paperweekly.site/papers/1980
■ 作者 |?Boyuan Chen / Harvey Wu / Warren Mo / Ishanu Chattopadhyay / Hod Lipson
Abstract
We introduce an automatic machine learning (AutoML) modeling architecture called Autostacker, which combines an innovative hierarchical stacking architecture and an Evolutionary Algorithm (EA) to perform efficient parameter search. Neither prior domain knowledge about the data nor feature preprocessing is needed. Using EA, Autostacker quickly evolves candidate pipelines with high predictive accuracy. These pipelines can be used as is or as a starting point for human experts to build on. Autostacker finds innovative combinations and structures of machine learning models, rather than selecting a single model and optimizing its hyperparameters. Compared with other AutoML systems on fifteen datasets, Autostacker achieves state-of-art or competitive performance both in terms of test accuracy and time cost.
■?論文 | Deep Neuroevolution: Genetic Algorithms Are a Competitive Alternative for Training Deep Neural Networks for Reinforcement Learning
■ 鏈接 | https://www.paperweekly.site/papers/1981
■ 源碼 |?https://github.com/uber-common/deep-neuroevolution
Abstract
Deep artificial neural networks (DNNs) are typically trained via gradient-based learning algorithms, namely backpropagation. Evolution strategies (ES) can rival backprop-based algorithms such as Q-learning and policy gradients on challenging deep reinforcement learning (RL) problems. However, ES can be considered a gradient-based algorithm because it performs stochastic gradient descent via an operation similar to a finite-difference approximation of the gradient. That raises the question of whether non-gradient-based evolutionary algorithms can work at DNN scales. Here we demonstrate they can: we evolve the weights of a DNN with a simple, gradient-free, population-based genetic algorithm (GA) and it performs well on hard deep RL problems, including Atari and humanoid locomotion. The Deep GA successfully evolves networks with over four million free parameters, the largest neural networks ever evolved with a traditional evolutionary algorithm. These results (1) expand our sense of the scale at which GAs can operate, (2) suggest intriguingly that in some cases following the gradient is not the best choice for optimizing performance, and (3) make immediately available the multitude of neuroevolution techniques that improve performance. We demonstrate the latter by showing that combining DNNs with novelty search, which encourages exploration on tasks with deceptive or sparse reward functions, can solve a high-dimensional problem on which reward-maximizing algorithms (e.g.\ DQN, A3C, ES, and the GA) fail. Additionally, the Deep GA is faster than ES, A3C, and DQN (it can train Atari in ~4 hours on one desktop or ~1 hour distributed on 720 cores), and enables a state-of-the-art, up to 10,000-fold compact encoding technique.
■?論文 | Improving Exploration in Evolution Strategies for Deep Reinforcement Learning via a Population of Novelty-Seeking Agents
■ 鏈接 | https://www.paperweekly.site/papers/1982
■ 源碼 |?https://github.com/uber-common/deep-neuroevolution
Abstract
Evolution strategies (ES) are a family of black-box optimization algorithms able to train deep neural networks roughly as well as Q-learning and policy gradient methods on challenging deep reinforcement learning (RL) problems, but are much faster (e.g. hours vs. days) because they parallelize better. However, many RL problems require directed exploration because they have reward functions that are sparse or deceptive (i.e. contain local optima), and it is not known how to encourage such exploration with ES. Here we show that algorithms that have been invented to promote directed exploration in small-scale evolved neural networks via populations of exploring agents, specifically novelty search (NS) and quality diversity (QD) algorithms, can be hybridized with ES to improve its performance on sparse or deceptive deep RL tasks, while retaining scalability. Our experiments confirm that the resultant new algorithms, NS-ES and a version of QD we call NSR-ES, avoid local optima encountered by ES to achieve higher performance on tasks ranging from playing Atari to simulated robots learning to walk around a deceptive trap. This paper thus introduces a family of fast, scalable algorithms for reinforcement learning that are capable of directed exploration. It also adds this new family of exploration algorithms to the RL toolbox and raises the interesting possibility that analogous algorithms with multiple simultaneous paths of exploration might also combine well with existing RL algorithms outside ES.
點(diǎn)擊以下標(biāo)題查看更多精彩文章:?
深度協(xié)同過濾:用神經(jīng)網(wǎng)絡(luò)取代內(nèi)積建模
本周 AI 論文良心推薦,你想 pick 誰?
簡(jiǎn)明條件隨機(jī)場(chǎng)CRF介紹 | 附帶純Keras實(shí)現(xiàn)
SRGAN With WGAN:讓超分辨率算法訓(xùn)練更穩(wěn)定
深度強(qiáng)化學(xué)習(xí)在指代消解中的一種嘗試
▲?戳我查看招募詳情
#作 者 招 募#
讓你的文字被很多很多人看到,喜歡我們不如加入我們
關(guān)于PaperWeekly
PaperWeekly 是一個(gè)推薦、解讀、討論、報(bào)道人工智能前沿論文成果的學(xué)術(shù)平臺(tái)。如果你研究或從事 AI 領(lǐng)域,歡迎在公眾號(hào)后臺(tái)點(diǎn)擊「交流群」,小助手將把你帶入 PaperWeekly 的交流群里。
▽ 點(diǎn)擊 |?閱讀原文?| 加入社區(qū)刷論文
總結(jié)
以上是生活随笔為你收集整理的进化计算在深度学习中的应用 | 附多篇论文解读的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CMU提出「十字绣网络」,自动决定多任务
- 下一篇: CVer入门必备:计算机视觉的深度学习实