3 years, 6 months ago

AI Can Write Code Like Humans—Bugs and All

Some software developers are now letting artificial intelligence help write their code. “And it can be really hard to track this down, perhaps because it seems like it makes errors that have a different flavor than the kind I would make.” The risks of AI generating faulty code may be surprisingly high. Researchers at NYU recently analyzed code generated by Copilot and found that, for certain tasks where security is crucial, the code contains security flaws around 40 percent of the time. “But the way Copilot was trained wasn’t actually to write good code—it was just to produce the kind of text that would follow a given prompt.” Despite such flaws, Copilot and similar AI-powered tools may herald a sea change in the way software developers write code. “It seems like it makes errors that have a different flavor than the kind I would make.” Alex Naka, data scientist While analyzing the code made available for a Copilot plugin, Dolan-Gavitt found that it included a list of restricted phrases.

Wired

Discover Related