{"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/paper2code-automating-code-generation-from","title":"Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning","arxiv_id":"2504.17192","date":"2025-04-24","proceeding":null,"authors":["Minju Seo","Jinheon Baek","Seongyun Lee","Sung Ju Hwang"],"abstract":"Despite the rapid growth of machine learning research, corresponding code implementations are often unavailable, making it slow and labor-intensive for researchers to reproduce results and build upon prior work. In the meantime, recent Large Language Models (LLMs) excel at understanding scientific documents and generating high-quality code. Inspired by this, we introduce PaperCoder, a multi-agent LLM framework that transforms machine learning papers into functional code repositories. PaperCoder operates in three stages: planning, where it constructs a high-level roadmap, designs the system architecture with diagrams, identifies file dependencies, and generates configuration files; analysis, which focuses on interpreting implementation-specific details; and generation, where modular, dependency-aware code is produced. Moreover, each phase is instantiated through a set of specialized agents designed to collaborate effectively across the pipeline. We then evaluate PaperCoder on generating code implementations from machine learning papers based on both model-based and human evaluations, particularly from the authors of those papers, with author-released repositories as ground truth if available. Our results demonstrate the effectiveness of PaperCoder in creating high-quality, faithful implementations. Furthermore, it consistently shows strengths in the recently released PaperBench benchmark, surpassing strong baselines by substantial margins. Code is available at: https://github.com/going-doer/Paper2Code.","url_abs":"https://arxiv.org/abs/2504.17192v3","url_pdf":"https://arxiv.org/pdf/2504.17192v3.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":"paper2code-automating-code-generation-from","repo_url":"https://github.com/going-doer/paper2code","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2504.17192","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.17192"}},"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/going-doer/Paper2Code","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/going-doer/paper2code","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"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":"9540dd6a0fa2b5f8","entry":"content_to_json","repo":"going-doer/Paper2Code","repo_kind":"official","path":"codes/utils.py","file_url":"https://github.com/going-doer/Paper2Code/blob/HEAD/codes/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9540dd6a0fa2b5f8"}},{"code_sha256_prefix":"d8cf90662cd6acee","entry":"content_to_json2","repo":"going-doer/Paper2Code","repo_kind":"official","path":"codes/utils.py","file_url":"https://github.com/going-doer/Paper2Code/blob/HEAD/codes/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d8cf90662cd6acee"}},{"code_sha256_prefix":"3eeceaf35787f5cb","entry":"extract_planning","repo":"going-doer/Paper2Code","repo_kind":"official","path":"codes/utils.py","file_url":"https://github.com/going-doer/Paper2Code/blob/HEAD/codes/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3eeceaf35787f5cb"}},{"code_sha256_prefix":"b3d675b6543ecf1f","entry":"get_write_msg","repo":"going-doer/Paper2Code","repo_kind":"official","path":"codes/3.1_coding_sh.py","file_url":"https://github.com/going-doer/Paper2Code/blob/HEAD/codes/3.1_coding_sh.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b3d675b6543ecf1f"}},{"code_sha256_prefix":"187cdf4b63527436","entry":"remove_spans","repo":"going-doer/Paper2Code","repo_kind":"official","path":"codes/0_pdf_process.py","file_url":"https://github.com/going-doer/Paper2Code/blob/HEAD/codes/0_pdf_process.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"187cdf4b63527436"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}