paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Reasoning about “reasoning about reasoning”: semantics and contextual equivalence for probabilistic programs with nested queries and recursion

对“关于推理的推理”的推理:带嵌套查询与递归的概率程序的语义与上下文等价
POPL 6(POPL)2022匹配度 6/10 · 论文为含嵌套查询与一般递归的概率程序建立互递归语义和上下文等价的关系推理原则,并机械化验证,属于概率编程/贝叶斯程序分析的形式基础,且嵌套查询对应 agent 元推理;但未涉及 LLM/Agent 静态分析、浮点程序分析或 AI 辅助形式验证,与画像核心方向只是部分交叉。引用 20 inbox
Yizhou Zhang, Nada Amin
crossref: 2026-09-10

AI 速览

一句话:首次为含嵌套查询与一般递归的概率程序给出互递归语义,并建立上下文等价的关系推理原则。

概率编程语言可通过在推断查询中递归嵌套推断查询来支持元推理(即“关于推理的推理”)。然而,这一反射式语言特性一直缺乏操作语义,更不用说上下文等价的推理原则。本文为含连续分布、scoring、一般递归与嵌套查询的核心概率编程语言给出形式语义。与已有工作不同,嵌套查询与一般递归的存在使得基于采样的操作语义与测度论语义无法分层定义,二者必须互递归地给出。作者证明了一个关键性质:概率程序具有良定义的意义,即其诱导的步进索引测度的极限存在。在语义之上,文章构造了步进索引的双正交逻辑关系模型,并证明可靠性定理:逻辑相关性蕴含上下文等价。作者用该原则证明了若干有实际意义的新等价,特别是博弈与决策智能体,并在 Coq 中机器化了直至可靠性证明的技术发展。

问题
如何在同时具有嵌套推断查询和一般递归的概率编程语言中定义良定义的形式语义,并给出上下文等价的可靠推理原则。
方法
为含连续分布、scoring、一般递归与嵌套查询的核心概率语言互递归地定义基于采样的操作语义与测度论语义,证明步进索引测度极限存在,并构造步进索引双正交逻辑关系模型以刻画上下文等价。
评估
通过证明博弈与决策智能体等具有实际相关性的新程序等价来展示推理原则的实用性,并在 Coq 证明助手中机器化相关技术发展直至可靠性证明。
原文摘要(Abstract)

Metareasoning can be achieved in probabilistic programming languages (PPLs) using agent models that recursively nest inference queries inside inference queries. However, the semantics of this powerful, reflection-like language feature has defied an operational treatment, much less reasoning principles for contextual equivalence. We give formal semantics to a core PPL with continuous distributions, scoring, general recursion, and nested queries. Unlike prior work, the presence of nested queries and general recursion makes it impossible to stratify the definition of a sampling-based operational semantics and that of a measure-theoretic semantics—the two semantics must be defined mutually recursively. A key yet challenging property we establish is that probabilistic programs have well-defined meanings: limits exist for the step-indexed measures they induce. Beyond a semantics, we offer relational reasoning principles for probabilistic programs making nested queries. We construct a step-indexed, biorthogonal logical-relations model. A soundness theorem establishes that logical relatedness implies contextual equivalence. We demonstrate the usefulness of the reasoning principles by proving novel equivalences of practical relevance—in particular, game-playing and decisionmaking agents. We mechanize our technical developments leading to the soundness proof using the Coq proof assistant. Nested queries are an important yet theoretically underdeveloped linguistic feature in PPLs; we are first to give them semantics in the presence of general recursion and to provide them with sound reasoning principles for contextual equivalence.

链接与引用

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

BibTeX
@article{paperbot1582,
  title = {Reasoning about “reasoning about reasoning”: semantics and contextual equivalence for probabilistic programs with nested queries and recursion},
  author = {Yizhou Zhang and Nada Amin},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {POPL},
  year = {2022},
  doi = {10.1145/3498677}
}