Compositional Entailment Learning for Hyperbolic Vision-Language Models

## Abstract

Abstract Image-text representation learning forms a cornerstone in vision-language models, where pairs of images and textual descriptions are contrastively aligned in a shared embedding space. Since visual and textual concepts are naturally hierarchical, recent work has shown that hyperbolic space can serve as a high-potential manifold to learn vision-language representation with strong downstream performance. In this work, for the first time we show how to fully leverage the innate hierarchical nature of hyperbolic embeddings by looking beyond individual image-text pairs. We propose Compositional Entailment Learning for hyperbolic vision-language models. The idea is that an image is not only described by a sentence but is itself a composition of multiple object boxes, each with their own textual description. Such information can be obtained freely by extracting nouns from sentences and using openly available localized grounding models. We show how to hierarchically organize images, image boxes, and their textual descriptions through contrastive and entailment-based objectives. Empirical evaluation on a hyperbolic vision-language model trained with millions of image-text pairs shows that the proposed compositional learning approach outperforms conventional Euclidean CLIP learning, as well as recent hyperbolic alternatives, with better zero-shot and retrieval generalization and clearly stronger hierarchical performance. Code to be released.

## 1 Introduction

Vision-language modeling has witnessed rapid progress in recent years with innovative approaches such as CLIP (Radford et al., ) and ALIGN (Jia et al., ) using extensive vision-language data to train encoders for understanding visual and textual content simultaneously. Such encoders align visual scenes with textual descriptions in a shared high-dimensional Euclidean space, facilitating semantic understanding (Radford et al., ). While effective, conventional vision-language models only take a holistic approach to image-text representation learning, neglecting the intrinsic hierarchy and composition of elements within images. Indeed, a visual scene is commonly composed of multiple objects interacting with one another to form a precise context. See for example Fig. 1(b) with description: “*Mineral water* with *fresh herbs* in a *glass carafe* on a *garden table*”.
Individually, these objects provide limited semantic meaning. Only through the interactions between these do we understand the specific context of both the scene and its parts, characterizing the single entities (cf. Fig. 1(a)). This object-scene hierarchy is analogous to a parent-child connection in a discrete tree where broader concepts are closer to the root while specific concepts reside deeper in the tree. These tree-like structures cannot be well represented in Euclidean space due its polynomial volume growth (Matoušek, ), whereas hyperbolic geometry does accommodate the exponential growth of trees (Gromov, ), making it more suitable for representing hierarchies.

Recently, Desai et al. () introduced MERU, a hyperbolic contrastive vision-language model. MERU projects Euclidean embeddings from image and text encoders onto hyperbolic space and enforces *inter-modal* (text to image) partial ordering (Vendrov et al., ) using an entailment loss (Ganea et al., ; Le et al., ) when optimizing encoder weights. Such hyperbolic image-text alignment has demonstrated strong quantitative performance on zero-shot downstream tasks, as well as increased interpretability of the shared embedding space. They, however, ignore the *intra-modal* hierarchical compositions of image-text pairs. Indeed, there is hierarchical semantics in language (Everaert et al., ), which has been leveraged to embed textual data in hyperbolic space (Dhingra et al., ). In the vision domain, work by Ge et al. () uses object-centric scene hierarchies to learn a hyperbolic space where visually similar objects are clustered near the origin and scenes consisting of them are descendants. Zhong et al. () propose RegionCLIP that only learns regional representations using contrastive learning and knowledge distillation. These prior works beg the question of what strategy can be adapted to compound the individual benefits of the inter-modal hierarchy and the two intra-modal hierarchies to encompass scene and region level understanding.

Figure: ((a))
Refer to caption: x1.png

To this end, we introduce Hyperbolic Compositional CLIP (HyCoCLIP), a contrastive learning method that accounts for compositional orders in both inter-modal and intra-modal settings in hyperbolic space. We approach the problem by using explicit hierarchies while training the encoders. This hierarchy is constituted of object crops (*image boxes*) within an image and corresponding nouns/phrases (*text boxes*) within the text as broader concepts of the whole image-text concept. We outline a robust hierarchical learning objective by using both entire images and image boxes, as well as complete captions and text boxes. This strategy involves both inter-modal hierarchies, where text generally provides broader context than images, and intra-modal hierarchies, where we consider the “boxes” more general than the complete image. In the hierarchical spatial representation, broader concepts are embedded near the origin of the metric space, while more fine-grained concepts are positioned towards the border, akin to tree graphs, see Fig. 1(c).

We show that HyCoCLIP outperforms CLIP and MERU on zero-shot image classification and is competitive on zero-shot retrieval and object detection when trained on a 20M pre-training dataset. Additionally, we show that HyCoCLIP improves on hierarchical classification tasks compared to the baselines and that its representation space is more interpretable and hierarchically aligned. Our contributions are summarized as follows:

- •
We introduce HyCoCLIP for learning vision-language representations in a shared hyperbolic space using scene compositions that are semantically and hierarchically aligned.
- •
We propose Compositional Entailment Learning, where image-text compositions are optimized through hyperbolic contrastive and entailment cone losses.
- •
We demonstrate empirically that HyCoCLIP is more hierarchically aware and is highly competitive to existing vision-language models.

## 2 Hyperbolic Compositional CLIP - HyCoCLIP

Figure: Figure 2: An overview of HyCoCLIP. Text and image boxes are extracted offline from image-text datasets (sides). Next, HyCoCLIP’s encoder modules embed the images and texts, projecting the representations in the hyperbolic latent space. HyCoCLIP preserves the inter-modal and intra-modal relationships by accommodating broader/finer concepts close to the center/border and by using entailment cones to give an interpretable structure to the learned latent space (cf. Fig. 1(c)).
Refer to caption: extracted/5913507/assets/hycoclip/HyCoCLIP_diagram.png

We propose a compositional learning scheme that enforces the semantic alignment of latent representations in the hyperbolic space, explicitly modeling intra- and inter-modal relationships of visual and language data by leveraging their joint hierarchical nature. Here, we first provide a short background with the required hyperbolic functions to make such compositional learning possible. Afterward, we outline our compositional encoding of image-text pairs.

### 2.1 Background

Hyperbolic geometry is a non-Euclidean geometry characterized by a constant negative curvature. The resulting space has the desirable property that volumes of subsets can grow exponentially as a function of their radius, making it an ideal choice for learning representations of data with an inherent hierarchical or tree-like structure (Sarkar, ; Nickel & Kiela, ; Krioukov et al., ). While several isometric models are used in literature for modeling hyperbolic space, we limit our background discussion to the Lorentz (or hyperboloid) model used in this work and refer to Cannon et al. (); Peng et al. () for detailed information on the other models.

The Lorentz model, denoted by $\mathbb{L}^{n}$, is an $n$-dimensional manifold represented as the upper sheet of a two-sheeted hyperboloid in $(n+1)$-dimensional Minkowski spacetime. For each vector $\mathbf{p}\in\mathbb{R}^{n+1}$, the first dimension is taken as the *time*-axis, denoted $p_{0}$, and the remaining $n$ dimensions as the *spatial*-coordinates, denoted $\bm{\tilde{p}}\in\mathbb{R}^{n}$. This model is described as

$$ $\mathbb{L}^{n}=\Big{\{}\mathbf{p}\in\mathbb{R}^{n+1}:\langle\mathbf{p},\mathbf {p}\rangle_{\mathbb{L}}=-\frac{1}{\kappa},p_{0}=\sqrt{1/\kappa+\|\bm{\tilde{p} }\|^{2}},\kappa>0\Big{\}},$ (1) $$

where $-\kappa\in\mathbb{R}$ is the curvature of the space and $\langle.,.\rangle_{\mathbb{L}}$ is the Lorentzian inner product defined for $\mathbf{p},\mathbf{q}\in\mathbb{L}^{n}$ as

