{"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/an-optimal-transport-kernel-for-feature","title":"A Trainable Optimal Transport Embedding for Feature Aggregation and its Relationship to Attention","arxiv_id":"2006.12065","date":"2020-06-22","proceeding":"ICLR 2021 1","authors":["Grégoire Mialon","Dexiong Chen","Alexandre d'Aspremont","Julien Mairal"],"abstract":"We address the problem of learning on sets of features, motivated by the need of performing pooling operations in long biological sequences of varying sizes, with long-range dependencies, and possibly few labeled data. To address this challenging task, we introduce a parametrized representation of fixed size, which embeds and then aggregates elements from a given input set according to the optimal transport plan between the set and a trainable reference. Our approach scales to large datasets and allows end-to-end training of the reference, while also providing a simple unsupervised learning mechanism with small computational cost. Our aggregation technique admits two useful interpretations: it may be seen as a mechanism related to attention layers in neural networks, or it may be seen as a scalable surrogate of a classical optimal transport-based kernel. We experimentally demonstrate the effectiveness of our approach on biological sequences, achieving state-of-the-art results for protein fold recognition and detection of chromatin profiles tasks, and, as a proof of concept, we show promising results for processing natural language sequences. We provide an open-source implementation of our embedding that can be used alone or as a module in larger learning models at https://github.com/claying/OTK.","url_abs":"https://arxiv.org/abs/2006.12065v4","url_pdf":"https://arxiv.org/pdf/2006.12065v4.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":"an-optimal-transport-kernel-for-feature","repo_url":"https://github.com/claying/OTK","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2006.12065","atlas_url":"https://app.syntology.ai/?focus=2006.12065","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.12065"}},"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":"deterministic:regex_extraction","url":"https://github.com/claying/OTK","reach":null}],"summary":{"ran_fixture":4,"ran_draft_wrong":1,"unverified":8},"by_repo_kind":{"official":{"samples":13,"ran":5,"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":13,"samples":[{"code_sha256_prefix":"6a5b264a00dc40db","entry":"log_sinkhorn","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a5b264a00dc40db"}},{"code_sha256_prefix":"0ad8efb4913866f6","entry":"multihead_attn","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0ad8efb4913866f6"}},{"code_sha256_prefix":"ea90720465da3345","entry":"normalize","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ea90720465da3345"}},{"code_sha256_prefix":"55a8cdfd0f911b6a","entry":"sinkhorn","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"55a8cdfd0f911b6a"}},{"code_sha256_prefix":"838829b61cf82bd2","entry":"spherical_kmeans","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"838829b61cf82bd2"}},{"code_sha256_prefix":"8713f1365af9fd76","entry":"OTKernel","repo":"claying/otk","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/otk/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8713f1365af9fd76"}},{"code_sha256_prefix":"c195abdcd448e5a0","entry":"OTKernel","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c195abdcd448e5a0"}},{"code_sha256_prefix":"210485a16a60a08e","entry":"multihead_attn","repo":"claying/otk","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/otk/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"210485a16a60a08e"}},{"code_sha256_prefix":"c956cbab65499a05","entry":"normalize","repo":"claying/otk","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/otk/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c956cbab65499a05"}},{"code_sha256_prefix":"fb854c01aaabc359","entry":"spherical_kmeans","repo":"claying/otk","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/otk/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fb854c01aaabc359"}},{"code_sha256_prefix":"c6f00e8b22fa76ed","entry":"wasserstein_barycenter","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c6f00e8b22fa76ed"}},{"code_sha256_prefix":"a95baa30738e561e","entry":"wasserstein_kmeans","repo":"claying/otk","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/otk/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a95baa30738e561e"}},{"code_sha256_prefix":"2e43b81b2901488c","entry":"wasserstein_kmeans","repo":"claying/OTK","repo_kind":"official","path":"otk/layers.py","file_url":"https://github.com/claying/OTK/blob/HEAD/otk/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2e43b81b2901488c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}