{"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/transformer-based-planning-for-symbolic-1","title":"Transformer-based Planning for Symbolic Regression","arxiv_id":"2303.06833","date":"2023-03-13","proceeding":"NeurIPS 2023 11","authors":["Parshin Shojaee","Kazem Meidani","Amir Barati Farimani","Chandan K. Reddy"],"abstract":"Symbolic regression (SR) is a challenging task in machine learning that involves finding a mathematical expression for a function based on its values. Recent advancements in SR have demonstrated the effectiveness of pre-trained transformer-based models in generating equations as sequences, leveraging large-scale pre-training on synthetic datasets and offering notable advantages in terms of inference time over classical Genetic Programming (GP) methods. However, these models primarily rely on supervised pre-training goals borrowed from text generation and overlook equation discovery objectives like accuracy and complexity. To address this, we propose TPSR, a Transformer-based Planning strategy for Symbolic Regression that incorporates Monte Carlo Tree Search into the transformer decoding process. Unlike conventional decoding strategies, TPSR enables the integration of non-differentiable feedback, such as fitting accuracy and complexity, as external sources of knowledge into the transformer-based equation generation process. Extensive experiments on various datasets show that our approach outperforms state-of-the-art methods, enhancing the model's fitting-complexity trade-off, extrapolation abilities, and robustness to noise.","url_abs":"https://arxiv.org/abs/2303.06833v5","url_pdf":"https://arxiv.org/pdf/2303.06833v5.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":"transformer-based-planning-for-symbolic-1","repo_url":"https://github.com/deep-symbolic-mathematics/TPSR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"equation-discovery","task_name":"Equation Discovery"},{"task_slug":"symbolic-regression","task_name":"Symbolic Regression"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.06833","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.06833"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/deep-symbolic-mathematics/TPSR","reach":null}],"summary":{"ran":2,"ran_fixture":2,"unverified":4},"by_repo_kind":{"official":{"samples":8,"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":"04ecacf475538188","entry":"BeamHypotheses","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.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":"04ecacf475538188"}},{"code_sha256_prefix":"5ada5edea86dc67b","entry":"TransformerFFN","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.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":"5ada5edea86dc67b"}},{"code_sha256_prefix":"57e18f5aa5126f5b","entry":"get_masks","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57e18f5aa5126f5b"}},{"code_sha256_prefix":"02e71d97ed55e54d","entry":"top_k_top_p_filtering","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"02e71d97ed55e54d"}},{"code_sha256_prefix":"b519b32ab2493ee4","entry":"Embedding","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b519b32ab2493ee4"}},{"code_sha256_prefix":"f9946efd274ff9ea","entry":"MultiHeadAttention","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.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":"f9946efd274ff9ea"}},{"code_sha256_prefix":"a554724206d77f64","entry":"TransformerModel","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.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":"a554724206d77f64"}},{"code_sha256_prefix":"61308f1bc02569e6","entry":"create_sinusoidal_embeddings","repo":"deep-symbolic-mathematics/TPSR","repo_kind":"official","path":"symbolicregression/model/transformer.py","file_url":"https://github.com/deep-symbolic-mathematics/TPSR/blob/HEAD/symbolicregression/model/transformer.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":"61308f1bc02569e6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}