Utilizing Complex-valued Network for Learning to Compare Image Patches

Siwen Jiang, Wenxuan Wei, Shihao Guo, Hongguang Fu, Lei Huang · DOI

Abstract

At present, the great achievements of convolutional neural network(CNN) in feature and metric learning have attracted many researchers. However, the vast majority of deep network architectures have been used to represent based on real values. The research of complex-valued networks is seldom concerned due to the absence of effective models and suitable distance of complex-valued vector. Motived by recent works, complex vectors have been shown to have a richer representational capacity and efficient complex blocks have been reported, we propose a new approach for learning image descriptors with complex numbers to compare image patches. We also propose a new architecture to learn image similarity function directly based on complex-valued network. We show that our models can perform competitive results on benchmark datasets. We make the source code of our models publicly available.

Introduction

Image patch matching is a cornerstone of computer vision, essential for tasks like 3D reconstruction (SfM), robot navigation, and image retrieval. The goal is to determine if two small image snippets represent the same physical point in space under different lighting or viewpoints. While deep learning has revolutionized this field, most models operate entirely in the real-number domain.

The authors of this paper argue that real-valued networks often lose fine details during the encoding process. Complex numbers, however, possess a "phase" component that is mathematically well-suited to describing structural features like shapes, edges, and orientations. The primary challenge has historically been a lack of effective complex-valued models and suitable distance metrics to compare complex-valued feature vectors. This research addresses these gaps by proposing novel complex-valued architectures.

Methodology

The proposed approach centers on a "Complex Feature Module" that leverages complex-valued arithmetic to preserve structural information.

Complex-Valued Building Blocks

To construct these networks, standard CNN components are adapted for the complex domain. The models utilize complex-valued convolutions, a simplified Complex Batch Normalization (which normalizes real and imaginary parts independently for efficiency), and Complex ReLU (CRelu). These components are organized into residual blocks to facilitate the training of deeper networks.

Comparison of standard real-valued residual blocks (a) and the proposed complex-valued residual blocks (b).

Network Architectures: CCN and CTN

The authors propose two distinct architectures built upon the Complex Feature Module:

  1. Complex Channel Net (CCN): This model learns a similarity function directly. It takes a pair of patches as a single multi-channel input, processes them through complex-valued layers, and outputs a similarity score (0 to 1). It serves as an end-to-end classifier for patch matching.
  2. Complex Triple Net (CTN): This is a triplet-style network designed for metric learning. It maps patches into a complex-valued embedding space where similar patches are clustered together and dissimilar ones are pushed apart. This architecture is more practical for large-scale applications as it produces searchable descriptors.
Overview of the proposed architectures: (a) Complex Channel Net (CCN), (b) Complex Triple Net (CTN) training phase, and (c) CTN testing phase.

Key technical innovations include pre-processing input images with a Fast Fourier Transform (FFT), defining a specific distance formula for complex vectors, and adapting the "Polar Nucleus Softmax" (PNSoft) loss for the complex domain.

Experiments and Results

The models were evaluated on two industry-standard benchmarks: the Photo-Tour Dataset (Yosemite, Notre Dame, and Liberty subsets) and HPatches, which evaluates local descriptors under varying viewpoints and illumination.

Key Results

The Complex Triple Net (CTN) emerged as the top performer:

  • Photo-Tour: CTN achieved a mean FPR95 (False Positive Rate at 95% recall) of 4.54%. In comparison, the real-valued 2-ch Net scored 5.63%, and PN-Net scored 6.98%. Lower FPR95 indicates better performance.
  • HPatches: CTN outperformed the strong L2-Net baseline on the "Notredame" subset (1.32 vs 1.54).
  • Ablation Study: When complex weights were replaced with real ones, performance dropped across the board, confirming that the complex-valued mathematical framework is the primary driver of the improved results.

Conclusion

This research demonstrates that phase information in complex-valued descriptors helps networks retain structural details that real-valued models might discard, leading to better generalization across viewpoints. While complex-valued networks currently face higher training complexity and less optimized software ecosystems compared to real-valued networks, their superior representational capacity makes them a promising direction for computer vision. Future work will explore improved weight initialization strategies and specialized kernels for complex-valued backpropagation.

Summary updated

BibTeX
@misc{jiang2018utilizing,
  author = {Siwen Jiang and Wenxuan Wei and Shihao Guo and Hongguang Fu and Lei Huang},
  title = {{Utilizing Complex-valued Network for Learning to Compare Image Patches}},
  year = {2018},
  eprint = {1811.12035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.12035},
}
Figure