math.AGFeb 25, 2026

Neural Learning of Fast Matrix Multiplication Algorithms: A StrassenNet Approach

Authors: Paolo Andreini, Alessandra Bernardi, Monica Bianchini, Barbara Toniella Corradini, Sara Marziali, Giacomo Nunziati, Franco Scarselli

Abstract

Fast matrix multiplication can be described as searching for low-rank decompositions of the matrix--multiplication tensor. We design a neural architecture, StrassenNet, which reproduces the Strassen algorithm for 2×22\times 2 multiplication. Across many independent runs the network always converges to a rank-77 tensor, thus numerically recovering Strassen's optimal algorithm. We then train the same architecture on 3×33\times 3 multiplication with rank r∈{19,…,23}r\in\{19,\dots,23\}. Our experiments reveal a clear numerical threshold: models with r=23r=23 attain significantly lower validation error than those with r≤22r\le 22, suggesting that r=23r=23 could actually be the smallest effective rank of the matrix multiplication tensor 3×33\times 3. We also sketch an extension of the method to border-rank decompositions via an ε\varepsilon--parametrisation and report preliminary results consistent with the known bounds for the border rank of the 3×33\times 3 matrix--multiplication tensor.

Figures & tables

Explore similar work

Aug 17, 2026

Improving the matrix multiplication exponent with modern optimization and AlphaEvolve

The current best bounds on the matrix multiplication exponent ωω are obtained through a refinement of the laser method called combination loss analysis (Duan et al., 2022; Williams et al., 2024; Alman et al., 2025). In this note, we address the optimization problem at the core of this approach and propose several improvements. First, we reformulate the optimization problem allowing us to solve it in a larger setting than was previously possible. Second, we leverage recent advances in machine learning to design a new optimization algorithm for this problem. Finally, we refine the resulting optimization algorithm with AlphaEvolve. Our combined approach yields an upper bound of ωω < 2.371177, improving the previous best bound of 2.371339.
Sep 26, 2026

Change the Product, Keep the Parameters: Associative Algebra Layers for Transformers

Fast matrix multiplication algorithms keep the product fixed and search for a cheaper way to evaluate it. We instead ask whether a Transformer's learned projections can use a different, cheaper product altogether. Building on an associative-algebra construction that replaces ordinary matrix multiplication with a sparser interaction table over the same weight blocks, we construct a family with quadratic arithmetic in the matrix dimension when the physical block size remains fixed, and derive finite-shape constraints for GPU execution. The construction is provably optimal for its bilinear rank by the Alder--Strassen bound and can be realized as row-typed rectangular projections compatible with causal masking and KV-cached decoding. We provide an empirical test of this approach by training two approximately 110M-parameter decoder-only Transformer LMs from the same recipe and 12.3B-token budget, differing only in their feed-forward layer: one uses ordinary dense matrix multiplication and the other uses the associative-algebra product. Across four prompt domains, the algebraic model achieves a 6.2--7.8% increase in end-to-end generation throughput, while obtaining lower scores on all three reported downstream metrics. We treat these results as a feasibility and trainability check for the proposed approach at small scale, leaving further investigation to future work.
Jun 1, 2026

Riemannian Gradient Descent for Low-Rank Architectures

We explore Riemannian optimization techniques for rank-factored matrix parameters, targeting contemporary deep learning applications. We examine ten points in the algorithm design space: two geometries for rank-rr matrices, three geometries for rank-rr partial isometries, and block-matrix variants of these five, where factors are shared across block-rows and block-columns. We apply our methods to the multihead attention parameters in small language models. After tuning learning rates, our methods do not conclusively outperform an AdamW baseline. Our implementations are available online.