$$ $\langle\mathbf{p},\mathbf{q}\rangle_{\mathbb{L}}=-p_{0}q_{0}+\langle\bm{\tilde {p}},\bm{\tilde{q}}\rangle_{\mathbb{E}},$ (2) $$

with $\langle.,.\rangle_{\mathbb{E}}$ denoting the Euclidean inner product.
The Lorentzian distance between two points in $\mathbb{L}^{n}$ is the length of the shortest path (geodesic) connecting them, which can be computed as

$$ $d_{\mathbb{L}}(\mathbf{p},\mathbf{q})=\sqrt{1/\kappa}\cdot\cosh^{-1}\big{(}- \kappa\langle\mathbf{p},\mathbf{q}\rangle_{\mathbb{L}}\big{)},\quad\mathbf{p}, \mathbf{q}\in\mathbb{L}^{n}.$ (3) $$

This metric induces the Lorentzian norm $\|\mathbf{p}\|_{\mathbb{L}}=\langle\mathbf{p},\mathbf{p}\rangle_{\mathbb{L}}$.
The tangent space $T_{\mathbf{p}}\mathbb{L}^{n}$ is well-defined for all the points $\mathbf{p}\in$ $\mathbb{L}^{n}$, and the exponential map represents the projecting map from the tangent space to the hyperboloid. Given a point $\mathbf{v}\in T_{\mathbf{p}}\mathbb{L}^{n}$ the exponential map can be computed as

$$ $\exp_{\mathbf{p}}^{\kappa}(\mathbf{v})=\cosh(\sqrt{\kappa}\|\mathbf{v}\|_{ \mathbb{L}})\mathbf{p}+\frac{\sinh(\sqrt{\kappa}\|\mathbf{v}\|_{\mathbb{L}})}{ \sqrt{\kappa}\|\mathbf{v}\|_{\mathbb{L}}}\mathbf{v}.$ (4) $$

Such a map can be used to move from Euclidean space to hyperbolic space by considering Euclidean vectors to be tangent vectors at the origin $\mathbf{0}=(\sqrt{1/\kappa},0,\ldots,0)^{T}$ of the hyperbolic space and using $\exp_{\mathbf{0}}^{\kappa}$ to project these onto the hyperboloid (Khrulkov et al., ).

### 2.2 Compositional Entailment Learning

We strive to learn the hierarchical compositional relations of images, boxes, and textual descriptions. Our idea is based on the following observation: the content inside a box of an image is hierarchically more general than the entire image. While counter-intuitive at first glance, Fig. 1(b) shows why this is the case: the box shows an object and the entire image additionally shows the context in which the object occurs, making it a semantically more specific scenario. From a hyperbolic perspective, semantically general/broad concepts are embedded closer to the origin, while more fine-grained concepts are positioned towards the border, akin to tree graphs (cf. Fig. 1(c)).

In this work, we are given a dataset $D=\{(I_{k},T_{k})\}_{k=1}^{K}$ of $K$ image-text pairs. Our goal is to train image and text encoders with a shared embedding space to align the visual and semantic inputs. The method is summarized in Fig. 2. Let $(I^{\text{box}}_{k},T^{\text{box}}_{k})$ be the local box with a short description from an image-text pair obtained following the automated procedure detailed in Appendix A. We propose a Compositional Entailment Learning objective in hyperbolic space to optimize the hierarchical compositions. Our approach consists of two parts, namely a compositional contrastive loss and a compositional entailment loss which we discuss next.

##### Hierarchical Compositional Contrastive (hCC) learning.

Image-text models commonly rely on contrastive objectives to align and distribute the multi-modal data. In our approach, we rely on hyperbolic embeddings to align visuals and text. Let $f_{I}(\cdot)$ and $f_{T}(\cdot)$ denote arbitrary encoders for the image and text inputs respectively. And, let $g_{I}(I_{k})=\exp_{\mathbf{0}}^{\kappa}(f_{I}(I_{k}))$ and $g_{T}(T_{k})=\exp_{\mathbf{0}}^{\kappa}(f_{T}(T_{k}))$ denote the hyperbolic representation of image $I_{k}$ and textual description $T_{k}$ respectively. To compute the contrastive loss over image-text pairs in a batch $B$, we take the negative Lorentzian distance as our similarity metric and formulate it with the softmax, using temperature $\tau$, for a batch of size ($B$) containing images ($I$) and text ($T$) as

$$ $L^{*}_{cont}(I,T)=-\sum_{i\in B}\log\frac{\exp\bigl{(}d_{\mathbb{L}}(g_{I}(I_{ i}),g_{T}(T_{i}))/\tau\bigl{)}}{\sum_{k=1,k\neq i}^{B}\exp\bigl{(}d_{\mathbb{L }}(g_{I}(I_{i}),g_{T}(T_{k}))/\tau\bigl{)}},$ (5) $$

where negatives for an image are picked from the texts in the batch. Similarly, we can define the loss when picking negatives for a text from images in the batch as $L^{*}_{cont}(T,I)$. To extend such a contrastive setup with our image-text compositions, we have to consider that due to the generalized information in a box, different images in a batch can have similar box-level information. To avoid unwanted negatives in a batch, we only contrast the box image with other entire images, and vice versa which have specific information. This avoids negative alignment between image-box pairs and boxes from different images. The final hierarchical Compositional Contrastive (hCC) loss is formulated as

$$ $\displaystyle hCC(I,T,I^{box},T^{box})$ $\displaystyle=\frac{1}{4}\Bigl{(}\underbrace{L^{*}_{cont}(I,T)+L^{*}_{cont}(T, I)}_{\text{specific-info contrast}}+\underbrace{L^{*}_{cont}(I^{box},T)+L^{*}_ {cont}(T^{box},I)}_{\text{general-info contrast}}\Bigl{)}.$ (6) $$

##### Hierarchical Compositional Entailment (hCE) learning.

Ganea et al. () introduced hyperbolic entailment cones that generalize the idea of partial order embeddings (Vendrov et al., ) by using the inherent hierarchical structure of the hyperbolic space. Entailment cones define a region $\Re_{q}$ for every possible point $\mathbf{q}$ in the space such that all points $\mathbf{p}\in\Re_{q}$ are semantically linked to $\mathbf{q}$ as its child concepts. As such, points in $\Re_{q}$ are expected to contain specific information for the general concept $\mathbf{q}$. Considering the Lorentz model $\mathbb{L}^{n}$, the half-aperture of these conical regions ($\Re_{q}$) is formulated by Le et al. (); Desai et al. () as

$$ $\omega(\mathbf{q})=\sin^{-1}\left(\frac{2K}{\sqrt{\kappa}\|\bm{\tilde{q}}\|} \right),$ (7) $$

where $-\kappa$ is the curvature of the space and a constant $K=0.1$ is set to limit values near the origin (see Ganea et al. ()). The aperture inversely depends on the norm $\|\bm{\tilde{q}}\|$. Inferring from this, a general concept with a wider aperture would lie closer to the origin. A specific concept would have a narrower aperture and lie further from the origin in the hyperbolic space.

To learn partial orders in this space, specific concepts $\mathbf{p}$ must be pushed to be within the aperture $\omega(\mathbf{q})$. This is done by penalizing encoders with the angular residual of outward point $\mathbf{p}$ having an exterior angle $\phi(\mathbf{p},\mathbf{q})$ as shown in Fig. 1(c). This is formulated by Le et al. (); Desai et al. () as

Figure: Figure 3: Aperture threshold $\eta$ scaling the aperture $\omega$ to increase or decrease the width of the entailment cone.
Refer to caption: extracted/5913507/assets/hycoclip/Entailment_thresh.png

