{"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/epicoder-encompassing-diversity-and","title":"EpiCoder: Encompassing Diversity and Complexity in Code Generation","arxiv_id":"2501.04694","date":"2025-01-08","proceeding":null,"authors":["Yaoxiang Wang","Haoling Li","Xin Zhang","Jie Wu","Xiao Liu","Wenxiang Hu","Zhongxin Guo","Yangyu Huang","Ying Xin","Yujiu Yang","Jinsong Su","Qi Chen","Scarlett Li"],"abstract":"Effective instruction tuning is indispensable for optimizing code LLMs, aligning model behavior with user expectations and enhancing model performance in real-world applications. However, most existing methods focus on code snippets, which are limited to specific functionalities and rigid structures, restricting the complexity and diversity of the synthesized data. To address these limitations, we introduce a novel feature tree-based synthesis framework inspired by Abstract Syntax Trees (AST). Unlike AST, which captures syntactic structure of code, our framework models semantic relationships between code elements, enabling the generation of more nuanced and diverse data. The feature tree is constructed from raw data and refined iteratively to increase the quantity and diversity of the extracted features. This process enables the identification of more complex patterns and relationships within the code. By sampling subtrees with controlled depth and breadth, our framework allows precise adjustments to the complexity of the generated code, supporting a wide range of tasks from simple function-level operations to intricate multi-file scenarios. We fine-tuned widely-used base models to create the EpiCoder series, achieving state-of-the-art performance at both the function and file levels across multiple benchmarks. Notably, empirical evidence indicates that our approach shows significant potential in synthesizing highly complex repository-level code data. Further analysis elucidates the merits of this approach by rigorously assessing data complexity and diversity through software engineering principles and LLM-as-a-judge method.","url_abs":"https://arxiv.org/abs/2501.04694v1","url_pdf":"https://arxiv.org/pdf/2501.04694v1.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":[],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"diversity","task_name":"Diversity"}],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2501.04694","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2501.04694"}},"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/microsoft/EpiCoder","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/DeepLearnXMU/EpiCoder","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":15},"by_repo_kind":{"found_in_text":{"samples":15,"ran":0,"repositories":2}},"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":14,"samples":[{"code_sha256_prefix":"874482fd57d4cebe","entry":"custom_compare","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"extract/extract_frequency_count.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/extract/extract_frequency_count.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"874482fd57d4cebe"}},{"code_sha256_prefix":"e3c9ed0f508ba2ea","entry":"extract_content","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"debug/run_test_iter0.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/debug/run_test_iter0.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e3c9ed0f508ba2ea"}},{"code_sha256_prefix":"d0f9fa36c5d6a449","entry":"extract_content","repo":"microsoft/EpiCoder","repo_kind":"found_in_text","path":"gen/gen_code.py","file_url":"https://github.com/microsoft/EpiCoder/blob/HEAD/gen/gen_code.py","link_basis":"harvester_set","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":"d0f9fa36c5d6a449"}},{"code_sha256_prefix":"fd8dc3b17db50e82","entry":"extract_fields_from_formatted_text","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"gen/gen_question.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/gen/gen_question.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"fd8dc3b17db50e82"}},{"code_sha256_prefix":"7237fedbb391f513","entry":"form_feature_explanation","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"evol/feature_evol.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/evol/feature_evol.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"7237fedbb391f513"}},{"code_sha256_prefix":"3d9347bfa4f46252","entry":"get_data_from_file","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"extract/extract_features.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/extract/extract_features.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"3d9347bfa4f46252"}},{"code_sha256_prefix":"e6d8c07fb59f049e","entry":"get_features","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"extract/construct_tree.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/extract/construct_tree.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e6d8c07fb59f049e"}},{"code_sha256_prefix":"f46485f691c95440","entry":"get_full_content","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"extract/extract_features.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/extract/extract_features.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"f46485f691c95440"}},{"code_sha256_prefix":"6150c6d6a7ed7b25","entry":"get_large_files","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"utils/clear_code_debug_files.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/utils/clear_code_debug_files.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"6150c6d6a7ed7b25"}},{"code_sha256_prefix":"91751933774cda1d","entry":"get_question","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"gen/gen_code.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/gen/gen_code.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"91751933774cda1d"}},{"code_sha256_prefix":"6e1c2fcd1329e0bc","entry":"get_text","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"evol/feature_evol.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/evol/feature_evol.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"6e1c2fcd1329e0bc"}},{"code_sha256_prefix":"48e55621bbfcb75f","entry":"prune_to_top_n","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"extract/extract_frequency_count.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/extract/extract_frequency_count.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"48e55621bbfcb75f"}},{"code_sha256_prefix":"c1811a3b989ac815","entry":"remove_keys","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"evol/feature_evol.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/evol/feature_evol.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"c1811a3b989ac815"}},{"code_sha256_prefix":"42f192ac4d7c7b09","entry":"shorten_repeated_substrings","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"call_api_local/call_api.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/call_api_local/call_api.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"42f192ac4d7c7b09"}},{"code_sha256_prefix":"993fdd25aaa46031","entry":"sort_feature_frequency","repo":"DeepLearnXMU/EpiCoder","repo_kind":"found_in_text","path":"extract/extract_frequency_count.py","file_url":"https://github.com/DeepLearnXMU/EpiCoder/blob/HEAD/extract/extract_frequency_count.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"993fdd25aaa46031"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}