paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Quantitative Bounds on Resource Usage of Probabilistic Programs

概率程序资源使用量的定量界
OOPSLA 8(OOPSLA1)2024匹配度 4/10 · 论文属于概率程序资源分析的静态分析与形式化方法,与程序分析和形式化验证有方法论关联;但未涉及 LLM/Agentic、浮点程序分析或贝叶斯程序分析与 LLM 的交叉,因此与当前核心研究方向匹配度较低。引用 16 inbox
Krishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Đorđe Žikelić
crossref: 2026-09-10

AI 速览

一句话:结合代价鞅与定量安全性分析,为概率程序给出期望和尾部资源界,突破非负代价、有界更新与期望有限等限制。

本文研究概率程序的资源使用(代价)分析,关注两个经典定量问题:求期望总代价的界,以及给定阈值 t 求总代价至少为 t 的概率界(尾部界)。已有期望界方法通常要求代价非负或变量更新有界;尾部界方法则要求期望总代价有限。作者提出一种新的代价鞅变体:只要每条路径上总代价有下界,即可处理含正负代价且变量更新无限制的程序,从而得到期望界。对于尾部界,作者将该鞅方法与定量安全性分析结合,即使期望总代价无穷甚至不几乎必然终止,也能获得运行时间的尾部界。实验表明,该方法可求解此前方法无法处理的实例。

问题
概率程序的代价/资源使用分析中,如何为期望总代价与尾部概率给出界,并放宽已有方法对非负代价、有界更新和期望总代价有限的限制。
方法
提出新的代价鞅变体以推导期望界;再将其与定量安全性分析结合处理尾部界,支持正负代价、无界更新、无限期望代价及非几乎必然终止。
评估
通过实验证明该方法能求解此前方法无法处理的实例。
原文摘要(Abstract)

Cost analysis, also known as resource usage analysis, is the task of finding bounds on the total cost of a program and is a well-studied problem in static analysis. In this work, we consider two classical quantitative problems in cost analysis for probabilistic programs. The first problem is to find a bound on the expected total cost of the program. This is a natural measure for the resource usage of the program and can also be directly applied to average-case runtime analysis. The second problem asks for a tail bound, i.e. ‍given a threshold t the goal is to find a probability bound p such that ℙ[total cost ≥ t ] ≤ p . Intuitively, given a threshold t on the resource, the problem is to find the likelihood that the total cost exceeds this threshold. First, for expectation bounds, a major obstacle in previous works on cost analysis is that they can handle only non-negative costs or bounded variable updates. In contrast, we provide a new variant of the standard notion of cost martingales, that allows us to find expectation bounds for a class of programs with general positive or negative costs and no restriction on the variable updates. More specifically, our approach is applicable as long as there is a lower bound on the total cost incurred along every path. Second, for tail bounds, all previous methods are limited to programs in which the expected total cost is finite. In contrast, we present a novel approach, based on a combination of our martingale-based method for expectation bounds with a quantitative safety analysis, to obtain a solution to the tail bound problem that is applicable even to programs with infinite expected cost. Specifically, this allows us to obtain runtime tail bounds for programs that do not terminate almost-surely. In summary, we provide a novel combination of martingale-based cost analysis and quantitative safety analysis that is able to find expectation and tail cost bounds for probabilistic programs, without the restrictions of non-negative costs, bounded updates, or finiteness of the expected total cost. Finally, we provide experimental results showcasing that our approach can solve instances that were beyond the reach of previous methods.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2564,
  title = {Quantitative Bounds on Resource Usage of Probabilistic Programs},
  author = {Krishnendu Chatterjee and Amir Kafshdar Goharshady and Tobias Meggendorfer and Đorđe Žikelić},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA1},
  year = {2024},
  doi = {10.1145/3649824}
}