Multi-Proxy Wasserstein Classifier for Image Classification

Benlin Liu, Yongming Rao, Jiwen Lu, Jie Zhou, Cho-Jui Hsieh

Abstract

Standard image classification models typically represent each category with a single "template" vector. This approach often fails to capture the diverse viewpoints, poses, and textures inherent in real-world objects. We introduce the Multi-Proxy Wasserstein Classifier, a novel architecture that represents each class using multiple "proxies." By employing Optimal Transport (the Wasserstein distance) via differentiable Sinkhorn iterations, the model intelligently matches local image features to these proxies. Our method demonstrates significant gains in accuracy and robustness across standard benchmarks like CIFAR and ImageNet while maintaining computational efficiency.

Introduction

Most modern Convolutional Neural Networks (CNNs) follow a standard pipeline: they extract a grid of features ($H \times W \times C$), compress them into a single vector using Global Average Pooling (GAP), and then compare this vector to a single class template in a Fully Connected (FC) layer.

This "GAP-FC" paradigm is fundamentally limited. A single vector is often insufficient to represent the complex "intrinsic properties" of a class. For instance, the class "bird" encompasses vastly different species, poses, and backgrounds. While one might attempt to add more template vectors (proxies) and average their scores, this typically leads to "mode collapse," where all proxies converge to the same representation because the model lacks a mechanism to assign specific image regions to specific proxies.

Methodology: Beyond the Single-Template Bottleneck

The proposed Multi-Proxy Wasserstein Classifier addresses these limitations through three core components:

  1. Multi-Proxy Representation: Each class is represented by $M$ distinct proxies (typically $M=4$) rather than a single vector.
  2. Optimal Transport (OT) Matching: The model treats the local feature map grid as one distribution and the class proxies as another. It uses Optimal Transport theory to find an optimal "matching flow," determining which local features best correspond to which class proxies.
  3. Differentiable Sinkhorn Iteration: To ensure computational feasibility and end-to-end learnability, the authors utilize an entropically-regularized version of the Wasserstein distance. This is solved using the Sinkhorn-Knopp algorithm, a lightweight iterative process embedded directly into the network.
Comparison of standard classifiers (GAP-FC, Flatten-FC) vs. the proposed Multi-Proxy Wasserstein approach.

Unlike "Flatten-FC" layers, which are sensitive to spatial locations, this approach is transition-invariant. It prioritizes feature matching over absolute positioning, allowing for "partial matching" where specific sub-areas (e.g., a bird's wing) focus on relevant proxies while ignoring background noise.

Key Results

The Multi-Proxy Wasserstein Classifier was evaluated on CIFAR-10, CIFAR-100, and ImageNet (ILSVRC2012). The method consistently outperforms baselines across various architectures:

  • CIFAR-100: Accuracy improved for ResNet-110 by 2.02% (from 73.25% to 75.27%).
  • ImageNet: As shown in the performance table, the method yields significant gains across ResNet variants. For ResNet-18, Top-1 accuracy increased by 1.32%.
  • Efficiency: While the Sinkhorn algorithm adds a slight training overhead (approx. 17.7% wall-clock time), the increase in total FLOPs is negligible. The algorithm typically converges within 6 iterations.
Performance comparison on ImageNet across different ResNet architectures.

Key Insights and Discussion

  • Structural Attention: Unlike traditional attention mechanisms that require additional learnable layers, the matching flow here is a structural optimization. It requires zero additional parameters to calculate the matching itself.
  • Representational Capacity: Embedding samples into a Wasserstein metric space provides higher capacity than the standard Euclidean space used by dot-product classifiers.
  • Robustness to Distribution Shift: The multi-proxy approach showed much stronger generalization to unseen natural variations (e.g., CIFAR-10.1) than standard GAP-FC models.

Conclusion

The Multi-Proxy Wasserstein Classifier offers a robust alternative to the standard GAP-FC bottleneck by leveraging the geometric properties of Optimal Transport. While it introduces minor hyperparameters like the number of proxies ($M$) and regularization ($\lambda$), its ability to capture diverse class features without significant parameter bloat is a major advantage. Future research may explore the interpretability of learned proxies and the scaling of this approach to even more complex, fine-grained datasets.

Summary updated

BibTeX
@inproceedings{liu2021multi,
  author = {Benlin Liu and Yongming Rao and Jiwen Lu and Jie Zhou and Cho-Jui Hsieh},
  title = {{Multi-Proxy Wasserstein Classifier for Image Classification}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i10.17045},
}
Figure