AI-Discovered Algorithms: AlphaDev and AlphaTensor

Quick answer: Yes, AI has discovered new algorithms for specific tasks. AlphaDev (2023) produced faster routines for sorting short lists, adopted in LLVM’s libc++ C++ library. AlphaTensor (2022) found a method using 47 scalar multiplications for 4×4 matrices in modulo-2 arithmetic, versus 49 for Strassen’s method applied twice. AlphaEvolve (2025) found a method using 48 multiplications for 4×4 complex matrices. These results have different limits: fewer multiplications do not automatically mean faster software.

Updated November 22, 2026.

Algorithms are recipes for computation, and the best ones were long found only by human insight: Strassen’s matrix trick in 1969, quicksort in 1959. Since 2022, AI systems have found new ones, some now running on billions of devices. Here is what they found, how, and what it does and does not mean.

AI-Discovered Algorithms at a Glance

SystemYearDiscoveryWhere it is used
AlphaTensorOct 20224×4 matrix multiplication with 47 scalar multiplications (mod 2); new methods for many sizesResearch; hardware-tailored versions
AlphaDevPublished June 2023Faster sorting of 3 to 5 items; faster hashing for 9–16-byte inputsLLVM libc++ (merged April 2022); Abseil
FunSearchDec 2023New cap-set constructions and online bin-packing heuristicsResearch
AlphaEvolve202548 multiplications for 4×4 complex matrices; scheduling and kernel speedupsGoogle data centers and Gemini training
AlphaEvolve-assisted teamAug 2026 (preprint)Better theoretical bound on the matrix multiplication exponent \(\omega\)Theory, not a software speedup

Why Matrix Multiplication Is the Big Prize

Multiplying two \(n \times n\) matrices the school way takes \(n^3\) multiplications, 64 for 4×4 (see matrix multiplication). In 1969 Volker Strassen showed a 2×2 product needs only 7 instead of 8; applying his trick twice gives 49 for 4×4. Since AI and scientific computing spend much of their time multiplying matrices, every saving matters.

Method for 4×4MultiplicationsNumber system
Standard64Real, complex or modulo 2
Strassen, applied twice (1969)49Real, complex or modulo 2
AlphaTensor (2022)47Arithmetic modulo 2 only
AlphaEvolve (2025)48Complex numbers

Why modulo 2 matters. In arithmetic modulo 2, only 0 and 1 exist and \(1 + 1 = 0\), which is useful in computer science but not for ordinary numbers. So 47 modulo-2 multiplications and 48 complex multiplications answer different questions; neither is a direct measure of speed.

AlphaTensor, published October 5, 2022, turned the search into a single-player game: each move simplifies a 3D array of numbers (a tensor) that describes matrix multiplication, and fewer moves means fewer multiplications. It also found faster methods for many other sizes. In a separate experiment, algorithms tailored to an Nvidia V100 GPU or a Google TPU v2 ran 10–20% faster than standard ones on that hardware. Three days after publication, mathematicians Manuel Kauers and Jakob Moosbauer improved its 5×5 modulo-2 result from 96 to 95 multiplications, a good example of AI and people building on each other.

AlphaDev Sorting: What Became Faster?

Sorting is one of the most-run operations in computing. AlphaDev, published in Nature in June 2023, worked at the level of assembly instructions and treated writing a sorting routine as a game, rewarded for correct and fast code. It found routines for sorting very short lists, such as 3, 4 or 5 items, with fewer instructions; DeepMind reported up to 70% faster sorting for short sequences and about 1.7% for very long ones. The new routines were added to LLVM’s libc++, an implementation of the C++ standard library (the patch merged in April 2022, before the paper appeared). Small sorting routines speed up larger sorts because they are called repeatedly inside them. The gains came from specific benchmarks; real performance depends on the data type, compiler and processor. AlphaDev also found a hashing routine that Google DeepMind measured as up to 30% faster for 9–16-byte inputs, now in Google’s Abseil library.

One famous trick, the “AlphaDev swap move,” saved a single instruction. Inside a routine that sorts three values, an earlier comparison already guaranteed that \(B \le C\), so a later step computing a minimum could skip one operand. Human experts had optimized this code for years without noticing.

FunSearch and AlphaEvolve: Language Models Write Programs

