Abstract
Deep Metric Learning (DML) aims to learn a feature space where semantically similar items are clustered together. While existing DML methods handle category shifts well, they often falter under domain shifts—such as transitioning from real-world photographs to sketches or paintings. This paper presents Self-Expanded Equalization (SEE), a novel framework designed for single-domain generalized DML. SEE iteratively expands the training distribution through Adaptive Domain Expansion (ADE) and aligns these distributions via Domain-Aware Equalization (DAE). By synthesizing diverse "hard" samples and enforcing structural consistency across domains, SEE achieves state-of-the-art performance on cross-domain benchmarks like DomainNet and extended versions of CUB-200-2011 and Cars196.
Introduction
Deep Metric Learning (DML) is a fundamental task in computer vision, focusing on learning an embedding space where the distance between points reflects their semantic similarity. This is crucial for applications like image retrieval, face recognition, and zero-shot learning. A significant challenge in DML is the discrepancy between training and testing distributions.
Traditional DML research primarily addresses category shift, where the model is tested on unseen classes within the same visual domain. However, real-world applications often encounter domain shift, where the visual style or environment changes (e.g., from a high-resolution photo to a hand-drawn sketch). Most existing domain generalization techniques require multiple source domains or explicit domain labels during training. In contrast, this work focuses on the more challenging single-domain generalized DML task: training on a single source domain to generalize across multiple unseen domains and categories.
Proposed Method: Self-Expanded Equalization (SEE)
The authors introduce Self-Expanded Equalization (SEE), a two-stage iterative framework that enhances the robustness of DML models without requiring external data or domain labels.
1. Adaptive Domain Expansion (ADE)
The goal of ADE is to synthesize diverse training samples that simulate potential domain shifts. Unlike standard data augmentation (e.g., rotation, cropping), ADE employs a "min-max" optimization strategy. It perturbs the pixels of source images to create "hard" samples that are pushed away from their respective class centers in the feature space. Crucially, a pixel-level constraint (Mean Squared Error) ensures these synthetic samples retain the semantic content of the original images. This process effectively "stretches" the training distribution, forcing the model to learn from a wider variety of visual styles.
2. Domain-Aware Equalization (DAE)
Once the synthetic samples are generated, the DAE module ensures the model learns domain-invariant features. DAE operates at two levels:
- Distribution-level Equalization: Using the Sliced Gromov-Wasserstein (SGW) distance, the framework aligns the relational structures of the source and augmented data. Instead of forcing individual points to match, it ensures that the relative distances between samples remain consistent across domains. If two birds are similar in the "Photo" domain, their counterparts should remain similar in the "Sketch" domain.
- Instance-level Equalization: A contrastive loss is applied to ensure that each augmented sample remains close to its specific source version in the embedding space, while being pushed away from other samples.
Experimental Evaluation
The SEE framework was evaluated across several challenging scenarios:
- Standard and Extended Benchmarks: The model was tested on CUB-200-2011 (birds) and Cars196. To test domain generalization, the authors created "Ext" versions of these datasets by transforming test images into "Painting" and "Water-painting" styles using generative models.
- DomainNet: A large-scale multi-domain dataset. The model was trained on the "Real" domain and evaluated on five others: Clipart, Infograph, Painting, Quickdraw, and Sketch.
Key Results
SEE consistently outperformed state-of-the-art DML baselines such as ProxyAnchor and SoftTriple.
- Cross-Domain Superiority: On the CUB-200-2011 Ext dataset (Real → Painting), SEE achieved a 41.43% Recall@1, significantly higher than the baseline ProxyAnchor's 31.77%.
- Robustness on DomainNet: When generalizing from real images to five diverse domains, SEE reached an average Recall@1 of 57.15%, surpassing the next best method (51.13%).
- Feature Space Quality: t-SNE visualizations confirmed that SEE produces tighter and more distinct clusters for unseen categories in unseen domains, indicating superior feature discriminability.
Discussion and Insights
The success of SEE stems from its focus on diversity over simple noise. Traditional adversarial training often produces perturbations that do not reflect realistic domain shifts. By expanding the "span" of the training data through ADE and enforcing geometric consistency through DAE, the model learns to ignore stylistic variations and focus on core semantic features.
However, the framework does have limitations. The ADE step is computationally intensive due to the pixel-level optimization. While the authors mitigate this by updating augmentations periodically, it remains a bottleneck compared to standard training. Additionally, the reliance on MSE for semantic consistency could be improved with more advanced perceptual losses.
Conclusion
Self-Expanded Equalization (SEE) provides a powerful solution for the single-domain generalized DML problem. By combining adaptive data expansion with relational distribution alignment, it enables models to handle both new categories and new visual domains effectively. Future work will explore more efficient augmentation strategies and the extension of this framework to multi-source domain generalization.
Summary updated