{"id":782,"date":"2023-10-28T21:45:58","date_gmt":"2023-10-28T21:45:58","guid":{"rendered":"https:\/\/todaysainews.com\/index.php\/2023\/10\/28\/discovering-novel-algorithms-with-alphatensor-2\/"},"modified":"2025-04-27T07:32:16","modified_gmt":"2025-04-27T07:32:16","slug":"discovering-novel-algorithms-with-alphatensor-2","status":"publish","type":"post","link":"https:\/\/todaysainews.com\/index.php\/2023\/10\/28\/discovering-novel-algorithms-with-alphatensor-2\/","title":{"rendered":"Discovering novel algorithms with AlphaTensor"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<div class=\"article-cover article-cover--centered\">\n<div class=\"article-cover__header\">\n<p class=\"article-cover__eyebrow glue-label\">Research<\/p>\n<dl class=\"article-cover__meta\">\n<dt class=\"glue-visually-hidden\">Published<\/dt>\n<dd class=\"article-cover__date glue-label\">\n              <time datetime=\"2022-10-05\"><br \/>\n                5 October 2022<br \/>\n              <\/time>\n            <\/dd>\n<dt class=\"glue-visually-hidden\">Authors<\/dt>\n<dd class=\"article-cover__authors\">\n<p data-block-key=\"e69ze\">Alhussein Fawzi, Matej Balog, Bernardino Romera-Paredes, Demis Hassabis, Pushmeet Kohli<\/p>\n<\/dd>\n<\/dl>\n<section class=\"glue-social glue-social--zippy share share--centered article-cover__share\" data-glue-expansion-panel-expand-tooltip=\"Share: Expand to see social channels\" data-glue-expansion-panel-collapse-tooltip=\"Share: Hide social channels\" id=\"share-ab4155c3-77dd-4b84-838f-0fb10c927bd5\">\n<\/section><\/div>\n<picture class=\"article-cover__image\"><source media=\"(min-width: 1024px)\" type=\"image\/webp\" width=\"1072\" height=\"603\" srcset=\"https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w1072-h603-n-nu-rw 1x, https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w2144-h1206-n-nu-rw 2x\"\/><source media=\"(min-width: 600px)\" type=\"image\/webp\" width=\"928\" height=\"522\" srcset=\"https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w928-h522-n-nu-rw 1x, https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w1856-h1044-n-nu-rw 2x\"\/><source type=\"image\/webp\" width=\"528\" height=\"297\" srcset=\"https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w528-h297-n-nu-rw 1x, https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w1056-h594-n-nu-rw 2x\"\/><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"603\" src=\"https:\/\/lh3.googleusercontent.com\/hTI87LDHi81OxoA3dLJYlCavVpnWYInEWhXRuY_r20Fkn5NNyi-qQ9VOPD5w6fVsJiCUR-57C7XZ_HorcyxoI91dngIqA7wf_2cCVQkKXa9KlYjRQg=w1072-h603-n-nu\" width=\"1072\"\/>\n    <\/picture>\n<\/p><\/div>\n<div class=\"gdm-rich-text rich-text\">\n<p data-block-key=\"vpp9q\"><b>First extension of AlphaZero to mathematics unlocks new possibilities for research<\/b><\/p>\n<p data-block-key=\"fpe5u\">Algorithms have helped mathematicians perform fundamental operations for thousands of years. The ancient Egyptians created an algorithm to multiply two numbers without requiring a multiplication table, and Greek mathematician Euclid described an algorithm to compute the greatest common divisor, which is still in use today.<\/p>\n<p data-block-key=\"fhx8i\">During the Islamic Golden Age, Persian mathematician <a href=\"https:\/\/en.wikipedia.org\/wiki\/Muhammad_ibn_Musa_al-Khwarizmi\" rel=\"noopener\" target=\"_blank\">Muhammad ibn Musa al-Khwarizmi<\/a> designed new algorithms to solve linear and quadratic equations. In fact, al-Khwarizmi\u2019s name, translated into Latin as <i>Algoritmi<\/i>, led to the term algorithm. But, despite the familiarity with algorithms today \u2013 used throughout society from classroom algebra to cutting edge scientific research \u2013 the process of discovering new algorithms is incredibly difficult, and an example of the amazing reasoning abilities of the human mind.<\/p>\n<p data-block-key=\"ewukv\">In our <a href=\"https:\/\/www.nature.com\/articles\/s41586-022-05172-4\" rel=\"noopener\" target=\"_blank\">paper<\/a>, published today in Nature<i>,<\/i> we introduce <i>AlphaTensor<\/i>, the first artificial intelligence (AI) system for discovering novel, efficient, and provably correct algorithms for fundamental tasks such as matrix multiplication. This sheds light on a 50-year-old open question in mathematics about finding the fastest way to multiply two matrices.<\/p>\n<p data-block-key=\"ndpb0\">This paper is a stepping stone in DeepMind\u2019s mission to advance science and unlock the most fundamental problems using AI. Our system, AlphaTensor, builds upon AlphaZero, an agent that has <a href=\"https:\/\/deepmind.google\/discover\/blog\/alphazero-shedding-new-light-on-chess-shogi-and-go\/\">shown superhuman performance on board games, like chess, Go and shogi<\/a>, and this work shows the journey of AlphaZero from playing games to tackling unsolved mathematical problems for the first time.<\/p>\n<h2 data-block-key=\"me8ja\">Matrix multiplication<\/h2>\n<p data-block-key=\"7x5kf\">Matrix multiplication is one of the simplest operations in algebra, commonly taught in high school maths classes. But outside the classroom, this humble mathematical operation has enormous influence in the contemporary digital world and is ubiquitous in modern computing.<\/p>\n<\/div>\n<figure class=\"single-media single-media--inline\"><figcaption class=\"single-media__caption\">\n<p data-block-key=\"btpby\">Example of the process of multiplying two 3&#215;3 matrices.<\/p>\n<\/figcaption><\/figure>\n<div class=\"gdm-rich-text rich-text\">\n<p data-block-key=\"1o42f\">This operation is used for processing images on smartphones, recognising speech commands, generating graphics for computer games, running simulations to predict the weather, compressing data and videos for sharing on the internet, and so much more. Companies around the world spend large amounts of time and money developing computing hardware to efficiently multiply matrices. So, even minor improvements to the efficiency of matrix multiplication can have a widespread impact.<\/p>\n<p data-block-key=\"r1pho\">For centuries, mathematicians believed that the standard matrix multiplication algorithm was the best one could achieve in terms of efficiency. But in 1969, German mathematician Volker Strassen <a href=\"https:\/\/link.springer.com\/article\/10.1007\/BF02165411\" rel=\"noopener\" target=\"_blank\">shocked the mathematical community<\/a> by showing that better algorithms do exist.<\/p>\n<\/div>\n<figure class=\"single-media single-media--inline\"><figcaption class=\"single-media__caption\">\n<p data-block-key=\"rm7di\">Standard algorithm compared to Strassen\u2019s algorithm, which uses one less scalar multiplication (7 instead of 8) for multiplying 2&#215;2 matrices. Multiplications matter much more than additions for overall efficiency.<\/p>\n<\/figcaption><\/figure>\n<div class=\"gdm-rich-text rich-text\">\n<p data-block-key=\"zn199\">Through studying very small matrices (size 2&#215;2), he discovered an ingenious way of combining the entries of the matrices to yield a faster algorithm. Despite decades of research following Strassen\u2019s breakthrough, larger versions of this problem have remained unsolved \u2013 to the extent that it\u2019s not known how efficiently it\u2019s possible to multiply two matrices that are as small as 3&#215;3.<\/p>\n<p data-block-key=\"6q3be\">In our paper, we explored how modern AI techniques could advance the automatic discovery of new matrix multiplication algorithms. Building on the progress of human intuition, AlphaTensor discovered algorithms that are more efficient than the state of the art for many matrix sizes. Our AI-designed algorithms outperform human-designed ones, which is a major step forward in the field of algorithmic discovery.<\/p>\n<h2 data-block-key=\"hee64\">The process and progress of automating algorithmic discovery<\/h2>\n<p data-block-key=\"gor81\">First, we converted the problem of finding efficient algorithms for matrix multiplication into a single-player game. In this game, the board is a three-dimensional tensor (array of numbers), capturing how far from correct the current algorithm is. Through a set of allowed moves, corresponding to algorithm instructions, the player attempts to modify the tensor and zero out its entries. When the player manages to do so, this results in a provably correct matrix multiplication algorithm for any pair of matrices, and its efficiency is captured by the number of steps taken to zero out the tensor.<\/p>\n<p data-block-key=\"h7dvv\">This game is incredibly challenging \u2013 the number of possible algorithms to consider is much greater than the number of atoms in the universe, even for small cases of matrix multiplication. Compared to the game of Go, which remained <a href=\"https:\/\/www.deepmind.com\/research\/highlighted-research\/alphago\" rel=\"noopener\" target=\"_blank\">a challenge for AI for decades<\/a>, the number of possible moves at each step of our game is 30 orders of magnitude larger (above 1033 for one of the settings we consider).<\/p>\n<p data-block-key=\"if47u\">Essentially, to play this game well, one needs to identify the tiniest of needles in a gigantic haystack of possibilities. To tackle the challenges of this domain, which significantly departs from traditional games, we developed multiple crucial components including a novel neural network architecture that incorporates problem-specific inductive biases, a procedure to generate useful synthetic data, and a recipe to leverage symmetries of the problem.<\/p>\n<p data-block-key=\"bs0pu\">We then trained an AlphaTensor agent using reinforcement learning to play the game, starting without any knowledge about existing matrix multiplication algorithms. Through learning, AlphaTensor gradually improves over time, re-discovering historical fast matrix multiplication algorithms such as Strassen\u2019s, eventually surpassing the realm of human intuition and discovering algorithms faster than previously known.<\/p>\n<\/div>\n<figure class=\"single-media single-media--large\"><figcaption class=\"single-media__caption\">\n<p data-block-key=\"j1ko5\">Single-player game played by AlphaTensor, where the goal is to find a correct matrix multiplication algorithm. The state of the game is a cubic array of numbers (shown as grey for 0, blue for 1, and green for -1), representing the remaining work to be done.<\/p>\n<\/figcaption><\/figure>\n<div class=\"gdm-rich-text rich-text\">\n<p data-block-key=\"obuck\">For example, if the traditional algorithm taught in school multiplies a 4&#215;5 by 5&#215;5 matrix using 100 multiplications, and this number was reduced to 80 with human ingenuity, AlphaTensor has found algorithms that do the same operation using just 76 multiplications.<\/p>\n<\/div>\n<figure class=\"single-media single-media--large\"><figcaption class=\"single-media__caption\">\n<p data-block-key=\"90uhf\">Algorithm discovered by AlphaTensor using 76 multiplications, an improvement over state-of-the-art algorithms.<\/p>\n<\/figcaption><\/figure>\n<div class=\"gdm-rich-text rich-text\">\n<p data-block-key=\"9lvjq\">Beyond this example, AlphaTensor\u2019s algorithm improves on Strassen\u2019s two-level algorithm in a finite field for the first time since its discovery 50 years ago. These algorithms for multiplying small matrices can be used as primitives to multiply much larger matrices of arbitrary size.<\/p>\n<p data-block-key=\"dnif0\">Moreover, AlphaTensor also discovers a diverse set of algorithms with state-of-the-art complexity \u2013 up to thousands of matrix multiplication algorithms for each size, showing that the space of matrix multiplication algorithms is richer than previously thought.<\/p>\n<p data-block-key=\"tcak0\">Algorithms in this rich space have different mathematical and practical properties. Leveraging this diversity, we adapted AlphaTensor to specifically find algorithms that are fast on a given hardware, such as Nvidia V100 GPU, and Google TPU v2. These algorithms multiply large matrices 10-20% faster than the commonly used algorithms on the same hardware, which showcases AlphaTensor\u2019s flexibility in optimising arbitrary objectives.<\/p>\n<\/div>\n<figure class=\"single-media single-media--large\"><figcaption class=\"single-media__caption\">\n<p data-block-key=\"6dwxe\">AlphaTensor with an objective corresponding to the runtime of the algorithm. When a correct matrix multiplication algorithm is discovered, it&#8217;s benchmarked on the target hardware, which is then fed back to AlphaTensor, in order to learn more efficient algorithms on the target hardware.<\/p>\n<\/figcaption><\/figure>\n<div class=\"gdm-rich-text rich-text\">\n<h2 data-block-key=\"6kdc5\">Exploring the impact on future research and applications<\/h2>\n<p data-block-key=\"wttjc\">From a mathematical standpoint, our results can guide further research in complexity theory, which aims to determine the fastest algorithms for solving computational problems. By exploring the space of possible algorithms in a more effective way than previous approaches, AlphaTensor helps advance our understanding of the richness of matrix multiplication algorithms. Understanding this space may unlock new results for helping determine the asymptotic complexity of matrix multiplication, <a href=\"https:\/\/www.cambridge.org\/core\/books\/geometry-and-complexity-theory\/15E3ABA3FF14E1054574663F60250D80#fndtn-information\" rel=\"noopener\" target=\"_blank\">one of the most fundamental open problems in computer science<\/a>.<\/p>\n<p data-block-key=\"tt5x8\">Because matrix multiplication is a core component in many computational tasks, spanning computer graphics, digital communications, neural network training, and scientific computing, AlphaTensor-discovered algorithms could make computations in these fields significantly more efficient. AlphaTensor\u2019s flexibility to consider any kind of objective could also spur new applications for designing algorithms that optimise metrics such as energy usage and numerical stability, helping prevent small rounding errors from snowballing as an algorithm works.<\/p>\n<p data-block-key=\"29nzi\">While we focused here on the particular problem of matrix multiplication, we hope that our paper will inspire others in using AI to guide algorithmic discovery for other fundamental computational tasks. Our research also shows that AlphaZero is a powerful algorithm that can be extended well beyond the domain of traditional games to help solve open problems in mathematics. Building upon our research, we hope to spur on a greater body of work \u2013 applying AI to help society solve some of the most important challenges in mathematics and across the sciences.<\/p>\n<p data-block-key=\"d59n6\">You can find more information in <a href=\"https:\/\/github.com\/deepmind\/alphatensor\" rel=\"noopener\" target=\"_blank\">AlphaTensor&#8217;s GitHub repository<\/a>.<\/p>\n<\/div>\n<aside class=\"notes\">\n<div class=\"glue-page\">\n<div class=\"gdm-rich-text notes__inner\">\n<h2 data-block-key=\"qp6hz\">Acknowledgements<\/h2>\n<p data-block-key=\"3vfue\">Francisco R. Ruiz, Thomas Hubert, Alexander Novikov, Alex Gaunt for feedback on the blog post. Sean Carlson, Arielle Bier, Gabriella Pearl, Katie McAtackney, Max Barnett for their help with text and figures. This work was done by a team with contributions from Alhussein Fawzi, Matej Balog, Aja Huang, Thomas Hubert, Bernardino Romera-Paredes, Mohammadamin Barekatain, Francisco Ruiz, Alexander Novikov, Julian Schrittwieser, Grzegorz Swirszcz, David Silver, Demis Hassabis, and Pushmeet Kohli.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<\/aside>\n<aside class=\"related-posts\">\n<\/aside><\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"https:\/\/deepmind.google\/discover\/blog\/discovering-novel-algorithms-with-alphatensor\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Research Published 5 October 2022 Authors Alhussein Fawzi, Matej Balog, Bernardino Romera-Paredes, Demis Hassabis, Pushmeet Kohli First<\/p>\n","protected":false},"author":2,"featured_media":783,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-deepmind-ai"],"_links":{"self":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts\/782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/comments?post=782"}],"version-history":[{"count":1,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts\/782\/revisions"}],"predecessor-version":[{"id":2682,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts\/782\/revisions\/2682"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/media\/783"}],"wp:attachment":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/media?parent=782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/categories?post=782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/tags?post=782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}