MarkTechPost@AI 前天 11:55
RXTX: A Machine Learning-Guided Algorithm for Efficient Structured Matrix Multiplication
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

RXTX 算法是一种用于高效计算 XX^T 的新算法,其中 X 属于 R^(n×m)。该算法通过机器学习引导的搜索和组合优化,减少了约 5% 的乘法和加法运算次数,优于现有的领先方法。与许多仅对大型矩阵有效的算法不同,RXTX 即使在小尺寸矩阵上也能提供改进。研究人员通过结合强化学习和两层混合整数线性规划 (MILP) 管道,成功发现了 RXTX 算法,为高效计算结构化矩阵乘法提供了新思路。

💡 矩阵乘法是计算机科学和数值线性代数中的关键问题,尤其是在处理如 AA^T 等结构化矩阵时。

🔍 RXTX 算法通过机器学习方法,针对 XX^T 进行了优化,减少了计算所需的运算次数,在效率上有所提升。

⚙️ RXTX 算法使用了 26 次通用矩阵乘法和优化的加法方案,在实际测试中,RXTX 在 6144 × 6144 矩阵上的速度比标准 BLAS 例程快约 9%。

🧠 该算法结合了强化学习和两层混合整数线性规划 (MILP) 管道,通过搜索和组合优化,发现了高效的矩阵乘法算法,简化了 AlphaTensor 的方法。

🔬 RXTX 算法对大、小矩阵均有效,证明了机器学习引导的搜索和组合优化的成功融合。

Discovering faster algorithms for matrix multiplication remains a key pursuit in computer science and numerical linear algebra. Since the pioneering contributions of Strassen and Winograd in the late 1960s, which showed that general matrix products could be computed with fewer multiplications than previously believed, various strategies have emerged. These include gradient-based methods, heuristic techniques, group-theoretic frameworks, graph-based random walks, and deep reinforcement learning. However, significantly less focus has been placed on matrix products with inherent structure, such as when the second matrix is the transpose or identical to the first, or when matrices possess sparsity or symmetry. This oversight is notable, given that expressions like AA^T appear frequently in domains such as statistics, deep learning, and communications, representing critical constructs like Gram and covariance matrices. Moreover, XX^T is repetitive in large language model training algorithms like Muon and Shampoo.

Previous studies have explored structured matrix multiplication using various theoretical and machine learning-based methods. Representation theory and the Cohn–Umans framework have been employed to design efficient multiplication schemes for structured matrices. Reinforcement learning has also shown promise—models have learned to discover or rediscover known algorithms like Strassen’s. Recent work has focused on optimizing the computation of XX^T over finite fields and complex domains. Among these, the most efficient known method for real-valued XX^T is Strassen’s algorithm, who apply Strassen’s algorithm recursively on 2×2 block matrices, effectively translating the structured problem back into the domain of general matrix multiplication. 

Researchers from the Chinese University and the Shenzhen Research Institute of Big Data have developed RXTX, an algorithm for efficiently computing XX^T where X belongs to R^n*m. RXTX reduces the number of required operations—multiplications and additions—by approximately 5% compared to the current leading methods. Unlike many algorithms that only show benefits for large matrices, RXTX delivers improvements even for small sizes (e.g., n = 4). The algorithm was discovered through machine learning-based search and combinatorial optimization, leveraging the specific structure of XX^T for constant-factor acceleration. 

The RXTX algorithm improves matrix multiplication by reducing the number of operations compared to previous methods like recursive Strassen and Strassen-Winograd. It uses 26 general matrix multiplications and optimized addition schemes, resulting in fewer total operations. Theoretical analysis shows RXTX performs fewer multiplications and combined operations, especially for larger matrices. Practical tests on 6144 × 6144 matrices using a single-thread CPU show RXTX is about 9% faster than standard BLAS routines, with speedups observed in 99% of runs. These results highlight RXTX’s efficiency for large-scale symmetric matrix products and its advantage over traditional and state-of-the-art recursive algorithms. 

The proposed methodology integrates RL with a two-tier Mixed Integer Linear Programming (MILP) pipeline to discover efficient matrix multiplication algorithms, particularly for computing XX^T. The RL-guided Large Neighborhood Search generates a large set of potential rank-1 bilinear products, which are candidate expressions. MILP-A explores all linear combinations of these products to express the target outputs, while MILP-B identifies the smallest subset that can represent all targets. This setup mirrors the AlphaTensor approach but simplifies it by reducing the action space significantly, focusing on lower-dimensional tensor products and leveraging MILP solvers like Gurobi for rapid computation.

For example, to compute XX^T for a 2×2 matrix X, the goal is to derive expressions like x_1^2 + x_2^2 or x_1x_3 + x_2x_4. The RL policy randoMLy samples thousands of bilinear products using coefficients from {−1, 0, +1}. MILP-A finds combinations of these products that match the desired expressions, and MILP-B selects the fewest needed to cover all targets. This framework enabled the discovery of RXTX, an algorithm that performs 5% fewer multiplications and overall operations than prior methods. RXTX is efficient for large and small matrices and demonstrates a successful fusion of ML-based search and combinatorial optimization. 


Check out the Paper. All credit for this research goes to the researchers of this project. Also, feel free to follow us on Twitter and don’t forget to join our 95k+ ML SubReddit and Subscribe to our Newsletter.

The post RXTX: A Machine Learning-Guided Algorithm for Efficient Structured Matrix Multiplication appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

RXTX算法 矩阵乘法 机器学习 算法优化
相关文章