{"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/fast-optimal-transport-through-sliced","title":"Fast Optimal Transport through Sliced Wasserstein Generalized Geodesics","arxiv_id":"2307.01770","date":"2023-07-04","proceeding":null,"authors":["Guillaume Mahey","Laetitia Chapel","Gilles Gasso","Clément Bonet","Nicolas Courty"],"abstract":"Wasserstein distance (WD) and the associated optimal transport plan have been proven useful in many applications where probability measures are at stake. In this paper, we propose a new proxy of the squared WD, coined min-SWGG, that is based on the transport map induced by an optimal one-dimensional projection of the two input distributions. We draw connections between min-SWGG and Wasserstein generalized geodesics in which the pivot measure is supported on a line. We notably provide a new closed form for the exact Wasserstein distance in the particular case of one of the distributions supported on a line allowing us to derive a fast computational scheme that is amenable to gradient descent optimization. We show that min-SWGG is an upper bound of WD and that it has a complexity similar to as Sliced-Wasserstein, with the additional feature of providing an associated transport plan. We also investigate some theoretical properties such as metricity, weak convergence, computational and topological properties. Empirical evidences support the benefits of min-SWGG in various contexts, from gradient flows, shape matching and image colorization, among others.","url_abs":"https://arxiv.org/abs/2307.01770v2","url_pdf":"https://arxiv.org/pdf/2307.01770v2.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":"fast-optimal-transport-through-sliced","repo_url":"https://github.com/maheyg/swgg","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"colorization","task_name":"Colorization"},{"task_slug":"image-colorization","task_name":"Image Colorization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.01770","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.01770"}},"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/MaheyG/SWGG","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maheyg/swgg","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"unverified":25},"by_repo_kind":{"official":{"samples":27,"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":"a22c3f25a95d6153","entry":"SWGG_smooth","repo":"maheyg/swgg","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/maheyg/swgg/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a22c3f25a95d6153"}},{"code_sha256_prefix":"09b0bdfef41ee4cd","entry":"W2_1d","repo":"maheyg/swgg","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/maheyg/swgg/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09b0bdfef41ee4cd"}},{"code_sha256_prefix":"d3e61fdc6a748dfa","entry":"PWD","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/other_loss.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/other_loss.py","link_basis":"first_harvest_node","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":"d3e61fdc6a748dfa"}},{"code_sha256_prefix":"10853de1303723dd","entry":"W2_1d","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","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":"10853de1303723dd"}},{"code_sha256_prefix":"f5c699456b9401ca","entry":"W2_proj","repo":"maheyg/swgg","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/maheyg/swgg/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","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":"f5c699456b9401ca"}},{"code_sha256_prefix":"805b00de71cd788c","entry":"W2_proj","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","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":"805b00de71cd788c"}},{"code_sha256_prefix":"a994c5d41db78bae","entry":"Y_to_X","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_ICP.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_ICP.py","link_basis":"first_harvest_node","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":"a994c5d41db78bae"}},{"code_sha256_prefix":"f668fbaf283bfb9e","entry":"bures","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_Color_Transfer.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_Color_Transfer.py","link_basis":"first_harvest_node","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":"f668fbaf283bfb9e"}},{"code_sha256_prefix":"0d22210ae635b4f5","entry":"compute_bary_line","repo":"maheyg/swgg","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/maheyg/swgg/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d22210ae635b4f5"}},{"code_sha256_prefix":"5803c476aaa8df6b","entry":"compute_bary_line","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/SWGG.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/SWGG.py","link_basis":"first_harvest_node","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":"5803c476aaa8df6b"}},{"code_sha256_prefix":"95742157c81daf61","entry":"load_data","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_GF.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_GF.py","link_basis":"first_harvest_node","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":"95742157c81daf61"}},{"code_sha256_prefix":"ee959ae4d23366a2","entry":"load_image","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_ICP.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_ICP.py","link_basis":"first_harvest_node","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":"ee959ae4d23366a2"}},{"code_sha256_prefix":"0c49eeb3efa10d5b","entry":"make_blobs_random","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/generate_data.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/generate_data.py","link_basis":"first_harvest_node","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":"0c49eeb3efa10d5b"}},{"code_sha256_prefix":"281c672a91d898db","entry":"make_blobs_reg","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/generate_data.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/generate_data.py","link_basis":"first_harvest_node","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":"281c672a91d898db"}},{"code_sha256_prefix":"e6859576298167fd","entry":"make_spiral","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/generate_data.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/generate_data.py","link_basis":"first_harvest_node","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":"e6859576298167fd"}},{"code_sha256_prefix":"d5cd1f149cc19377","entry":"max_sw","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/other_loss.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/other_loss.py","link_basis":"first_harvest_node","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":"d5cd1f149cc19377"}},{"code_sha256_prefix":"020d9a0a810e3203","entry":"monge","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_Color_Transfer.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_Color_Transfer.py","link_basis":"first_harvest_node","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":"020d9a0a810e3203"}},{"code_sha256_prefix":"06574dd18197d712","entry":"nearest_neighbor","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/ICP.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/ICP.py","link_basis":"first_harvest_node","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":"06574dd18197d712"}},{"code_sha256_prefix":"68ab46e49e152b1d","entry":"procruste","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/ICP.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/ICP.py","link_basis":"first_harvest_node","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":"68ab46e49e152b1d"}},{"code_sha256_prefix":"128af456c8f6bf42","entry":"quantile_to_plan","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils.py","link_basis":"first_harvest_node","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":"128af456c8f6bf42"}},{"code_sha256_prefix":"2a5e2478a8bf42d6","entry":"random_slice","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils.py","link_basis":"first_harvest_node","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":"2a5e2478a8bf42d6"}},{"code_sha256_prefix":"a3cf34348d116058","entry":"rotation_matrix","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_ICP.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_ICP.py","link_basis":"first_harvest_node","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":"a3cf34348d116058"}},{"code_sha256_prefix":"26b94ccd4d0041f5","entry":"sort_to_plan","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils.py","link_basis":"first_harvest_node","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":"26b94ccd4d0041f5"}},{"code_sha256_prefix":"265432966cf60195","entry":"sqrtm","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_Color_Transfer.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_Color_Transfer.py","link_basis":"first_harvest_node","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":"265432966cf60195"}},{"code_sha256_prefix":"780b93de379e325c","entry":"sw","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/other_loss.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/other_loss.py","link_basis":"first_harvest_node","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":"780b93de379e325c"}},{"code_sha256_prefix":"56963d39c9de6af6","entry":"temperature","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/Simulated_Annealing.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/Simulated_Annealing.py","link_basis":"first_harvest_node","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":"56963d39c9de6af6"}},{"code_sha256_prefix":"4ca72352fb69bafc","entry":"w2","repo":"MaheyG/SWGG","repo_kind":"official","path":"code/utils_GF.py","file_url":"https://github.com/MaheyG/SWGG/blob/HEAD/code/utils_GF.py","link_basis":"first_harvest_node","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":"4ca72352fb69bafc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}