Researchers Created 'Bayou', An AI Capable In Writing Codes On Its Own

It has been a goal for humans to create a computer software capable of creating other software on its own. And here, researchers have made than happen.

Computer scientists at Rice University’s Intelligent Software Systems Laboratory has developed a deep learning AI that works like a search engine for codes. This AI is aimed to help programmers to write codes that contain Java application programming interfaces (APIs).

The AI is called Bayou, and it allows developers to enter a few keywords indicating what kind of program they want to create. The software then returns the codes needed by the developers with their task.

"People have tried for 60 years to build systems that can write code, but the problem is that these methods aren’t that good with ambiguity," said Bayou co-creator Swarat Chaudhuri, an associate professor of computer science at Rice University. "You usually need to give a lot of details about what the target program does, and writing down these details can be as much work as just writing the code."

Bayou and its deep learning software application has been developed with funding help from the U.S. Department of Defense’s Defense Advanced Research Projects Agency (DARPA) and Google.

"Bayou is a considerable improvement," Chaudhuri continued.

The AI has trained itself by studying millions of lines of codes written by humans Java programmers on GitHub, which is a home to almost 1500 applications' source code. "It’s basically studied everything on GitHub, and it draws on that to write its own code," said Chaudhuri.

Using a method called neural sketch learning, Bayou's AI was trained to recognize high-level patterns in hundreds of thousands of examples, explained the researchers at Rice University. It does this by creating a “sketch” for each program it reads, to then associate this sketch with the "intent" that lies behind the program.

Bayou screenshot

The Java programs the AI was trained on, were marked with labels, which contained information such as library functions, the set of API calls, the types used in the code and its metadata.

This is to enable Bayou to return users' question based on those labels, make a judgement call about what program it's being asked to write, and referring to its sketches to find the most relevant ones.

"Based on that guess, a separate part of Bayou, a module that understands the low-level details of Java and can do automatic logical reasoning, is going to generate four or five different chunks of code," explained Chris Jermaine, Bayou co-creator and a professor of computer science who co-directs Rice’s Intelligent Software Systems Laboratory.

"It’s going to present those to the user like hits on a web search. This one is most likely the correct answer, but here are three more that could be what you’re looking for."

"The days when a programmer could write code from scratch are long gone,” added Jermaine.

Bayou researchers
Rice University computer scientists (left-right) Vijay Murali, Chris Jermaine, Swarat Chaudhuri and Letao Qi

Here, the researchers concluded that Bayou is a major improvement over previous attempts to build computers to write codes on its own.

"Modern software development is all about APls," said Bayou's architect Vijay Murali. "These are system-specific rules, tools, definitions, and protocols that allow a piece of code to interact with a specific operating system, database, hardware platform or another software system. There are hundreds of APIs, and navigating them is very difficult for developers. They spend lots of time at question-answer sites like Stack Overflow asking other developers for help."

Bayou can answer questions immediately. And this immediate feedback could solve the problem right away. And it it doesn't, Bayou's answer should help its human peers in finding the more informed question.

"The more information we have about what people want from a system like Bayou, the better we can make it," Jermaine said. "We want as many people to use it as we can get."

But no, Bayou can't self-replicate. The AI only sketches a program its human programmer wants to write, and its only function is to work alongside programmers and developers. These sketches still need to be pieced together into the larger work, and they may have to be put together manually onto a project before the intended program can run.

The technology of computers capable of writing its own code is still in its infancy. But Bayou that emerges from a concept called "AI as IT.", is a major step in the search for an AI programmer, a longstanding goal for computer science researchers.

Bayou has been released as an open source project under the Apache 2.0 licence. Programmers can also join its development at GitHub.

Published: 
01/05/2018