$$ $L_{ent}(\mathbf{p},\mathbf{q})=\max(0,\phi(\mathbf{p},\mathbf{q})-\omega( \mathbf{q})),$ (8) $$

where the exterior angle is given by,

$$ $\phi(\mathbf{p},\mathbf{q})=\cos^{-1}\left(\frac{p_{0}+q_{0}\kappa\langle \mathbf{p},\mathbf{q}\rangle_{\mathbb{L}}}{\|\bm{\tilde{q}}\|\sqrt{(\kappa \langle\mathbf{p},\mathbf{q}\rangle_{\mathbb{L}})^{2}-1}}\right).$ (9) $$

However, intuitively observing the entailment loss presented in Eq. 8 shows that this loss would push any outward point $\mathbf{p}$ only towards the $\Re_{q}$ region’s border. Hence, we add a threshold to the half-aperture $\omega(\mathbf{q})$ effectively making it flexible to accommodate $\mathbf{p}$ at various spatial distances from $\mathbf{q}$, see Fig. 3.
We reformulate Eq. 8 with half-aperture threshold $\eta$ as

$$ $L^{*}_{ent}(\mathbf{p},\mathbf{q})=\max(0,\phi(\mathbf{p},\mathbf{q})-\eta \omega(\mathbf{q})).$ (10) $$

Entailment cones enable us to enforce the hierarchical image-text relations given by the compositions. We formulate the Hierarchical Compositional Entailment (hCE) loss by considering that images and textual descriptions are not identical, but that text precedes image, akin to Desai et al. (). We additionally consider the relation *whole $\Rightarrow$ box* for both images and texts. Hence, the hCE loss would comprise both image-text inter-modality entailments and text-text, image-image intra-modality entailments as

$$ $\displaystyle hCE(I,T,I^{box},T^{box})$ $\displaystyle=\underbrace{L^{*}_{ent}(I^{box},T^{box})+L^{*}_{ent}(I,T)}_{ \text{inter-modality entailment}}+\underbrace{L^{*}_{ent}(I,I^{box})+L^{*}_{ ent}(T,T^{box})}_{\text{intra-modality entailment}}.$ (11) $$

In Fig. 1(c) we visualize how the image-text compositions should be organized in hyperbolic compositional entailment.

##### Hierarchical Compositional (hC) learning.

We aggregate the losses to form the overall hierarchical Compositional (*hC*) loss for HyCoCLIP by taking a weighted sum of the two loss components:

$$ $hC=hCC+\gamma hCE.$ (12) $$

In Appendix B, we detail all hyperparameters, thresholds, and further implementation details.

##### Computational complexity.

Our approach enables us to double the amount of visual and textual data to learn from. The training time scales linear with the increase in training volume; for ViT-B/16, HyCoCLIP requires 73 hours of training, compared to 46 hours for MERU and 45 hours for CLIP. We note that our method inference maintains the same efficiency as CLIP and MERU and allows for scalable deployment.

## 3 Experiments

### 3.1 Benchmark

##### Datasets

We develop our models using grounded vision-language pairs. This could be human-annotated such as the Localized narratives subset of Open Images (Pont-Tuset et al., ) or the Flickr30K Entities dataset (Plummer et al., ). However, the sizes of these datasets are fairly limited considering the intensive efforts of manual labelling. Hence, we depend on automatic grounded information generated by pre-trained phrase grounding models. Several large-scale grounded language-vision datasets are publicly available by Li et al. () and Peng et al. (). We train our models using the large-scale training corpus - Grounded Image-Text Pairs (GRIT) dataset (Peng et al., ) containing 20.5 million grounded vision-language pairs which are processed from the even larger COYO-700M (Byeon et al., ) dataset. Information on the grounding procedure is added in Appendix A. We similarly use the grounding procedure on the RedCaps dataset (Desai et al., ) originally used to train MERU. Additionally, we use the smaller-scale grounded Conceptual Captions 3M (CC3M) (Li et al., ; Sharma et al., ) dataset for hyperparameter search.

##### Baseline Comparisons

We compare HyCoCLIP against CLIP and MERU. We reproduce the CLIP and MERU models by training on the RedCaps dataset, reducing the batch size to 768 to fit on our available compute. We further retrain CLIP and MERU from scratch on the GRIT dataset. To fairly evaluate the impact of including image-text boxes, we also retrain CLIP and MERU when image-text boxes are included as additional pre-training samples.

### 3.2 Downstream Tasks

Figure: Figure 4: Histogram of ratios of box area wrt the full image for GRIT and RedCaps. The latter reports generally larger crops, indicating lower precision in grounding concepts.
Refer to caption: x3.png

To assess performance, we evaluate HyCoCLIP on several downstream tasks. For zero-shot image classification, the label set is fitted to multiple prompts which are embedded using the text encoder and then averaged to obtain a single embedding per label. The closest text embedding is picked from the collection as the predicted class for an image. We report the model’s accuracy on 16 image classification datasets. Similarly, we assess our method on zero-shot retrieval tasks to determine if complex concepts, like scenes and captions, are accurately preserved in the representation space. Further, we evaluate the models on object detection task to analyze the regional understanding of HyCoCLIP. We also evaluate the hierarchical nature of HyCoCLIP using multiple hierarchical metrics. Additionally, we assess the scene understanding capability of HyCoCLIP on two compositional benchmarks - VL-Checklist (Zhao et al., ) and VG Attribution (Yüksekgönül et al., ).

**Table 1: Zero-shot image classification evaluation. $\dagger$ denotes reproduced results from MERU. When using boxes during pre-training, numbers in squared brackets represent the additional box-pairs counts. For RedCaps, we find results for CLIP and MERU consistent with Desai et al. () even when trained with lower batch size. Bold-face numbers are the best overall performances, for GRIT. Our method outperforms baselines on 15 out of the 16 evaluation datasets.**
|  |  |  |  | General datasets | Fine-grained datasets | Misc. datasets |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | w/ boxes | samples (M) | ImageNet | CIFAR-10 | CIFAR-100 | SUN397 | Caltech-101 | STL-10 | Food-101 | CUB | Cars | Aircraft | Pets | Flowers | DTD | EuroSAT | RESISC45 | Country211 |
| RedCaps |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
|  | CLIP^† | ✗ | 11.4 | 32.5 | 66.7 | 35.8 | 26.7 | 60.8 | 89.8 | 72.5 | 29.8 | 11.1 | 1.3 | 72.5 | 44.9 | 16.4 | 30.1 | 27.7 | 5.0 |
|  | CLIP | ✓ | 11.4 [6.3] | 30.2 | 76.5 | 42.4 | 25.8 | 62.3 | 89.5 | 69.6 | 25.7 | 8.5 | 2.2 | 65.3 | 38.6 | 13.6 | 36.6 | 28.5 | 4.6 |
|  | MERU^† | ✗ | 11.4 | 31.4 | 65.9 | 35.2 | 26.8 | 58.1 | 89.3 | 71.4 | 29.0 | 8.3 | 1.6 | 71.0 | 40.9 | 17.0 | 29.9 | 29.3 | 4.7 |
| ViT<br>S/16 | MERU | ✓ | 11.4 [6.3] | 29.9 | 76.4 | 39.9 | 26.6 | 62.3 | 89.5 | 68.4 | 25.4 | 8.9 | 1.2 | 67.2 | 37.6 | 13.0 | 30.5 | 27.6 | 4.3 |
| GRIT |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
|  | CLIP | ✗ | 20.5 | 36.7 | 70.2 | 42.6 | 49.5 | 73.6 | 89.7 | 44.7 | 9.8 | 6.9 | 2.0 | 44.6 | 14.8 | 22.3 | 40.7 | 40.1 | 5.1 |
|  | CLIP | ✓ | 20.5 [35.9] | 36.2 | 84.2 | 54.8 | 46.1 | 74.1 | 91.6 | 43.2 | 11.9 | 6.0 | 2.5 | 45.9 | 18.1 | 24.0 | 32.4 | 35.5 | 4.7 |
|  | MERU | ✗ | 20.5 | 35.4 | 71.2 | 42.0 | 48.6 | 73.0 | 89.8 | 48.8 | 10.9 | 6.5 | 2.3 | 42.7 | 17.3 | 18.6 | 39.1 | 38.9 | 5.3 |
|  | MERU | ✓ | 20.5 [35.9] | 35.0 | 85.0 | 54.0 | 44.6 | 73.9 | 91.6 | 41.1 | 10.1 | 5.6 | 2.2 | 43.9 | 15.9 | 24.5 | 39.3 | 33.5 | 4.8 |
| ViT<br>S/16 | HyCoCLIP | ✓ | 20.5 [35.9] | 41.7 | 85.0 | 53.6 | 52.5 | 75.7 | 92.5 | 50.2 | 14.7 | 8.1 | 4.2 | 52.0 | 20.5 | 22.3 | 33.8 | 45.7 | 5.2 |
|  | CLIP | ✗ | 20.5 | 40.6 | 78.9 | 48.3 | 53.0 | 76.7 | 92.4 | 48.6 | 10.0 | 9.0 | 3.4 | 45.9 | 21.3 | 23.4 | 37.1 | 42.7 | 5.7 |
|  | MERU | ✗ | 20.5 | 40.1 | 78.6 | 49.3 | 53.0 | 72.8 | 93.2 | 51.5 | 11.9 | 8.6 | 3.7 | 48.5 | 21.2 | 22.2 | 31.7 | 44.2 | 5.6 |
| ViT<br>B/16 | HyCoCLIP | ✓ | 20.5 [35.9] | 45.8 | 88.8 | 60.1 | 57.2 | 81.3 | 95.0 | 59.2 | 16.4 | 11.6 | 3.7 | 56.8 | 23.9 | 29.4 | 35.8 | 45.6 | 6.5 |

