Learning Affinity with Hyperbolic Representation for Spatial Propagation

Jin-Hwi Park, Jaesung Choe, Inhwan Bae, Hae-Gon JeonICML 2023

Overview

This paper introduces the Hyperbolic Affinity learning Module (HAM), a novel approach that leverages hyperbolic geometry to better model pixel-wise relationships in images. By embedding features into a Poincaré ball, HAM captures hierarchical structures more effectively than traditional Euclidean methods. This geometric shift significantly reduces "bleeding errors" at object boundaries, leading to marked improvements in dense prediction tasks like depth completion and semantic segmentation.

The Problem: The Limits of Flat Space

In computer vision, Spatial Propagation Networks (SPNs) are widely used to refine initial predictions—such as a blurry depth map or a coarse segmentation mask. They do this by "propagating" information between pixels based on their affinity, or how similar and related they are.

Historically, these affinities have been calculated in Euclidean space. However, the authors argue that Euclidean space is a poor fit for image data, which inherently possesses a hierarchical or tree-like structure (e.g., scenes contain objects, objects contain parts, parts contain textures). Forcing a tree-like hierarchy into a flat Euclidean space causes high distortion. In practice, this distortion manifests as "bleeding errors," where information from a foreground object leaks into the background because the affinity at the boundary is not distinct enough.

The Solution: Hyperbolic Affinity Learning Module (HAM)

The core contribution of this work is the Hyperbolic Affinity learning Module (HAM). Instead of relying on standard convolutions, HAM operates in hyperbolic space using the Poincaré ball model.

Key technical innovations include:

  • Hyperbolic Embedding: The module uses exponential maps to project standard CNN features from Euclidean space into the hyperbolic manifold.
  • $\beta$-priority: Because hyperbolic space is "curved," the spatial order of pixels can become distorted. The $\beta$-priority mechanism rearranges neighboring pixels based on their hyperbolic distance, maintaining consistent positional relationships during convolution.
  • Geodesic Weights: HAM assigns weights based on hyperbolic geodesic distances (the shortest path on a curved surface). This naturally prioritizes semantically similar pixels while suppressing noise.
  • Plug-and-Play Integration: HAM is designed as a differentiable layer that can be seamlessly swapped into existing SPN architectures (like CSPN or NLSPN) without adding any extra learnable parameters.

Key Insights

  • The "Distinction Property": In hyperbolic space, the distance between points grows exponentially as you move toward the edge of the disk. This geometry naturally "stretches" the distance between unrelated pixels (such as those on opposite sides of an object boundary) while keeping related pixels close together. Consequently, the affinity map becomes much sharper and more binary exactly where it matters.
  • Quantifying "Tree-likeness": The authors utilize a metric called $\delta$-hyperbolicity to demonstrate that pixel features in common datasets genuinely exhibit a tree-like structure. This provides a strong mathematical justification for why hyperbolic geometry outperforms Euclidean geometry for image representation.
  • Parameter Efficiency: Because the performance boost stems from the geometry of the representation rather than added depth or complexity, HAM achieves superior results using the exact same number of parameters as baseline models.

Datasets and Key Results

The authors evaluated HAM across a comprehensive suite of benchmarks to demonstrate its versatility, including Depth Completion (NYUv2, ScanNet, Virtual-KITTIv2, KITTI-DC) and Semantic Segmentation (Pascal VOC 2012, NYUv2 40-class, Pascal-Context, ADE20K, COCO-Stuff10K).

The results highlight consistent improvements, particularly under challenging conditions:

  • Depth Completion: On the NYUv2 dataset, integrating HAM reduced the Root Mean Squared Error (RMSE) from 0.116 (baseline) to 0.102.
  • Semantic Segmentation: On Pascal VOC, HAM improved the mean Intersection over Union (mIoU) to 71.16, outperforming both Euclidean baselines and naive hyperbolic implementations.
  • Robustness to Sparsity: HAM excels when data is scarce. In depth completion tests using only 100 random samples (extremely sparse conditions), HAM maintained significantly higher accuracy than traditional SPNs, which typically fail as propagation "seeds" become sparse.
  • Qualitative Superiority: Visual results confirm that HAM successfully preserves thin, intricate structures—such as chair legs, bicycle frames, and distant tree branches—that are routinely blurred out by standard propagation methods.

Limitations and Future Work

While HAM presents a significant step forward, the authors note a few areas for future exploration:

  • Optimization Stability: The current implementation uses Euclidean optimization for stability. While Riemannian optimization is the mathematically "native" way to train in hyperbolic spaces, it remains difficult to stabilize in deep networks.
  • Fixed Curvature: In this study, the curvature of the hyperbolic space ($\kappa$) is treated as a fixed hyperparameter. The authors suggest that dynamic curvature—where the network learns to adjust the "curviness" of the space for different images or iterations—could yield even better results.
  • Computational Overhead: Although HAM does not add learnable parameters, the mathematical operations required for hyperbolic space (such as Möbius addition and multiplication) are more computationally intensive than standard linear algebra. This could impact real-time performance on low-power hardware.

Summary updated

BibTeX
@inproceedings{park2023learning,
  author = {Jin-Hwi Park and Jaesung Choe and Inhwan Bae and Hae-Gon Jeon},
  title = {{Learning Affinity with Hyperbolic Representation for Spatial Propagation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=StszTN_xefA},
}
Figure