{"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/datasp-a-differential-all-to-all-shortest","title":"DataSP: A Differential All-to-All Shortest Path Algorithm for Learning Costs and Predicting Paths with Context","arxiv_id":"2405.04923","date":"2024-05-08","proceeding":null,"authors":["Alan A. Lahoud","Erik Schaffernicht","Johannes A. Stork"],"abstract":"Learning latent costs of transitions on graphs from trajectories demonstrations under various contextual features is challenging but useful for path planning. Yet, existing methods either oversimplify cost assumptions or scale poorly with the number of observed trajectories. This paper introduces DataSP, a differentiable all-to-all shortest path algorithm to facilitate learning latent costs from trajectories. It allows to learn from a large number of trajectories in each learning step without additional computation. Complex latent cost functions from contextual features can be represented in the algorithm through a neural network approximation. We further propose a method to sample paths from DataSP in order to reconstruct/mimic observed paths' distributions. We prove that the inferred distribution follows the maximum entropy principle. We show that DataSP outperforms state-of-the-art differentiable combinatorial solver and classical machine learning approaches in predicting paths on graphs.","url_abs":"https://arxiv.org/abs/2405.04923v2","url_pdf":"https://arxiv.org/pdf/2405.04923v2.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":"datasp-a-differential-all-to-all-shortest","repo_url":"https://github.com/alanlahoud/datasp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"all","task_name":"All"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.04923","atlas_url":"https://app.syntology.ai/?focus=2405.04923","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.04923"}},"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/alanlahoud/datasp","reach":{"status":"ok"}}],"summary":{"ran":14},"by_repo_kind":{"official":{"samples":14,"ran":14,"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":14,"samples":[{"code_sha256_prefix":"65c1bcfdeccc03e5","entry":"argmin_smooth","repo":"alanlahoud/datasp","repo_kind":"official","path":"datasp.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/datasp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"65c1bcfdeccc03e5"}},{"code_sha256_prefix":"5da2f8265f71362d","entry":"check_or_create_folder","repo":"alanlahoud/datasp","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5da2f8265f71362d"}},{"code_sha256_prefix":"cca78e7b7aff39f8","entry":"costs_to_matrix","repo":"alanlahoud/datasp","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cca78e7b7aff39f8"}},{"code_sha256_prefix":"ec62045e0efa1cb7","entry":"cross_entropy_cont","repo":"alanlahoud/datasp","repo_kind":"official","path":"exp_cabspotting.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/exp_cabspotting.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ec62045e0efa1cb7"}},{"code_sha256_prefix":"08e64eb6241429b9","entry":"d_is_large","repo":"alanlahoud/datasp","repo_kind":"official","path":"datasp.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/datasp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"08e64eb6241429b9"}},{"code_sha256_prefix":"cfb366bb41c25ba7","entry":"edges_from_vertex","repo":"alanlahoud/datasp","repo_kind":"official","path":"comb_modules/utils.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/comb_modules/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cfb366bb41c25ba7"}},{"code_sha256_prefix":"344e207e50232b42","entry":"gen_cond_dist","repo":"alanlahoud/datasp","repo_kind":"official","path":"data_generation.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/data_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"344e207e50232b42"}},{"code_sha256_prefix":"734a6852070b9b8f","entry":"gen_data","repo":"alanlahoud/datasp","repo_kind":"official","path":"data_generation.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/data_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"734a6852070b9b8f"}},{"code_sha256_prefix":"85d9c1a42ed1aa25","entry":"gen_intermediate","repo":"alanlahoud/datasp","repo_kind":"official","path":"data_generation.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/data_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"85d9c1a42ed1aa25"}},{"code_sha256_prefix":"cdc8e06a258ebcd5","entry":"get_adj_cost_M","repo":"alanlahoud/datasp","repo_kind":"official","path":"create_networks.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/create_networks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cdc8e06a258ebcd5"}},{"code_sha256_prefix":"d593db1610afbe36","entry":"get_bin_M","repo":"alanlahoud/datasp","repo_kind":"official","path":"create_networks.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/create_networks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d593db1610afbe36"}},{"code_sha256_prefix":"b2dba6d1326e8400","entry":"get_neighbourhood_func","repo":"alanlahoud/datasp","repo_kind":"official","path":"comb_modules/utils.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/comb_modules/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b2dba6d1326e8400"}},{"code_sha256_prefix":"e6257721df2f0f28","entry":"min_smooth","repo":"alanlahoud/datasp","repo_kind":"official","path":"datasp.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/datasp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e6257721df2f0f28"}},{"code_sha256_prefix":"89cc3bc20a3a00d6","entry":"vertex_index","repo":"alanlahoud/datasp","repo_kind":"official","path":"comb_modules/utils.py","file_url":"https://github.com/alanlahoud/datasp/blob/HEAD/comb_modules/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"89cc3bc20a3a00d6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}