##### Zero-shot image classification

From Table 1, we find our reproduced results for CLIP and MERU are fairly consistent with Desai et al. () even when trained with smaller batch size on RedCaps. On grounding RedCaps and filtering noise, we notice only 5.8 million image-text pairs are retained containing 6.3 million boxes. Training the baselines with these additional boxes also demonstrates reduced performance. Alternatively, the quantity of data is significantly higher for GRIT with 20.5 million image-text pairs and 35.9 million boxes in total. To differentiate between the datasets, we compare the ratio of the box area with the image area of all data points and plot a histogram in Fig. 4. A lower ratio signifies that phrases have more localized information in the image and constitute a better semantic parent for the whole image. This is evident for GRIT while boxes generated for RedCaps do not seem to localize well. We, therefore, recommend GRIT over RedCaps for grounded pre-training and thus report the results of models pre-trained on GRIT. We find that HyCoCLIP performs best across a wide range of datasets and settings when pre-training is done on GRIT. We especially note the performance on ImageNet, where we obtain an accuracy of 45.8% compared to 40.1% (MERU) and 40.6% (CLIP). Interestingly, adding image-text boxes to CLIP and MERU training does not improve performance, despite nearly doubling the samples.

##### Zero-shot retrieval

For the retrieval task, the top-k image/text embeddings are picked from a collection for input text/image embedding based on the distance score (Eq. 3). We perform this task zero-shot on the COCO validation set (Lin et al., ) and the Flickr30K test set (Young et al., ; Karpathy & Fei-Fei, ). We show the retrieval results in Table 2.
We find that our method performs slightly worse on Flickr text retrieval while demonstrating increased performance on image retrieval over CLIP and MERU. We also note a significant decrease in the performance of CLIP and MERU when adding local information. These results further highlight the need for our approach. Naively adding these boxes as additional samples is not effective because the boxes are often without broader context, and the text is highly generic compared to the whole images. Only by optimizing for their hierarchical compositional nature as done in our approach is it possible to get better performance.
Our method aims to obtain a hierarchically aligned representation space, but this is not necessarily beneficial for the task of retrieval, where proximity of text and image embeddings is key. Regardless, our approach remains highly competitive.

**Table 2: Zero-shot retrieval, detection, and hierarchical classification. HyCoCLIP performs best in image retrieval, and hierarchical classification and is competitive in text retrieval and object detection. Bold figures indicate the best results overall.**
|  |  |  | Text retrieval | Image retrieval | Hierarchical metrics |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  |  | COCO | Flickr | COCO | Flickr | WordNet |  |  |  |  |  |  |  |  |
| Vision<br>encoder | Model | w/ boxes | R@5 | R@10 | R@5 | R@10 | R@5 | R@10 | R@5 | R@10 | TIE($\downarrow$) | LCA($\downarrow$) | $J$($\uparrow$) | $P_{H}$($\uparrow$) | $R_{H}$($\uparrow$) |
|  | CLIP | ✗ | 69.3 | 79.1 | 90.2 | 95.2 | 53.7 | 65.2 | 81.1 | 87.9 | 4.02 | 2.39 | 0.76 | 0.83 | 0.84 |
|  | CLIP | ✓ | 60.7 | 71.8 | 84.2 | 91.3 | 47.1 | 58.6 | 73.1 | 82.1 | 4.03 | 2.38 | 0.76 | 0.83 | 0.83 |
|  | MERU | ✗ | 68.8 | 78.8 | 89.4 | 94.8 | 53.6 | 65.3 | 80.4 | 87.5 | 4.08 | 2.39 | 0.76 | 0.83 | 0.83 |
|  | MERU | ✓ | 72.7 | 81.9 | 83.5 | 90.1 | 46.6 | 58.3 | 60.0 | 71.7 | 4.08 | 2.39 | 0.75 | 0.83 | 0.83 |
| ViT<br>S/16 | HyCoCLIP | ✓ | 69.5 | 79.5 | 89.1 | 93.9 | 55.2 | 66.6 | 81.5 | 88.1 | 3.55 | 2.17 | 0.79 | 0.86 | 0.85 |
|  | CLIP | ✗ | 71.4 | 81.5 | 93.6 | 96.9 | 57.4 | 68.5 | 83.5 | 89.9 | 3.60 | 2.21 | 0.79 | 0.85 | 0.85 |
|  | MERU | ✗ | 72.3 | 82.0 | 93.5 | 96.2 | 57.4 | 68.6 | 84.0 | 90.0 | 3.63 | 2.22 | 0.78 | 0.85 | 0.85 |
| ViT<br>B/16 | HyCoCLIP | ✓ | 72.0 | 82.0 | 92.6 | 95.4 | 58.4 | 69.3 | 84.9 | 90.3 | 3.17 | 2.05 | 0.81 | 0.87 | 0.87 |

##### Zero-shot object detection

**Table 3: Zero-shot object detection with ground-truth boxes evaluated on COCO 17 novel categories split (Bansal et al., ). HyCoCLIP shows the best average precision (AP).**
| Model | AP |
| --- | --- |
| CLIP | 51.2 |
| MERU | 55.8 |
| RegionCLIP | 65.2 |
| HyCoCLIP | 68.5 |

We utilize pre-trained vision-language models to recognize proposed object regions. Specifically, we evaluate the scenario where ground-truth bounding boxes from the COCO detection dataset are used as region proposals and predict the correct categories with a setup similar to image classification. We compare our method with RegionCLIP (Zhong et al., ) whose vision encoder (ResNet50x4) was trained on CC3M with a frozen text encoder (originally trained on CLIP400M). We report the average precision (AP) on the 17 novel categories data split (Bansal et al., ). As shown in Table 3, HyCoCLIP outperforms the baselines, surpassing RegionCLIP on the novel categories. We believe this highlights a key advantage of our approach—its ability to leverage inherent hierarchies for effective semantic concept alignment.

