arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.31571cs.AIcs.LO
收藏

安全自动形式化:蕴含图的充分性与必要性

Safe Autoformalization: Sufficiency and Necessity with Entailment Graphs

Amazon Scholar(亚马逊学者);Carnegie Mellon University(卡内基梅隆大学);Amazon Web Services(亚马逊网络服务)

Umut A. Acar, Eli Goldweber

AI总结:

本文提出基于蕴含图的安全自动形式化技术,利用LLM生成并排序候选公式,通过可靠预言机保证搜索安全,在AWS属性实验中表现优于多数投票与通用自洽性方法,且证明经Lean机器验证。

摘要:

自动形式化是将自然语言语句转换为能捕获其意图的公式,该过程依赖于消除语句歧义的背景上下文。大语言模型(LLM)使自动形式化具备实用性,但其概率输出不具备形式化保证。本文提出安全自动形式化技术,可证明单侧逻辑充分性:足以满足意图的公式可安全实施,必要的公式可安全依赖。我们利用LLM生成候选公式,并在蕴含图(Entailment Graph, EG)中按逻辑强度排序,该排序由求解器确定。每条边携带残差与共残差,二者是蕴含序的伴随算子,仅由候选池确定。在特定上下文下,两次搜索分别返回充分前沿(蕴含该语句的最弱候选)与必要前沿(该语句蕴含的最强候选);每一步仅需对边的残差或共残差进行一次局部检查。前沿界定了语句的范围,并产生歧义残差,该残差恰好对应候选既未证明满足也未证明违反语句的情况;当残差可满足时,语句存在歧义。对于自然语言语句与上下文,LLM蕴含预言机负责判定检查结果:若仅接受成立的检查则为可靠,若接受所有成立的检查则为完备。我们证明,可靠的预言机无论候选池质量如何都能保证搜索安全,而完备的预言机可使前沿达到最紧状态。在安全关键的AWS属性上,蕴含图在专家裁定研究的20个案例中均安全,而等价簇多数投票与通用自洽性分别在25%和10%的案例中不安全。在相同预言机但无图的消融实验中,25%的案例不安全,另有30%的案例拒绝所有候选。我们在Lean中对证明进行了机器验证。

英文摘要:

Autoformalization translates a natural-language statement into a formula that captures its intent, which depends on the statement's context: the background that disambiguates it. LLMs make autoformalization practical, but their probabilistic output carries no formal guarantees. We propose techniques for safe autoformalization that certify one-sided logical adequacy: a formula sufficient for the intent is safe to enforce, and a formula necessary for it is safe to rely on. We use LLMs to generate candidate formulas and order them by logical strength in an Entailment Graph (EG), an ordering a solver decides. Each edge carries a residual and a co-residual, the two adjoints of the entailment order, all fixed by the candidate pool alone. In a context, two searches return the sufficient frontier, the weakest candidates that entail the statement, and the necessary frontier, the strongest candidates the statement entails; each step is one local check against an edge's residual or co-residual. The frontiers bracket the statement and yield the ambiguity residue, which holds exactly of the situations the candidates certify neither as satisfying nor as violating it; the statement is ambiguous precisely when the residue is satisfiable. For natural-language statements and contexts, an LLM entailment oracle decides the checks; it is sound if it accepts only checks that hold, and complete if it accepts every check that holds. We prove that a sound oracle makes the search safe regardless of pool quality, and that a complete one makes the frontiers tight. On security-critical AWS properties, EGs are safe in all 20 cases of an expert-adjudicated study, where majority vote over equivalence clusters and Universal Self-Consistency are unsafe in 25% and 10%. An ablation with the same oracle but no graph is unsafe in 25% and rejects every candidate in another 30%. We machine-checked our proofs in Lean.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