Improving Visual Recognition with Hyperbolical Visual Hierarchy Mapping

Hyeongjun Kwon, Jinhyun Jang, Jin Kim, Kwonyoung Kim, Kwanghoon SohnCVPR 2024

Abstract

Visual scenes are naturally organized in a hierarchy, where a coarse semantic is recursively comprised of several fine details. Exploring such a visual hierarchy is crucial to recognize the complex relations of visual elements, leading to a comprehensive scene understanding. In this paper, we propose a Visual Hierarchy Mapper (Hi-Mapper), a novel approach for enhancing the structured understanding of the pre-trained Deep Neural Networks (DNNs). Hi-Mapper investigates the hierarchical organization of the visual scene by 1) pre-defining a hierarchy tree through the encapsulation of probability densities; and 2) learning the hierarchical relations in hyperbolic space with a novel hierarchical contrastive loss. The pre-defined hierarchy tree recursively interacts with the visual features of the pre-trained DNNs through hierarchy decomposition and encoding procedures, thereby effectively identifying the visual hierarchy and enhancing the recognition of an entire scene. Extensive experiments demonstrate that Hi-Mapper significantly enhances the representation capability of DNNs, leading to an improved performance on various tasks, including image classification and dense prediction tasks.

Introduction

Visual scenes are inherently hierarchical: a "car" is composed of "wheels," "doors," and "windows," which are themselves composed of smaller textures and edges. While modern Deep Neural Networks (DNNs) are excellent at extracting features, they often struggle to explicitly represent these structured relationships. Most DNNs operate in Euclidean space, which is "flat." In a hierarchy, the number of nodes grows exponentially with depth; Euclidean space lacks the geometric "room" to represent this growth without distorting the distances between elements. Furthermore, common similarity measures like cosine similarity are symmetric, whereas hierarchical relationships are fundamentally asymmetric—a "wheel" is part of a "car," but a "car" is not part of a "wheel."

To address these challenges, we introduce Hi-Mapper (Visual Hierarchy Mapper), a plug-and-play module designed to help DNNs understand the "part-to-whole" structure of visual scenes by leveraging the unique properties of hyperbolic geometry.

The Hi-Mapper Framework

Hi-Mapper identifies and encodes visual hierarchies through a multi-stage process that integrates probabilistic modeling with non-Euclidean geometry.

1. Probabilistic Hierarchy Tree

Instead of representing hierarchy nodes as fixed points, Hi-Mapper models them using probability distributions. Leaf nodes are represented as Gaussians, while higher-level "parent" nodes are modeled as a Mixture of Gaussians (MoG) of their children. This approach naturally captures the "inclusion" relationship, where a parent node covers a wider semantic area than its descendants.

2. Hierarchy Decomposition and Hyperbolic Mapping

A transformer-based module takes the raw feature map from a pre-trained backbone (such as ResNet or ViT) and "decomposes" it, assigning specific visual features to the corresponding nodes in the probabilistic tree. To solve the geometry mismatch, the identified hierarchy is mapped into hyperbolic space (specifically the Lorentz model). Hyperbolic space possesses constant negative curvature, providing the necessary capacity to represent branching tree structures with minimal distortion.

3. Hierarchical Contrastive Loss

The model is optimized using a novel hierarchical contrastive loss function. This loss pulls parent and child nodes together in hyperbolic space while pushing "sibling" nodes apart, ensuring the learned embeddings respect the intended tree structure.

4. Hierarchy Encoding

Finally, this structured hierarchical information is fused back into the global image representation. This enhances the final prediction capabilities for tasks ranging from simple classification to complex dense pixel predictions.

Experimental Results

We evaluated Hi-Mapper across three industry-standard benchmarks: ImageNet-1K (classification), MS COCO (detection and instance segmentation), and ADE20K (semantic segmentation). The module was tested across various architectures, including ResNet-50, EfficientNet-B4, DeiT, and Swin Transformers.

Performance Gains

Hi-Mapper consistently outperformed baseline models with only a marginal increase in computational cost:

  • ImageNet-1K: Boosted ResNet-50 performance by 2.0% (reaching 78.2%) and DeiT-Tiny by 2.6%.
  • MS COCO: Using a DeiT-S backbone, Hi-Mapper improved the Box AP (Average Precision) by 6.3 points over the vanilla version.
  • ADE20K: Achieved significant gains in semantic segmentation, demonstrating that understanding hierarchy helps the model better delineate boundaries between different objects.

Discussion and Insights

The success of Hi-Mapper highlights two critical insights for modern computer vision. First, hyperbolic geometry is essential for hierarchical tasks; experiments showed that attempting to learn these hierarchies in standard Euclidean space can actually degrade performance. The negative curvature of hyperbolic space is the "secret sauce" for stabilizing the learning of complex branching structures. Second, probabilistic modeling is superior to deterministic vectors for capturing semantic scale and uncertainty, allowing the model to distinguish between broad categories and specific components.

Conclusion and Future Work

Hi-Mapper provides a compelling argument for moving beyond "flat" representations and embracing the inherent geometry of the visual world. While the current implementation uses a fixed tree structure, future research may explore dynamic tree depths to better accommodate scenes of varying complexity. As a plug-and-play module, Hi-Mapper offers a practical and scalable upgrade for existing computer vision pipelines, significantly enhancing the structural understanding of deep neural networks.

Summary updated

BibTeX
@inproceedings{kwon2024improving,
  author = {Hyeongjun Kwon and Jinhyun Jang and Jin Kim and Kwonyoung Kim and Kwanghoon Sohn and Kwanghoon Sohn},
  title = {{Improving Visual Recognition with Hyperbolical Visual Hierarchy Mapping}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=KkPIMXBtbn},
}
Figure