Bean:一种用于后向误差分析的语言
Bean: A Language for Backward Error Analysis
AI总结:
本文提出Bean语言,通过结合分级余效应与严格线性的类型系统,静态推导数值程序的后向误差界,并验证其数值稳定性。
摘要:
后向误差分析提供了一种在浮点舍入误差存在的情况下评估数值程序质量的方法。然而,数值分析文献中用于量化后向误差的技术需要大量的人力投入,目前尚无工具或自动化方法能够静态推导出可靠的后向误差界。为弥补这一空白,我们提出了Bean,一种带类型的头等编程语言,旨在表达后向误差的定量界。Bean的类型系统将分级余效应系统与严格线性相结合,以可靠地追踪后向误差在程序中的流动。我们通过一种新颖的范畴语义证明了我们系统的可靠性,其中每个Bean程序表示一个三元组的相关变换,这些变换共同满足后向误差保证。为了展示Bean作为自动化后向误差分析实用工具的潜力,我们在Bean中实现了数值线性代数中的多种标准算法,通过组合风格的类型推导建立了细粒度的后向误差界。我们还开发了Bean的原型实现,能够自动推断后向误差界。我们的评估表明,这些推断出的界与文献中最坏情况的理论相对后向误差界相匹配,凸显了Bean在验证数值程序关键属性——数值稳定性——方面的实用性。
英文摘要:
Backward error analysis offers a method for assessing the quality of numerical programs in the presence of floating-point rounding errors. However, techniques from the numerical analysis literature for quantifying backward error require substantial human effort, and there are currently no tools or automated methods for statically deriving sound backward error bounds. To address this gap, we propose Bean, a typed first-order programming language designed to express quantitative bounds on backward error. Bean's type system combines a graded coeffect system with strict linearity to soundly track the flow of backward error through programs. We prove the soundness of our system using a novel categorical semantics, where every Bean program denotes a triple of related transformations that together satisfy a backward error guarantee. To illustrate Bean's potential as a practical tool for automated backward error analysis, we implement a variety of standard algorithms from numerical linear algebra in Bean, establishing fine-grained backward error bounds via typing in a compositional style. We also develop a prototype implementation of Bean that infers backward error bounds automatically. Our evaluation shows that these inferred bounds match worst-case theoretical relative backward error bounds from the literature, underscoring Bean's utility in validating a key property of numerical programs: numerical stability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。