How AI Discovered a Faster Matrix Multiplication Algorithm

Quanta Magazine
22 May 202313:00

TLDRDeepMind, Google's AI research lab, has discovered a faster matrix multiplication algorithm, breaking a 50-year-old record. The new method, which uses reinforcement learning, reduces the number of multiplication steps needed for specific matrices, making it possible to tackle larger computational problems more efficiently. This breakthrough demonstrates the potential of AI in assisting mathematicians and could redefine the collaboration between humans and artificial intelligence in solving complex mathematical challenges.

Takeaways

  • ๐Ÿง  Matrix multiplication is a fundamental operation in mathematics used in various fields like computer graphics, neural networks, and quantum physics.
  • ๐Ÿ” Researchers have been seeking more efficient matrix multiplication methods to tackle larger problems that were previously considered too big to compute in a reasonable time.
  • ๐Ÿ“š The standard method for multiplying two matrices is based on an algorithm that requires N-cubed steps, which becomes unwieldy for larger matrices.
  • ๐Ÿ‡ฉ๐Ÿ‡ช Volker Strassen's algorithm, discovered in 1969, reduced the number of multiplication steps for 2x2 matrices from eight to seven, offering significant computational savings for larger matrices.
  • ๐Ÿš€ Shmuel Winograd proved that it's impossible to multiply two 2x2 matrices using fewer than seven multiplications, making Strassen's algorithm the optimal solution for this case.
  • ๐Ÿค– Google's DeepMind used an AI system called AlphaTensor, based on reinforcement learning, to discover a new algorithm that beats Strassen's for multiplying 4x4 matrices with elements of zero or one.
  • ๐ŸŽฒ AlphaTensor's approach involved playing a 'game' where it learned to decompose a 3D tensor into rank-1 tensors with the fewest steps possible, representing a more efficient matrix multiplication algorithm.
  • ๐Ÿ† AlphaTensor not only rediscovered Strassen's algorithm but also found a new algorithm that uses only 47 multiplications for 4x4 matrices, breaking a 50-year record.
  • ๐Ÿ”‘ AlphaTensor's discovery led to further advancements; mathematicians used its findings as inspiration to improve upon its algorithm, showcasing the collaborative potential between AI and mathematicians.
  • ๐ŸŒ The collaboration between AI and mathematicians is a new frontier, with AI serving as a tool to empower mathematicians rather than replace them.

Q & A

  • What is matrix multiplication and why is it important in various fields?

    -Matrix multiplication is a fundamental mathematical operation used in fields such as computer graphics, neural networks, and quantum physics. It involves performing operations on a two-dimensional array of numbers, and it's crucial for many computations in engineering and physics because it can make solving larger problems more feasible.

  • Why is finding more efficient matrix multiplication methods significant?

    -Efficient matrix multiplication methods allow for the handling of larger problems within a reasonable time frame. Even a slight improvement in speed can make a significant difference, enabling the computation of problems that were previously considered too large or time-consuming.

  • What was the traditional method for multiplying two 2x2 matrices before Strassen's algorithm?

    -The traditional method involved multiplying elements from the first row of matrix A with the first column of matrix B, and then adding them to get the first element of matrix C. This process was repeated for each row and column, resulting in eight multiplication steps for two 2x2 matrices.

  • Who is Volker Strassen and what contribution did he make to matrix multiplication?

    -Volker Strassen is a German mathematician known for his work in analyzing algorithms. In 1969, he discovered a new algorithm for multiplying two 2x2 matrices that requires only seven multiplication steps, which offered significant computational savings for larger matrices.

  • What is the significance of Strassen's algorithm for larger matrices?

    -Strassen's algorithm allows for dramatic computational savings when multiplying large matrices. This is because large matrices can be broken down into smaller ones, and the savings from fewer multiplication steps in Strassen's algorithm can propagate through these smaller matrices.

  • What is the historical context of matrix multiplication algorithms before the breakthrough by DeepMind?

    -Before DeepMind's breakthrough, the most efficient method known for multiplying matrices of any reasonable size was to break them down and apply Strassen's algorithm, which had been the best solution for over half a century.

  • Who discovered the new algorithm that beats Strassen's for multiplying two 4x4 matrices with elements of zero or one?

    -The new algorithm was discovered by Google's artificial intelligence research lab, DeepMind, using an AI system called AlphaTensor.

  • What is AlphaTensor and how does it differ from previous computer programs used in mathematical research?

    -AlphaTensor is an AI system developed by DeepMind that uses reinforcement learning to discover new algorithms for matrix multiplication. Unlike previous computer programs that assisted with mathematical research, AlphaTensor is capable of learning and improving its strategies through a process similar to playing a game.

  • How does AlphaTensor's reinforcement learning approach work in the context of matrix multiplication?

    -AlphaTensor uses reinforcement learning to strategically penalize and reward itself as it experiments with different ways to achieve its task of finding the most efficient matrix multiplication algorithm. It plays a 'game' where it tries to decompose a 3D tensor using as few unique rank-1 tensors as possible, which corresponds to finding an algorithm with the fewest multiplication steps.

  • What was the outcome of AlphaTensor's work on matrix multiplication algorithms?

    -AlphaTensor successfully discovered a new algorithm for multiplying two 4x4 matrices with elements of zero or one, which requires only 47 multiplication steps compared to the standard 64 steps or Strassen's 49 steps. It also found thousands of other new fast algorithms, including ones for 5x5 matrices in modulo-2.

  • How did the mathematical community react to the discovery made by AlphaTensor, and what was the subsequent development?

    -The mathematical community embraced AlphaTensor's discovery and used it as a tool to guide their intuition and find new results. Shortly after AlphaTensor's results were published, two mathematicians in Austria used AlphaTensor's algorithm as inspiration to further reduce the number of steps in a 5x5 matrix multiplication algorithm from 96 to 95.

  • What is the potential impact of AI like AlphaTensor on the collaboration between humans and artificial intelligence in mathematical research?

    -AI like AlphaTensor has the potential to significantly enhance collaboration between humans and artificial intelligence in mathematical research. It can serve as a powerful tool that helps mathematicians find new results and guide their intuition, thereby empowering them to explore new frontiers in mathematics.