##### Hierarchical Classification

A characteristic feature of hyperbolic spaces is their ability to represent hierarchical structures present in data. We evaluate our models for this property on several hierarchical classification metrics (Kosmopoulos et al., ) described in Appendix C.
We use the WordNet hierarchy (Miller, ) of the ImageNet class labels (Deng et al., ; Russakovsky et al., ) for the hierarchical classification task. The image classification setup is kept similar and the final scores are averaged over the validation set. Table 2 reports the results of HyCoCLIP and other baselines on these metrics. We observe a consistent improvement, confirming that the hierarchy of the class labels is better represented in its embedding space.

Figure: ((a))
Refer to caption: extracted/5913507/assets/analyze_space/embedding_radius_dist.png

##### Scene Understanding

**Table 4: Ablation study on loss terms during pre-training of HyCoCLIP-ViT-S/16 on grounded CC3M evaluated for image classification and Flickr image/text retrieval. Lower accuracy/R@5 indicates a more influential loss term.**
|  | classification | retrieval |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Pre-training losses | ImageNet | Food-101 | Mean(16) | Text | Image |
| HyCoCLIP | 16.7 | 10.6 | 22.3 | 56.2 | 46.4 |
| hCC loss |  |  |  |  |  |
| $-L^{*}_{cont}(I,T)$ | 16.0 | 9.4 | 22.5 | 55.2 | 46.2 |
| $-L^{*}_{cont}(T,I)$ | 16.1 | 10.2 | 22.2 | 55.2 | 45.4 |
| $-L^{*}_{cont}(I^{box},T)$ | 13.8 | 8.7 | 19.3 | 49.1 | 42.9 |
| $-L^{*}_{cont}(T^{box},I)$ | 15.2 | 7.6 | 20.4 | 55.9 | 44.5 |
| hCE loss |  |  |  |  |  |
| $-L^{*}_{ent}(I,T)$ | 14.9 | 9.9 | 21.8 | 54.3 | 46.1 |
| $-L^{*}_{ent}(I^{box},T^{box})$ | 16.1 | 9.3 | 22.3 | 54.8 | 45.4 |
| $-L^{*}_{ent}(I,I^{box})$ | 16.1 | 10.1 | 21.5 | 55.0 | 45.6 |
| $-L^{*}_{ent}(T,T^{box})$ | 16.3 | 9.2 | 22.3 | 55.6 | 45.1 |

Given the compositional pre-training strategy, we expect HyCoCLIP to be provisioned with localized object/noun information in both vision and language and improve upon such aspects. The setup for these benchmarks is the same, for a given image the model has to pick between the correct caption and a hard negative caption. For more information on the methods used to generate the hard negative captions, we refer to Appendix E. From Table 6, we see that CLIP and MERU give near-random performance for the VL-Checklist-Object (VL-CO) (Zhao et al., ) benchmark in which object information in the captions is perturbed. HyCoCLIP improves considerably on these experiments reaching $60\%$ accuracy indicating good object comprehension of the visual scene. HyCoCLIP also performs well on VG-Attribution (VG-A) (Yüksekgönül et al., ) reporting a mean accuracy of $68.4\%$ surpassing other methods. We refer to Appendix E for further analysis.

### 3.3 Ablation Study

##### Pre-training loss terms

We examine the impact of the terms in hCC (Eq. 6) and hCE (Eq. 11) losses by pre-training the model several times, each time turning off a single loss term. We use the grounded CC3M dataset and train for 40k steps. Table 6 shows the results of this experiment. A lower accuracy and recall on image classification and retrieval respectively, indicate a higher influence of corresponding loss term. For hCC loss, we find that our hypothesis of contrasting the generalized information in boxes against entire images and text is indeed beneficial. For hCE loss, we see that the terms entailing the image ($I$) are most influential.

##### Scaling w.r.t batch size

Figure: Figure 6: Interpolation between points. Multimodal retrieval results when moving from (top) an image to (left) another image or (right) the origin, as depicted in the (bottom-right) circle.
Refer to caption: extracted/5913507/assets/analyze_space/interpolation.png

We train our models using a batch size 768 according to available compute (Appendix B). To study the influence of this hyperparameter, we train our primary baseline MERU-ViT-S using CC3M for various batch sizes and report their zero-shot performance on ImageNet classification. Table 6 indicates no empirical benefits when working with larger batch sizes. In the contrastive setting, the number of positives grows linearly, and the number of negatives grows quadratically in a batch. When using softmax, the ratio of positives to negatives affects loss functions differently depending on the type of similarity metric that is being used. This can explain the difference in batch size behavior of our approach. The saturation of softmax loss with increasing batch size has been previously discussed by Zhai et al. (), and the entailment loss may also contribute to this early saturation.

## 4 Analyzing the hyperbolic space

##### Visualizing the learned hyperbolic space

We visualize the learned hyperbolic space in lower dimensions to see if the image, text, and corresponding box embeddings are distributed in a proper semantic hierarchy. To this end, we plot the distribution of the spatial norms of 128k random samples of training data in a histogram. Furthermore, we use *HoroPCA* (Chami et al., ) for reducing the dimensionality for 200 image-text pairs along with their boxes. Lastly, we extract 50 principal components to suppress noise and use CO-SNE (Guo et al., ) to bring the embeddings to the low-dimensional space.

Fig. 5(a) shows that the embedding distributions of texts and their corresponding boxes are well separated, while images and their box representations display similar norms. This spatial contraction in image embeddings arises from the convergence of contrastive loss within a confined entailment cone, as noted by Ramasinghe et al. (). Furthermore, many image boxes are almost identical to the full image (cf. Fig. 4), making it challenging for the network to differentiate between them. Nonetheless, the bottom plot in Fig. 5(a) shows that the box embeddings distribute closer to the origin, thus displaying hierarchical ordering. From Fig. 5(b) and 5(c), we observe the semantic separation in the two principal components of HoroPCA and in the 2D space formed with CO-SNE, indicating an apparent hierarchy between the components.

##### Interpolating between points in hyperbolic space

We interpolate the geodesic connecting an image (source) with another image (target) and also with the origin similar to Desai et al. (), which have been visualized on the bottom-right of Fig. 6. This intuitively represents traversing between nodes in a discrete tree. This is useful in visualizing the ancestors of any given image and qualitatively verifying the hierarchical properties of the learned hyperbolic space. We do the shortest path traversal in the tangent space details of which are in Appendix G. We use grounded Flickr30K (Li et al., ) to generate the collection of representations of images, texts, and corresponding boxes. Fig. 6 shows the result of 100 points being interpolated between two randomly selected images from [pexels.com](pexels.com) as well as to the origin. We observe that HyCoCLIP can fetch representations of both data modes in a very rational hierarchy. More interpolation examples are added in Appendix H.

## 5 Related Work

##### Vision-language models

Currently expanding at a rapid pace, this topic has been in focus for multiple decades with initial works in image retrieval (Mori et al., ), semantic segmentation (Barnard et al., ), and object classification (Wang et al., ) leveraging natural language descriptors for computer vision. Later works (He & Peng, ) utilized more expressive representations from multi-modal neural network encoders. The advent of transformers (Vaswani et al., ) and vision transformers (Dosovitskiy et al., ) helped construct a highly semantic embedding space for texts and images, respectively.
Recent works have explored creating a shared embedding space by leveraging various pre-training strategies to integrate text and image information. We refer the reader to the survey by Gan et al. () for a comprehensive overview. Many approaches use contrastive learning as a core method, like CLIP (Radford et al., ) and ALIGN (Jia et al., ). Zhao et al. () advanced this with RegionCLIP, which aligns image regions with textual concepts for object detection. More recently, MERU (Desai et al., ) combines entailment learning (Ganea et al., ; Le et al., ) with the CLIP approach to learn embeddings in hyperbolic space capturing latent visual-semantic hierarchies. We extend this to include image patches and caption parts, enforcing an ordering that reflects the hierarchy shared by both modalities.

