计算机工程与科学2025,Vol.47Issue(3):381-391,11.DOI:10.3969/j.issn.1007-130X.2025.03.001
基于监督学习的稀疏矩阵乘算法优选
Selection of sparse matrix multiplication algorithms based on supervised learning
摘要
Abstract
The sparse matrix multiplication algorithms with mainstream row-by-row calculation for-mulas,including SPA,HASH,and ESC,have significant performance disparities in different sparse matrices.There is no single optimal algorithm for all sparse matrices.A single algorithm cannot always achieve optimal performance on different non-zero element scales,and there is a significant gap between a single algorithm and the optimal selection.To this end,a selection model of sparse matrix multiplica-tion algorithm based on supervised learning is proposed.A given set of matrices is used as the data source to extract the features of the sparse matrices,and performance data is obtained using SPA,HASH,and ESC calculations for training and validation.The resulting model can select the optimal algorithm for a new dataset solely based on the features of the sparse matrix.The experimental results show that this model can achieve a prediction accuracy of over 91%,with an average performance of 98%of the optimal selection,which is more than 1.55 times the performance of a single algorithm.It can also be used in practical library functions and has good generalization ability and practical value.关键词
稀疏矩阵乘/SpGEMM/SPA算法/HASH算法/ESC算法/机器学习Key words
sparse matrix multiplication/SpGEMM/SPA algorithm/HASH algorithm/ESC algo-rithm/machine learning分类
计算机与自动化引用本文复制引用
彭林,张鹏,陈俊峰,唐滔,黄春..基于监督学习的稀疏矩阵乘算法优选[J].计算机工程与科学,2025,47(3):381-391,11.基金项目
国家重点研发计划(2020YFA0709803) (2020YFA0709803)