Towards Improved Proxy-Based Deep Metric Learning via Data-Augmented Domain Adaptation

Li Ren, Chen Chen, Liqiang Wang, Kien A. Hua

Abstract

Proxy-based Deep Metric Learning (DML) offers a computationally efficient alternative to pair-based methods by utilizing a small set of learnable representative vectors. However, a significant "distribution gap" often exists between these randomly initialized proxies and actual image features, hindering convergence and performance. This paper introduces Data-Augmented Domain Adaptation (DADA), a novel framework that treats proxies and data samples as distinct domains. By employing adversarial learning and feature mixup, DADA aligns these distributions while preserving category-level distinctions. Experimental results demonstrate that DADA consistently improves existing proxy-based losses, achieving state-of-the-art performance on standard retrieval benchmarks.

Introduction

Deep Metric Learning (DML) focuses on learning an embedding space where semantically similar images are clustered together and dissimilar ones are separated. While traditional pair-based methods, such as triplet loss, are effective, they suffer from high computational costs due to the need for extensive pair sampling. Proxy-based DML addresses this by comparing data samples to a fixed number of learnable "proxies" (typically one per class).

Despite their efficiency, proxies are often initialized from a normal distribution, lacking semantic relevance at the start of training. This creates a massive distribution gap between the proxy space and the actual data manifold. This gap can lead to learning biases and slow convergence, as the model struggles to map image features to an unrelated proxy distribution.

Comparison between the original proxy method and the proposed DADA framework.

The DADA Framework

The core innovation of this work is reframing the proxy-sample gap as a domain adaptation problem. The data samples are treated as the "source domain," while the proxies represent the "target domain." To bridge this gap, the authors propose the Data-Augmented Domain Adaptation (DADA) framework, which utilizes three integrated components.

1. Domain Data Augmentation

Direct alignment is challenging because proxies are extremely sparse compared to data samples. DADA creates an "intermediate domain" by performing feature mixup (interpolation) between data samples and proxies, as well as between samples of the same class. This process generates a dense manifold of augmented features that serves as a continuous bridge between the source and target domains.

2. Domain-level Discriminator ($f_D$)

An adversarial training strategy is employed where a domain-level discriminator $f_D$ attempts to distinguish between features from the sample domain, the proxy domain, and the augmented intermediate domain. Simultaneously, the feature generator and the proxies themselves are updated to fool this discriminator, effectively forcing their distributions to align in the embedding space.

3. Category-level Discriminator ($f_C$)

Aligning domains globally can inadvertently lead to "mode collapse," where class-specific boundaries are blurred. To maintain discriminative power, a category-level discriminator $f_C$ ensures class consistency. It minimizes the Nuclear-norm Wasserstein Distance (NWD) between category predictions of data samples and augmented proxies, preserving the vital inter-class separation required for effective metric learning.

The DADA pipeline: from initial sparse space to an aligned, adapted space via adversarial learning signals from domain and category discriminators.

Experimental Evaluation

The authors evaluated DADA by integrating it into the standard ProxyAnchor (PA) loss across four benchmark datasets: CUB-200-2011, CARS196, Stanford Online Products (SOP), and In-Shop Clothes Retrieval.

Key Results

  • Performance Gains: On a ResNet50 backbone, PA+DADA improved Recall@1 by 4.6% (to 72.9%) on CUB200 and 5.0% (to 92.1%) on CARS196 compared to the baseline ProxyAnchor loss.
  • State-of-the-Art: The proposed method outperformed previous leading techniques, such as AVSL, by 0.6% on CUB200 and 0.9% on CARS196.
  • Ablation Study: Removing the category-level discriminator resulted in a significant performance drop (e.g., 2.0% on CUB200), confirming that maintaining class boundaries is essential during domain alignment.

Conclusion

DADA provides a creative and effective solution to the distribution gap in proxy-based DML. By treating proxies as a distinct domain and using data augmentation as a "stepping stone" for adversarial alignment, the framework significantly enhances retrieval performance. While the method shows slightly lower gains on datasets with extremely high class-to-sample ratios (like SOP), it represents a major step forward in making proxy-based methods more robust and semantically grounded. Future work will explore extending this domain-alignment paradigm to zero-shot and self-supervised learning contexts.

Summary updated

BibTeX
@inproceedings{ren2024towards,
  author = {Li Ren and Chen Chen and Liqiang Wang and Kien A. Hua},
  title = {{Towards Improved Proxy-Based Deep Metric Learning via Data-Augmented Domain Adaptation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i13.29400},
}
Figure