##### Learning in hyperbolic space

Hyperbolic space for representation learning has desirable properties for data with an inherent hierarchical or tree-like structure (Nickel & Kiela, ; Chamberlain et al., ). When generating embeddings in hyperbolic space from such data, its innate hierarchical structure can be retained with minimal distortion. As a result, hyperbolic deep learning has rapidly gained traction (Peng et al., ; Mettes et al., ). Recent works have developed methods for building neural networks that operate in hyperbolic space (Ganea et al., ; Shimizu et al., ) and corresponding optimization algorithms (Bécigneul & Ganea, ; Bonnabel, ). This led to the use of hyperbolic models in many different modalities such as graphs (Liu et al., ), text (Dhingra et al., ; Tifrea et al., ), images (van Spengler et al., ; Atigh et al., ), videos (Long et al., ), etc. Other recent work has focused on combining embedding spaces of different modalities (Liu et al., ; Desai et al., ). Our work similarly learns multimodal representations in hyperbolic space to benefit from its inductive hierarchical bias.

##### Hierarchies in vision and language

Vendrov et al. () use a visual-semantic hierarchy over words, sentences, and images to learn representations in a supervised fashion. They consider hypernym-hyponym relations in language to construct a hierarchy. This concept has been used in hypernymy detection tasks (Nguyen et al., ; Vulic & Mrksic, ). Hierarchies formed by constituency-based parse trees have been used to learn embeddings in hyperbolic space by Dhingra et al. (). In vision, several works sought to connect scenes to objects and parts of objects within the scene. Early works have used such information for pose estimation, image segmentation, and object and contour detection (Bourdev & Malik, ; Arbeláez et al., ). Recently, un-/self-supervised methods have been used for representation learning leveraging hierarchical segmentation of an image by Zhang & Maire () and object-scene hypernymy by Xie et al. (); Ge et al. (). We combine hypernymy relations of vision and language.

## 6 Conclusion

The idea of this work is to use object compositions within a scene and its description, along with the visual-semantic ordering between image and text to learn hyperbolic representations that are semantically and hierarchically aligned. Our proposed HyCoCLIP improves over standard CLIP and its recent hyperbolic extension MERU in zero-shot classification. Moreover, our approach has increased scene understanding and better hierarchical structuring. Further, we qualitatively analyze the space by visualizing representations and through point-to-point interpolation which substantiates HyCoCLIP’s ability to embed multi-modal hierarchies in a shared space. The method has certain limitations, with a key challenge being the need to generate bounding box information from image-caption pairs during training. This increases the volume of visual and textual data processed by HyCoCLIP, though it still preserves scalability during inference. Additionally, while our hierarchical training strategy improves interpretability by separating images and texts into distinct regions in the embedding space, it may not be optimal for tasks like large-scale retrieval.

#### Acknowledgments

We sincerely acknowledge the scholarship from ELLIS Amsterdam for the research to Avik Pal. Max van Spengler acknowledges the University of Amsterdam Data Science Centre for financial support. We also extend our gratitude to SURF ([www.surf.nl](www.surf.nl)) for granting compute resources from the National Supercomputer Snellius.

## Appendix A Generating box information

We derive box information using an image grounding pipeline similar to Peng et al. (). Given an image-caption pair, noun entities are initially extracted from the caption into a list using spaCy (Honnibal et al., ). To minimize noise, we remove abstract nouns such as {*life, humor, love, …*} from the list. We then predict the bounding boxes of the extracted entities within the image using the pre-trained grounding model GLIP (Li et al., ; Zhang et al., ). We exclude boxes with sizes lower than $32\times 32$. We also threshold the predictions to at least 0.65 CLIP confidence score for the generated bounding box with the corresponding noun entity. Image-caption pairs for which no boxes could be generated or retained while filtering, are dropped. Further, referring expressions for noun chunks taken from the dependency tree of the caption using spaCy, are also included as text boxes. This increases the robustness of the stem towards linguistic complexities.

## Appendix B Implementation Details

##### Model architecture

We use a similar setup as Desai et al. (), where the language encoder is the same one used by the original CLIP (Radford et al., ) consisting of a 12-layer Transformer architecture (Vaswani et al., ) with a width of 512 dimensions. The maximum input token size is set to 77 with a vocab size of 49408. For the vision encoder, we use the small and base Vision Transformer (Dosovitskiy et al., ; Chen et al., ; Touvron et al., ) backbone using a patch size of 16. The images are resized using border padding and random cropping (with scale $[0.5,1.0]$) to $224\times 224$, which results in an input sequence size of 196. A fixed set of 2-D sine-cosine position embeddings is included in the input sequence to instill a positional inductive bias.

**Table 7: Hyperparameter search for $\eta_{inter}$ performed on grounded CC3M dataset.**
| $\eta_{inter}$ | ImageNet |
| --- | --- |
| 1.0 | 12.5 |
| 0.9 | 12.6 |
| 0.8 | 13.1 |
| 0.7 | 13.4 |
| 0.6 | 13.3 |
| 0.5 | 12.8 |

##### Initializing Lorentz model and Loss

The curvature of the Lorentz model is made learnable with an initial value of $\kappa=1.0$. Similar to Desai et al. (), we scale our batch of vectors before projecting it to the hyperboloid using learnable scalars $c_{img}$ and $c_{txt}$, respectively, in both image and text modes. These scalars are initialized with a value of $c_{img}=c_{txt}=1/\sqrt{512}$. The adaptive softmax temperature of the contrastive loss is initialized with $\tau=0.07$ and clipped at $0.01$. All of these scalar values are learned in the logarithmic space. In the hCE loss (Equations 10,11), we set separate values of the $\eta$ parameter for inter-modality entailments $\eta_{inter}=0.7$ and intra-modality entailments $\eta_{intra}=1.2$ through a hyperparameter search while pre-training on the CC3M dataset for 75k steps and evaluating on ImageNet zero-shot image classification (cf. Table 7). Intuitively, this is because embeddings of images and text exist in different regions of the space, making it easier for text to entail the corresponding image as texts are nearer the origin and have a wider aperture $\omega$ (cf. Eq. 7). Hence, we make the loss stricter by reducing the aperture of text embeddings. Similarly, the intra-modal box representations are closer in their corresponding spaces. Accordingly, we increase the aperture of the box regions to relax the entailment loss. In the final hC loss, we set the weight for hCE loss $\gamma=0.1$.

##### Optimizer and Hardware

We train our models on 4 A100 GPUs for 500k steps using a batch size of 768 on an internal cluster. Similar to Desai et al. (), we use the AdamW optimizer (Loshchilov & Hutter, ) with hyperparameters $\beta_{1}=0.9,\beta_{2}=0.98$ and weight decay $0.2$ which is disabled for the learnable scalars. We use a cosine learning rate scheduler (Loshchilov & Hutter, ) with a maximum learning rate of $5\times 10^{-4}$ and a linear rate for the initial 4k steps.

## Appendix C Metrics for Hierarchical Classification

