Neural-Guided Deductive Search for Real-Time Program Synthesis from Examples

Synthesizing user-intended programs from a small number of input-output examples is a challenging problem with several important applications like spreadsheet manipulation, data wrangling and code refactoring. Existing synthesis systems either completely rely on deductive logic techniques that are extensively hand-engineered or on purely statistical models that need massive amounts of data, and in general fail to provide real-time synthesis on challenging benchmarks. In this work, we propose Neural Guided Deductive Search (NGDS), a hybrid synthesis technique that combines the best of both symbolic logic techniques and statistical models. Thus, it produces programs that satisfy the provided specifications by construction and generalize well on unseen examples, similar to data-driven systems. Our technique effectively utilizes the deductive search framework to reduce the learning problem of the neural component to a simple supervised learning setup. Further, this allows us to both train on sparingly available real-world data and still leverage powerful recurrent neural network encoders. We demonstrate the effectiveness of our method by evaluating on real-world customer scenarios by synthesizing accurate programs with up to 12x speed-up compared to state-of-the-art systems.

[1]  Om P. Damani,et al.  Combining Top-Down and Bottom-Up Techniques in Program Derivation , 2015, LOPSTR.

[2]  Nando de Freitas,et al.  Neural Programmer-Interpreters , 2015, ICLR.

[3]  Pushmeet Kohli,et al.  RobustFill: Neural Program Learning under Noisy I/O , 2017, ICML.

[4]  Lukasz Kaiser,et al.  Neural GPUs Learn Algorithms , 2015, ICLR.

[5]  Sumit Gulwani,et al.  Automating string processing in spreadsheets using input-output examples , 2011, POPL '11.

[6]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[7]  Sebastian Nowozin,et al.  DeepCoder: Learning to Write Programs , 2016, ICLR.

[8]  Lihong Li,et al.  Neuro-Symbolic Program Synthesis , 2016, ICLR.

[9]  Zohar Manna,et al.  Toward automatic program synthesis , 1971, Symposium on Semantics of Algorithmic Languages.

[10]  Sumit Gulwani,et al.  FlashExtract: a framework for data extraction by examples , 2014, PLDI.

[11]  Amit Agarwal,et al.  CNTK: Microsoft's Open-Source Deep-Learning Toolkit , 2016, KDD.

[12]  Rajeev Alur,et al.  TRANSIT: specifying protocols with concolic snippets , 2013, PLDI.

[13]  C. Cordell Green,et al.  What Is Program Synthesis? , 1985, J. Autom. Reason..

[14]  Pushmeet Kohli,et al.  TerpreT: A Probabilistic Programming Language for Program Induction , 2016, ArXiv.

[15]  Emina Torlak,et al.  Growing solver-aided languages with rosette , 2013, Onward!.

[16]  Sumit Gulwani,et al.  Predicting a Correct Program in Programming by Example , 2015, CAV.

[17]  Stephen Muggleton,et al.  Bias reformulation for one-shot function induction , 2014, ECAI.

[18]  Franz Franchetti,et al.  SPIRAL: Code Generation for DSP Transforms , 2005, Proceedings of the IEEE.

[19]  Tim Rocktäschel,et al.  Programming with a Differentiable Forth Interpreter , 2016, ICML.

[20]  J. Clausen,et al.  Branch and Bound Algorithms-Principles and Examples , 2003 .

[21]  Dawn Xiaodong Song,et al.  Making Neural Programming Architectures Generalize via Recursion , 2017, ICLR.

[22]  Catherine Ramsey,et al.  Learning to Learn Programs from Examples : Going Beyond Program Structure , 2017 .

[23]  Sumit Gulwani,et al.  Programming by Examples: PL Meets ML , 2017, APLAS.

[24]  Sumit Gulwani,et al.  Learning Syntactic Program Transformations from Examples , 2016, 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE).

[25]  Sumit Gulwani,et al.  FlashMeta: a framework for inductive program synthesis , 2015, OOPSLA.

[26]  Wojciech Zaremba,et al.  Learning Simple Algorithms from Examples , 2015, ICML.

[27]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[28]  Richard C. T. Lee,et al.  PROW: A Step Toward Automatic Program Writing , 1969, IJCAI.

[29]  Cezary Kaliszyk,et al.  Deep Network Guided Proof Search , 2017, LPAR.