# AlphaTensor

> Source: https://aiwiki.ai/wiki/alphatensor
> Updated: 2026-06-27
> Categories: Google DeepMind, Mathematics, Reinforcement Learning
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
> From AI Wiki (https://aiwiki.ai), the free encyclopedia of artificial intelligence. Reuse freely with attribution to "AI Wiki (aiwiki.ai)".

**AlphaTensor** is an artificial-intelligence system from [DeepMind](/wiki/deepmind) that uses deep [reinforcement learning](/wiki/reinforcement_learning) to discover faster algorithms for [matrix multiplication](/wiki/matrix_multiplication). Built on [AlphaZero](/wiki/alphazero), it recasts the search for a multiplication algorithm as a single-player game and learned to find decompositions that rediscover decades of human results and, in several cases, improve on them. Its headline result, reported in *Nature* on 5 October 2022, is an algorithm that multiplies two 4x4 matrices using 47 scalar multiplications in arithmetic modulo 2, the first improvement on Strassen's two-level method (49 multiplications) for that case since 1969.[1][2][3]

The system was introduced in a paper titled "Discovering faster matrix multiplication algorithms with reinforcement learning" (Fawzi, Balog, Huang, Hubert, Romera-Paredes et al., *Nature* 610, 47-53). As the abstract states, the authors "report a deep reinforcement learning approach based on AlphaZero for discovering efficient and provably correct algorithms for the multiplication of arbitrary matrices," with an agent "trained to play a single-player game where the objective is finding tensor decompositions within a finite factor space."[1] The work drew wide attention as one of the first demonstrations that a game-playing reinforcement-learning agent could contribute to a long-studied question in pure algorithmics, though commentators noted that the most eye-catching result was specific to a finite field rather than a speedup for ordinary numerical computing.[1][2][4]

## What is AlphaTensor?

AlphaTensor is a learning-based search system that finds low-cost matrix-multiplication algorithms by treating the problem as a game. Multiplying two matrices is one of the most heavily used operations in scientific computing, computer graphics, and machine learning, so even small constant-factor savings can matter at scale. The schoolbook method for multiplying two n-by-n matrices uses n cubed scalar multiplications, which for two 2x2 matrices means eight multiplications.[3][5]

In 1969 Volker Strassen showed that two 2x2 matrices can be multiplied using only seven scalar multiplications instead of eight, at the cost of extra additions. Applied recursively to larger matrices, Strassen's trick lowers the asymptotic exponent of matrix multiplication below three. The number of multiplications matters more than the number of additions because, in a recursive scheme, the multiplications are what get applied to ever-larger submatrices, so reducing them improves the asymptotic cost. Half a century of effort had refined the asymptotics, but for many small fixed sizes the best known number of multiplications had not moved in years, and the space of possible algorithms was widely believed to be largely mapped out.[2][3][5]

## How does AlphaTensor work?

AlphaTensor builds on a standard reformulation: any bilinear algorithm for a fixed matrix-multiplication size corresponds to a decomposition of a fixed three-dimensional array called the matrix-multiplication tensor. Writing that tensor as a sum of rank-1 terms (outer products of three vectors) yields a valid multiplication algorithm, and the number of terms in the decomposition, its rank, equals the number of scalar multiplications the algorithm uses. Finding a fast algorithm is therefore the same as finding a low-rank decomposition of the tensor, a problem known to be NP-hard in general.[1][3][6]

DeepMind turned this into a single-player game called TensorGame. As the authors put it, "we converted the problem of finding efficient algorithms for matrix multiplication into a single-player game."[3] The starting position is the target tensor. On each move the agent picks three vectors, forms their outer product, and subtracts it from the current tensor. The episode ends when the tensor has been reduced entirely to zeros, at which point the sequence of moves is a provably correct decomposition. A small negative reward at every step pushes the agent toward decompositions that use as few moves, and therefore as few multiplications, as possible. To keep results exact and avoid floating-point error, the entries the agent was allowed to choose were restricted to a small set such as {-2, -1, 0, 1, 2}.[1][3][6]

The game is extraordinarily large: DeepMind noted that "the number of possible algorithms to consider is much greater than the number of atoms in the universe, even for small cases," estimating more than 10 to the 33rd power possible moves at each step, far beyond the branching factor of Go.[3] To cope, AlphaTensor pairs a deep neural network with Monte Carlo tree search in the AlphaZero style. The network uses a transformer-based architecture with axial attention to read the tensor's state and an autoregressive policy head to propose the next set of vectors, while a value head estimates the eventual rank. Training mixed reinforcement learning on self-play with supervised signal from synthetic examples, generated by sampling random vector triples and multiplying them out to produce tensors with a known decomposition. The agent could be trained over different arithmetic domains, including the field with two elements and standard arithmetic, and basis changes served as data augmentation to enrich the positions seen.[1][3][6]

## What did AlphaTensor discover?

AlphaTensor rediscovered Strassen's 2x2 algorithm within minutes of training and reproduced the best known algorithms for many other sizes. For a given size it often found a large and diverse collection of distinct algorithms, in some cases thousands, suggesting that the space of efficient matrix-multiplication algorithms is richer than had been assumed.[1][2][3]

Its most-cited new result was in arithmetic modulo 2, where the agent found a way to multiply two 4x4 matrices with 47 multiplications, beating the 49 that come from two levels of Strassen (7 squared). In the paper's words, this is "the case of 4 x 4 matrices in a finite field, where AlphaTensor's algorithm improves on Strassen's two-level algorithm for the first time, to our knowledge, since its discovery 50 years ago."[1] The system also reported a 5x5 algorithm in the same setting using 96 multiplications, below the previous figure of 98. Over standard arithmetic the picture was more modest: AlphaTensor generally matched rather than beat the known records for square matrices, but it did improve several non-square cases that hold for ordinary real numbers. A widely quoted example multiplies a 4x5 matrix by a 5x5 matrix in 76 multiplications, down from a previous best of 80.[1][2][4]

| Size and setting | AlphaTensor | Previous best | Notes |
| --- | --- | --- | --- |
| 4x4, modulo 2 | 47 | 49 (two-level Strassen) | First improvement on two-level Strassen in this setting since 1969 |
| 5x5, modulo 2 | 96 | 98 | Later improved to 95 by other researchers |
| 4x5 times 5x5, standard arithmetic | 76 | 80 | A non-square improvement that holds over the real numbers |

The distinction between the two arithmetic settings is the most important caveat to the headline number. The 4x4 result is a statement about the field with two elements, not a faster way to multiply matrices of real or floating-point numbers, and the paper reported only a handful of improvements that carry over to standard arithmetic, all for rectangular rather than square sizes.[1][4][7]

## Did AlphaTensor find hardware-specific algorithms?

Because the number of multiplications is not the only thing that determines real-world speed, DeepMind also tuned AlphaTensor to optimize for the running time on a specific processor rather than for rank alone. By folding measured execution time into the reward, the agent discovered algorithms tailored to a particular Nvidia V100 GPU and to a Google TPU v2. DeepMind reported that "these algorithms multiply large matrices 10-20% faster than the commonly used algorithms on the same hardware," with the company citing figures on the order of 8.5 percent on the V100 and about 10.3 percent on the TPU in its benchmarks.[1][3][6]

These speedups came with conditions. An algorithm tuned for one accelerator did not necessarily perform well on another, and independent commentary noted that the reported gains were measured against ordinary block matrix multiplication on large matrices rather than against an optimized Strassen implementation, so the baseline matters when interpreting the numbers.[6][7]

## What are the caveats, and how was AlphaTensor received?

Coverage in outlets such as *Quanta Magazine* and *MIT Technology Review* treated the work as a genuine and surprising result while stressing its limits. The record-setting 4x4 algorithm is valid only in modulo 2 arithmetic, and for everyday floating-point computation the standard multiplication kernel often remains preferable, partly because modern hardware executes fused multiply-add operations cheaply and partly because methods that save multiplications can introduce more additions and numerical-stability concerns. In other words, fewer multiplications does not automatically translate into a faster or more accurate program.[2][4][7]

The clearest sign that the search space was not exhausted came from human mathematicians. Within about a week of the paper's release, Manuel Kauers and Jakob Moosbauer used a conventional computer search, seeded in part by AlphaTensor's own output, to push the 5x5 modulo 2 result from 96 multiplications down to 95, and they independently found a separate 47-multiplication algorithm for the 4x4 case. Their note, given the tongue-in-cheek title "The FBHHRBNRSSSHK-Algorithm" after the initials of the DeepMind authors, underscored that the AlphaTensor results were a starting point rather than a final answer, and that classical techniques could sometimes extend them quickly.[2][4]

## Why does AlphaTensor matter?

AlphaTensor is notable less for any single record than for what it demonstrated about method. It showed that a game-playing reinforcement-learning agent could be pointed at a well-defined mathematical search problem, the decomposition of a tensor, and turn up algorithms that experts had not found, including in regions of the search space that researchers had assumed were not worth exploring. DeepMind framed it as the moment AlphaZero went "from playing games to tackling unsolved mathematical problems for the first time."[3] It is part of a broader DeepMind program of using learning-based search for algorithm discovery, a thread that continued with [AlphaDev](/wiki/alphadev), which found faster sorting and hashing routines later adopted into standard libraries, and with related systems such as [MuZero](/wiki/muzero) that share the AlphaZero lineage.[1][3][8]

At the same time, the episode became a frequently cited example of how AI results in mathematics should be read carefully. The most striking claim applied to a specific finite field, the practical speedups depended on hardware and baseline choices, and human researchers improved on the new records almost immediately. AlphaTensor thus stands as both a real contribution to the study of matrix-multiplication algorithms and a case study in distinguishing a headline from its caveats.[2][4][7]

## ELI5: AlphaTensor in plain terms

Multiplying two grids of numbers (matrices) normally takes a fixed recipe with a certain number of small multiplications. In 1969 a mathematician named Strassen found a shortcut that uses fewer multiplications. DeepMind turned the hunt for even better shortcuts into a puzzle game where the goal is to chip a special block of numbers down to nothing in as few steps as possible. An AI called AlphaTensor, related to the program that mastered Go and chess, learned to play this game and found a few shortcuts people had missed, including one for 4x4 grids that beats Strassen's best in a special kind of arithmetic. The catch is that the flashiest shortcut only works in that special arithmetic, and human mathematicians quickly found shortcuts of their own once they saw what the AI did.

## References

1. Fawzi, A., Balog, M., Huang, A. et al. "Discovering faster matrix multiplication algorithms with reinforcement learning." *Nature* 610, 47-53 (2022). https://www.nature.com/articles/s41586-022-05172-4
2. Nardelli, S. "AI Reveals New Possibilities in Matrix Multiplication." *Quanta Magazine*, 23 November 2022. https://www.quantamagazine.org/ai-reveals-new-possibilities-in-matrix-multiplication-20221123/
3. DeepMind. "Discovering novel algorithms with AlphaTensor." Google DeepMind blog, 5 October 2022. https://deepmind.google/blog/discovering-novel-algorithms-with-alphatensor/
4. Heaven, W. D., and follow-up reporting on the Kauers and Moosbauer result. *MIT Technology Review* / *Quanta Magazine* coverage of AlphaTensor, October-November 2022. https://www.quantamagazine.org/ai-reveals-new-possibilities-in-matrix-multiplication-20221123/
5. "Matrix multiplication algorithm." Wikipedia. https://en.wikipedia.org/wiki/Matrix_multiplication_algorithm
6. "AlphaTensor for Faster Matrix Multiplication, Explained." DeepLearning.AI, The Batch. https://www.deeplearning.ai/the-batch/alphatensor-for-faster-matrix-multiplication-explained/
7. Giesen, F. "On AlphaTensor's new matrix multiplication algorithms." The ryg blog, 6 October 2022. https://fgiesen.wordpress.com/2022/10/06/on-alphatensors-new-matrix-multiplication-algorithms/
8. "AlphaTensor." Wikipedia. https://en.wikipedia.org/wiki/AlphaTensor

