Papers › The Balanced-Pairwise-Affinities Feature Transform

The Balanced-Pairwise-Affinities Feature Transform

25 Jun 2024arXiv:2407.01467archive 2025-07-28

Daniel Shalam, Simon Korman

The Balanced-Pairwise-Affinities (BPA) feature transform is designed to upgrade the features of a set of input items to facilitate downstream matching or grouping related tasks. The transformed set encodes a rich representation of high order relations between the input features. A particular min-cost-max-flow fractional matching problem, whose entropy regularized version can be approximated by an optimal transport (OT) optimization, leads to a transform which is efficient, differentiable, equivariant, parameterless and probabilistically interpretable. While the Sinkhorn OT solver has been adapted extensively in many contexts, we use it differently by minimizing the cost between a set of features to itself and using the transport plan's rows as the new representation. Empirically, the transform is highly effective and flexible in its use and consistently improves networks it is inserted into, in a variety of tasks and training schemes. We demonstrate state-of-the-art results in few-shot classification, unsupervised image clustering and person re-identification. Code is available at \url{github.com/DanielShalam/BPA}.

PaperPDFCode

Code

danielshalam/bpa officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Few-Shot Image ClassificationImage ClusteringPerson Re-Identification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Few-Shot Image Classification CIFAR-FS 5-way (1-shot) PT+MAP+SF+BPA (transductive) Accuracy 89.94 #2 of 38 Archive leaderboard report
Few-Shot Image Classification CIFAR-FS 5-way (5-shot) PT+MAP+SF+BPA (transductive) Accuracy 92.83 #3 of 39 Archive leaderboard report
Few-Shot Image Classification CUB 200 5-way 1-shot PT+MAP+SF+BPA (transductive) Accuracy 95.80 #3 of 36 Archive leaderboard report
Few-Shot Image Classification CUB 200 5-way 5-shot PT+MAP+SF+BPA (transductive) Accuracy 97.12 #3 of 32 Archive leaderboard report
Few-Shot Image Classification Mini-Imagenet 5-way (1-shot) PT+MAP+SF+BPA (transductive) Accuracy 85.59 #6 of 105 Archive leaderboard report
Few-Shot Image Classification Mini-Imagenet 5-way (5-shot) PT+MAP+SF+BPA (transductive) Accuracy 91.34 #9 of 95 Archive leaderboard report
Image Clustering CIFAR-10 SPICE-BPA ARI 0.866 #6 of 40 Archive leaderboard report
Image Clustering CIFAR-10 SPICE-BPA Accuracy 0.933 #6 of 40 Archive leaderboard report
Image Clustering CIFAR-10 SPICE-BPA Backbone ResNet-18 #6 of 40 Archive leaderboard report
Image Clustering CIFAR-10 SPICE-BPA NMI 0.870 #6 of 40 Archive leaderboard report
Image Clustering CIFAR-100 SPICE-BPA ARI 0.402 #10 of 30 Archive leaderboard report
Image Clustering CIFAR-100 SPICE-BPA Accuracy 0.550 #10 of 30 Archive leaderboard report
Image Clustering CIFAR-100 SPICE-BPA NMI 0.560 #10 of 30 Archive leaderboard report
Image Clustering STL-10 SPICE-BPA ARI 0.879 #4 of 29 Archive leaderboard report
Image Clustering STL-10 SPICE-BPA Accuracy 0.943 #4 of 29 Archive leaderboard report
Image Clustering STL-10 SPICE-BPA Backbone ResNet-34 #4 of 29 Archive leaderboard report
Image Clustering STL-10 SPICE-BPA NMI 0.880 #4 of 29 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

SET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections