Introduction
In modern machine learning, many data types are naturally represented as sets—unordered collections of elements with varying sizes. Examples include 3D point clouds, groups of word embeddings in a document, or nodes in a graph. Processing these sets requires a "pooling" operation to transform variable-sized inputs into fixed-length vectors compatible with standard neural network architectures.
While heuristic methods like mean or max pooling are common, they often discard critical structural information. Conversely, sophisticated attention-based mechanisms like Set Transformers are computationally intensive and lack a clear geometric interpretation. This paper introduces Generalized Sliced-Wasserstein Embeddings (GSWE), a principled pooling layer grounded in Optimal Transport (OT) theory that provides an exact Euclidean embedding for set-structured data.
The GSWE Framework
The core of GSWE lies in treating sets as samples from probability distributions and measuring the distance between them using the Wasserstein metric. To overcome the high computational cost of the standard Wasserstein distance, the authors utilize Generalized Sliced-Wasserstein (GSW) distances. This approach involves "slicing" high-dimensional distributions into multiple one-dimensional projections where OT distances are trivial to compute.
As shown in the pipeline above, the GSWE method maps sets into a Euclidean space such that the distance between embedded vectors corresponds exactly to the GSW distance between the original sets. This is achieved by using "reference sets" as anchors. The final embedding is a concatenation of transport maps that describe how an input set differs from these learned references across various projections (slices).
Experimental Evaluation
The authors evaluated GSWE across several benchmarks, focusing on both unsupervised and supervised tasks:
- Set-Circles: A synthetic 2D dataset where sets of points are distributed along circular arcs of varying radii.
- Point Cloud MNIST: A 2D point cloud representation of the classic handwritten digit dataset.
- Text Categorization: Documents from four standard datasets (
twitter,bbcsport,classic, andamazon) treated as sets of word embeddings.
Key Results
GSWE demonstrates significant advantages over existing baselines, particularly the Set Transformer (PMA). In unsupervised settings using contrastive frameworks like SimCLR and SimSiam, GSWE consistently outperformed PMA as the complexity of the reference sets increased.
In supervised text classification, GSWE achieved results on par with or better than state-of-the-art methods like RepSet. Notably, GSWE exhibited greater robustness to hyperparameters, maintaining stable performance regardless of the number of reference sets used, whereas competing methods showed high sensitivity.
Conclusion
Generalized Sliced-Wasserstein Embeddings offer a mathematically rigorous alternative to heuristic pooling. By viewing pooling as a coordinate mapping in the space of distributions, GSWE provides a geometrically intuitive and parameter-efficient way to represent sets. This "principled pooling" not only improves interpretability but also delivers superior performance in complex unsupervised representation learning tasks.
Summary updated