An In-Context Learning Agent for Formal Theorem-Proving

We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large lang...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:arXiv.org 2024-08
Hauptverfasser: Thakur, Amitayush, Tsoukalas, George, Wen, Yeming, Xin, Jimmy, Chaudhuri, Swarat
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title arXiv.org
container_volume
creator Thakur, Amitayush
Tsoukalas, George
Wen, Yeming
Xin, Jimmy
Chaudhuri, Swarat
description We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large language model (GPT-4) to propose tactic applications from within a stateful backtracking search. Proposed tactics are executed in the underlying proof environment. Feedback from the execution is used to build the prompt for the next model query, along with selected information from the search history and lemmas retrieved from an external database. We evaluate our implementation of COPRA on the miniF2F benchmark for Lean and a set of Coq tasks from the CompCert project. On these benchmarks, COPRA significantly outperforms few-shot invocations of GPT-4. It also compares favorably against finetuning-based approaches, outperforming ReProver, a state-of-the-art finetuned approach for Lean, in terms of the pass@1 metric. Our code and data are available at https://github.com/trishullab/copra.
format Article
fullrecord <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_2900774630</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2900774630</sourcerecordid><originalsourceid>FETCH-proquest_journals_29007746303</originalsourceid><addsrcrecordid>eNpjYuA0MjY21LUwMTLiYOAtLs4yMDAwMjM3MjU15mQwd8xT8MzTdc7PK0mtKFHwSU0sysvMS1dwTE_NK1FIyy9ScMsvyk3MUQjJSM0vSs3VDSjKLwMq4GFgTUvMKU7lhdLcDMpuriHOHroFRfmFpanFJfFZ-aVFeUCpeCNLAwNzcxMzYwNj4lQBAJ9SNO0</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2900774630</pqid></control><display><type>article</type><title>An In-Context Learning Agent for Formal Theorem-Proving</title><source>Free E- Journals</source><creator>Thakur, Amitayush ; Tsoukalas, George ; Wen, Yeming ; Xin, Jimmy ; Chaudhuri, Swarat</creator><creatorcontrib>Thakur, Amitayush ; Tsoukalas, George ; Wen, Yeming ; Xin, Jimmy ; Chaudhuri, Swarat</creatorcontrib><description>We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large language model (GPT-4) to propose tactic applications from within a stateful backtracking search. Proposed tactics are executed in the underlying proof environment. Feedback from the execution is used to build the prompt for the next model query, along with selected information from the search history and lemmas retrieved from an external database. We evaluate our implementation of COPRA on the miniF2F benchmark for Lean and a set of Coq tasks from the CompCert project. On these benchmarks, COPRA significantly outperforms few-shot invocations of GPT-4. It also compares favorably against finetuning-based approaches, outperforming ReProver, a state-of-the-art finetuned approach for Lean, in terms of the pass@1 metric. Our code and data are available at https://github.com/trishullab/copra.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Benchmarks ; Control tasks ; Large language models ; Searching ; Theorem proving ; Theorems</subject><ispartof>arXiv.org, 2024-08</ispartof><rights>2024. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>776,780</link.rule.ids></links><search><creatorcontrib>Thakur, Amitayush</creatorcontrib><creatorcontrib>Tsoukalas, George</creatorcontrib><creatorcontrib>Wen, Yeming</creatorcontrib><creatorcontrib>Xin, Jimmy</creatorcontrib><creatorcontrib>Chaudhuri, Swarat</creatorcontrib><title>An In-Context Learning Agent for Formal Theorem-Proving</title><title>arXiv.org</title><description>We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large language model (GPT-4) to propose tactic applications from within a stateful backtracking search. Proposed tactics are executed in the underlying proof environment. Feedback from the execution is used to build the prompt for the next model query, along with selected information from the search history and lemmas retrieved from an external database. We evaluate our implementation of COPRA on the miniF2F benchmark for Lean and a set of Coq tasks from the CompCert project. On these benchmarks, COPRA significantly outperforms few-shot invocations of GPT-4. It also compares favorably against finetuning-based approaches, outperforming ReProver, a state-of-the-art finetuned approach for Lean, in terms of the pass@1 metric. Our code and data are available at https://github.com/trishullab/copra.</description><subject>Benchmarks</subject><subject>Control tasks</subject><subject>Large language models</subject><subject>Searching</subject><subject>Theorem proving</subject><subject>Theorems</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>BENPR</sourceid><recordid>eNpjYuA0MjY21LUwMTLiYOAtLs4yMDAwMjM3MjU15mQwd8xT8MzTdc7PK0mtKFHwSU0sysvMS1dwTE_NK1FIyy9ScMsvyk3MUQjJSM0vSs3VDSjKLwMq4GFgTUvMKU7lhdLcDMpuriHOHroFRfmFpanFJfFZ-aVFeUCpeCNLAwNzcxMzYwNj4lQBAJ9SNO0</recordid><startdate>20240808</startdate><enddate>20240808</enddate><creator>Thakur, Amitayush</creator><creator>Tsoukalas, George</creator><creator>Wen, Yeming</creator><creator>Xin, Jimmy</creator><creator>Chaudhuri, Swarat</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope></search><sort><creationdate>20240808</creationdate><title>An In-Context Learning Agent for Formal Theorem-Proving</title><author>Thakur, Amitayush ; Tsoukalas, George ; Wen, Yeming ; Xin, Jimmy ; Chaudhuri, Swarat</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_29007746303</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Benchmarks</topic><topic>Control tasks</topic><topic>Large language models</topic><topic>Searching</topic><topic>Theorem proving</topic><topic>Theorems</topic><toplevel>online_resources</toplevel><creatorcontrib>Thakur, Amitayush</creatorcontrib><creatorcontrib>Tsoukalas, George</creatorcontrib><creatorcontrib>Wen, Yeming</creatorcontrib><creatorcontrib>Xin, Jimmy</creatorcontrib><creatorcontrib>Chaudhuri, Swarat</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science &amp; Engineering Collection</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>Publicly Available Content Database</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Thakur, Amitayush</au><au>Tsoukalas, George</au><au>Wen, Yeming</au><au>Xin, Jimmy</au><au>Chaudhuri, Swarat</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>An In-Context Learning Agent for Formal Theorem-Proving</atitle><jtitle>arXiv.org</jtitle><date>2024-08-08</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large language model (GPT-4) to propose tactic applications from within a stateful backtracking search. Proposed tactics are executed in the underlying proof environment. Feedback from the execution is used to build the prompt for the next model query, along with selected information from the search history and lemmas retrieved from an external database. We evaluate our implementation of COPRA on the miniF2F benchmark for Lean and a set of Coq tasks from the CompCert project. On these benchmarks, COPRA significantly outperforms few-shot invocations of GPT-4. It also compares favorably against finetuning-based approaches, outperforming ReProver, a state-of-the-art finetuned approach for Lean, in terms of the pass@1 metric. Our code and data are available at https://github.com/trishullab/copra.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier EISSN: 2331-8422
ispartof arXiv.org, 2024-08
issn 2331-8422
language eng
recordid cdi_proquest_journals_2900774630
source Free E- Journals
subjects Benchmarks
Control tasks
Large language models
Searching
Theorem proving
Theorems
title An In-Context Learning Agent for Formal Theorem-Proving
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-30T23%3A31%3A27IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=document&rft.atitle=An%20In-Context%20Learning%20Agent%20for%20Formal%20Theorem-Proving&rft.jtitle=arXiv.org&rft.au=Thakur,%20Amitayush&rft.date=2024-08-08&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E2900774630%3C/proquest%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2900774630&rft_id=info:pmid/&rfr_iscdi=true