This section provides more details on the metrics used for our hierarchical classification experiment. For a pair of predicted and true class $(\hat{y},y)$, the Tree Induced Error (TIE) (Dekel et al., ) is the distance between $\hat{y}$ and $y$ in the graph (cf. Fig. 7(a)). This is defined as $\sum_{e\in E(\hat{y},y)}w_{e}$, where $E(i,j)$ is the set of edges with weights $w_{e}$ along the path connecting nodes $i$ and $j$. For the WordNet graph, we set $w_{e}=1$. Similarly, the Lowest Common Ancestor (LCA) error is the distance to the deepest common node in the graph which is shared between the ancestors of classes $\hat{y}$ and $y$.

For set-based measures, we define $\hat{Y}_{anc}$ and $Y_{anc}$ as the set of ancestor nodes of classes $\hat{y}$ and $y$ respectively (cf. Fig. 7(b)). Other relevant set-based hierarchical metrics such as, Jaccard Similarity $J$, and Hierarchical precision ($P_{H}$) and recall ($R_{H}$) (Kosmopoulos et al., ) are then given by

$$ $J=\frac{|\hat{Y}_{anc}\cap Y_{anc}|}{|\hat{Y}_{anc}\cup Y_{anc}|},\quad P_{H}= \frac{|\hat{Y}_{anc}\cap Y_{anc}|}{|\hat{Y}_{anc}|},\quad R_{H}=\frac{|\hat{Y} _{anc}\cap Y_{anc}|}{|Y_{anc}|}.$ (13) $$

Figure: ((a))
Refer to caption: extracted/5913507/assets/appendix/hierarchy_metrics_dist.png

## Appendix D RegionCLIP on other tasks

In addition to object detection (cf. Sec. 3.2, Zero-shot object detection), we evaluate RegionCLIP on the other downstream tasks described in Sec. 3.2. We compare RegionCLIP, which uses a ResNet-50 backbone ($\sim$25M parameters), to HyCoCLIP, which employs a ViT-S/16 backbone with $\sim$22M parameters. As shown in Table 8, our method significantly outperforms RegionCLIP across all these tasks. This is expected, as RegionCLIP is primarily optimized for object detection. By contrast, HyCoCLIP reaches the level of performance of RegionCLIP on object detection despite being designed to learn hierarchical representation spaces.

**Table 8: RegionCLIP performance on downstream tasks. The pre-training of RegionCLIP using boxes is primarily optimized for object detection. Thus displays poorer performance in comparison to HyCoCLIP which is designed to learn hierarchical representations from the boxes. * s.u. denotes scene understanding.**
|  | classification | retrieval | hierarchical metrics | s.u.* |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Model | ImageNet | CIFAR-100 | SUN397 | Food-101 | Mean(16) | Text | Image | TIE ($\downarrow$) | LCA ($\downarrow$) | $J$ ($\uparrow$) | $P_{H}$ ($\uparrow$) | $R_{H}$ ($\uparrow$) | VL-CO | VG-A |
| RegionCLIP | 40.6 | 23.2 | 43.4 | 41.3 | 36.4 | 38.5 | 31.5 | 3.76 | 2.29 | 0.77 | 0.84 | 0.84 | 52.5 | 59.7 |
| HyCoCLIP | 41.7 | 53.6 | 52.5 | 50.2 | 41.1 | 69.5 | 55.2 | 3.55 | 2.17 | 0.79 | 0.86 | 0.85 | 59.8 | 68.4 |

## Appendix E Scene understanding benchmarks

In this section, we describe in detail the experiments of the compositional reasoning benchmarks used to evaluate our models in Sec. 3.2.

### E.1 Benchmarks

##### VL-Checklist-Object (VL-CO)

This benchmark (Zhao et al., ) modifies the caption in several aspects. An object term in the caption is replaced with a random noun phrase. The model results are categorized for different sizes and locations of the object within the image to check for invariance which are summarized as follows,

- •
O-Small: The object covers a small area within the image. Following Zhao et al. (), the threshold of the object area is set to below $32\times 32$.
- •
O-Medium: The object covers a moderate area within the image. The threshold of the object area is set between $32\times 32$ and $96\times 96$.
- •
O-Large: The object covers a large area within the image. Any object with an area greater than $96\times 96$ fits this category.
- •
O-Center: The object center lies within the center region of the image. If $x$ is the half-length diagonal, and $y$ is the distance between the center of the object and the center of the image, the object is considered to lie in the center region if $\frac{y}{x}\leq\frac{1}{3}$.
- •
O-Margin: The object center lies at the margin of the image. This is when $\frac{y}{x}>\frac{2}{3}$.
- •
O-Mid: The object center lies in between the center and margin region which is when $\frac{1}{3}<\frac{y}{x}\leq\frac{2}{3}$.

##### VG-Attribution (VG-A)

This benchmark (Yüksekgönül et al., ) tests the capability of the model to correctly identify the attribute word associated with an object in a sentence in the context of an image. For instance, the model has to pick between ”the crouched cat and the open door” and ”the open cat and the crouched door”.

### E.2 Performance

Figure: ((a))
Refer to caption: x4.png

We reported the mean performance for scene understanding benchmarks in Table 6. In addition to this, here we provide the results of HyCoCLIP compared against MERU on the individual categories of VL-CO and the top 19 most frequently occurring attribute pairs in the VG-A evaluation set. Fig. 8 highlights the significant improvements achieved by our method indicating better semantic scene understanding.

## Appendix F Visualizing representation space - MERU

Figure: ((a))
Refer to caption: extracted/5913507/assets/appendix/embedding_radius_dist_meru.png

Following Sec. 4, we additionally plot the learned hyperbolic space of MERU in lower dimensions in Fig. 9. We observe that the distributions of text embeddings and image embeddings are overlapped with corresponding box distributions from Fig. 9(a). This is also apparent in the 2D plot when using HoroPCA in Fig. 9(b). The embeddings for all modes seem to collapse to a small region with CO-SNE as seen in Fig. 9(c).

## Appendix G Interpolation details

The logarithmic map is the inverse of the exponential map and, for $\mathbf{p},\mathbf{q}\in$ $\mathbb{L}^{n}$, is given by

$$ $\log_{\mathbf{p}}^{\kappa}(\mathbf{q})=\frac{\cosh^{-1}(-\kappa\langle\mathbf{ p},\mathbf{q}\rangle_{\mathbb{L}})}{\sqrt{(\kappa\langle\mathbf{p},\mathbf{q} \rangle)^{2}-1}}(\mathbf{q}+\kappa\langle\mathbf{p},\mathbf{q}\rangle_{\mathbb {L}}\mathbf{p}).$ (14) $$

Here, we will use it to interpolate between points in hyperbolic space (Desai et al., ).

For hyperbolic representations $(g_{I}(I_{S}),g_{I}(I_{T}))$ of source image $I_{S}$ and target image $I_{T}$, we take the logarithmic maps $\log_{0}(g_{I}(I_{S}))$ and $\log_{0}(g_{I}(I_{T}))$ and obtain a set of $N$ equally spaced representations on the line joining these vectors given by,

$$ $S^{N}_{E}=\Big{\{}p_{i}\in\mathcal{T}_{p}\mathbb{L}^{n}:p_{i}=(1-t_{i})\log_{0 }(g_{I}(I_{S}))+t_{i}\log_{0}(g_{I}(I_{T})),\;t_{i}=\frac{i}{N},\;i\in\{1, \ldots,N\}\Big{\}}.$ (15) $$

These are then mapped back to the hyperboloid using exponential mapping given by,

$$ $S^{N}_{H}=\Big{\{}q_{i}\in\mathbb{L}^{n}:q_{i}=\exp_{0}(p_{i}),\;p_{i}\in S^{N }_{E}\Big{\}}.$ (16) $$

The closest representations are retrieved for all points in the set $S^{N}_{H}$ using Lorentzian distance as the similarity metric from a collection of representations of images and texts. Further, we drop any duplicate representations retrieved.

