Modality Alignment across Trees on Heterogeneous Hyperbolic Manifolds

Wu Wei, Xiaomeng Fan, Yuwei Wu, Zhi Gao, Pengxiang Li, Yunde Jia, Mehrtash Harandi · OpenReview

Abstract

Modality alignment is critical for vision-language models (VLMs) to effectively integrate information across modalities. However, existing methods extract hierarchical features from text while representing each image with a single feature, leading to asymmetric and suboptimal alignment. To address this, we propose Alignment across Trees, a method that constructs and aligns tree-like hierarchical features for both image and text modalities. Specifically, we introduce a semantic-aware visual feature extraction framework that applies a cross-attention mechanism to visual class tokens from intermediate Transformer layers, guided by textual cues to extract visual features with coarse-to-fine semantics. We then embed the feature trees of the two modalities into hyperbolic manifolds with distinct curvatures to effectively model their hierarchical structures. To align across the heterogeneous hyperbolic manifolds with different curvatures, we formulate a KL distance measure between distributions on heterogeneous manifolds, and learn an intermediate manifold for manifold alignment by minimizing the distance. We prove the existence and uniqueness of the optimal intermediate manifold. Experiments on taxonomic open-set classification tasks across multiple image datasets demonstrate that our method consistently outperforms strong baselines under few-shot and cross-domain settings.

Introduction

In Vision-Language Models (VLMs) like CLIP, alignment typically involves matching the feature vector of an image to the feature vector of its corresponding text description. However, real-world semantics are inherently hierarchical. For instance, a biological species belongs to a nested hierarchy of genus, family, and class.

Comparison between previous asymmetric alignment methods and our proposed symmetric tree-to-tree alignment.

Current alignment paradigms are often asymmetric: they utilize hierarchical features for text but represent images as single, flat features. This asymmetry creates a "modality gap," where models struggle to capture the multi-level granularity present in visual data. Furthermore, visual data is inherently noisier than text labels, suggesting that the two modalities may not naturally reside in the same geometric space. As shown in Figure 1, traditional Euclidean alignment often leads to inferior, coarse-grained predictions, whereas symmetric alignment on hyperbolic manifolds enables optimal, fine-grained classification.

Methodology

The proposed "Alignment across Trees" framework addresses these issues through two primary innovations:

1. Semantic-Aware Visual Feature Extraction

Rather than relying solely on the final layer of a Vision Transformer (ViT), the model extracts class tokens from intermediate layers, which naturally capture coarser semantic information. A cross-attention mechanism is employed where textual features at various taxonomic levels act as queries to extract corresponding visual features. This process constructs a visual "feature tree" that mirrors the hierarchical structure of the text labels.

2. Heterogeneous Hyperbolic Alignment

While hierarchical structures are ideally represented in hyperbolic space due to its exponential expansion, the visual and textual trees possess different geometric properties. The framework embeds each modality into its own hyperbolic manifold with a learnable curvature ($c_1$ for text, $c_2$ for images). To bridge these distinct geometries, the authors derive an optimal intermediate manifold ($c_3$) that minimizes the Kullback–Leibler (KL) distance between the two distributions.

Overview of the proposed framework for alignment across heterogeneous hyperbolic manifolds.

Experimental Setup

The model was evaluated on the Taxonomic Open-Set (TOS) classification task across four diverse datasets:

  • Cifar100: 100 classes mapped to a generic taxonomy.
  • SUN: A scene recognition dataset.
  • ImageNet: The standard large-scale benchmark with hierarchical extensions.
  • Rare Species: A dataset featuring a rigorous biological taxonomy (Kingdom to Species), ideal for testing fine-grained hierarchical alignment.

Key Results and Insights

The proposed method consistently outperformed strong baselines, such as MaPLe and PromptSRC, across all evaluated settings.

  • Hierarchical Consistent Accuracy (HCA): This strict metric requires all ancestors in the taxonomic tree to be correctly predicted. The method achieved significant gains, improving HCA by up to 7.72% in 1-shot settings and 28.83% in 16-shot settings.
  • Open-Set Generalization: In "Base-to-Novel" tasks, the model demonstrated superior generalization. On Cifar100, it improved HCA by 5.66% on novel, unseen classes.
  • Visual Intuition: GradCAM visualizations (as seen in Figure 1) confirm that the model adaptively shifts its focus based on semantic level. For a bird species, it may attend to the whole body for the "Class" level while focusing on specific beak features for the "Genus" level.

Conclusion

By enforcing symmetry in hierarchical feature extraction and utilizing heterogeneous hyperbolic manifolds, this work effectively bridges the modality gap in VLMs. While the method currently depends on predefined taxonomies and introduces some computational complexity through manifold optimization, it provides a mathematically sound foundation for aligning complex, multi-level data structures. Future work may explore scaling this tree-to-tree alignment to larger models or other hierarchical modalities like audio and video.

Summary updated

BibTeX
@inproceedings{wei2026modality,
  author = {Wu Wei and Xiaomeng Fan and Yuwei Wu and Zhi Gao and Pengxiang Li and Yunde Jia and Mehrtash Harandi},
  title = {{Modality Alignment across Trees on Heterogeneous Hyperbolic Manifolds}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=F1uJKsaf0M},
}
Figure