Now for the last AI trick: writing computer code

It may take years to learn how to write computer code well. SourceAI, a Parisian startup, thinks programming shouldn’t be such a big deal.

The company is refining a tool that uses artificial intelligence to write code based on a short textual description of what the code should do. Tell the company’s tool to “multiply two numbers given by a user”, for example, and it will create a dozen rows in Python to do just that.

SourceAI’s ambitions are a sign of a larger revolution in software development. Advances in machine learning have made it possible to automate a growing array of coding tasks, from auto-entering code segments and fine-tuning algorithms to finding source code and locating annoying bugs.

Coding automation could change software development, but the limitations and blind spots of modern AI can introduce new problems. Machine learning algorithms can behave unpredictably, and machine-generated code can harbor harmful bugs unless it is carefully examined.

SourceAI, and other similar programs, aim to take advantage of GPT-3, a powerful AI language program announced in May 2020 by OpenAI, a San Francisco-based company focused on fundamental advancements in AI. The founders of SourceAI were among the few hundred people who gained access to GPT-3. OpenAI has not released the code for GPT-3, but it does allow some users to access the model through an API.

GPT-3 is a huge network of artificial neurons formed on huge amounts of text pulled from the web. He does not grasp the meaning of this text, but he can capture language models well enough to generate articles on a given topic, summarize a text succinctly, or answer questions about the content of documents.

“By testing the tool, we realized that it could generate code,” says Furkan Bektes, Founder and CEO of SourceAI. “That’s when we got the idea to develop SourceAI.”

He wasn’t the first to notice the potential. Shortly after the release of GPT-3, a programmer has shown it can build custom web apps, including buttons, text input fields, and colors, remixing snippets of code it had been fed into. Another company, Deconstruct, plans to commercialize the technology.

SourceAI aims to enable its users to generate a wider range of programs in many different languages, thereby helping to automate the creation of more software. “Developers will save time in coding, while people without coding knowledge will also be able to develop applications,” says Bektes.

Another company, TabNine, used a previous version of the OpenAI language model, GPT-2, published by OpenAI, to create a tool that offers to automatically complete a line or function when a developer starts typing.

Some software giants also seem interested. Microsoft invested $ 1 billion in OpenAI in 2019 and agreed to GPT-3 license. At the software giant Design a conference in May, Sam Altman, co-founder of OpenAI, demonstrated how GPT-3 could auto-complete code for a developer. Microsoft declined to comment on how it might use AI in its software development tools.

Brendan Dolan-Gavitt, an assistant professor in the computer science and engineering department at NYU, says language models like GPT-3 will most likely be used to help human programmers. Other products will use the models to “identify likely bugs in your code as you write it, looking for ‘surprising’ things for the language model,” he says.

However, using AI to generate and analyze code can be problematic. In an article posted online in March, researchers at MIT has shown that an AI program trained to verify this code will work safely can be tricked into making some careful changes, like replacing some variables, to create a harmful program. Shashank Srikant, a doctoral student involved in the work, says AI models shouldn’t be overused. “Once these models go into production, things can get nasty pretty quickly,” he says.

NYU professor Dolan-Gavitt says there are issues with the nature of the language models used to generate coding tools. “I think the direct use of language models would probably end up producing buggy and even insecure code,” he says. “After all, they’re trained in human-written code, which is very often buggy and insecure.”

Leave a Reply

Your email address will not be published. Required fields are marked *