TL;DR
Researchers have developed StrassenNet, a specialized tensor-network architecture designed to "learn" fast matrix multiplication algorithms through gradient-based optimization. The network successfully rediscovers Strassen’s famous $2 \times 2$ algorithm and identifies a sharp numerical barrier at rank 23 for $3 \times 3$ matrices, providing a machine-learning perspective on long-standing problems in algebraic complexity.
What Problem Does This Paper Address?
Matrix multiplication is the backbone of modern computing, from physics simulations to training LLMs. While the "schoolbook" method for $n \times n$ matrices takes $O(n^3)$ operations, Volker Strassen shocked the world in 1969 by proving that $2 \times 2$ matrices could be multiplied using only 7 multiplications instead of 8. This discovery launched a quest to find the "rank" (the minimum number of scalar multiplications needed) for larger matrices.
For $3 \times 3$ matrices, we know an algorithm exists for rank 23 (Laderman, 1976), but whether rank 22 is possible remains one of the most famous open questions in the field. This paper investigates whether a neural network, constrained by the algebraic structure of the problem, can "sense" these theoretical limits and discover new, efficient algorithms.
Methods
The authors introduce StrassenNet, a tensor-neural network where the forward pass isn't a standard sequence of ReLU layers, but a structured computation graph based on the Bhattacharya–Mesner product (BMP).
Key technical components include:
- Learnable Tensors ($H, K, F$): These represent the three stages of a bilinear algorithm: linear combinations of input $A$, linear combinations of input $B$, and the final post-combination to produce the result.
- Algebraic Operators: The network uses "blow" (inflation) and "forget" (contraction) operators to manipulate tensor dimensions, allowing the model to mirror the exact topology of known fast algorithms like Strassen's.
- End-to-End Training: Unlike previous reinforcement learning approaches (like AlphaTensor), StrassenNet uses standard gradient descent (Adam) and Mean Squared Error (MSE) loss to find the values within the $H, K, F$ tensors that minimize multiplication error.
Datasets
The study uses synthetic datasets consisting of:
- Training/Validation Sets: 10,000 triples each of random matrices $(A, B)$ and their true product $AB$.
- Data Generation: Entries are sampled uniformly from the range $[-1, 1]$.
- Matrix Sizes: Primary focus is on $3 \times 3$ matrices, with $2 \times 2$ used as a proof-of-concept.
Key Insights and Ideas
- Architecture as a Constraint: By forcing the neural network to follow the mathematical structure of a bilinear algorithm, the "bottleneck" (the internal dimension $r$) becomes a direct proxy for the algorithm's rank.
- The Numerical Threshold: The most striking insight is that the network's ability to learn drops off a cliff when the rank $r$ is set below 23. The network "knows" it can't fit the data well with only 22 multiplications.
- Recovering Strassen: For $2 \times 2$ matrices, the network consistently converged to a rank-7 solution, numerically recovering the optimal Strassen algorithm without any prior knowledge of its coefficients.
- Gauge Symmetry: The authors note that these factorized schemes have "gauge symmetry"—many different sets of $H, K, F$ tensors can represent the same algorithm. The network navigates this non-identifiable space to find a valid solution.
Key Results
- $2 \times 2$ Success: StrassenNet reliably recovers the rank-7 Strassen algorithm across multiple independent runs.
- $3 \times 3$ Gap: There is a clear order-of-magnitude difference in validation error between $r=23$ and $r=22$.
- For $r=23$, the MSE stays below $10^{-3}$ (mean $\approx 0.0022$).
- For $r \le 22$, the MSE plateaus around $10^{-2}$ (mean $\approx 0.0128$ for $r=22$).
- Statistical Significance: A one-tailed Welch’s t-test confirmed that the model trained with $r=23$ achieves a significantly lower loss than $r=22$ ($p = 0.0032$), suggesting $r=23$ is a "practical barrier" for this architecture.
Limitations and Future Work
- Not a Formal Proof: While the numerical results are suggestive, they do not constitute a mathematical proof that rank 22 is impossible; they only show it is significantly harder to find via standard gradient descent in this architecture.
- Border Rank Instability: The authors attempted to explore "border rank" (approximate algorithms that work in the limit $\epsilon \to 0$), but found the optimization landscape to be extremely flat and unstable.
- Optimization Challenges: The current use of the Adam optimizer might be a limiting factor. Future work could involve more sophisticated "homotopy-style" training, where the parameter $\epsilon$ is gradually reduced, or introducing explicit cancellation mechanisms to stabilize the learning of approximate algorithms.
Summary updated