Outlines

00:00

๐Ÿง  Matrix Multiplication and Its Computational Challenge

Matrix multiplication is a fundamental mathematical operation widely used in fields such as computer graphics, neural networks, and quantum physics. Despite its simplicity, it poses a significant computational challenge due to the complexity involved in multiplying larger matrices. The standard algorithm for multiplying two N by N matrices requires N-cubed steps, which becomes inefficient as the size of the matrices increases. Researchers have been seeking more efficient methods to multiply matrices together, as even a slight improvement can make a significant difference in solving larger problems. The script introduces a breakthrough in matrix multiplication algorithms, which has been a long-standing challenge in the field of mathematics and computer science.

05:02

๐Ÿค– DeepMind's AlphaTensor and the Matrix Multiplication Breakthrough

DeepMind, Google's artificial intelligence research lab, has made a significant breakthrough in matrix multiplication by developing a new algorithm that outperforms the traditional method and Strassen's algorithm for specific cases. The new algorithm is particularly effective for multiplying two four by four matrices with elements that are only zero or one. This achievement was made possible by leveraging machine learning techniques through a program called AlphaTensor, which is based on the reinforcement learning algorithm used in AlphaZero. AlphaTensor was trained to decompose 3D tensors representing matrix multiplication into rank-1 tensors, with the goal of using as few of these tensors as possible to achieve the most efficient multiplication algorithm. The program successfully rediscovered Strassen's algorithm and then improved upon it, demonstrating the potential for AI to contribute to mathematical research.

10:03

๐Ÿ” The Future of AI in Mathematical Research

The script discusses the potential impact of AI on mathematical research, suggesting that tools like AlphaTensor do not make mathematicians obsolete but rather empower them to achieve more. The collaboration between AI and mathematicians is highlighted as a new frontier with vast potential. Following the publication of AlphaTensor's results, two mathematicians from Austria used the program's five by five matrix multiplication algorithm as a starting point to further refine the process, reducing the number of steps from 96 to 95. This example illustrates the complementary nature of AI and human intelligence in advancing mathematical knowledge. The script concludes by emphasizing that AI can be a powerful tool to assist mathematicians in their quest for new discoveries and to guide their intuition in solving complex problems.

Mindmap

Keywords

๐Ÿ’กMatrix Multiplication

Matrix multiplication is a fundamental operation in mathematics that involves taking two matrices (two-dimensional arrays of numbers) and computing a third matrix by multiplying the elements of the rows of the first matrix by the elements of the columns of the second matrix and summing the results. It is central to the video's theme as it is the core operation that researchers are trying to optimize for efficiency. The script mentions that researchers have been seeking more efficient ways to perform this operation to handle larger problems that were previously considered too large to compute in a reasonable time.

๐Ÿ’กEfficiency

In the context of the video, efficiency refers to the speed and computational cost of performing matrix multiplication. The script discusses how making matrix multiplication even slightly faster can allow for the computation of larger problems that were previously deemed too big. The efficiency of matrix multiplication is directly tied to the number of multiplication steps required, with fewer steps indicating a more efficient algorithm.

๐Ÿ’กAlgorithm

