Neural network for program synthesis

US10795645B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10795645-B2
Application numberUS-201715470784-A
CountryUS
Kind codeB2
Filing dateMar 27, 2017
Priority dateMar 27, 2017
Publication dateOct 6, 2020
Grant dateOct 6, 2020

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Described are systems, methods, and computer-readable media for program generation in a domain-specific language based on input-output examples. In accordance with various embodiments, a neural-network-based program generation model conditioned on an encoded set of input-output examples is used to generate a program tree by iteratively expanding a partial program tree, beginning with a root node and ending when all leaf nodes are terminal.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: for a given domain-specific language that defines a plurality of symbols and a plurality of production rules, providing an input-output encoder and a program-generation model comprising a neural network, the input-output encoder and the neural network having been trained on a plurality of programs within the domain-specific language and a plurality of respective training sets of input-output examples associated with the programs, wherein, for each of the plurality of programs and its associated training set, each input-output example of the training set comprises a pair of an input to the program and a corresponding output produced by the program from the input; providing a test set of input-output examples for a target program; using one or more hardware processors to perform operations for generating the target program based on the test set of input-output examples, the operations comprising: encoding the test set of input-output examples using the input-output encoder; conditioning the program-generation model on the encoded set of input-output examples; and using the neural network to generate a program tree representing the target program by iteratively expanding a partial program tree, beginning with a root node and ending when all leaf nodes are terminal, based on a computed probability distribution for a set of valid expansions, wherein leaves in the program tree and the partial program tree represent symbols in the domain-specific language and wherein non-leaf interior nodes in the program tree and the partial program tree represent production rules in the domain-specific language. 2. The method of claim 1 , wherein the neural network is a recursive-reverse-recursive neural network. 3. The method of claim 2 , wherein the recursive-reverse-recursive neural network specifies distributed representations of the plurality of symbols and the plurality of production rules and, for each of the plurality of production rules, first and second deep neural networks, and wherein iteratively expanding the partial program tree comprises, in each iteration: computing global leaf representations for at least non-terminal ones of the leaf nodes of the partial program tree by retrieving the distributed representations of the symbols represented by the leaf nodes, performing a recursive bottom-to-top pass through the partial program tree from the leaf nodes to the root node using the first deep neural networks, and thereafter performing a reverse-recursive top-to-bottom pass through the partial program tree from the root node to the leaf nodes using the second deep neural networks; computing the probability distribution for the set of valid expansions from the global leaf representations and the distributed representations of the production rules; selecting a non-terminal leaf node and a production rule based on the computed probability distribution; and expanding the partial program tree by applying the selected production rule to the selected non-terminal leaf node. 4. The method of claim 3 , wherein the program-generation model is conditioned prior to performing the recursive bottom-to-top pass by appending the encoded set of input-output examples to the distributed representations of the symbols associated with the leaf nodes to obtain updated distributed representations of the leaf nodes, and passing the updated distributed representations to a conditioning network. 5. The method of claim 3 , wherein the program-generation model is conditioned after performing the recursive bottom-to-top pass and prior to performing the reverse-recursive top-to-bottom pass by appending the encoded set of input-output examples to a distributed representation of the root node resulting from the bottom-to-top pass to thereby obtain an updated distributed representation of the root node, and passing the updated distributed representation of the root node to a conditioning network. 6. The method of claim 3 , wherein the program-generation model is conditioned after performing the reverse-recursive top-to-bottom pass by appending the encoded set of input-output examples to the global leaf representations to obtain updated global leaf representations, and passing the updated global leaf representations to a conditioning network prior to computing the probability distribution. 7. The method of claim 3 , wherein encoding the set of input-output examples comprises processing input and output of each input-output example separately using two respective deep bidirectional long short term memory neural networks to obtain respective input and output representations, and computing a cross correlation between each input example representation and the respective output example representation. 8. The method of claim 3 , wherein the probability distribution is a normalized exponential distribution over products of the global leaf representations and the distributed representations of the production rules. 9. The method of claim 3 , further comprising processing the global leaf representations with a bidirectional long short term memory neural network prior to computing the probability distribution. 10. The method of claim 3 , wherein the production rules defined by the domain-specific language are string transformations. 11. A system comprising: one or more hardware processors; and one or more machine-readable media storing instructions that, when executed by the one or more hardware processors, cause the one or more hardware processors to perform operations for generating a target program in a domain-specific language based on a test set of input-output examples each comprising a pair of an input and an output to be produced by the target program from the input, the domain-specific language defining a plurality of symbols and a plurality of production rules, the operations comprising: using an input-output encoder to encode the test set of input-output examples provided for the target program, the input-output encoder trained on a plurality of programs within the domain-specific language and a plurality of respective training sets of input-output examples associated with the programs, wherein, for each of the plurality of programs and its associated training set, each input-output example of the training set comprises a pair of an input to the program and a corresponding output produced by the program from the input; conditioning a program-generation model on the encoded set of input-output examples, the program-generation model comprising a neural network trained, together with the input-output encoder, on the plurality of programs and the plurality of respective training sets of input-output examples; and using the neural network to generate a program tree representing the target program by iteratively expanding a partial program tree, beginning with a root node and ending when all leaf nodes are terminal, based on a computed probability distribution for a set of valid expansions, wherein leaves in the program tree and the partial program tree represent symbols in the domain-specific language and wherein non-leaf interior nodes in the program tree and the partial program tree represent production rules in the domain-specific language. 12. The system of claim 11 , wherein the neural network is a recursive-reverse-recursive neural network that specifies distributed representations of the plurality of symbols and the plurality of production rules and, for each of the plurality of production rules, first and second deep neural networks; and wherein iteratively expanding the partial program tree comprises, in each iteration, operations comprising: computing global l

Assignees

Inventors

Classifications

  • Recurrent networks, e.g. Hopfield networks · CPC title

  • Combinations of networks · CPC title

  • Auto-encoder networks; Encoder-decoder networks · CPC title

  • characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU] · CPC title

  • Supervised learning · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10795645B2 cover?
Described are systems, methods, and computer-readable media for program generation in a domain-specific language based on input-output examples. In accordance with various embodiments, a neural-network-based program generation model conditioned on an encoded set of input-output examples is used to generate a program tree by iteratively expanding a partial program tree, beginning with a root nod…
Who is the assignee on this patent?
Microsoft Technology Licensing Llc
What technology area does this patent fall under?
Primary CPC classification G06F8/30. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 06 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 6 related publications on this page (citations in our corpus or others sharing the same primary CPC).