Learning an Effective Premise Retrieval Model for Efficient Mathematical Formalization

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tao, Yicheng, Liu, Haotian, Wang, Shanwen, Xu, Hongteng
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908451129524224
author Tao, Yicheng
Liu, Haotian
Wang, Shanwen
Xu, Hongteng
author_facet Tao, Yicheng
Liu, Haotian
Wang, Shanwen
Xu, Hongteng
contents Formalized mathematics has recently garnered significant attention for its ability to assist mathematicians across various fields. Premise retrieval, as a common step in mathematical formalization, has been a challenge, particularly for inexperienced users. Existing retrieval methods that facilitate natural language queries require a certain level of mathematical expertise from users, while approaches based on formal languages (e.g., Lean) typically struggle with the scarcity of training data, hindering the training of effective and generalizable retrieval models. In this work, we introduce a novel method that leverages data extracted from Mathlib to train a lightweight and effective premise retrieval model. In particular, the proposed model embeds queries (i.e., proof state provided by Lean) and premises in a latent space, featuring a tokenizer specifically trained on formal corpora. The model is learned in a contrastive learning framework, in which a fine-grained similarity calculation method and a re-ranking module are applied to enhance the retrieval performance. Experimental results demonstrate that our model outperforms existing baselines, achieving higher accuracy while maintaining a lower computational load. We have released an open-source search engine based on our retrieval model at https://premise-search.com/. The source code and the trained model can be found at https://github.com/ruc-ai4math/Premise-Retrieval.
format Preprint
id arxiv_https___arxiv_org_abs_2501_13959
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Learning an Effective Premise Retrieval Model for Efficient Mathematical Formalization
Tao, Yicheng
Liu, Haotian
Wang, Shanwen
Xu, Hongteng
Computation and Language
Artificial Intelligence
Information Retrieval
Formalized mathematics has recently garnered significant attention for its ability to assist mathematicians across various fields. Premise retrieval, as a common step in mathematical formalization, has been a challenge, particularly for inexperienced users. Existing retrieval methods that facilitate natural language queries require a certain level of mathematical expertise from users, while approaches based on formal languages (e.g., Lean) typically struggle with the scarcity of training data, hindering the training of effective and generalizable retrieval models. In this work, we introduce a novel method that leverages data extracted from Mathlib to train a lightweight and effective premise retrieval model. In particular, the proposed model embeds queries (i.e., proof state provided by Lean) and premises in a latent space, featuring a tokenizer specifically trained on formal corpora. The model is learned in a contrastive learning framework, in which a fine-grained similarity calculation method and a re-ranking module are applied to enhance the retrieval performance. Experimental results demonstrate that our model outperforms existing baselines, achieving higher accuracy while maintaining a lower computational load. We have released an open-source search engine based on our retrieval model at https://premise-search.com/. The source code and the trained model can be found at https://github.com/ruc-ai4math/Premise-Retrieval.
title Learning an Effective Premise Retrieval Model for Efficient Mathematical Formalization
topic Computation and Language
Artificial Intelligence
Information Retrieval
url https://arxiv.org/abs/2501.13959