SOSNet: Second Order Similarity Regularization for Local Descriptor Learning

Yurun Tian, Xin Yu, Bin Fan, Fuchao Wu, Huub Heijnen, Vassileios Balntas · DOI

Abstract

Despite the fact that Second Order Similarity (SOS) has been used with significant success in tasks such as graph matching and clustering, it has not been exploited for learning local descriptors. In this work, we explore the potential of SOS in the field of descriptor learning by building upon the intuition that a positive pair of matching points should exhibit similar distances with respect to other points in the embedding space. Thus, we propose a novel regularization term, named Second Order Similarity Regularization (SOSR), that follows this principle. By incorporating SOSR into training, our learned descriptor achieves state-of-the-art performance on several challenging benchmarks containing distinct tasks ranging from local patch retrieval to structure from motion. Furthermore, by designing a von Mises-Fischer distribution based evaluation method, we link the utilization of the descriptor space to the matching performance, thus demonstrating the effectiveness of our proposed SOSR. Extensive experimental results, empirical evidence, and in-depth analysis are provided, indicating that SOSR can significantly boost the matching performance of the learned descriptor.

Introduction

Local image descriptors are essential components in many computer vision pipelines, including 3D reconstruction, image retrieval, and object recognition. Traditionally, deep learning models for these descriptors focus on First Order Similarity (FOS), which optimizes the distance between pairs of matching (positive) and non-matching (negative) patches in isolation. However, FOS ignores the broader structural context of the embedding space.

This paper introduces SOSNet, which incorporates Second Order Similarity (SOS) into the learning process. The core intuition is that if two patches are a true match, they should not only be close to each other but should also share a similar "view" of the rest of the embedding space—meaning they should have similar distances to all other points in the dataset.

Methodology

The primary innovation is the Second Order Similarity Regularization (SOSR) term. For a pair of matching descriptors $(x_i, x_i^+)$, SOSR calculates the difference between their distance vectors to other points within a training mini-batch. To maintain computational efficiency and mitigate noise from distant points, the loss focuses on the $K$ nearest neighbors (KNN) for each pair.

Visualization of embedding space on a unit sphere: (a) standard Triplet Loss vs (b) Triplet Loss with SOSR. SOSR leads to more compact and well-separated clusters.

In addition to SOSR, the authors utilize a Quadratic Hinge Triplet (QHT) Loss. Unlike the standard linear hinge loss, QHT adaptively weights gradients based on loss magnitude, leading to more stable training. To evaluate the model's effectiveness, the authors also propose a metric based on the von Mises-Fisher (vMF) distribution, which mathematically measures how well the descriptors utilize the unit hypersphere.

Experimental Results

SOSNet was rigorously tested on several industry-standard benchmarks:

  • UBC Phototour: SOSNet achieved a mean False Positive Rate (FPR@95%) of 1.03%, a significant improvement over the previous state-of-the-art, HardNet (1.51%).
  • HPatches: This large-scale dataset tests verification, matching, and retrieval under varying conditions. SOSNet set new records across all three tasks, outperforming specialized models like DOAP and GeoDesc.
  • ETH SfM: In real-world Structure-from-Motion tasks, SOSNet produced significantly denser 3D reconstructions. For example, in the "Madrid Metropolis" sequence, it registered 844 images compared to SIFT's 500.
HPatches benchmark results comparing SOSNet-HPa against other state-of-the-art descriptors across verification, matching, and retrieval tasks.

Key Insights

The vMF analysis provided deep insights into how SOSR affects the embedding space. In low-dimensional visualizations, SOSR makes clusters more compact. However, in the high-dimensional (128D) space used for descriptors, SOSR encourages the model to exploit more of the hypersphere's volume. This spreading effect reduces interference between different classes while maintaining high consistency for matching pairs.

Conclusion and Future Work

SOSNet demonstrates that regularizing the second-order structure of the embedding space significantly enhances the discriminative power of local descriptors. While highly effective, the current model does not explicitly handle extreme geometric transformations like large rotations. Future research could integrate Spatial Transformer Networks (STN) to address these challenges and further optimize the computational balance of the SOS calculation during training.

Summary updated

BibTeX
@inproceedings{tian2019sosnet,
  author = {Yurun Tian and Xin Yu and Bin Fan and Fuchao Wu and Huub Heijnen and Vassileios Balntas},
  title = {{SOSNet: Second Order Similarity Regularization for Local Descriptor Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.01127},
}
Figure