on site There is perhaps no more fundamental task in computer science than classification. Bubble, Heap, Merge – choose what you like. The methods of sorting data in a computer have been thoroughly theorized, serve as exercises for millions of novices, and have been optimized for decades by expert developers. Type the sort() function in any programming language and you can trust that code. Don’t touch me. It’s already working great.
But last year, an AI system developed by engineers at Google’s Deepmind made significant improvements in important ways. The system, which Deepmind calls his AlphaDev, was tasked with devising a new way to numerically permute short sequences in C++, a popular coding language. This means going under the hood and letting the AI build new algorithms in assembly code. It’s an instruction that bridges the gap between programming languages like C++ and computer hardware. When a C++ developer tells a computer to “sort”, those commands are translated into machine-readable code that tells the computer’s memory and processor what to do: where to move data, how to change it. accurately indicate. This is where the bit and metal come into contact.
The experiment worked. Since last April, C++ has run slightly faster thanks to a new sorting algorithm devised by AI. However, an engineer at AlphaDev describes today’s work as follows: Nature, that’s just the first step. “We want to optimize the entire computing stack,” says DeepMind researcher Daniel Mankowitz, who led the sorting project. Mankowitz says AlphaDev has already improved algorithms for other basic tasks, such as hashing, as well as sorting.
“I think this work is incredibly exciting,” says Armando Solar-Rezama, an MIT program synthesis expert who was not involved in the research. It’s useful to let the AI come up with new sorting algorithms. Building AI that can learn how to write state-of-the-art code across a range of tasks is far more important, he says. This means AlphaDev is beginning to learn more fundamentals about the art of coding itself.
Of course, that comes with serious limitations. “These are very small programs,” he adds. The total number of assembly code instructions is only a few dozen. However, these small programs are naturally optimized by humans and are often the major bottlenecks to computer performance. Overall, AlphaDev’s new C++ sorting algorithm is 1.7 percent more efficient than his previous method when sorting long numeric sequences, and up to 70 percent faster for five-item sequences. Mankowitz says these improvements add up at scale. Algorithms are used trillions of times a day, he estimates, since AI-created code was sent to Libc++, his primary open-source library in C++. I’m here.
These improvements are thanks to a technique called reinforcement learning, which is the same approach that DeepMind’s AI uses to master games like chess and Go. This type of AI learns by doing. It works by treating certain tasks like writing assembly programs as games, with the AI being rewarded for making smart moves that increase the efficiency of the program. Over time, the system works to maximize this reward, resulting in winning Go strategies and faster assembly programs. This is unlike the kind of AI found in large language models like GPT-4, which rely on huge amounts of data to learn how to write words and code. This is great for creating sentences that reflect the tone of the internet, or creating code intersections. However, AI is not very good at producing novel, cutting-edge solutions to coding challenges it has never experienced before.