{"about":{"non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","site":"https://codewithpapers.app","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/the-balanced-pairwise-affinities-feature","title":"The Balanced-Pairwise-Affinities Feature Transform","arxiv_id":"2407.01467","date":"2024-06-25","proceeding":null,"authors":["Daniel Shalam","Simon Korman"],"abstract":"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}.","url_abs":"https://arxiv.org/abs/2407.01467v1","url_pdf":"https://arxiv.org/pdf/2407.01467v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"the-balanced-pairwise-affinities-feature","repo_url":"https://github.com/danielshalam/bpa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"few-shot-image-classification","task_name":"Few-Shot Image Classification"},{"task_slug":"image-clustering","task_name":"Image Clustering"},{"task_slug":"person-re-identification","task_name":"Person Re-Identification"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-image-classification-on-cifar-fs-5","task":"Few-Shot Image Classification","dataset":"CIFAR-FS 5-way (1-shot)","model":"PT+MAP+SF+BPA (transductive)","rank_in_archive_order":2,"of":38,"metrics":{"Accuracy":"89.94"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-cifar-fs-5-1","task":"Few-Shot Image Classification","dataset":"CIFAR-FS 5-way (5-shot)","model":"PT+MAP+SF+BPA (transductive)","rank_in_archive_order":3,"of":39,"metrics":{"Accuracy":"92.83"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-cub-200-5-1","task":"Few-Shot Image Classification","dataset":"CUB 200 5-way 1-shot","model":"PT+MAP+SF+BPA (transductive)","rank_in_archive_order":3,"of":36,"metrics":{"Accuracy":"95.80"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-cub-200-5","task":"Few-Shot Image Classification","dataset":"CUB 200 5-way 5-shot","model":"PT+MAP+SF+BPA (transductive)","rank_in_archive_order":3,"of":32,"metrics":{"Accuracy":"97.12"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-2","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"PT+MAP+SF+BPA (transductive)","rank_in_archive_order":6,"of":105,"metrics":{"Accuracy":"85.59"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-3","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"PT+MAP+SF+BPA (transductive)","rank_in_archive_order":9,"of":95,"metrics":{"Accuracy":"91.34"},"uses_additional_data":false},{"leaderboard":"/sota/image-clustering-on-cifar-10","task":"Image Clustering","dataset":"CIFAR-10","model":"SPICE-BPA","rank_in_archive_order":6,"of":40,"metrics":{"ARI":"0.866","Accuracy":"0.933","Backbone":"ResNet-18","NMI":"0.870"},"uses_additional_data":false},{"leaderboard":"/sota/image-clustering-on-cifar-100","task":"Image Clustering","dataset":"CIFAR-100","model":"SPICE-BPA","rank_in_archive_order":10,"of":30,"metrics":{"ARI":"0.402","Accuracy":"0.550","NMI":"0.560"},"uses_additional_data":false},{"leaderboard":"/sota/image-clustering-on-stl-10","task":"Image Clustering","dataset":"STL-10","model":"SPICE-BPA","rank_in_archive_order":4,"of":29,"metrics":{"ARI":"0.879","Accuracy":"0.943","Backbone":"ResNet-34","NMI":"0.880"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers","held":null,"reason":"arxiv_id_not_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"by_repo":[{"repo":"danielshalam/bpa","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0}],"by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"89dd16fa728f9570cb3a4e2c2e440420978cdec91524ce6dfe268578a37b1e14","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}