arXiv:2601.00728cs.LGcs.NA2026-01被引 1

用强化学习自动调优线性求解器的精度,兼顾速度与准确度。

Precision autotuning for linear solvers via contextual bandit-based RL

  • 将精度调优建模为上下文多臂老虎机问题,动态选择计算步骤的最佳精度配置。
  • 在求解线性方程组时,计算成本降低且精度接近双精度基准。
  • 首次在未见数据上验证强化学习精度调优,适用于多种数值算法。

我们提出一种基于强化学习的自适应精度调优框架,适用于线性求解器及通用算法。该框架被建模为上下文多臂老虎机问题,通过离散状态空间的增量动作价值估计,选择计算步骤中的最优精度配置,以平衡精度与计算效率。在求解线性系统 $Ax = b$ 的迭代精化应用中,该方法基于系统特征(如近似条件数、矩阵范数)动态选择精度,保持可接受的精度与收敛性。动作价值估计器输入离散特征,输出动作价值,策略通过 $ε$-贪心优化,以最大化兼顾准确性和计算成本的多目标奖励。实验表明,该方法有效降低计算成本,同时精度与双精度基线相当。框架具备泛化能力,适用于多样化的未见数据,为强化学习在数值算法中的精度选择提供新思路,是首个在未见数据上验证的强化学习精度调优工作。

原文摘要 · Abstract (English)

We propose a reinforcement learning (RL) framework for adaptive precision tuning for linear solvers, which 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 while maintaining acceptable accuracy and convergence. In detail, an action-value estimator takes discretized features (e.g., approximate condition number and matrix norm) as input and outputs estimated action values, from which a policy selects the actions (chosen precision configurations for specific steps), optimized via an $ε$-greedy strategy to maximize a multi-objective reward to balance 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 provides insights into applying RL precision selection to 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 with verification on unseen datasets.

强化学习精度调优数值计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。