TF-Coder: Program Synthesis for Tensor Manipulations
Open Access
- 27 May 2022
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 44 (2) , 1-36
Abstract
The success and popularity of deep learning is on the rise, partially due to powerful deep learning frameworks such as TensorFlow and PyTorch, which make it easier to develop deep learning models. However, these libraries also come with steep learning curves, since programming in these frameworks is quite different from traditional imperative programming with explicit loops and conditionals. In this work, we present a tool called TF-Coder for programming by example in TensorFlow. TF-Coder uses a bottom-up weighted enumerative search, with value-based pruning of equivalent expressions and flexible type- and value-based filtering to ensure that expressions adhere to various requirements imposed by the TensorFlow library. We train models to predict TensorFlow operations from features of the input and output tensors and natural language descriptions of tasks to prioritize relevant operations during search. TF-Coder solves 63 of 70 real-world tasks within 5 minutes, sometimes finding simpler solutions in less time compared to experienced human programmers.Keywords
All Related Versions
This publication has 30 references indexed in Scilit:
- Predicting a Correct Program in Programming by Example2015
- Synthesizing data structure transformations from input-output examples2015
- Deep learningNature, 2015
- TRANSIT2013
- Program sketchingInternational Journal on Software Tools for Technology Transfer, 2012
- Spreadsheet data manipulation using examplesCommunications of the ACM, 2012
- Synthesizing data structure manipulations from storyboards2011
- A statistical interpretation of term specificity and its application in retrievalJournal of Documentation, 2004
- How not to lie with statistics: the correct way to summarize benchmark resultsCommunications of the ACM, 1986
- Symbolic execution and program testingCommunications of the ACM, 1976