{"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/swarm-reinforcement-learning-for-adaptive-1","title":"Swarm Reinforcement Learning For Adaptive Mesh Refinement","arxiv_id":"2304.00818","date":"2023-04-03","proceeding":"NeurIPS 2023 11","authors":["Niklas Freymuth","Philipp Dahlinger","Tobias Würth","Simon Reisch","Luise Kärger","Gerhard Neumann"],"abstract":"Adaptive Mesh Refinement (AMR) enhances the Finite Element Method, an important technique for simulating complex problems in engineering, by dynamically refining mesh regions, enabling a favorable trade-off between computational speed and simulation accuracy. Classical methods for AMR depend on heuristics or expensive error estimators, hindering their use for complex simulations. Recent learning-based AMR methods tackle these issues, but so far scale only to simple toy examples. We formulate AMR as a novel Adaptive Swarm Markov Decision Process in which a mesh is modeled as a system of simple collaborating agents that may split into multiple new agents. This framework allows for a spatial reward formulation that simplifies the credit assignment problem, which we combine with Message Passing Networks to propagate information between neighboring mesh elements. We experimentally validate our approach, Adaptive Swarm Mesh Refinement (ASMR), on challenging refinement tasks. Our approach learns reliable and efficient refinement strategies that can robustly generalize to different domains during inference. Additionally, it achieves a speedup of up to $2$ orders of magnitude compared to uniform refinements in more demanding simulations. We outperform learned baselines and heuristics, achieving a refinement quality that is on par with costly error-based oracle AMR strategies.","url_abs":"https://arxiv.org/abs/2304.00818v3","url_pdf":"https://arxiv.org/pdf/2304.00818v3.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":"swarm-reinforcement-learning-for-adaptive-1","repo_url":"https://github.com/niklasfreymuth/asmr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2304.00818","atlas_url":"https://app.syntology.ai/?focus=2304.00818","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.00818"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/niklasfreymuth/asmr","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3},"by_repo_kind":{"official":{"samples":3,"ran":3,"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":"219e294614c78360","entry":"calculate_reference_solutions","repo":"niklasfreymuth/asmr","repo_kind":"official","path":"asmr_evaluations/evaluate_inference_speed.py","file_url":"https://github.com/niklasfreymuth/asmr/blob/HEAD/asmr_evaluations/evaluate_inference_speed.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":"219e294614c78360"}},{"code_sha256_prefix":"b270de64d4cfaf77","entry":"get_clean_base_params","repo":"niklasfreymuth/asmr","repo_kind":"official","path":"modules/swarm_environments/get_environments.py","file_url":"https://github.com/niklasfreymuth/asmr/blob/HEAD/modules/swarm_environments/get_environments.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":"b270de64d4cfaf77"}},{"code_sha256_prefix":"16c84d3cf855a9df","entry":"get_config_path","repo":"niklasfreymuth/asmr","repo_kind":"official","path":"asmr_evaluations/evaluation_util.py","file_url":"https://github.com/niklasfreymuth/asmr/blob/HEAD/asmr_evaluations/evaluation_util.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":"16c84d3cf855a9df"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}