FSPool: Learning Set Representations with Featurewise Sort Pooling

Yan Zhang, Jonathon S. Hare, Adam Prügel-Bennett

Overview

FSPool (Featurewise Sort Pooling) is a novel pooling method designed to help neural networks better understand and generate sets of data. By sorting individual features across set elements before processing them, FSPool solves the "responsibility problem"—a common failure mode where standard networks struggle to map specific outputs to specific set members. This approach leads to significantly better performance in set auto-encoding and classification tasks.

The Responsibility Problem

Working with "sets" (collections of items where order doesn't matter, like a cloud of points or a list of objects in a scene) is notoriously difficult for standard neural networks. Most architectures are designed for ordered data like sequences (RNNs) or grids (CNNs).

The authors identify a fundamental hurdle in set processing called the responsibility problem. Imagine a network trying to predict the four corners of a square. If you rotate that square slightly, the "top-left" corner might suddenly become the "top-right" corner.

Illustration of the responsibility problem where rotating a set of points causes a discontinuous jump in which output neuron is responsible for which point.

In a standard network, a specific output neuron is "responsible" for a specific point. As the square rotates, there is a point where the network must instantaneously "swap" which neuron is responsible for which corner. This creates a mathematical discontinuity that neural networks—which prefer smooth, continuous functions—find nearly impossible to learn.

Featurewise Sort Pooling (FSPool)

To overcome this, the authors propose FSPool. Instead of using standard pooling methods like Sum or Max (which throw away a lot of structural information), FSPool introduces a sorting mechanism to retain more signal while achieving permutation invariance.

The FSPool mechanism: sorting features independently, applying a dot product with learned weights, and using a continuous piecewise linear function to handle variable set sizes.

The process follows these key steps:

  1. Featurewise Sorting: For a set of $n$ elements, each with $d$ features, the network sorts each feature independently across the $n$ elements.
  2. Weighted Sum: It then performs a weighted sum of these sorted values using learnable weights.
  3. Handling Variable Sizes: To handle sets of different sizes, the weights are defined using a continuous piecewise linear function. This allows the network to "interpolate" weights regardless of whether the set has 10 elements or 100.

The Auto-encoder Trick: In an auto-encoder setup (where a set is compressed and then reconstructed), FSPool stores the "sorting order" used during encoding. The decoder then uses the inverse of that permutation to put the points back in their original places. This makes the whole system permutation-equivariant, effectively bypassing the responsibility problem because the network no longer has to "guess" which output corresponds to which input.

Key Results and Datasets

The researchers evaluated FSPool across several diverse benchmarks, demonstrating its superiority over traditional pooling methods:

  • Rotating Polygons: On a toy dataset of regular polygons designed specifically to trigger the responsibility problem, FSPool achieved near-zero error. Standard baselines failed to converge or produced "average" shapes that ignored rotation.
  • MNIST as Point Sets: When auto-encoding noisy MNIST point sets (representing active pixels as coordinates), FSPool achieved a Mean Squared Error (MSE) of 0.00022, nearly half the error of the MLP baseline (0.00043).
  • CLEVR: On this visual reasoning dataset, FSPool reached 99% accuracy significantly faster than Relation Networks (209 epochs vs. 268 epochs) and achieved a higher final accuracy.
  • Graph Classification: When integrated into a Graph Isomorphism Network (GIN) as a "readout" layer to summarize node features, FSPool improved classification accuracy on 6 out of 9 standard graph datasets compared to the original sum-pooling baseline.

Limitations and Future Work

While highly effective, FSPool does have some limitations. For the auto-encoder version, the authors use a "relaxed" sorting method to maintain differentiability during training. This introduces a computational complexity of $O(n^2)$, which could become a bottleneck for extremely large sets (though standard $O(n \log n)$ sorting can be used at inference time). Additionally, because the method sorts features independently, a transformation (like an MLP) is usually required before pooling to ensure features are "mostly independent" so that structural information isn't lost.

Looking forward, the authors suggest that FSPool could serve as a powerful drop-in replacement for any architecture dealing with point clouds, object detection bounding boxes, or multi-agent reinforcement learning.

Summary updated

BibTeX
@inproceedings{zhang2020fspool,
  author = {Yan Zhang and Jonathon S. Hare and Adam Prügel-Bennett},
  title = {{FSPool: Learning Set Representations with Featurewise Sort Pooling}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
}
Figure