[ICLR'17] DEEPCODER: LEARNING TO WRITE PROGRAMS
DEEPCODER: LEARNING TO WRITE PROGRAMS
Basic Information
- Authors: Matej Balog, Alexander L. Gaunt, Marc Brockschmidt, Sebastian Nowozin, Daniel Tarlow
- Publication: ICLR'17
- Description: Generate code based on input-output examples via neural network techniques
INDUCTIVE PROGRAM SYNTHESIS (IPS)
The Inductive Program Synthesis (IPS) problem is the following: given input-output examples, produce a program that has behavior consistent with the examples.
Building an IPS system requires solving two problems:
- Search problem: to find consistent programs we need to search over a suitable set of possible programs. We need to define the set
(i.e., the program space) and search procedure. - Ranking problem: if there are multiple programs consistent with the input-output examples, which one do we return?
Domain Specific Languages (DSLs)
- DSLs are programming languages that are suitable for a
specialized domain but are more restrictive than full-featured programming languages. - Restricted DSLs can also enable more efficient special-purpose search algorithms.
- The choice of DSL also affects the difficulty of the ranking problem.
Search Techniques
Technique for searching for programs consistent with input-output examples.
- Special-purpose algorithm
- Satisfiability Modulo Theories (SMT) solving
Ranking
LEARNING INDUCTIVE PROGRAM SYNTHESIS (LIPS)
The components of LIPS are:
a DSL specification,
An attribute function A that maps programs P of the DSL to finite attribute vectors a = A(P). (Attribute vectors of different programs need not have equal length.) Attributes serve as the link between the machine learning and the search component of LIPS: the machine learning model predicts a distribution q(a | E), where E is the set of input-output examples, and the search procedure aims to search over programs P as ordered by q(A(P) | E). Thus an attribute is useful if it is both predictable from input-output examples, and if conditioning on its value significantly reduces the effective size of the search space.
Possible attributes are the (perhaps position-dependent) presence or absence of high-level functions (e.g., does the program contain or end in a call to SORT). Other possible attributes include control
flow templates (e.g., the number of loops and conditionals).a data-generation procedure,
Generate a dataset ((P(n), a(n), E(n)))Nn=1 of programs P(n) in the chosen DSL, their attributes a(n), and accompanying input-output examples E(n)).
a machine learning model that maps from input-output examples to program attributes,
Learn a distribution of attributes given input-output examples, q(a | E).
a search procedure that searches program space in an order guided by the model from (3).
Interface with an existing solver, using the predicted q(a | E) to guide the search.
DEEPCODER: Instantiation of LIPS
- DSL AND ATTRIBUTES
A program in our DSL is a sequence of function calls, where the result of each call initializes a fresh variable that is either a
singleton integer or an integer array. Functions can be applied to any of the inputs or previously computed (intermediate) variables. The output of the program is the return value of the last function
call, i.e., the last variable. See Fig. 1 for an example program of length T = 4 in our DSL.
Overall, our DSL contains the first-order functions HEAD, LAST, TAKE, DROP, ACCESS, MINIMUM, MAXIMUM, REVERSE, SORT, SUM, and the higher-order functions MAP, FILTER, COUNT, ZIPWITH, SCANL1.
- DATA GENERATION
- MACHINE LEARNING MODEL
- an encoder: a differentiable mapping from a set of M input-output examples generated by
a single program to a latent real-valued vector, and - a decoder: a differentiable mapping from the latent vector representing a set of M inputoutput
examples to predictions of the ground truth program’s attributes.
- an encoder: a differentiable mapping from a set of M input-output examples generated by
- SEARCH
- Depth-first search (DFS)
- “Sort and add” enumeration
- Sketch
- TRAINING LOSS FUNCTION
Negative cross entropy loss
Implementation
[ICLR'17] DEEPCODER: LEARNING TO WRITE PROGRAMS的更多相关文章
- 17、Learning and Transferring IDs Representation in E-commerce笔记
一.摘要 电子商务场景:主要组成部分(用户ID.商品ID.产品ID.商店ID.品牌ID.类别ID等) 传统的编码两个缺陷:如onehot,(1)存在稀疏性问题,维度高(2)不能反映关系,以两个不同的i ...
- SysML——AI-Sys Spring 2019
AI-Sys Syllabus Projects Grading AI-Sys Spring 2019 When: Mondays and Wednesdays from 9:30 to 11:00 ...
- [综述]Deep Compression/Acceleration深度压缩/加速/量化
Survey Recent Advances in Efficient Computation of Deep Convolutional Neural Networks, [arxiv '18] A ...
- (zhuan) Deep Reinforcement Learning Papers
Deep Reinforcement Learning Papers A list of recent papers regarding deep reinforcement learning. Th ...
- Machine Learning 方向读博的一些重要期刊及会议 && 读博第一次组会时博导的交代
读博从报道那天算起到现在已经3个多月了,这段时间以来和博导总共见过两次面,寥寥数语的见面要我对剩下的几年读书生活没有了太多的期盼,有些事情一直想去做却总是打不起来精神,最后挣扎一下还是决定把和博导开学 ...
- 【Deep Learning Nanodegree Foundation笔记】第 0 课:课程计划
第一周 机器学习的类型,以及何时使用机器学习 我们将首先简单介绍线性回归和机器学习.这将让你熟悉这些领域的常用术语,你需要了解的技术进展,并了解深度学习在更大的机器学习背景中的位置. 直播:线性回归 ...
- Github项目推荐-图神经网络(GNN)相关资源大列表
文章发布于公号[数智物语] (ID:decision_engine),关注公号不错过每一篇干货. 转自 | AI研习社 作者|Zonghan Wu 这是一个与图神经网络相关的资源集合.相关资源浏览下方 ...
- 库、教程、论文实现,这是一份超全的PyTorch资源列表(Github 2.2K星)
项目地址:https://github.com/bharathgs/Awesome-pytorch-list 列表结构: NLP 与语音处理 计算机视觉 概率/生成库 其他库 教程与示例 论文实现 P ...
- CNN结构:场景分割与Relation Network
参考第一个回答:如何评价DeepMind最新提出的RelationNetWork 参考链接:Relation Network笔记 ,暂时还没有应用到场景中 LiFeifei阿姨的课程:CV与ML课程 ...
随机推荐
- vue中的v-cloak
问题 在使用vue时,HTML 绑定 Vue实例,在页面加载时会闪烁类似{{msg}}这样的信息.可能会导致用户体验不好. 使用v-cloak v-cloak就能解决这个问题. (1)用法 这个指令保 ...
- python之模块3
RE模块使用方法 (1)finditer 返回迭代器 (2)search:只匹配第一个结果 import re res=re.search("\d+","djksf34 ...
- px2rem
vue做移动端适配,借助px2rem 插件方便的将px单位转为了rem 1.安装 npm install px2rem-loader lib-flexible --save 2.在项目入口文件mai ...
- 让你的app在iPhoneX中全屏显示
如果你的项目什么也不修改,直接把你的app运行在 iPhone X 模拟器下,很有可能就会出现下面的情形: 上下都有黑边,没有全屏显示 为了让app能够全屏显示,你需要准备以下的内容 Xcode 9. ...
- JAVA中通过Jedis操作Redis连接与插入简单库
一.简述 JAVA中通过Jedis操作Redis连接与插入简单库 二.依赖 <!-- https://mvnrepository.com/artifact/redis.clients/jedis ...
- ORA-12514 TNS:LISTENER DOES NOT CURRENTLY KNOW OF SERVICE REQUESTED IN CONNE
对比Oracle服务器地址,端口号,还有实例名(也就是服务名).修改tnsnames.ora 在Oracle客户端的安装目录底下. 然后用sqlplus [用户名]/[密码]@[服务命名] 服务命名 ...
- Rabbit五种消息队列学习(一) – 总述
RabbitMQ支持五种消息传递类型,分别如下图所示: 上图中显示6中消息队列分别为: 1.简单队列 一个生产者将消息放到队列中,一个消费者监听队列 2.工作队列(Work queues) 一个生产者 ...
- Mac NPM 配置
1.NPM 简介 NPM(node package manager),通常称为 node 包管理器,是目前世界上最大的开源库生态系统.使用 NPM 可以对 node 包进行安装.卸载.更新.查看.搜索 ...
- 安卓自己定义View进阶-Path基本操作
版权声明:本人全部文章均採用 [知识共享 署名-非商业性使用-禁止演绎 4.0 国际 许可协议] 转载前请保证理解此协议,原文出处 :http://www.gcssloop.com/#blog htt ...
- Atitit s2018.6 s6 doc list on com pc.docx Atitit s2018.6 s6 doc list on com pc.docx Aitit algo fix 算法系列补充.docx Atiitt 兼容性提示的艺术 attilax总结.docx Atitit 应用程序容器化总结 v2 s66.docx Atitit file cms api
Atitit s2018.6 s6 doc list on com pc.docx Atitit s2018.6 s6 doc list on com pc.docx Aitit algo fi ...