search
HomeTechnology peripheralsAIReproduce the magic touch of AlphaGo back then! DeepMind's new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasn't been updated in ten years has been updated

DeepMind has once again appeared in Nature with blockbuster results!

This time, they have strengthened learning AI again and made new breakthroughs in the two most basic algorithms in the computer field:

One is the sorting algorithm, which has found the highest speed improvement 70% new implementation;

The other is the hashing algorithm, which also found a new way to increase the speed by 30%.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

Not only that, the method used by the AI ​​is called "recreating the magic touch of AlphaGo", which seems to be illegal, but actually defeats it in one fell swoop. That time with the human master Lee Sedol.

As soon as the news came out, it immediately detonated the academic circle. Some netizens called out:

I didn’t expect that such an ancient and basic algorithm could be further improved.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

It is precisely because of this latest achievement that the LLVM standard C library, which has not been updated for ten years, has been updated, and dozens of Billions of people will benefit.

Because, whether it is sorting or hashing, their application scenarios can be used in various scenarios from online shopping, cloud computing to supply chain management, etc., and they are called hundreds of millions of times every day!

However, as DeepMind said:

Don’t get too excited, the power of AI has just begun to be used to improve code efficiency.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

The "upstart" of the Alpha family discovers a faster sorting algorithm

This AI is called AlphaDev, and it belongs to the "upstart" of the Alpha family. And it is built based on AlphaZero (the chess AI that defeated the world champion in 2017).

Its discovery is not based on existing algorithms, but starts from the lowest level assembly instructions.

DeepMind researchers designed a single-player "assembly" game for it:

As long as you can search and select the appropriate instructions (process A in the figure below), it is correct and fast You can get rewards by arranging the data (process B in the figure below).

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

But the challenge of this game is not only the size of the search space (the number of combinable instructions is equivalent to the number of particles in the universe), but also It lies in the nature of the reward function, because one wrong instruction may cause the entire algorithm to fail.

AlphaDev has two core components: learning algorithm and representation function.

Among them, the learning algorithm is mainly expanded on the powerful AlphaZero, which can combine DRL and random search optimization algorithms to conduct a huge amount of instruction searches; the main representation function is based on Transformer, which can capture assembly The underlying structure of a program and expressed as a special sequence.

As AlphaDev continues to fight monsters and upgrade, researchers will also limit the number of steps it can perform and the length of the sequence to be sorted.

In the end, AlphaDev discovered a new sorting algorithm:

If the sequence is short, it can increase the speed by 70% compared to the human baseline sorting algorithm; if the sequence length exceeds 25,000 elements, the increase is 1.7%.

Short sequence sorting is widely used in practice, especially as an important component of larger sorting functions and is called many times. As long as short sequences are improved, the sorting speed of all sequences can be improved. )

Specifically, the innovation of this algorithm mainly lies in two instruction sequences:

(1) AlphaDev Swap Move (exchange move)
(2) AlphaDev Copy Move (copy move) )

As shown in the figure below, the left side is the original sort3 implementation using min(A,B,C), and the right side is the implementation of "AlphaDev Swap Move", which only requires min(A,B). It can be found that one step of instructions can be omitted, and only the minimum values ​​of A and B need to be calculated.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

The author said that this novel method is reminiscent of AlphaGo's "Move 37" - a counterintuitive move that directly defeated the legendary Go player Lee Sedol, shocking the audience.

Similarly, AlphaDev skips a step by swapping and copying moves, achieving the goal in a way that seems wrong but is actually a shortcut.

As shown in the figure below, in the algorithm for sorting 8 elements, AlphaDev also uses "AlphaDev Copy Move" to replace the changes in the original implementation with max (B, min (A, C)) It is a complex max (B, min (A, C, D)) instruction, and the total number of instructions of the entire algorithm is also reduced by one step.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

After discovering a faster sorting algorithm, the author also tried the hash algorithm with AlphaDev to prove its versatility.

The results did not disappoint, AlphaDev also achieved a 30% speed increase in the length range of 9-16 bytes.

Like the sorting algorithm, they have integrated the new method into the Abseil library, which is now available to millions of developers around the world.

Finally, the author stated that the implementation of two new algorithms shows that AlphaDev has a strong ability to discover original solutions, and will make us further think about how to improve basic algorithms in the computer field.

However, due to the limitations of the assembly language used in this study, they next plan to try AlphaDev's ability to optimize algorithms in high-level languages ​​(such as C).

Netizen: Not counting the discovery of a new sorting algorithm

Many people expressed great excitement about this achievement.

As this netizen said:

