Potential Field Based Deep Metric Learning

Shubhang Bhatnagar, Narendra Ahuja

Introduction

Deep Metric Learning (DML) is a cornerstone of modern computer vision, powering applications from image retrieval to face recognition. The objective is to learn a mapping where semantically similar images are clustered together in a high-dimensional embedding space. However, traditional DML methods often struggle with label noise and complex, multi-modal class distributions. This paper introduces Potential Field based Deep Metric Learning (PFML), a physics-inspired framework that treats data points as physical charges in a continuous potential field.

Problem Statement

Existing DML strategies generally fall into two categories:

  1. Tuplet-based methods: These rely on pairs or triplets of samples. While effective, they are computationally expensive due to the need for hard-negative mining and are highly sensitive to outliers.
  2. Proxy-based methods: These use representative centers (proxies) for each class. While more efficient, they often fail to capture the internal variance of a class (e.g., different breeds within a "dog" category) and ignore sample-to-sample relationships.

A significant drawback of many current losses is that the "force" exerted on a sample often remains constant or increases with distance. Consequently, a mislabeled sample far from its class center can exert a disproportionate pull, distorting the learned embedding space.

Methodology: The PFML Framework

PFML addresses these issues by modeling the interaction between all samples in a batch simultaneously through a continuous potential field.

Overview of the Potential Field based Deep Metric Learning (PFML) framework.

The Physics Analogy and Decay Property

In PFML, every image embedding is treated as a unit charge. Samples belonging to the same class generate an attractive field, while those from different classes generate a repulsive field. The total force acting on any point is the superposition of all fields in the system.

A key innovation is the decay property: the influence of a sample (the gradient of the potential) decreases as the distance increases. This ensures that distant outliers or mislabeled samples do not overly influence the global structure, making the model inherently robust to noise.

Visualization of attraction (left) and repulsion (right) potential fields for two classes.

Multi-Proxy Representation

To handle multi-modal distributions, PFML employs multiple proxies per class. These proxies are not fixed averages; instead, they act as "mode seekers" that gravitate toward the densest clusters of data points within their respective classes, guided by the potential field. The network is optimized by minimizing the total potential energy of the system via backpropagation.

Experimental Results

The authors evaluated PFML on standard DML benchmarks, including CUB-200-2011, Cars-196, and Stanford Online Products (SOP), using various backbones (ResNet, ViT, DINO).

Performance and Robustness

PFML consistently outperformed state-of-the-art (SOTA) methods. For instance, on the Cars-196 dataset with a ResNet50 backbone, PFML achieved a 92.7% Recall@1, a significant improvement over the 87.7% achieved by Proxy Anchor.

The method's resilience was further tested by introducing 20% label noise. PFML demonstrated superior stability; on CUB-200, it maintained a 66.7% R@1, whereas competitors like Proxy Anchor dropped to 60.7%. Analysis using Wasserstein distance confirmed that PFML proxies align more closely with the actual data distribution than traditional proxy methods.

Conclusion and Limitations

PFML provides a robust, flexible framework for DML by leveraging the principles of potential fields. While highly effective, the method faces challenges common to proxy-based approaches, such as computational scaling with the number of classes. Additionally, performance can be sensitive to hyperparameters like the decay rate ($\alpha$). Future work may explore extending this framework to self-supervised learning and open-set recognition tasks.

Summary updated

BibTeX
@inproceedings{bhatnagar2025potential,
  author = {Shubhang Bhatnagar and Narendra Ahuja},
  title = {{Potential Field Based Deep Metric Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02379},
}
Figure