版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Towards modular and programmable architecture search Renato Negrinho1 Darshan Patil1Nghia Le1Daniel Ferreira2 Matthew R. Gormley1Geoffrey Gordon1,3 Carnegie Mellon University1, TU Wien2, Microsoft Research Montreal3 Abstract Neural architecture search methods are able to fi nd high performance deep
2、learning architectures with minimal effort from an expert 1. However, current systems focus on specifi c use-cases (e.g. convolutional image classifi ers and recurrent language models), making them unsuitable for general use-cases that an expert might wish to write. Hyperparameter optimization syste
3、ms 2,3,4 are general- purpose but lack the constructs needed for easy application to architecture search. In this work, we propose a formal language for encoding search spaces over general computational graphs. The language constructs allow us to write modular, composable, and reusable search space
4、encodings and to reason about search space design. We use our language to encode search spaces from the architecture search literature. The language allows us to decouple the implementations of the search space and the search algorithm, allowing us to expose search spaces to search algorithms throug
5、h a consistent interface. Our experiments show the ease with which we can experiment with different combinations of search spaces and search algorithms without having to implement each combination from scratch. We release an implementation of our language with this paper2. 1Introduction Architecture
6、 search has the potential to transform machine learning workfl ows. High performance deep learning architectures are often manually designed through a trial-and-error process that amounts to trying slight variations of known high performance architectures. Recently, architecture search techniques ha
7、ve shown tremendous potential by improving on handcrafted architectures, both by improving state-of-the-art performance and by fi nding better tradeoffs between computation and performance. Unfortunately, current systems fall short of providing strong support for general architecture search use-case
8、s. Hyperparameter optimization systems 2,3,4,5 are not designed specifi cally for architecture search use-cases and therefore do not introduce constructs that allow experts to implement these use-cases effi ciently, e.g., easily writing new search spaces over architectures. Using hyperparameter opti
9、mization systems for an architecture search use-case requires the expert to write the encoding for the search space over architectures as a conditional hyperparameter space and to write the mapping from hyperparameter values to the architecture to be evaluated. Hyperparameter optimization systems ar
10、e completely agnostic that their hyperparameter spaces encode search spaces over architectures. By contrast, architecture search systems 1 are in their infancy, being tied to specifi c use-cases (e.g., either reproducing results reported in a paper or concrete systems, e.g., for searching over Sciki
11、t-Learn pipelines 6 ) and therefore lack support for general architecture search workfl ows. For Part of this work was done while the fi rst author was a research scientist at Petuum. 2Visit for code and documentation. 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), Vancouve
12、r, Canada. example, current implementations of architecture search methods rely on ad-hoc encodings for search spaces, providing limited extensibility and programmability for new work to build on. For example, implementations of the search space and search algorithm are often intertwined, requiring
13、substantial coding effort to try new search spaces or search algorithms. ContributionsWe describe a modular language for encoding search spaces over general computa- tional graphs. We aim to improve the programmability, modularity, and reusability of architecture search systems. We are able to use t
14、he language constructs to encode search spaces in the literature. Furthermore, these constructs allow the expert to create new search spaces and modify existing ones in structured ways. Search spaces expressed in the language are exposed to search algorithms under a consistent interface, decoupling
15、the implementations of search spaces and search algorithms. We showcase these functionalities by easily comparing search spaces and search algorithms from the architecture search literature. These properties will enable better architecture search research by making it easier to benchmark and reuse s
16、earch algorithms and search spaces. 2Related work Hyperparameter optimizationAlgorithms for hyperparameter optimization often focus on small or simple hyperparameter spaces (e.g., closed subsets of Euclidean space in low dimensions). Hy- perparameters might be categorical (e.g., choice of regularize
17、r) or continuous (e.g., learning rate and regularization constant). Gaussian process Bayesian optimization 7 and sequential model based optimization 8 are two popular approaches. Random search has been found to be com- petitive for hyperparameter optimization 9,10. Conditional hyperparameter spaces
18、(i.e., where some hyperparameters may be available only for specifi c values of other hyperparameters) have also been considered 11,12. Hyperparameter optimization systems (e.g. Hyperopt 2, Spearmint 3, SMAC 5,8 and BOHB 4) are general-purpose and domain-independent. Yet, they rely on the expert to
19、distill the problem into an hyperparameter space and write the mapping from hyperparameter values to implementations. Architecture searchContributions to architecture search often come in the form of search algo- rithms, evaluation strategies, and search spaces. Researchers have considered a variety
20、 of search algorithms, including reinforcement learning 13, evolutionary algorithms 14,15, MCTS 16, SMBO 16,17, and Bayesian optimization 18. Most search spaces have been proposed for recurrent or convolutional architectures 13,14,15 focusing on image classifi cation (CIFAR-10) and language modeling
21、 (PTB). Architecture search encodes much of the architecture design in the search space (e.g., the connectivity structure of the computational graph, how many operations to use, their type, and values for specifying each operation chosen). However, the literature has yet to provide a consistent meth
22、od for designing and encoding such search spaces. Systems such as Auto-Sklearn 19, TPOT 20, and Auto-Keras 21 have been developed for specifi c use-cases (e.g., Auto-Sklearn and TPOT focus on classifi cation and regression of featurized vector data, Auto-Keras focus on image classifi cation) and the
23、refore support relatively rigid workfl ows. The lack of focus on extensibility and programmability makes these systems unsuitable as frameworks for general architecture search research. 3Proposed approach: modular and programmable search spaces To maximize the impact of architecture search research,
24、 it is fundamental to improve the programma- bility of architecture search tools3. We move towards this goal by designing a language to write search spaces over computational graphs. We identify the following advantages for our language and search spaces encoded in it: Similarity to computational gr
25、aphs:Writing a search space in our language is similar to writing a fi xed computational graph in an existing deep learning framework. The main difference is that nodes in the graph may be search spaces rather than fi xed operations (e.g., see Figure 5). A search space maps to a single computational
26、 graph once all its hyperparameters have been assigned values (e.g., in frame d in Figure 5). 3cf. the effect of highly programmable deep learning frameworks on deep learning research and practice. 2 Modularity and reusability:The building blocks of our search spaces are modules and hyper- parameter
27、s. Search spaces are created through the composition of modules and their interactions. Implementing a new module only requires dealing with aspects local to the module. Modules and hyperparameters can be reused across search spaces, and new search spaces can be written by combining existing search
28、spaces. Furthermore, our language supports search spaces in general domains (e.g., deep learning architectures or Scikit-Learn 22 pipelines). Laziness:A substitution module delays the creation of a subsearch space until all hyperpa- rameters of the substitution module are assigned values. Experts ca
29、n use substitution modules to encode natural and complex conditional constructions by concerning themselves only with the conditional branch that is chosen. This is simpler than the support for conditional hyper- parameter spaces provided by hyperparameter optimization tools, e.g., in Hyperopt 2, wh
30、ere all conditional branches need to be written down explicitly. Our language allows conditional constructs to be expressed implicitly through composition of language constructs (e.g., nesting substitution modules). Laziness also allows us to encode search spaces that can expand infi nitely, which i
31、s not possible with current hyperparameter optimization tools (see Appendix D.1). Automatic compilation to runnable computational graphs:Once all choices in the search space are made, the single architecture corresponding to the terminal search space can be mapped to a runnable computational graph (
32、see Algorithm 4). By contrast, for general hyperparameter optimization tools this mapping has to be written manually by the expert. 4 Components of the search space specifi cation language A search space is a graph (see Figure 5) consisting of hyperparameters (either of type independent or dependent
33、) and modules (either of type basic or substitution). This section describes our language components and show encodings of simple search spaces in our Python implementation. Figure 5 and the corresponding search space encoding in Figure 4 are used as running examples. Appendix A and Appendix B provi
34、de additional details and examples, e.g. the recurrent cell search space of 23. Independent hyperparametersThe value of an independent hyperparameter is chosen from its set of possible values. An independent hyperparameter is created with a set of possible values, but without a value assigned to it.
35、 Exposing search spaces to search algorithms relies mainly on iteration over and value assignment to independent hyperparameters. An independent hyperparameter in our implementation is instantiated as, for example,D(1, 2, 4, 8). In Figure 5,IH-1has set of possible values 64,128 and is eventually ass
36、igned value 64 (shown in frame d). Dependent hyperparametersThe value of a dependent hyperparameter is computed as a func- tion of the values of the hyperparameters it depends on (see line 7 of Algorithm 1). Depen- dent hyperparameters are useful to encode relations between hyperparameters, e.g., in
37、 a convo- lutional network search space, we may want the number of fi lters to increase after each spatial reduction. In our implementation, a dependent hyperparameter is instantiated as, for example,h = DependentHyperparameter(lambda dh:2*dhunits, units:h_units). In Figure 5, in the transition from
38、 frameato frameb,IH-3is assigned value 1, triggering the value assignment of DH-1 according to its function fn:2*x. 1defone_layer_net(): 2a_in, a_out = dropout(D(0.25,0.5) 3b_in, b_out = dense(D(100, 200, 300) 4c_in, c_out = relu() 5a_outout.connect(b_inin) 6b_outout.connect(c_inin) 7return a_in, c_
39、out Figure 1: Search space over feedforward networks with dropout rate of0.25or0.5, ReLU activations, and one hidden layer with 100, 200, or 300 units. Basic modulesA basic module implements computation that depends on the values of its properties. Search spaces involving only basic modules and hype
40、rparameters do not create new modules or hyperparameters, and therefore are fi xed computational graphs (e.g., see framesc anddin Figure 5). Upon compilation, a basic module consumes the values of its inputs, per- forms computation, and publishes the results to its outputs (see Algorithm 4). Deep le
41、arning layers can be wrapped as basic modules, e.g., a fully connected layer can be wrapped as a single-input single-output basic module with one hyper- parameter for the number of units. In the search space in Figure 1,dropout,dense, andreluare 3 basic modules. In Figure 5, both framescanddare sear
42、ch spaces with only basic modules and hyperparameters. In the search space of framed, all hyperparameters have been assigned values, and therefore the single architecture can be mapped to its implementation (e.g., in Tensorfl ow). 1defmulti_layer_net(): 2h_or = D(0, 1) 3h_repeat = D(1, 2, 4) 4return
43、siso_repeat( 5lambda: siso_sequential( 6dense(D(300), 7siso_or(relu, tanh, h_or) 8), h_repeat) Figure 2: Search space over feedforward networks with 1, 2, or 4 hidden layers and ReLU or tanh activations. Substitution modulesSubstitution modules encode structural transformations of the com- putationa
44、l graph that are delayed4until their hyperparameters are assigned values. Similarly to a basic module, a substitution module has hyperparameters, inputs, and outputs. Contrary to a basic module, a substitution module does not implement computationit is substituted by a subsearch space (which depends
45、 on the val- ues of its hyperparameters and may contain new substitution modules). Substitution is triggered once all its hyperparameters have been assigned values. Upon substitution, the module is removed from the search space and its connections are rerouted to the corresponding inputs and outputs
46、 of the generated subsearch space (see Algorithm 1 for how substitutions are resolved). For example, in the transition from framebto framecof Figure 5, IH-2 was assigned the value 1 and Dropout-1 and IH-7 were created by the substitution ofOptional-1. The connections ofOptional-1were rerouted toDrop
47、out-1. IfIH-2had been assigned the value0,Optional-1would have been substituted by an identity basic module and no new hyperparameters would have been created. Figure 2 shows a search space using two substitution modules:siso_orchooses betweenreluandtanh;siso_repeatchooses how many layers to include
48、. siso_sequential is used to avoid multiple calls to connect as in Figure 1. 1defrnn_cell(hidden_fn , output_fn): 2h_inputs , h_outputs = hidden_fn() 3y_inputs , y_outputs = output_fn() 4h_outputsout.connect(y_inputsin) 5returnh_inputs , y_outputs Figure 3: Auxiliary function to create the search sp
49、ace for the recurrent cell given functions that create the subsearch spaces. AuxiliaryfunctionsAuxiliaryfunctions, while not components per se, help create com- plex search spaces. Auxiliary functions might take functions that create search spaces and put them together into a larger search space. Fo
50、r example, the search space in Figure 3 defi nes an auxiliary RNN cell that captures the high-level functional dependency:ht= qh(xt,ht1) andyt=qy(ht).We can instantiate a specifi c search space asrnn_cell(lambda: siso_sequential(concat(2), one_layer_net(), multi_layer_net). 5Example search space 1de
51、fsearch_space(): 2h_n = D(1, 2, 4) 3h_ndep = DependentHyperparameter( 4lambda dh: 2 * dhx, x: h_n) 5 6c_inputs , c_outputs = conv2d(D(64,128) 7o_inputs , o_outputs = siso_optional( 8lambda: dropout(D(0.25,0.5), D(0, 1) 9fn = lambda: conv2d(D(64,128) 10r1_inputs , r1_outputs = siso_repeat(fn, h_n) 11
52、r2_inputs , r2_outputs = siso_repeat(fn, h_ndep) 12cc_inputs , cc_outputs = concat(2) 13 14o_inputsin.connect(c_outputsout) 15r1_inputsin.connect(o_outputsout) 16r2_inputsin.connect(o_outputsout) 17cc_inputsin0.connect(r1_outputsout) 18cc_inputsin1.connect(r2_outputsout) 19returnc_inputs , cc_output
53、s Figure 4: Simple search space showcasing all lan- guage components. See also Figure 5. We ground discussion textually, through code examples (Figure 4), and visually (Figure 5) through an example search space.There is a convolutional layer followed, optionally, by dropout with rate0.25or0.5. After
54、 the optional dropout layer, there are two parallel chains of convolutional layers. The fi rst chain has length 1,2, or4, and the second chain has double the length of the fi rst. Finally, the outputs of both chains are concatenated. Each convolutional layer has64or128 fi lters (chosen separately).
55、This search space has 25008 distinct models. Figure 5 shows a sequence of graph transitions for this search space.IHandDHdenote type identifi ers for independent and dependent hyper- parameters, respectively. Modules and hyperpa- 4Substitution modules are inspired by delayed evaluation in programmin
56、g languages. 4 Conv2D-1 in out fi lters Optional-1 in out opt Repeat-1 in out k Repeat-2 in out k Concat-1 in0in1 out IH-20, 1 DH-1fn: 2*x x IH-31, 2, 4 IH-164, 128 a Conv2D-1 in out fi lters Optional-1 in out opt Conv2D-2 in out fi lters Conv2D-3 in out fi lters Conv2D-4 in out fi lters Concat-1 in
57、0in1 out IH-20, 1 IH-164, 128 IH-464, 128 IH-564, 128 IH-664, 128 DH-1 2 IH-31 b Conv2D-1 in out fi lters Dropout-1 in out prob Conv2D-2 in out fi lters Conv2D-3 in out fi lters Conv2D-4 in out fi lters Concat-1 in0in1 out IH-164, 128 IH-464, 128 IH-564, 128 IH-664, 128 IH-70.25, 0.5 DH-1 2 IH-31 IH
58、-21 c Conv2D-1 in out fi lters Dropout-1 in out prob Conv2D-2 in out fi lters Conv2D-3 in out fi lters Conv2D-4 in out fi lters Concat-1 in0in1 out IH-164 IH-4128 IH-5128 IH-664 IH-70.5 DH-1 2 IH-31 IH-21 d Figure 5: Search space transitions for the search space in Figure 4 (framea) leading to a sin
59、gle architecture (framed). Modules and hyperparameters created since the previous frame are highlighted in green. Hyperparameters assigned values since the previous frame are highlighted in red. rameters types are suffi xed with a number to generate unique identifi ers. Modules are represented by rectangles that contain inputs, outputs, and properties. Hyperparameters are represen
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026山东青岛日报报业集团(青岛日报社)二次招聘3人模拟试卷含完整答案详解(名师系列)
- 2026广西凭祥产业园区工会联合会社会化工会工作者招聘2人考前冲刺密卷附答案详解【能力提升】
- 2026江西南昌安义县工投商业管理有限公司第二批招聘工作人员1人笔试题库及答案详解【名校卷】
- 2026年安义县殡葬服务所招聘工作人员20人考前冲刺密卷含答案详解(满分必刷)
- 2026仰恩大学招聘教师及教辅人员考前冲刺试卷及答案详解【基础+提升】
- 2026广西梧州市人力资源和社会保障局市本级第七批城镇公益性岗位招用31人考前冲刺试卷附答案详解(黄金题型)
- 2026贵州遵义市播州区退役军人事务局关于招聘城镇公益性岗位人员1人的备考题库带答案详解(夺分金卷)
- 2026年蚌埠市怀远县公开竞聘省示范高中副校长3人备考题库附答案详解【培优B卷】
- 2026秋季福建福维新材料有限公司招聘42人考前冲刺试卷带答案详解(B卷)
- 2026广东梅州兴宁市教育局选调教研员7人考前冲刺密卷标准卷附答案详解
- 2026年重庆市“五方面人员”选拔乡镇领导班子考试历年参考题库(含完整答案)
- (正式版)DB31 650-2020 《非织造布单位产品能源消耗限额》
- (已压缩)广东省工程勘察设计服务成本取费导则(2024版)
- T/CECS 10214-2022钢面镁质复合风管
- DL∕T 5776-2018 水平定向钻敷设电力管线技术规定
- 作业治疗技术复习试题含答案
- 电力建设工程量清单计价规范变电
- 物业公司常见劳动争议处理
- LY/T 3274-2021木塑复合材料分级
- GB/T 30370-2022火力发电机组一次调频试验及性能验收导则
- GA/T 1481.2-2018北斗/全球卫星导航系统公安应用第2部分:终端定位技术要求
评论
0/150
提交评论