Pooling by Sliced-Wasserstein Embedding

Navid Naderializadeh, Joseph F. Comer, Reed W. Andrews, Heiko Hoffmann, Soheil Kolouri

Introduction

Many modern machine learning tasks involve "sets"—collections of data points where the number of elements varies and their order doesn't matter (permutation invariance). Examples include the points in a 3D scan, nodes in a social network, or local patches in an image.

The standard way to handle these sets is through "pooling": collapsing a set of features into a single fixed-size vector that a classifier can process. While simple methods like Global Average Pooling (GAP) or Max Pooling are common, they often discard crucial structural information about the distribution of the features. More complex methods, like attention-based pooling, exist but can be computationally heavy or lack a clear geometric foundation.

To address this, researchers have introduced Pooling by Sliced-Wasserstein Embedding (PSWE), a novel, geometrically-interpretable pooling mechanism for set-structured data. By treating set elements as samples from a probability distribution, PSWE derives a trainable Euclidean embedding that captures the "distance" between sets, significantly boosting performance when using simple neural network backbones.

How PSWE Works

PSWE is built on the mathematics of Optimal Transport, specifically utilizing the Wasserstein distance (also known as the Earth Mover’s Distance). The method operates through several key steps:

  1. The Distributional View: PSWE treats each input set as an empirical probability distribution.
  2. The "Sliced" Trick: Calculating the exact Wasserstein distance in high dimensions is computationally expensive. However, in 1D, it is trivial—you simply sort the values. PSWE "slices" high-dimensional features by projecting them onto multiple 1D lines using permutation-equivariant slicers.
  3. Trainable Reference Sets: Instead of just comparing two input sets directly, PSWE compares every input set to a learned, trainable reference set.
  4. The Embedding: For each slice, the model calculates the "Monge map"—essentially the displacement needed to move the reference set's distribution to match the input set's distribution. These displacements are concatenated to form a fixed-length vector, which serves as the final embedding.
  5. End-to-End Learning: Crucially, the directions of the slices and the elements of the reference set are parameters learned during training via standard backpropagation.
PSWE Architecture

Key Insights and Performance

The authors evaluated PSWE across three distinct modalities: 3D Point Clouds (ModelNet40), Graph Classification (TUD datasets like IMDB and ENZYMES), and Image Recognition (NWPU-RESISC45 and Places-Extra69).

The Backbone-Pooling Trade-off

One of the most interesting findings is the relationship between the feature extractor (backbone) and the pooling layer. If the backbone is highly complex (e.g., uses self-attention), simple mean pooling works surprisingly well. However, if the backbone is "plain" (e.g., a shared MLP), a sophisticated pooling layer like PSWE provides a massive performance boost. This makes PSWE highly valuable for lightweight architectures.

Empirical Results

  • Point Clouds: On ModelNet40 with a simple MLP backbone, PSWE achieved 86.9% accuracy, dwarfing Global Average Pooling's 57.8%. It also outperformed other sophisticated baselines like PMA and FSPool.
  • Images: When treating images as sets of patches (similar to a Vision Transformer approach but with a simpler backbone), PSWE outperformed GAP by 10% on the NWPU satellite dataset (75.0% vs 65.0%).
  • Graphs: PSWE consistently ranked as the top or near-top performer across various Graph Neural Network (GNN) architectures (GCN, GAT, GIN), showing it is robust to different ways of generating node embeddings.
Graph Classification Results

Geometric Interpretability

Unlike black-box pooling methods, PSWE has a physical meaning: it represents a set by how its distribution deviates from a learned "template" across various geometric projections. The method can be seen as a theoretically-grounded generalization of "SortPool." While SortPool simply sorts features, PSWE learns which projections to sort and what to compare them against.

Limitations and Future Work

While powerful, PSWE does have some limitations:

  • Computational Overhead: While "slicing" makes Wasserstein distances tractable, the process still involves sorting and interpolation for every slice, which is slower than simple mean or max pooling.
  • Hyperparameter Sensitivity: The performance depends heavily on the number of slices ($L$) and the size of the reference set ($N$). As seen in the graph results, using too many slices on smaller datasets can lead to overfitting.
  • Local Pooling: The current research focuses on global pooling (summarizing an entire object). The authors suggest that applying this mechanism to local pooling (e.g., within specific layers of a CNN or GNN) is a promising but unexplored direction for future work.

Summary updated

BibTeX
@inproceedings{naderializadeh2021pooling,
  author = {Navid Naderializadeh and Joseph F. Comer and Reed W. Andrews and Heiko Hoffmann and Soheil Kolouri},
  title = {{Pooling by Sliced-Wasserstein Embedding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure