paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Explainable dynamic programming

可解释的动态规划
JFP vol.312021匹配度 2/10 · 该论文属于函数式编程/DSL 与动态规划解释,关注用 Haskell 和半环形式化生成可解释实现;与用户画像中的静态分析、LLM/Agent、浮点程序分析和贝叶斯程序分析等核心方向基本无交集。仅在 PL 形式化与工程实现偏好上有非常弱的间接关联。引用 9 inbox
MARTIN ERWIG, PRASHANT KUMAR
crossref: 2026-09-10

AI 速览

一句话:提出基于细粒度值表示解释动态规划结果的方法,并用 Haskell 库支持从递推关系自动生成可解释实现。

动态规划广泛用于实现优化算法,但其通过聚合值比较作出的决策往往难以解释。本文提出一种可解释动态规划方法:在执行过程中保留被聚合值的细粒度表示,据此回答“为何得到此结果而非彼结果”,从而增强对结果正确性的信心。作者利用半环形式化动态规划,构建 Haskell 库,使程序员只需给出递推关系即可自动获得高效实现;动态规划还可作为类型类泛化,使普通程序平滑过渡到带细粒度表示并生成解释的版本。该库还支持预先推测用户对结果的疑问并自动生成相应解释。

问题
动态规划算法通过比较聚合值做出决策,但最终结果缺乏解释,用户难以理解为何选择某一结果而非另一结果。
方法
提出保留聚合值细粒度表示的方法,并用半环形式化 DP,构建 Haskell 库;通过类型类泛化,从递推关系自动派生高效实现,并可生成解释。
评估
通过 Haskell 库和示例展示可回答反事实问题,并预先推测用户疑问自动生成解释;摘要未报告系统基准或用户实验。
原文摘要(Abstract)

Abstract In this paper, we present a method for explaining the results produced by dynamic programming (DP) algorithms. Our approach is based on retaining a granular representation of values that are aggregated during program execution. The explanations that are created from the granular representations can answer questions of why one result was obtained instead of another and therefore can increase the confidence in the correctness of program results. Our focus on dynamic programming is motivated by the fact that dynamic programming offers a systematic approach to implementing a large class of optimization algorithms which produce decisions based on aggregated value comparisons. It is those decisions that the granular representation can help explain. Moreover, the fact that dynamic programming can be formalized using semirings supports the creation of a Haskell library for dynamic programming that has two important features. First, it allows programmers to specify programs by recurrence relationships from which efficient implementations are derived automatically. Second, the dynamic programs can be formulated generically (as type classes), which supports the smooth transition from programs that only produce result to programs that can run with granular representation and also produce explanations. Finally, we also demonstrate how to anticipate user questions about program results and how to produce corresponding explanations automatically in advance.

链接与引用

DOI 原文 ·

BibTeX
@article{paperbot1235,
  title = {Explainable dynamic programming},
  author = {MARTIN ERWIG and PRASHANT KUMAR},
  journal = {Journal of Functional Programming},
  volume = {31},
  year = {2021},
  doi = {10.1017/s0956796821000083}
}