File size: 3,591 Bytes
f6f40f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d8da8df
f6f40f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
license: mit
task_categories:
  - zero-shot-classification
  - image-classification
tags:
  - compositionality
  - vision-language-models
  - hyperbolic-geometry
  - GDE
  - CZSL
  - group-robustness
  - embeddings
pretty_name: VLM Compositionality Embeddings
size_categories:
  - 100K<n<1M
---

# VLM Compositionality Embeddings

Pre-computed image and text embeddings for the thesis **"From Euclidean to Hyperbolic Vision-Language Spaces: A Study of Attribute–Object Compositionality"** by Meelad Dashti (Politecnico di Torino & University of Twente, 2026).

Code repository: [github.com/MelDashti/hyperbolic-vlm-compositionality](https://github.com/MelDashti/hyperbolic-vlm-compositionality)

## Models

| Model | Geometry | Architecture | Training Data |
|-------|----------|-------------|---------------|
| **CLIP ViT-L/14** | Spherical | ViT-L/14 | WIT (400M+ pairs) |
| **DINOv2 ViT-L/14** | Spherical | ViT-L/14 | LVD-142M (self-supervised) |
| **CLIP-B (GRIT)** | Spherical | ViT-B/16 | GRIT (20.5M pairs) |
| **MERU-B (GRIT)** | Hyperbolic | ViT-B/16 | GRIT (20.5M pairs) |
| **HyCoCLIP-B (GRIT)** | Hyperbolic | ViT-B/16 | GRIT (20.5M pairs) |

## Datasets

### CZSL Benchmarks
- **MIT-States** — 53K images, 115 attributes, 245 objects
- **UT-Zappos** — 33K images, 16 attributes, 12 objects
- **C-GQA** — 39K images, 413 attributes, 674 objects
- **VAW-CZSL** — 92K images, 413 attributes, 541 objects

### Group Robustness
- **WaterBirds** — Bird type classification (spurious: background)
- **CelebA** — Hair color classification (spurious: gender)

## File Structure

Each dataset directory contains:

```
{dataset}/
├── IMGemb_{model}_{pretraining}.pt          # Image embeddings
├── TEXTemb_{model}_{pretraining}.pt         # Text pair embeddings
├── TEXTemb_primitives_{model}_{pretraining}.pt  # Primitive text embeddings
├── metadata_compositional-split-natural.t7  # Dataset metadata
└── compositional-split-natural/
    ├── train_pairs.txt
    ├── val_pairs.txt
    └── test_pairs.txt
```

### File Naming Convention

- `IMGemb_` — Image embeddings (one vector per image)
- `TEXTemb_` — Text embeddings for (attribute, object) pair prompts
- `TEXTemb_primitives_` — Separate attribute and object text embeddings
- Model identifiers: `ViT-L-14_openai`, `CLIP-B_GRIT_GRIT`, `MERU-B_GRIT_GRIT`, `HyCoCLIP-B_HyCoCLIP`, `dinov2_vitl14_talk2dino`, `MERU-L_MERU`

## Usage

```python
import torch

# Load image embeddings
img_emb = torch.load("mit-states/IMGemb_ViT-L-14_openai.pt", weights_only=False)

# Load text pair embeddings
text_emb = torch.load("mit-states/TEXTemb_ViT-L-14_openai.pt", weights_only=False)

# Load primitive text embeddings
primitives = torch.load("mit-states/TEXTemb_primitives_ViT-L-14_openai.pt", weights_only=False)
attr_embs = primitives['attr_embs']  # Individual attribute embeddings
obj_embs = primitives['obj_embs']    # Individual object embeddings
```

## Download

```bash
# Clone with git LFS
git lfs install
git clone https://huggingface.co/datasets/Meldashti/vlm-compositionality-embeddings

# Or using huggingface_hub
from huggingface_hub import snapshot_download
snapshot_download("Meldashti/vlm-compositionality-embeddings", local_dir="data/", repo_type="dataset")
```

## Citation

```bibtex
@mastersthesis{dashti2026euclidean,
  title={From Euclidean to Hyperbolic Vision-Language Spaces: A Study of Attribute-Object Compositionality},
  author={Dashti, Meelad},
  school={Politecnico di Torino \& University of Twente},
  year={2026}
}
```

## License

MIT