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
| System | Year | Discovery | Where it is used |
|---|---|---|---|
| AlphaTensor | Oct 2022 | 4×4 matrix multiplication with 47 scalar multiplications (mod 2); new methods for many sizes | Research; hardware-tailored versions |
| AlphaDev | Published June 2023 | Faster sorting of 3 to 5 items; faster hashing for 9–16-byte inputs | LLVM libc++ (merged April 2022); Abseil |
| FunSearch | Dec 2023 | New cap-set constructions and online bin-packing heuristics | Research |
| AlphaEvolve | 2025 | 48 multiplications for 4×4 complex matrices; scheduling and kernel speedups | Google data centers and Gemini training |
| AlphaEvolve-assisted team | Aug 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×4 | Multiplications | Number system |
|---|---|---|
| Standard | 64 | Real, complex or modulo 2 |
| Strassen, applied twice (1969) | 49 | Real, complex or modulo 2 |
| AlphaTensor (2022) | 47 | Arithmetic modulo 2 only |
| AlphaEvolve (2025) | 48 | Complex 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.
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.
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
- AlphaEvolve Explained: Google’s AI Math Discoveries
- AI in Math Timeline: From Early Proofs to 2026
- AI Math Breakthroughs 2026: What’s Proven So Far
Sources and Further Reading
- Fawzi et al., Discovering faster matrix multiplication algorithms with reinforcement learning (Nature, 2022)
- Mankowitz et al., Faster sorting algorithms discovered using deep reinforcement learning (Nature, 2023)
- Google DeepMind: AlphaDev discovers faster sorting algorithms (June 2023)
- Romera-Paredes et al., Mathematical discoveries from program search with large language models (Nature, 2023)
- Google DeepMind: AlphaEvolve, a Gemini-powered coding agent for designing advanced algorithms (May 14, 2025)
- Kauers and Moosbauer, The FBHHRBNRSSSHK-Algorithm for Multiplication in Z2^(5×5) is still not the end of the story (arXiv 2210.04045)
- Dupont et al., Improving the matrix multiplication exponent with modern optimization and AlphaEvolve (arXiv 2608.16884)
Related to This Article
More math articles
- Wire Gauge Calculator
- Using a Table to Write down a Two-Variable Equation
- Electioneering
- DAT Quantitative Reasoning Math FREE Sample Practice Questions
- Multiplying & Dividing Fractions Practice — Free Drills
- 10 Most Common 3rd Grade MCAS Math Questions
- Full-Length 7th Grade PSSA Math Practice Test-Answers and Explanations
- The Best Grade 7 ELA Practice Tests for Louisiana Students
- Free Grade 8 English Worksheets for Colorado Students
- Hairy Ball Theorem: Why You Can’t Comb a Sphere Flat


What people say about "AI-Discovered Algorithms: AlphaDev and AlphaTensor - Effortless Math"?
No one replied yet.