{"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/revisiting-pooling-through-the-lens-of","title":"Revisiting Global Pooling through the Lens of Optimal Transport","arxiv_id":"2201.09191","date":"2022-01-23","proceeding":null,"authors":["Minjie Cheng","Hongteng Xu"],"abstract":"Global pooling is one of the most significant operations in many machine learning models and tasks, whose implementation, however, is often empirical in practice. In this study, we develop a novel and solid global pooling framework through the lens of optimal transport. We demonstrate that most existing global pooling methods are equivalent to solving some specializations of an unbalanced optimal transport (UOT) problem. Making the parameters of the UOT problem learnable, we unify various global pooling methods in the same framework, and accordingly, propose a generalized global pooling layer called UOT-Pooling (UOTP) for neural networks. Besides implementing the UOTP layer based on the classic Sinkhorn-scaling algorithm, we design a new model architecture based on the Bregman ADMM algorithm, which has better numerical stability and can reproduce existing pooling layers more effectively. We test our UOTP layers in several application scenarios, including multi-instance learning, graph classification, and image classification. Our UOTP layers can either imitate conventional global pooling layers or learn some new pooling mechanisms leading to better performance.","url_abs":"https://arxiv.org/abs/2201.09191v2","url_pdf":"https://arxiv.org/pdf/2201.09191v2.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":"revisiting-pooling-through-the-lens-of","repo_url":"https://github.com/sds-lab/rot-pooling","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-classification","task_name":"Graph Classification"},{"task_slug":"graph-embedding","task_name":"Graph Embedding"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"admm","method_name":"ADMM"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2201.09191","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.09191"}},"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/sds-lab/rot-pooling","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"unverified":14},"by_repo_kind":{"listed":{"samples":15,"ran":1,"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":"131a82fd65128218","entry":"accuracy","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/resnet_imagenet.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/resnet_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"131a82fd65128218"}},{"code_sha256_prefix":"ec8c933c0c321597","entry":"get_dim","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/attention_mil.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/attention_mil.py","link_basis":"harvester_set","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":"ec8c933c0c321597"}},{"code_sha256_prefix":"9d7c914f74cff214","entry":"global_softmax_pooling","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"pooling/baselines.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/pooling/baselines.py","link_basis":"harvester_set","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":"9d7c914f74cff214"}},{"code_sha256_prefix":"e5f5692f50afab40","entry":"initialize_edge_weight","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/adgcl.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/adgcl.py","link_basis":"harvester_set","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":"e5f5692f50afab40"}},{"code_sha256_prefix":"4765da09c326c59f","entry":"initialize_node_features","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/adgcl.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/adgcl.py","link_basis":"harvester_set","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":"4765da09c326c59f"}},{"code_sha256_prefix":"a919d94d33818c15","entry":"load_mil_data_mat","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/attention_mil.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/attention_mil.py","link_basis":"harvester_set","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":"a919d94d33818c15"}},{"code_sha256_prefix":"9a2e477393a1dffe","entry":"org_batch","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/ddi_gin.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/ddi_gin.py","link_basis":"harvester_set","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":"9a2e477393a1dffe"}},{"code_sha256_prefix":"72b6375204b98c11","entry":"rot_sinkhorn","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"pooling/rotlayers.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/pooling/rotlayers.py","link_basis":"harvester_set","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":"72b6375204b98c11"}},{"code_sha256_prefix":"382c92abf2446b95","entry":"set_tu_dataset_y_shape","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/adgcl.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/adgcl.py","link_basis":"harvester_set","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":"382c92abf2446b95"}},{"code_sha256_prefix":"1d61626dd637955d","entry":"to_sparse_batch","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"pooling/rotpooling.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/pooling/rotpooling.py","link_basis":"harvester_set","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":"1d61626dd637955d"}},{"code_sha256_prefix":"3ce20c8e0eb7e9c5","entry":"train","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/attention_mil.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/attention_mil.py","link_basis":"harvester_set","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":"3ce20c8e0eb7e9c5"}},{"code_sha256_prefix":"954a0c90bea1cc24","entry":"train","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/ddi_gin.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/ddi_gin.py","link_basis":"harvester_set","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":"954a0c90bea1cc24"}},{"code_sha256_prefix":"8ab6d9d56daf6d67","entry":"uot_badmm","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"pooling/rotlayers.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/pooling/rotlayers.py","link_basis":"harvester_set","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":"8ab6d9d56daf6d67"}},{"code_sha256_prefix":"f3ed0e56606b76fe","entry":"uot_sinkhorn","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"pooling/rotlayers.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/pooling/rotlayers.py","link_basis":"harvester_set","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":"f3ed0e56606b76fe"}},{"code_sha256_prefix":"f7cef679653b52d5","entry":"validate","repo":"sds-lab/rot-pooling","repo_kind":"listed","path":"backbones/resnet_imagenet.py","file_url":"https://github.com/sds-lab/rot-pooling/blob/HEAD/backbones/resnet_imagenet.py","link_basis":"harvester_set","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":"f7cef679653b52d5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}