Project DelphiTensors Workshop
20 · AlphaTensor: Multiplying Matrices as a Game

20 · AlphaTensor: Multiplying Matrices as a Game

Deep dive 20 of Tensors for Machine Learning — the last one, and opened live as a 20-minute lab in the six-hour workshop. It asks a question that sounds like a different subject: how many multiplications does it take to multiply two matrices?

The rule for multiplying matrices is a fixed tensor of 0s and 1s, and every exact CP decomposition of that tensor into R rank-one terms is an algorithm that multiplies with R multiplications.

So “invent a faster algorithm” becomes “find fewer terms”. Strassen found seven for 2 × 2 by hand; in 2022 DeepMind’s AlphaTensor played the search as a game and found 47 for 4 × 4 matrices modulo 2. One size up the question is still open: nobody knows the rank of 3 × 3 matrix multiplication, only that it lies between 19 and 23.

The notebook trains nothing. It plays the game in NumPy and checks the factorizations DeepMind published.

Study here, then run the real thing: notebook 20 on Colab · all the notebooks · the AlphaTensor widget

Built from the workshop’s own material by Ravi Kalia and Sebastian Laverde Chunza, CC BY 4.0.

11 topics

Your path through this unit

Step 1 of 3

Initial review

Take a first look at each topic and tick Got it once you have the general idea.