An algorithm is a step-by-step procedure for calculations. In the video, the focus is on algorithms for matrix multiplication. The script explains that the standard algorithm for multiplying two 2x2 matrices requires eight multiplication steps, while Volker Strassen's algorithm reduces this to seven steps, offering significant computational savings for larger matrices.

๐Ÿ’กVolker Strassen

Volker Strassen is a German mathematician who is highlighted in the video for his discovery of a new algorithm for multiplying 2x2 matrices that requires only seven multiplication steps, instead of the traditional eight. His algorithm is significant because it offers a more efficient way to multiply matrices, which is particularly beneficial when dealing with very large matrices.

๐Ÿ’กReinforcement Learning

Reinforcement learning is a type of machine learning where an agent learns to make decisions by performing actions in an environment to maximize some notion of cumulative reward. In the video, DeepMind's AlphaTensor uses reinforcement learning to discover new algorithms for matrix multiplication. It is trained to guess rank-1 tensors to decompose a 3D tensor, with the goal of using as few tensors as possible to achieve the result.

๐Ÿ’กAlphaTensor

AlphaTensor is a program developed by DeepMind, which is designed to find more efficient algorithms for matrix multiplication. It builds upon the reinforcement learning algorithm used in AlphaGo, another DeepMind creation. The script explains that AlphaTensor was used to break the 50-year record for matrix multiplication by finding an algorithm that requires fewer multiplication steps for 4x4 matrices with elements of zero or one.

๐Ÿ’กTensor

A tensor is a generalization of vectors and matrices to potentially higher dimensions. In the video, the process of multiplying any two matrices of a given size can be represented by a unique 3D tensor, where each dimension of the tensor represents one of the matrices being multiplied. The concept of a tensor is central to how AlphaTensor approaches the problem of finding efficient matrix multiplication algorithms.

๐Ÿ’กRank-1 Tensors

Rank-1 tensors are simple tensors that can be represented as the outer product of two vectors. In the context of the video, each rank-1 tensor corresponds to a multiplication step in a matrix multiplication algorithm. The goal of AlphaTensor's reinforcement learning process is to decompose the 3D tensor representing a matrix multiplication into as few rank-1 tensors as possible, which translates to finding an algorithm with the fewest multiplication steps.

๐Ÿ’กModulo-2

Modulo-2, also known as binary arithmetic, is a system of arithmetic that only considers the remainders after division by 2. In the video, DeepMind's AlphaTensor made a significant breakthrough by discovering a new algorithm for multiplying two 4x4 matrices where the elements are only zero or one, effectively working in modulo-2 arithmetic. This discovery broke the longstanding record set by Strassen's algorithm.

๐Ÿ’กCollaboration

The video emphasizes the collaboration between artificial intelligence, such as AlphaTensor, and human mathematicians. It highlights how AlphaTensor's discoveries inspired mathematicians Manuel Kauers and Jakob Moosbauer to further refine the algorithm for multiplying 5x5 matrices, reducing the number of steps from 96 to 95. This collaboration is presented as a powerful example of how AI can augment human intelligence, rather than replace it.

Highlights

Matrix multiplication is a fundamental operation in mathematics with applications in various fields.

Efficient matrix multiplication can make larger problems computable within a reasonable time frame.

Finding faster matrix multiplication methods is a significant challenge in mathematics.

Researchers have broken a 50-year-old matrix multiplication record with a new tool.

Traditional matrix multiplication involves a centuries-old algorithm that requires N-cubed steps.

Volker Strassen's algorithm reduced the number of multiplication steps for 2x2 matrices from eight to seven.

Strassen's algorithm offers computational savings for larger matrices by breaking them into smaller ones.

IBM researcher Shmuel Winograd proved that no algorithm could use fewer than seven multiplications for 2x2 matrices.

A new algorithm by Google's DeepMind breaks Strassen's record for multiplying 4x4 matrices with binary elements.

DeepMind's AI system, AlphaTensor, uses reinforcement learning to discover more efficient matrix multiplication algorithms.

AlphaTensor is built on the AlphaZero reinforcement learning algorithm, used for mastering games.

AlphaTensor uses tensor decomposition to find efficient matrix multiplication algorithms.

The process involves breaking down a 3D tensor into rank-1 tensors, each representing a multiplication step.

AlphaTensor's algorithm for 4x4 matrices with modulo-2 elements uses only 47 multiplications, beating Strassen's.

AlphaTensor also discovered new fast algorithms for larger matrices, including 5x5 matrices in modulo-2.

Mathematicians and AI like AlphaTensor can collaborate to push the frontiers of mathematical discovery.

AlphaTensor's results inspired two mathematicians to further optimize a 5x5 matrix multiplication algorithm.

The collaboration between technology and mathematicians is a promising frontier for future advancements.