摘 要: 由于谱半径与矩阵的映射关系无法用一个可微函数显式表示,所以无法直接利用梯度下降算法进行计算。针对这一问题,提出一种基于梯度下降的不可微损失函数优化算法。首先,利用矩阵的F 范数替代谱半径构建损失函数。其次,基于谱半径小于等于F 范数的事实,构建初始化参数矩阵进而计算目标矩阵。最后,如果目标矩阵的谱半径小于阈值,则参数矩阵停止更新。实验结果表明,与随机连边、度小优先连边及度大优先连边相比,基于梯度下降的连边数量更多。 |
关键词: 感染强度;传染阈值;梯度下降;谱半径;F 范数 |
中图分类号: TP181
文献标识码: A
|
基金项目: 吕梁市重点研发项目(2022GXYF18);山西省高等学校教学改革创新项目(J20221164,J2020349);山西省深度贫困县科技精准扶贫专项(2020FP-11);山西省研究生教育创新项目(2022YJJG310);山西省大学生创新创业训练计划项目(20221239). |
|
Optimization Algorithm of Non-differentiable Loss Function Based on Gradient Descent |
XUE Yanfeng, LIU Jihua, ZHANG Xiang, XUE Zhiwen
|
(Department of Computer Science and Technology, Lvliang University, Lvliang 033000, China)
644126935@qq.com; 157598066@qq.com; 471623290@qq.com; 421070155@qq.com
|
Abstract: The mapping relationship between spectral radius and matrix cannot be expressed by a differentiable function, so it cannot be directly calculated by gradient descent algorithm. To solve this problem, this paper proposes a non-differentiable loss function optimization algorithm based on gradient descent. Firstly, the loss function is constructed by replacing the spectral radius with the F-norm of the matrix. Secondly, since the spectral radius is less than or equal to the F-norm, the initialization parameter matrix is constructed to calculate the target matrix. Finally, if the spectral radius of the target matrix is less than the threshold, the parameter matrix stops updating. The experimental results show that the number of connected edges based on gradient descent is more than that based on random connected edges, low degree first connected edges and high degree first connected edges. |
Keywords: infection intensity; threshold of infection; gradient descent; spectral radius; F-norm |