Matrix multiplication is a fundamental process in computer software

aire images/Getty Images

A common problem computed trillions of times a day by virtually all software has an efficiency limit, and OpenAI has just discovered what it is. This mathematical achievement lets algorithm designers know what is achievable in principle, but will not in itself make computers faster.

Matrix multiplication – where two grids of numbers are multiplied together – is heavily used in graphics, AI and scientific simulations. Almost any task on a computer will require matrix multiplication to some extent, so even a small improvement in the efficiency of these algorithms could bring large performance gains, or significant energy savings.

The standard way of multiplying two matrices is to multiply the numbers from each row in the first matrix with each column in the second. For two matrices each containing two rows and two columns, this involves eight multiplications.

But the mathematician Volker Strassen proved in 1969 that, with a clever trick, it can be reduced to seven. This approach, called the Strassen algorithm, requires some extra addition, but this is acceptable in some scenarios because additions in a computer take far less time than multiplications.

That algorithm – aside from some improvements – stood as the most efficient approach on most matrix sizes for more than 50 years, until DeepMind used AI to discover a faster technique in 2022.

A very basic algorithm can complete the task in n3 steps, where n is the number of rows and columns in a matrix. Strassen reduced that to n2.8 and DeepMind improved that again slightly, to around n2.77.

Now OpenAI has shown that the lower bound is in fact n2.25. But while Strassen and DeepMind showed algorithms to achieve their figures, OpenAI has instead proved – without developing a new algorithm – how efficient any attempt can ever hope to be. The discovery was posted to the company’s GitHub page with no fanfare or wider announcement.

Mantas Mikaitis at the University of Leeds, UK, says there is no known algorithm that can achieve efficiency of 2.25, but we do have some that approach it – although, like Strassen’s, they only work in some scenarios.

“The problem size n has to grow enormously the closer we get to the n to the power of 2.25 complexity, to gain speed-up,” he says. “Some of these algorithms are beneficial only when n is very large, because at small n various other computing costs, apart from multiply-and-add, can dominate. So in practice we still use the n to the power of 3 algorithm in scientific computing and AI workloads because we need very large n to see gains from the theoretically faster algorithms.”

Mikaitis says the discovery is valuable because we can now stop looking for theoretically faster algorithms, because we know they don’t exist, and put all our attention on optimising algorithms we have towards the 2.25 barrier.

But we should not expect to see a huge speed-up in computer calculations any time soon, as a lower bound for the algorithm is a very different thing to real-world efficiency, says Thomas Ranner at the University of Leeds.

“A theoretical lower bound tells us what may be achievable in principle, but not how to achieve it,” says Ranner. “Historically, there has often been a large gap between the best known theoretical algorithms and the algorithms that are actually useful in practice.”

The major challenge now is whether algorithms can be developed that approach this bound while remaining practical, efficient and reliable, says Ranner. If that turns out to be possible, the consequences could be substantial.

OpenAI also recently revealed an upper bound for the difficulty of matrix multiplication in specific sizes of matrices, in one paper of more than 700 it released at once in October. Coincidentally, the upper bound is the same as the newly discovered lower bound. “It means that the current best known algorithm for the problem is also the most efficient among any algorithms,” says Per Kristian Lehre at the University of Birmingham, UK.

Silvia Butti at King’s College London points out that both the upper and lower bounds found by OpenAI relate to certain sizes of matrix, which she says makes them more interesting from a conceptual point of view than from a practical one.

“It is fair to say that human conceptual understanding of these new AI-generated results is, so far, quite limited. I think we will soon cease to be amazed at the AI companies telling us what is and isn’t true, and go back to our community’s original raison d’être: why are things the way they are?” says Butti.

OpenAI did not respond to a request for comment.

Source: New Scientist · Matthew Sparkes

At a glance

Topic
Science
Country
🇬🇧 GB
Publisher language
EN
Added to Allnira