{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/learning-formal-mathematics-from-intrinsic","title":"Learning Formal Mathematics From Intrinsic Motivation","arxiv_id":"2407.00695","date":"2024-06-30","proceeding":null,"authors":["Gabriel Poesia","David Broman","Nick Haber","Noah D. Goodman"],"abstract":"How did humanity coax mathematics from the aether? We explore the Platonic view that mathematics can be discovered from its axioms - a game of conjecture and proof. We describe Minimo (Mathematics from Intrinsic Motivation): an agent that jointly learns to pose challenging problems for itself (conjecturing) and solve them (theorem proving). Given a mathematical domain axiomatized in dependent type theory, we first combine methods for constrained decoding and type-directed synthesis to sample valid conjectures from a language model. Our method guarantees well-formed conjectures by construction, even as we start with a randomly initialized model. We use the same model to represent a policy and value function for guiding proof search. Our agent targets generating hard but provable conjectures - a moving target, since its own theorem proving ability also improves as it trains. We propose novel methods for hindsight relabeling on proof search trees to significantly improve the agent's sample efficiency in both tasks. Experiments on 3 axiomatic domains (propositional logic, arithmetic and group theory) demonstrate that our agent can bootstrap from only the axioms, self-improving in generating true and challenging conjectures and in finding proofs.","url_abs":"https://arxiv.org/abs/2407.00695v2","url_pdf":"https://arxiv.org/pdf/2407.00695v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"learning-formal-mathematics-from-intrinsic","repo_url":"https://github.com/gpoesia/minimo","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learning-formal-mathematics-from-intrinsic","repo_url":"https://github.com/gpoesia/peano","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"automated-theorem-proving","task_name":"Automated Theorem Proving"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":null,"task_name":"valid"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2407.00695","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.00695"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/gpoesia/minimo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gpoesia/peano","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"ran_violates":1,"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":2,"repositories":1},"listed":{"samples":5,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"4e2a73751fad8636","entry":"compare_dependencies","repo":"gpoesia/peano","repo_kind":"listed","path":"learning/curriculum.py","file_url":"https://github.com/gpoesia/peano/blob/HEAD/learning/curriculum.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e2a73751fad8636"}},{"code_sha256_prefix":"572549ed9144b302","entry":"format","repo":"gpoesia/peano","repo_kind":"listed","path":"domains/generate.py","file_url":"https://github.com/gpoesia/peano/blob/HEAD/domains/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"572549ed9144b302"}},{"code_sha256_prefix":"1b68e87818578318","entry":"get_task_result","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/bootstrap.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/bootstrap.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b68e87818578318"}},{"code_sha256_prefix":"640bcf54dbb57530","entry":"sympy_to_sexp","repo":"gpoesia/peano","repo_kind":"listed","path":"domains/generate.py","file_url":"https://github.com/gpoesia/peano/blob/HEAD/domains/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"640bcf54dbb57530"}},{"code_sha256_prefix":"f15c4b4559c12a51","entry":"topologically_sort_dependencies","repo":"gpoesia/peano","repo_kind":"listed","path":"learning/curriculum.py","file_url":"https://github.com/gpoesia/peano/blob/HEAD/learning/curriculum.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f15c4b4559c12a51"}},{"code_sha256_prefix":"75028df1d168888c","entry":"tqdm_if","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/proofsearch.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/proofsearch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"75028df1d168888c"}},{"code_sha256_prefix":"80047b94fe10028f","entry":"MonteCarloTreeSearch","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/proofsearch.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/proofsearch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"80047b94fe10028f"}},{"code_sha256_prefix":"125ede135fa4d524","entry":"Policy","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/proofsearch.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/proofsearch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"125ede135fa4d524"}},{"code_sha256_prefix":"adb27c584b45f5df","entry":"ProofStateNode","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/proofsearch.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/proofsearch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"adb27c584b45f5df"}},{"code_sha256_prefix":"65f79cc819d8f97e","entry":"TreeSearchNode","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/proofsearch.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/proofsearch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65f79cc819d8f97e"}},{"code_sha256_prefix":"97211e408a9ced92","entry":"generate_term","repo":"gpoesia/peano","repo_kind":"listed","path":"domains/generate.py","file_url":"https://github.com/gpoesia/peano/blob/HEAD/domains/generate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"97211e408a9ced92"}},{"code_sha256_prefix":"962c20c096635384","entry":"value_color","repo":"gpoesia/minimo","repo_kind":"official","path":"learning/proofsearch.py","file_url":"https://github.com/gpoesia/minimo/blob/HEAD/learning/proofsearch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"962c20c096635384"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}