We propose a reinforcement learning (RL) framework for adaptive precision tuning of linear solvers, and can be extended to general algorithms. The framework is formulated as a contextual bandit problem and solved using incremental action-value estimation with a discretized state space to select optimal precision configurations for computational steps, balancing precision and computational efficiency. To verify its effectiveness, we apply the framework to iterative refinement for solving linear systems $Ax = b$. In this application, our approach dynamically chooses precisions based on calculated features from the system. In detail, a Q-table maps discretized features (e.g., approximate condition number and matrix norm)to actions (chosen precision configurations for specific steps), optimized via an epsilon-greedy strategy to maximize a multi-objective reward balancing accuracy and computational cost. Empirical results demonstrate effective precision selection, reducing computational cost while maintaining accuracy comparable to double-precision baselines. The framework generalizes to diverse out-of-sample data and offers insight into utilizing RL precision selection for other numerical algorithms, advancing mixed-precision numerical methods in scientific computing. To the best of our knowledge, this is the first work on precision autotuning with RL and verified on unseen datasets.


翻译:我们提出了一个用于线性求解器自适应精度调优的强化学习框架,该框架可扩展至通用算法。该框架被建模为一个上下文赌博机问题,并通过离散化状态空间下的增量动作-价值估计进行求解,以选择计算步骤的最优精度配置,从而在精度与计算效率之间取得平衡。为验证其有效性,我们将该框架应用于求解线性方程组 $Ax = b$ 的迭代精化算法。在此应用中,我们的方法基于从系统计算得到的特征动态选择精度。具体而言,一个 Q 表将离散化特征(例如近似条件数和矩阵范数)映射到动作(为特定步骤选择的精度配置),并通过 epsilon-贪婪策略进行优化,以最大化一个平衡精度与计算成本的多目标奖励函数。实证结果表明,该方法能有效选择精度,在保持与双精度基线相当精度的同时降低了计算成本。该框架可泛化至多样的样本外数据,并为在其他数值算法中利用强化学习进行精度选择提供了思路,推动了科学计算中混合精度数值方法的发展。据我们所知,这是首项基于强化学习进行精度自动调优并在未见数据集上验证的工作。

0
下载
关闭预览

相关内容

【ICML2023】表示驱动强化学习
专知会员服务
39+阅读 · 2023年6月2日
机器学习组合优化
专知会员服务
110+阅读 · 2021年2月16日
概述自动机器学习(AutoML)
人工智能学家
19+阅读 · 2019年8月11日
机器学习中的最优化算法总结
人工智能前沿讲习班
22+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
【强化学习】强化学习+深度学习=人工智能
产业智能官
55+阅读 · 2017年8月11日
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2013年12月31日
国家自然科学基金
23+阅读 · 2009年12月31日
国家自然科学基金
48+阅读 · 2009年12月31日
国家自然科学基金
11+阅读 · 2008年12月31日
Arxiv
0+阅读 · 1月29日
VIP会员
相关VIP内容
【ICML2023】表示驱动强化学习
专知会员服务
39+阅读 · 2023年6月2日
机器学习组合优化
专知会员服务
110+阅读 · 2021年2月16日
相关基金
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2013年12月31日
国家自然科学基金
23+阅读 · 2009年12月31日
国家自然科学基金
48+阅读 · 2009年12月31日
国家自然科学基金
11+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员