Revisiting Pooling through the Lens of Optimal Transport

Minjie Cheng, Hongteng Xu

Revisiting Pooling through the Lens of Optimal Transport

TL;DR

This research reveals that common global pooling methods—such as mean, max, and attention pooling—are special cases of a single mathematical framework: Unbalanced Optimal Transport (UOT). By treating pooling as a learnable UOT problem, the authors introduce UOT-Pooling (UOTP), a flexible layer that can either mimic traditional pooling or discover superior, data-driven aggregation strategies.

The Problem: Heuristic Pooling in Deep Learning

In deep learning, "global pooling" is the essential step that collapses variable-sized inputs (like nodes in a graph, instances in a bag, or pixels in a feature map) into a single fixed-size vector. While critical for tasks like graph classification or multi-instance learning, the choice of pooling method is usually empirical. Whether to use mean, max, or attention pooling is often decided through trial and error rather than a unifying theory.

The authors set out to provide a solid mathematical foundation for pooling by viewing it through the lens of Optimal Transport (OT)—a field concerned with the most efficient way to move "mass" from one distribution to another.

Methods: The UOT-Pooling (UOTP) Layer

The core proposal is the UOT-Pooling (UOTP) layer. This framework treats pooling as an optimization problem: finding an optimal joint distribution between samples and feature dimensions.

Overview of the UOT-Pooling architecture, showing the conceptual pooling layer and the unrolled Bregman ADMM modules used for optimization.

Key aspects of UOTP include:

  1. Unification: The authors prove that by adjusting the regularization parameters of the UOT problem, they can mathematically recover mean, max, and attention pooling.
  2. Learnable Parameters: Unlike static pooling, UOTP makes transport costs and marginal distributions learnable. The network can "learn" how to aggregate information based on the specific dataset.
  3. Flexibility via "Unbalanced" Transport: Standard OT requires strict mass conservation. Unbalanced OT allows for mass to be created or destroyed, meaning the model can choose to ignore "noisy" samples or amplify "important" features.

Robust Optimization via BADMM

To solve the UOT problem during the forward pass of a neural network, the authors use "unrolled" optimization. While the standard Sinkhorn algorithm is common for OT, it can be numerically unstable, often producing NaNs if parameters aren't perfectly tuned.

Instead, the authors propose a version based on the Bregman Alternating Direction Method of Multipliers (BADMM). This approach is significantly more robust and supports both entropic and quadratic regularization, ensuring stability across a massive range of configurations.

Comparison of numerical stability between the Sinkhorn algorithm and the proposed BADMM approach across various parameter settings.

Key Results and Performance

The authors evaluated UOTP across three distinct domains, demonstrating its versatility and efficiency:

  • Multi-Instance Learning (MIL): UOTP achieved competitive results on medical imaging and gene ontology datasets.
  • Graph Classification: On social network datasets (like COLLAB and Reddit), the BADMM-based UOTP achieved the highest classification accuracy among all tested pooling layers.
  • ImageNet Boost: By replacing the final pooling layer of a pre-trained ResNet-50 with a UOTP layer and fine-tuning for just 10 epochs, Top-1 accuracy rose from 76.14% to 76.45%.
  • Efficiency: While more complex than simple mean pooling, UOTP's runtime is comparable to other learnable layers like DeepSet or Set2Set, making it a viable drop-in replacement.

Conclusion and Future Work

By framing pooling as a statistical signal processing task modulated by Unbalanced Optimal Transport, this work provides a powerful unifying theory for data aggregation in deep learning. The transition from Sinkhorn to the more stable BADMM algorithm makes UOTP a practical tool for modern architectures. Future research will focus on developing efficient CUDA implementations to bring the benefits of UOT-based pooling to local operations in CNNs and Transformers.

Summary updated

BibTeX
@misc{cheng2022revisiting,
  author = {Minjie Cheng and Hongteng Xu},
  title = {{Revisiting Pooling through the Lens of Optimal Transport}},
  year = {2022},
  eprint = {2201.09191},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.09191},
}
Figure