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

Lean Finder: 用于Mathlib的语义搜索,能理解用户意图

Lean Finder: Semantic Search for Mathlib That Understands User Intents

Simon Fraser University(西蒙·弗雷泽大学);University of Waterloo(滑铁卢大学);University of Texas at Austin(德克萨斯大学奥斯汀分校)

Jialin Lu, Kye Emond, Kaiyu Yang, Swarat Chaudhuri, Weiran Sun, Wuyang Chen

AI总结:

Lean Finder通过语义搜索和用户意图理解,提升了数学家在Lean和mathlib中的搜索效率和准确性。

摘要:

我们提出了Lean Finder,这是一个用于Lean和mathlib的语义搜索引擎,能够理解并符合数学家的意图。形式化定理证明的进步常常受到寻找相关定理的难度以及Lean 4语言的学习曲线的影响,使进展缓慢且劳动密集。现有的Lean搜索引擎虽然有帮助,但主要依赖于非正式化(形式化陈述的自然语言翻译),而大多忽略了与现实世界用户查询的不匹配。相比之下,我们提出了一个以用户为中心的语义搜索,以满足数学家的需求。我们的方法首先分析并聚类公开的Lean讨论的语义,然后在合成查询上微调文本嵌入,这些查询模拟了用户的意图。我们进一步通过多方面的反馈信号将Lean Finder与数学家的偏好对齐,编码其对目标的丰富意识。在真实世界查询、非正式化陈述和证明状态上的评估表明,我们的Lean Finder相比之前的搜索引擎和GPT-4o实现了超过30%的相对提升。此外,Lean Finder与基于LLM的定理证明者兼容,弥合了检索与形式推理之间的差距。Lean Finder可在:https://leanfinder.github.io访问。

英文摘要:

We present Lean Finder, a semantic search engine for Lean and mathlib that understands and aligns with the intents of mathematicians. Progress in formal theorem proving is often hindered by the difficulty of locating relevant theorems and the steep learning curve of the Lean 4 language, making advancement slow and labor-intensive. Existing Lean search engines, though helpful, rely primarily on informalizations (natural language translation of the formal statements), while largely overlooking the mismatch with real-world user queries. In contrast, we propose a user-centered semantic search tailored to the needs of mathematicians. Our approach begins by analyzing and clustering the semantics of public Lean discussions, then fine-tuning text embeddings on synthesized queries that emulate user intents. We further align Lean Finder with mathematicians' preferences using diverse feedback signals, encoding it with a rich awareness of their goals from multiple perspectives. Evaluations on real-world queries, informalized statements, and proof states demonstrate that our Lean Finder achieves over $30\%$ relative improvement compared to previous search engines and GPT-4o. In addition, Lean Finder is compatible with LLM-based theorem provers, bridging retrieval with formal reasoning. Lean Finder is available at: https://leanfinder.github.io

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

↑