FunSearch (2023) paired a language model with an automatic scorer: the model proposed small programs, the best were kept and improved. It found larger cap sets, a combinatorics problem, and better heuristics for bin packing. AlphaEvolve (May 2025) scaled this up to whole programs. Besides the 48-multiplication result, Google reported that it found a scheduling rule recovering about 0.7% of worldwide computing resources, and sped up a key kernel in Gemini’s architecture by 23%, cutting training time by 1%. In August 2026, a team using AlphaEvolve improved the best known bound on the matrix multiplication exponent to \(\omega < 2.371177\).

How These Discoveries Are Checked

  • Matrix algorithms are checked by verifying an exact algebraic identity: the formulas must give the right product for all inputs in the stated arithmetic. Passing sample tests alone would not prove this.
  • Sorting routines are tested for correctness on all relevant inputs and timed on real hardware.
  • Speed claims need a documented baseline and reproducible measurements, and depend on hardware and input sizes: “70% faster” applies to short lists, not to all sorting.
  • Can developers use them? AlphaDev’s routines ship in libc++ and Abseil; AlphaTensor’s algorithms are published in DeepMind’s research repository; AlphaEvolve is available on Google Cloud.

What This Means

AI is now a tool for searching spaces of algorithms too large for people to explore by hand. But people choose the problem, design the scoring rule and verify the result. Most gains are modest in percentage terms yet large in total, because the code runs trillions of times. For the wider story, see AI in math timeline and AI math breakthroughs of 2026.

Common Misconceptions

“AI invented a whole new sorting algorithm.” Not exactly. AlphaDev improved small fixed-size sorting routines used inside larger algorithms.

“AlphaTensor beat Strassen everywhere.” No. Its 47-multiplication 4×4 method works only in arithmetic modulo 2; AlphaEvolve’s 48 was the first improvement for complex numbers.

“Fewer multiplications always means faster code.” No. Additions, memory movement and hardware also matter.

Watch: How AI Finds New Algorithms

If you learn better by watching, these videos are worth your time.

How AI Discovered a Faster Matrix Multiplication Algorithm (Quanta Magazine). A clear animated explanation of AlphaTensor.
AlphaTensor by DeepMind explained (Yannic Kilcher). A detailed walk through the AlphaTensor paper.
DeepMind’s AlphaEvolve AI: History In The Making! (Two Minute Papers). A quick tour of AlphaEvolve’s results.

Check Your Understanding

Five quick questions to see how much of this has stuck. Pick an answer and press Submit; you will see a short explanation either way.

Answer each question and press Submit to see your result right away.

1. Does using fewer multiplications always mean faster software?
Found a bug? Let us know!
2. In what number system does AlphaTensor’s 47-step 4×4 method work?
Found a bug? Let us know!
3. Where were AlphaDev’s sorting routines added?
Found a bug? Let us know!
4. How much faster did AlphaDev sort very short sequences, at most?
Found a bug? Let us know!
5. Who checks that an AI-found algorithm is correct?
Found a bug? Let us know!

Frequently Asked Questions

What algorithms has AI discovered?

AlphaTensor found new matrix multiplication methods (2022), AlphaDev found faster sorting and hashing routines (2023), FunSearch found better bin-packing heuristics (2023), and AlphaEvolve found a 48-multiplication method for 4×4 complex matrices and data-center scheduling improvements (2025).

Did AI beat Strassen’s algorithm?

In special cases. AlphaTensor multiplied 4×4 matrices with 47 multiplications in arithmetic modulo 2 (2022), and AlphaEvolve used 48 for complex numbers (2025), versus 49 for Strassen’s method applied twice.

Is AlphaDev’s sorting algorithm used in real software?

Yes. Its faster routines for sorting short sequences were merged into LLVM’s libc++, an implementation of the C++ standard library, in April 2022, and its hashing routine is in Google’s Abseil library.

Why is AlphaTensor 47 but AlphaEvolve 48?

They work in different arithmetic. AlphaTensor’s 47 multiplications apply only modulo 2, where 1 + 1 = 0. AlphaEvolve’s 48 work for complex numbers, the first improvement over 49 in that setting.

How much faster is AlphaDev’s sorting?

DeepMind reported up to 70% faster for very short sequences and about 1.7% faster for sequences over 250,000 elements.

Can AI discover algorithms on its own?

Within limits. People define the problem and the scoring rule; AI searches huge numbers of candidates; people then verify correctness and measure real speed.

Keep Exploring

Sources and Further Reading

Related to This Article

What people say about "AI-Discovered Algorithms: AlphaDev and AlphaTensor - Effortless Math"?

No one replied yet.

Leave a Reply