## Appendix H More interpolation examples

Figure: ((a))
Refer to caption: extracted/5913507/assets/appendix/example1.png

Figure: ((a))
Refer to caption: extracted/5913507/assets/appendix/example3.png

Figure: ((a))
Refer to caption: extracted/5913507/assets/appendix/example5.png

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 8
presentation: 4
questions: Can the authors share the results of HyCoCLIP on RedCaps dataset?
soundness: 3
strengths: * The proposed method is simple and elegant and can be easily applied to large scale pretraining of vision-language models. The procedure to automatically generate paired image and text boxes is also relatively straightforward.
* The empirical results show improvement across several tasks which demonstrates the improved representation learning - classification, retrieval, detection and understanding.
* Table 1 results show that CLIP trained on additional image-text boxes doesn't improve the performance. However, training on the same data but with the proposed hierarchical compositional learning losses shows significant improvement in performance. This further demonstrates the effectiveness of the proposed technique.
summary: This work proposes a novel learning method for training vision-language models. Specifically, the method involves pretraining such models with 2 losses --- hierarchical compositional contrastive and entailment losses. The hierarchical concepts correspond to image boxes and the corresponding text boxes. The experiments are conducted on large scale dataset (GRIT) consisting of 20.5M image-text pairs. In Appendix A, the authors describe an automatic procedure to obtain the text boxes (noun entities in this case) and their corresponding bounding boxes in the images. The paper details empirical results on a variety of tasks including zero-shot image classification, retrieval, object detection and scene understanding.
weaknesses: When training CLIP on additional image-text boxes shows no improvement (Table 1), it could be because there is limited new information in such examples (as original image-text pairs are already present in the training data). For a better understanding of this, an experiment such as this might help: split the GRIT dataset into 2 random subsets of 10M each. Then compare the results on the following settings:

[1] CLIP trained on 10M image-text pairs

[2] CLIP trained on 10M image-text pairs + additional image-text boxes

[3] HyCoCLIP trained on 10M image-text pairs + additional image-text boxes

[4] CLIP trained on 20M image-text pairs

The paper presents the comparison of [1] vs [2] vs [3] (but on all 20M image-text pairs) in Table 1 but comparing [3] vs [4] will help answer the above question. It is worth noting that even if the comparison shows similar results, [3] might still be slightly favored since it can be applied on top of any existing large dataset.

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: Could you please provide more details on the choice of hyperbolic space parameters?
soundness: 4
strengths: 1. This paper is well-organized. The motivation is easy to follow, and the method is easy-to-understand.
2. The proposed HyCoCLIP is novel and effective. It organizes data at multiple abstraction levels, providing an inspiring approach to multi-modal learning.
3. The authors performs exhaustive experiments to show that the effectiveness of HyCoCLIP. It outperforms baselines on general and fine-grained image classification tasks.
summary: This paper introduces a novel approach named HyCoCLIP to vision-language modeling that leverages the hierarchical nature of hyperbolic space to better align visual and textual data. It organizes image and text data as hierarchical compositions, where objects within an image and their corresponding text descriptions are represented at different levels of abstraction in hyperbolic space.The experiments demonstrate that HyCoCLIP achieves significant performance improvements across multiple tasks.
weaknesses: 1. While the paper compare with CLIP and MERU, it should also compare some recently proposed VLMs.
2. The paper should explore how sensitive the model is to the choice of hyperbolic space parameters.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: In Table 1/2, the authors bold the best performance overall across different model backbones. Wouldn’t it be more informative and fair to bold the best performance within each backbone group (e.g., ViT-S/16, ViT-B/16) to allow for a clearer comparison of HyCoCLIP’s performance relative to baselines on similar architectures?

Regarding the choice of batch size, the authors used a batch size of 768 due to memory limitations. Did the authors consider implementing techniques like gradient accumulation to effectively simulate a larger batch size? This could provide further insights into how batch size impacts model performance, especially since batch size has been shown to affect contrastive learning tasks significantly.
soundness: 3
strengths: I think this paper is very well written and I find it easy to follow. Overall the idea behind HyCoCLIp is well motivated and I believe the authors have conducted sufficient experiments to empirically demonstrate the proposed method and model’s efficacy. The empirical performance of HyCoCLIP is very strong and to the best of my knowledge, the proposed HyCoCLIP achieved the state-of-results on many of the reported zero-shot tasks from a contrastive-pretrained model.
summary: The authors proposed to incorporate hierarchical pretraining for hyperbolic vision language models and the resulting model Hyperbolic Compositional CLIP (HyCoCLIP). The core idea is to construct object regions (image boxes) and corresponding text phrases (text boxes) to build a multi-layered, compositional hierarchy within the shared hyperbolic embedding space. The HyCoCLIP shows competitive performance in zero-shot classification and retrievals. The author also conducted experiments to show how HyCOCLIP can outperform CLIP and the hyperbolic contrastive model MERU in zero-shot hierarchical classification and scene understanding tasks.
weaknesses: One major concern is the incremental nature of this work. Hyperbolic embeddings for representing hierarchical relationships have been explored in previous models, and this paper primarily builds upon these established ideas. However, the specific contributions of HyCoCLIP, particularly in enhancing hierarchical and scene understanding tasks, offer sufficient merit to make this work valuable to the broader community.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 4
questions: Could the use of objects as supervision bias the model towards nouns and concrete concepts, possibly at the expense of attributes, dynamic actions (verbs), etc.?

Some details that are unclear from Supp. A: How were abstract nouns filtered? Are the nouns that can be grounded open-vocabulary (not limited to a fixed list)? How accurate is the GLIP-based grounding procedure?
soundness: 3
strengths: The central idea is clever and novel – utilizing the hierarchical nature of nouns mentioned in image captions as supervision for a hyperbolic model. The exposition is clear and concepts are well-illustrated. The quantitative experiments are extensive and overall convincing.
summary: This paper proposes the novel Compositional Entailment Learning framework to train VLMs, by using as supervision the hierarchical relations between images, captions, and constituent nouns and their bounding boxes. Their results show that this outperforms standard CLIP and the hyperbolic CLIP variant MERU on both standard multimodal and hierarchical benchmarks. This is supported by qualitative results illustrating the learned hierarchical semantics of the learned space.
weaknesses: Qualitative results (Sec 4, Supp 8) are fairly limited. In particular, it is missing a qualitative comparison to existing models (CLIP, MERU) to illustrate whether HyCoCLIP’s embedding space represents hierarchies in a more qualitatively satisfying way.

While a comparison to CLIP trained from scratch is provided, recent work has found pretrained foundation VLMs to represent hierarchies in Euclidean space [1]. It would be useful to compare to such results to understand whether HyCoCLIP trained from scratch is competitive with such models.

[1] Alper and Averbuch-Elor. Emergent Visual-Semantic Hierarchies in Image-Text Representations. ECCV 2024

Meta-review: This paper studies the hierarchical visual-text representation. Concretely, the author proposed to leverage the hierarchical relation within the image (whole image and objects) and the text (whole sentence and nouns) to construct a hierachical embedding space, where the more general terms (objects / nouns) are pushing towards the origin and the more specific terms (sentences and whole images) are pushing towards the boundary. To construct this hierarchical embedding space, the author proposed object (noun) and sentence (image) contrastive loss and also entailment loss. 

Strength:
1. The paper is easy to follow and well-written
2. The proposed approach is interesting and novel.
3. The proposed approach achieves good performance on multiple benchmarks.

Weakness:
1. Considering the related works on hierarchical and hyperbolic space, the proposed approach might be slightly incremental. 

Given all the support from the reviewers (all 8), I recommend accept.

Decision: Accept (Oral)