Fast Matrix Multiplication via Ternary Meta Flip Graphs
A. I. Perminov
TL;DR
This work tackles fast matrix multiplication by restricting coefficients to the ternary set $Z_T$ and using a GPU-accelerated meta flip-graph search that enforces ternary safety via specialized arithmetic and sign symmetry breaking. It reports new best ranks for several formats, independently rediscovering 32 ternary schemes that match or exceed previous $Q$-based results and achieving 30 binary-field improvements, while analyzing the limits of ternary applicability over 164 known schemes. The approach combines core and meta operators, isotropy-aware novelty checks, and robust tooling to explore both fixed-dimension spaces and cross-format expansions, yielding practical, hardware-friendly algorithms. The results and tools are openly available, enabling broader exploration of coefficient-efficient matrix multiplication and informing future hardware and algorithm design.
Abstract
Matrix multiplication optimization remains a fundamental challenge in computational mathematics. This work introduces a novel approach that discovers matrix multiplication schemes whose coefficients are restricted to the set $\{-1, 0, 1\}$ (denoted $Z_T$), minimizing naive additive complexity for efficient hardware implementation. The core of the method is a GPU-accelerated meta flip graph algorithm that maintains ternary safety through specialized arithmetic operations and sign symmetry breaking. Key results include new best ranks for the formats $4 \times 5 \times 12$, $5 \times 6 \times 10$, and $6 \times 7 \times 9$, the independent discovery of 32 schemes in $Z_T$ that match known optimal ranks (including 8 previously known only with rational coefficients), and 30 rank improvements in the binary field. The analysis of 164 known schemes shows that 92 admit a ternary-coefficient implementation, while 72 could not be found under this constraint, defining the current boundaries of the approach. All software, results, and discovered schemes are provided as open-source.
