{"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/recursive-algorithmic-reasoning","title":"Recursive Algorithmic Reasoning","arxiv_id":"2307.00337","date":"2023-07-01","proceeding":null,"authors":["Jonas Jürß","Dulhan Jayalath","Petar Veličković"],"abstract":"Learning models that execute algorithms can enable us to address a key problem in deep learning: generalizing to out-of-distribution data. However, neural networks are currently unable to execute recursive algorithms because they do not have arbitrarily large memory to store and recall state. To address this, we (1) propose a way to augment graph neural networks (GNNs) with a stack, and (2) develop an approach for capturing intermediate algorithm trajectories that improves algorithmic alignment with recursive algorithms over previous methods. The stack allows the network to learn to store and recall a portion of the state of the network at a particular time, analogous to the action of a call stack in a recursive algorithm. This augmentation permits the network to reason recursively. We empirically demonstrate that our proposals significantly improve generalization to larger input graphs over prior work on depth-first search (DFS).","url_abs":"https://arxiv.org/abs/2307.00337v2","url_pdf":"https://arxiv.org/pdf/2307.00337v2.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":"recursive-algorithmic-reasoning","repo_url":"https://github.com/DJayalath/gnn-call-stack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.00337","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.00337"}},"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/DJayalath/gnn-call-stack","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"unverified":3},"by_repo_kind":{"official":{"samples":6,"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":"af9e8ccc380610b6","entry":"array","repo":"DJayalath/gnn-call-stack","repo_kind":"official","path":"clrs/_src/probing.py","file_url":"https://github.com/DJayalath/gnn-call-stack/blob/HEAD/clrs/_src/probing.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"af9e8ccc380610b6"}},{"code_sha256_prefix":"b83f762db64e56f0","entry":"log_sinkhorn","repo":"DJayalath/gnn-call-stack","repo_kind":"official","path":"clrs/_src/decoders.py","file_url":"https://github.com/DJayalath/gnn-call-stack/blob/HEAD/clrs/_src/decoders.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b83f762db64e56f0"}},{"code_sha256_prefix":"9cfc6b7e82435a99","entry":"opt_update","repo":"DJayalath/gnn-call-stack","repo_kind":"official","path":"clrs/_src/baselines.py","file_url":"https://github.com/DJayalath/gnn-call-stack/blob/HEAD/clrs/_src/baselines.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9cfc6b7e82435a99"}},{"code_sha256_prefix":"bb5f76f4d0e769cb","entry":"get_wandb_stats","repo":"DJayalath/gnn-call-stack","repo_kind":"official","path":"gnn_call_stack/utils.py","file_url":"https://github.com/DJayalath/gnn-call-stack/blob/HEAD/gnn_call_stack/utils.py","link_basis":"first_harvest_node","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":"bb5f76f4d0e769cb"}},{"code_sha256_prefix":"ec6c1cbb5fa6ffa6","entry":"init","repo":"DJayalath/gnn-call-stack","repo_kind":"official","path":"gnn_call_stack/utils.py","file_url":"https://github.com/DJayalath/gnn-call-stack/blob/HEAD/gnn_call_stack/utils.py","link_basis":"first_harvest_node","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":"ec6c1cbb5fa6ffa6"}},{"code_sha256_prefix":"0988e2aa209bdf7e","entry":"network_from_string","repo":"DJayalath/gnn-call-stack","repo_kind":"official","path":"gnn_call_stack/callstacks.py","file_url":"https://github.com/DJayalath/gnn-call-stack/blob/HEAD/gnn_call_stack/callstacks.py","link_basis":"first_harvest_node","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":"0988e2aa209bdf7e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}