arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.11990cs.AI
收藏

通过直接依赖检索改进自动形式化

Improving Autoformalization Using Direct Dependency Retrieval

Zhejiang University(浙江大学);Ant Group(蚂蚁集团);Hong Kong Polytechnic University(香港理工大学)

Shaoqi Wang, Lu Yu, Siwei Lou, Feng Yan, Chunjie Yang, Qing Cui, Jun Zhou

AI总结:

本文提出DDR方法,通过直接依赖检索提升声明自动形式化的精确度和召回率,显著优于现有方法。

摘要:

深度学习与形式数学的融合推动了形式验证的研究。声明自动形式化是这一过程中的关键第一步,旨在将非正式描述转化为可机验证的表示,但仍然是一个重大挑战。核心困难在于现有方法往往缺乏上下文意识,导致形式定义和定理的幻觉。此外,当前检索增强方法在形式库依赖检索的精确度和召回率方面表现不佳,且缺乏扩展性以有效利用不断增长的公共数据集。为弥补这一差距,我们提出了一种基于DDR(直接依赖检索)的新型检索增强框架,用于声明自动形式化。我们的DDR方法直接从自然语言数学描述中生成候选库依赖,并通过高效的后缀数组检查验证其在形式库中的存在。利用这种高效的搜索机制,我们构建了一个包含超过50万样本的依赖检索数据集,并微调了一个高精度的DDR模型。实验结果表明,我们的DDR模型在检索精确度和召回率上均显著优于现有最佳方法。因此,配备DDR的自动形式化器在单次尝试准确性和多次尝试稳定性方面均比使用传统选择式RAG方法的模型表现出一致的优势。

英文摘要:

The convergence of deep learning and formal mathematics has spurred research in formal verification. Statement autoformalization, a crucial first step in this process, aims to translate informal descriptions into machine-verifiable representations but remains a significant challenge. The core difficulty lies in the fact that existing methods often suffer from a lack of contextual awareness, leading to hallucination of formal definitions and theorems. Furthermore, current retrieval-augmented approaches exhibit poor precision and recall for formal library dependency retrieval, and lack the scalability to effectively leverage ever-growing public datasets. To bridge this gap, we propose a novel retrieval-augmented framework based on DDR (\textit{Direct Dependency Retrieval}) for statement autoformalization. Our DDR method directly generates candidate library dependencies from natural language mathematical descriptions and subsequently verifies their existence within the formal library via an efficient suffix array check. Leveraging this efficient search mechanism, we constructed a dependency retrieval dataset of over 500,000 samples and fine-tuned a high-precision DDR model. Experimental results demonstrate that our DDR model significantly outperforms SOTA methods in both retrieval precision and recall. Consequently, an autoformalizer equipped with DDR shows consistent performance advantages in both single-attempt accuracy and multi-attempt stability compared to models using traditional selection-based RAG methods.

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

↑