{"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/hsevo-elevating-automatic-heuristic-design","title":"HSEvo: Elevating Automatic Heuristic Design with Diversity-Driven Harmony Search and Genetic Algorithm Using LLMs","arxiv_id":"2412.14995","date":"2024-12-19","proceeding":null,"authors":["Pham Vu Tuan Dat","Long Doan","Huynh Thi Thanh Binh"],"abstract":"Automatic Heuristic Design (AHD) is an active research area due to its utility in solving complex search and NP-hard combinatorial optimization problems in the real world. The recent advancements in Large Language Models (LLMs) introduce new possibilities by coupling LLMs with evolutionary computation to automatically generate heuristics, known as LLM-based Evolutionary Program Search (LLM-EPS). While previous LLM-EPS studies obtained great performance on various tasks, there is still a gap in understanding the properties of heuristic search spaces and achieving a balance between exploration and exploitation, which is a critical factor in large heuristic search spaces. In this study, we address this gap by proposing two diversity measurement metrics and perform an analysis on previous LLM-EPS approaches, including FunSearch, EoH, and ReEvo. Results on black-box AHD problems reveal that while EoH demonstrates higher diversity than FunSearch and ReEvo, its objective score is unstable. Conversely, ReEvo's reflection mechanism yields good objective scores but fails to optimize diversity effectively. With this finding in mind, we introduce HSEvo, an adaptive LLM-EPS framework that maintains a balance between diversity and convergence with a harmony search algorithm. Through experimentation, we find that HSEvo achieved high diversity indices and good objective scores while remaining cost-effective. These results underscore the importance of balancing exploration and exploitation and understanding heuristic search spaces in designing frameworks in LLM-EPS.","url_abs":"https://arxiv.org/abs/2412.14995v1","url_pdf":"https://arxiv.org/pdf/2412.14995v1.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":"hsevo-elevating-automatic-heuristic-design","repo_url":"https://github.com/datphamvn/hsevo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"combinatorial-optimization","task_name":"Combinatorial Optimization"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"heuristic-search","task_name":"Heuristic Search"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2412.14995","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.14995"}},"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/datphamvn/hsevo","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":7},"by_repo_kind":{"official":{"samples":9,"ran":2,"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":"ab6795497be8743a","entry":"file_to_string","repo":"datphamvn/hsevo","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/utils/utils.py","link_basis":"harvester_set","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":"ab6795497be8743a"}},{"code_sha256_prefix":"16b43ab11204e083","entry":"filter_traceback","repo":"datphamvn/hsevo","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/utils/utils.py","link_basis":"harvester_set","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":"16b43ab11204e083"}},{"code_sha256_prefix":"78d45901c9b95116","entry":"calculate_path_cost_fitness","repo":"datphamvn/hsevo","repo_kind":"official","path":"problems/bpp_offline_aco/aco.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/problems/bpp_offline_aco/aco.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":"78d45901c9b95116"}},{"code_sha256_prefix":"ab24e8237b635dca","entry":"calculate_path_fitness","repo":"datphamvn/hsevo","repo_kind":"official","path":"problems/bpp_offline_aco/aco.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/problems/bpp_offline_aco/aco.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":"ab24e8237b635dca"}},{"code_sha256_prefix":"1b64542a1f3acc78","entry":"cosine_similarity_matrix","repo":"datphamvn/hsevo","repo_kind":"official","path":"diversity/metrics.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/diversity/metrics.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":"1b64542a1f3acc78"}},{"code_sha256_prefix":"d310bbcfb1630294","entry":"cumulative_diversity_index","repo":"datphamvn/hsevo","repo_kind":"official","path":"diversity/metrics.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/diversity/metrics.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":"d310bbcfb1630294"}},{"code_sha256_prefix":"e317150ec455dec9","entry":"extract_description","repo":"datphamvn/hsevo","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/utils/utils.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":"e317150ec455dec9"}},{"code_sha256_prefix":"6c32eaeb0ad23eed","entry":"organize_path","repo":"datphamvn/hsevo","repo_kind":"official","path":"problems/bpp_offline_aco/aco.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/problems/bpp_offline_aco/aco.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":"6c32eaeb0ad23eed"}},{"code_sha256_prefix":"4213eff536ab301c","entry":"shannon_wiener_index","repo":"datphamvn/hsevo","repo_kind":"official","path":"diversity/metrics.py","file_url":"https://github.com/datphamvn/hsevo/blob/HEAD/diversity/metrics.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":"4213eff536ab301c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}