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

由大型语言模型引导的等式饱和

Equality Saturation Guided by Large Language Models

Peking University(北京大学)

Wentao Peng, Ruyi Ji, Yingfei Xiong

AI总结:

本文提出LLM引导的等式饱和框架LGuess,通过引入e-graphs作为中间层,结合LLM预测重写检查点,解决了LLM生成可靠重写链困难的问题,在多元多项式分解任务上表现优异。

摘要:

大型语言模型(LLMs)的一个关键问题是无法保证正确性。尽管可以通过将LLMs应用于形式化重写系统来解决此问题,但当前的LLMs仍远不足以生成可靠的重写链。为弥补这一差距,本文提出LLM引导的等式饱和(称为LGuess),将e-graphs作为LLMs与重写系统之间的中间层。LGuess仅向LLMs查询高级重写检查点,并利用e-graphs提供这些检查点之间的低级重写链。该过程的关键技术挑战在于从饱和的e-graph中有效提取合适的检查点,LGuess通过从LLM中学习概率模型来解决此问题。该模型预测可能的检查点,同时保持足够简单以实现有效提取。我们实现了LGuess原型,并在多元多项式分解问题上进行了评估。结果表明,与直接的等式饱和和直接向LLM查询重写链的方法相比,LGuess具有显著优势。

英文摘要:

One critical issue with large language models (LLMs) is their inability to guarantee correctness. Although this problem can be addressed by applying LLMs to formal rewrite systems, current LLMs are still far from adequate to generate sound rewrite chains. To bridge this gap, this paper proposes LLM-guided equality saturation, dubbed LGuess, by incorporating e-graphs as an intermediate layer between LLMs and rewrite systems. LGuess queries LLMs only for high-level rewrite checkpoints and uses e-graphs to supply low-level rewrite chains between these checkpoints. The key technical challenge in this procedure lies in effectively extracting a suitable checkpoint from a saturated e-graph, which LGuess addresses by learning a probabilistic model from the LLM. The model predicts probable checkpoints while remaining simple enough for effective extraction. We implement a prototype of LGuess and evaluate it on the problem of factorizing multivariable polynomials. The results demonstrate a significant advantage of LGuess compared to both straightforward equality saturation and the approach that queries the LLM directly for the rewrite chain.

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

↑