Toward artificial intelligence that learns to write code [Tech Xplore]

June 17, 2019

Learning to code involves recognizing how to structure a program, and how to fill in every last detail correctly. No wonder it can be so frustrating.

A new program-writing AI, SketchAdapt, offers a way out. Trained on tens of thousands of program examples, SketchAdapt learns how to compose short, high-level programs, while letting a second set of algorithms find the right sub-programs to fill in the details. Unlike similar approaches for automated program-writing, SketchAdapt knows when to switch from statistical pattern-matching to a less efficient, but more versatile, symbolic reasoning mode to fill in the gaps.

"Neural nets are pretty good at getting the structure right, but not the details," says Armando Solar-Lezama, a professor at MIT's Computer Science and Artificial Intelligence Laboratory (CSAIL). "By dividing up the labor—letting the neural nets handle the high-level structure, and using a search strategy to fill in the blanks—we can write efficient programs that give the right answer."

SketchAdapt is a collaboration between Solar-Lezama and Josh Tenenbaum, a professor at CSAIL and MIT's Center for Brains, Minds and Machines. The work will be presented at the International Conference on Machine Learning June 10-15.

Program synthesis, or teaching computers to code, has long been a goal of AI researchers. A computer that can program itself is more likely to learn language faster, converse fluently, and even model human cognition. All of this drew Solar-Lezama to the field as a graduate student, where he laid the foundation for SketchAdapt.

Associated CBMM Pages: