{"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/learning-permutations-with-sinkhorn-policy","title":"Learning Permutations with Sinkhorn Policy Gradient","arxiv_id":"1805.07010","date":"2018-05-18","proceeding":null,"authors":["Patrick Emami","Sanjay Ranka"],"abstract":"Many problems at the intersection of combinatorics and computer science\nrequire solving for a permutation that optimally matches, ranks, or sorts some\ndata. These problems usually have a task-specific, often non-differentiable\nobjective function that data-driven algorithms can use as a learning signal. In\nthis paper, we propose the Sinkhorn Policy Gradient (SPG) algorithm for\nlearning policies on permutation matrices. The actor-critic neural network\narchitecture we introduce for SPG uniquely decouples representation learning of\nthe state space from the highly-structured action space of permutations with a\ntemperature-controlled Sinkhorn layer. The Sinkhorn layer produces continuous\nrelaxations of permutation matrices so that the actor-critic architecture can\nbe trained end-to-end. Our empirical results show that agents trained with SPG\ncan perform competitively on sorting, the Euclidean TSP, and matching tasks. We\nalso observe that SPG is significantly more data efficient at the matching task\nthan the baseline methods, which indicates that SPG is conducive to learning\nrepresentations that are useful for reasoning about permutations.","url_abs":"http://arxiv.org/abs/1805.07010v1","url_pdf":"http://arxiv.org/pdf/1805.07010v1.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":"learning-permutations-with-sinkhorn-policy","repo_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1805.07010","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1805.07010"}},"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/pemami4911/sinkhorn-policy-gradient.pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran_honours":1,"ran_violates":1,"unverified":8},"by_repo_kind":{"listed":{"samples":10,"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":"6dd69b9b76d320b4","entry":"array_min2d","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"spg/memory.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/spg/memory.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6dd69b9b76d320b4"}},{"code_sha256_prefix":"248284f69adfeaad","entry":"str2bool","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"train_nco.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/train_nco.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"248284f69adfeaad"}},{"code_sha256_prefix":"500e7106751f6ddf","entry":"download_file_from_google_drive","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/tsp_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/tsp_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"500e7106751f6ddf"}},{"code_sha256_prefix":"fbcc4ff1d7572f35","entry":"reward","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/mwm2D_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/mwm2D_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"fbcc4ff1d7572f35"}},{"code_sha256_prefix":"3cfb4f8ceec0755c","entry":"reward_ddpg_A","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/sorting_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/sorting_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3cfb4f8ceec0755c"}},{"code_sha256_prefix":"231f961891da4b54","entry":"reward_ddpg_B","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/sorting_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/sorting_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"231f961891da4b54"}},{"code_sha256_prefix":"897b35a435866750","entry":"reward_nco","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/mwm2D_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/mwm2D_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"897b35a435866750"}},{"code_sha256_prefix":"7db1ec87169e246b","entry":"reward_nco","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/sorting_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/sorting_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7db1ec87169e246b"}},{"code_sha256_prefix":"5a75eb99cba9891c","entry":"reward_nco","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/tsp_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/tsp_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5a75eb99cba9891c"}},{"code_sha256_prefix":"05adf444acd0d22d","entry":"reward_spg","repo":"pemami4911/sinkhorn-policy-gradient.pytorch","repo_kind":"listed","path":"envs/tsp_task.py","file_url":"https://github.com/pemami4911/sinkhorn-policy-gradient.pytorch/blob/HEAD/envs/tsp_task.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"05adf444acd0d22d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}