“This is a really great result,” said François Le Gall, a mathematician at the University of Nagoya in Japan, who was not involved in the work. “Matrix multiplication is used all over engineering,” he says. “Everything you want to solve numerically, you usually use matrices.”
Despite the ubiquity of the calculation, it is still not well understood. A matrix is simply a grid of numbers, representing anything you want. Multiplying two matrices usually involves multiplying the rows of one by the columns of the other. The basic technique for solving the problem is taught in secondary school. “It’s like the ABCs of computing,” said Pushmeet Kohli, head of DeepMind’s AI for Science team.
But it gets complicated when you try to find a faster method. “No one knows the best algorithm to solve it,” says Le Gall. “It’s one of the biggest open problems in computer science.”
This is because there are more ways to multiply two matrices together than there are atoms in the universe (10 to the power of 33, for some of the cases the researchers looked at). “The number of possible actions is almost infinite,” said Thomas Hubert, an engineer at DeepMind.
The trick was to turn the problem into a sort of three-dimensional board game called TensorGame. The board represents the multiplication problem to be solved, and each move represents the next step in solving that problem. Thus, the sequence of moves made in a game represents an algorithm.
The researchers trained a new version of AlphaZero, called AlphaTensor, to play this game. Instead of learning the best set of moves in Go or chess, AlphaTensor learned the best set of steps to make when multiplying matrices. It was rewarded for winning the game in as few moves as possible.
“We’ve turned this into a game, our favorite kind of framework,” said Hubert, one of AlphaZero’s lead researchers.