After AlphaGo amazed the world, what else can reinforcement learning do? Can anything of practical significance be done? This is the answer.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

But this time, many people pointed out that DeepMind seemed to be suspected of exaggerating the title.

It calculates algorithm delay, not time complexity in the traditional sense. If you really calculate the time complexity, the data may not look good.

Its improvement is not in the sorting algorithm itself, but in new sorting optimization for modern CPUs (especially for short sequences). This approach is actually very common. For example, libraries such as FFTW and ATLAS have adopted this method.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

Agreed, they just found a faster machine optimization for a specific CPU, not a new sorting algorithm , the method itself is cool, but not yet groundbreaking research.

Reproduce the magic touch of AlphaGo back then! DeepMinds new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasnt been updated in ten years has been updated

What do you think?

Paper address: https://www.php.cn/link/a3fefe83288ecb0e40ebe40b2bde29fe
Official blog: https://www.php.cn/link/f5b2aa928f940f3f09a0d14f45a27875

Reference link:
[1]https://www.php.cn/link/5383c7318a3158b9bc261d0b6996f7c2
[2]https:// www.php.cn/link/ecf9902e0f61677c8de25ae60b654669
[3]https://www.php.cn/link/0383314bf626052313b8275638fcccce

The above is the detailed content of Reproduce the magic touch of AlphaGo back then! DeepMind's new AI discovered a 70% speed-up sorting algorithm, and the C++ library that hasn't been updated in ten years has been updated. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
Are You At Risk Of AI Agency Decay? Take The Test To Find OutAre You At Risk Of AI Agency Decay? Take The Test To Find OutApr 21, 2025 am 11:31 AM

This article explores the growing concern of "AI agency decay"—the gradual decline in our ability to think and decide independently. This is especially crucial for business leaders navigating the increasingly automated world while retainin

How to Build an AI Agent from Scratch? - Analytics VidhyaHow to Build an AI Agent from Scratch? - Analytics VidhyaApr 21, 2025 am 11:30 AM

Ever wondered how AI agents like Siri and Alexa work? These intelligent systems are becoming more important in our daily lives. This article introduces the ReAct pattern, a method that enhances AI agents by combining reasoning an

Revisiting The Humanities In The Age Of AIRevisiting The Humanities In The Age Of AIApr 21, 2025 am 11:28 AM

"I think AI tools are changing the learning opportunities for college students. We believe in developing students in core courses, but more and more people also want to get a perspective of computational and statistical thinking," said University of Chicago President Paul Alivisatos in an interview with Deloitte Nitin Mittal at the Davos Forum in January. He believes that people will have to become creators and co-creators of AI, which means that learning and other aspects need to adapt to some major changes. Digital intelligence and critical thinking Professor Alexa Joubin of George Washington University described artificial intelligence as a “heuristic tool” in the humanities and explores how it changes

Understanding LangChain Agent FrameworkUnderstanding LangChain Agent FrameworkApr 21, 2025 am 11:25 AM

LangChain is a powerful toolkit for building sophisticated AI applications. Its agent architecture is particularly noteworthy, allowing developers to create intelligent systems capable of independent reasoning, decision-making, and action. This expl

What are the Radial Basis Functions Neural Networks?What are the Radial Basis Functions Neural Networks?Apr 21, 2025 am 11:13 AM

Radial Basis Function Neural Networks (RBFNNs): A Comprehensive Guide Radial Basis Function Neural Networks (RBFNNs) are a powerful type of neural network architecture that leverages radial basis functions for activation. Their unique structure make

The Meshing Of Minds And Machines Has ArrivedThe Meshing Of Minds And Machines Has ArrivedApr 21, 2025 am 11:11 AM

Brain-computer interfaces (BCIs) directly link the brain to external devices, translating brain impulses into actions without physical movement. This technology utilizes implanted sensors to capture brain signals, converting them into digital comman

Insights on spaCy, Prodigy and Generative AI from Ines MontaniInsights on spaCy, Prodigy and Generative AI from Ines MontaniApr 21, 2025 am 11:01 AM

This "Leading with Data" episode features Ines Montani, co-founder and CEO of Explosion AI, and co-developer of spaCy and Prodigy. Ines offers expert insights into the evolution of these tools, Explosion's unique business model, and the tr

A Guide to Building Agentic RAG Systems with LangGraphA Guide to Building Agentic RAG Systems with LangGraphApr 21, 2025 am 11:00 AM

This article explores Retrieval Augmented Generation (RAG) systems and how AI agents can enhance their capabilities. Traditional RAG systems, while useful for leveraging custom enterprise data, suffer from limitations such as a lack of real-time dat

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software