File size: 10,132 Bytes
6dce3ef
 
 
 
 
 
 
 
f8781d0
6dce3ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f8781d0
 
6dce3ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f8781d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6dce3ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---

pretty_name: MERU-ImageNet-1M
language:
- en
license: cc-by-nc-4.0
size_categories:
- 1M<n<10M
tags:
- arxiv:2611.22159
- hyperbolic
- approximate-nearest-neighbor
- vector-search
- imagenet
- meru
- poincare
- lorentz
- benchmark
---


# MERU-ImageNet-1M

**A Million-Scale Hyperbolic Vector Search Benchmark**

MERU-ImageNet-1M contains 1,000,000 database vectors, 10,000 test queries, and 2,000 tuning queries in 512-dimensional hyperbolic space. Astrmira Tech prepared the benchmark by encoding ILSVRC2012 images with the official MERU ViT-small checkpoint and computing exhaustive FP64 nearest-neighbor ground truth.

This is the benchmark called **MERU-1M** in [Pelorus: Warped-Product Graph Indexing for Hyperbolic Vector Search](https://arxiv.org/abs/2611.22159).

The release provides canonical Poincaré coordinates at curvature −1, the model's original Lorentz spatial components, top-10 and top-100 neighbors, distances, image provenance records, and the frozen preparation scripts.

## Splits

| Split | Source images | Vectors | Dimensions |
|---|---|---:|---:|
| Database | ILSVRC2012 training images | 1,000,000 | 512 |
| Test queries | ILSVRC2012 validation images | 10,000 | 512 |
| Tuning queries | ILSVRC2012 validation images | 2,000 | 512 |

The complete training and validation archives were encoded before subset selection. Image IDs, image SHA256 hashes, and canonical vector-byte SHA256 hashes were deduplicated globally. A fixed random seed of `20261114` identifies the preparation run. The selected splits have disjoint image IDs, image hashes, and vector hashes.

## Download and load

```bash

pip install huggingface_hub numpy

hf download YoKONCy/MERU-ImageNet-1M --repo-type dataset --local-dir MERU-ImageNet-1M

```

```python

import sys

from pathlib import Path



root = Path("MERU-ImageNet-1M")

sys.path.insert(0, str(root.resolve()))

from load_dataset import load_benchmark



data = load_benchmark(root)

database = data["documents"]

queries = data["queries"]

truth = data["truth"]

print(database.shape, queries.shape, truth.shape)

```

The arrays are read-only NumPy memory maps. The canonical database occupies 2,048,000,000 bytes. The complete release is approximately 4.32 GB, including the original model-space representation and provenance.

For a selective download of the canonical benchmark, use the following files with `snapshot_download`.

```python

from huggingface_hub import snapshot_download



snapshot_download(

    repo_id="YoKONCy/MERU-ImageNet-1M",

    repo_type="dataset",

    local_dir="MERU-ImageNet-1M",

    allow_patterns=[

        "documents.f32", "queries.f32", "tuning_queries.f32",

        "truth.u64", "tuning_truth.u64", "mapping.json",

        "load_dataset.py", "README.md", "LICENSE*", "SHA256SUMS",

    ],

)

```

## File formats

All binary arrays are headerless, little-endian, and stored in row-major order. Neighbor IDs are zero-based row indices into `documents.f32`.

| File | Shape | Element type | Contents |
|---|---|---|---|
| `documents.f32` | 1,000,000 × 512 | float32 | Canonical database coordinates |
| `queries.f32` | 10,000 × 512 | float32 | Canonical test queries |
| `tuning_queries.f32` | 2,000 × 512 | float32 | Canonical tuning queries |
| `truth.u64` | 10,000 × 10 | uint64 | Test top-10 neighbor IDs |
| `tuning_truth.u64` | 2,000 × 10 | uint64 | Tuning top-10 neighbor IDs |
| `queries_top100.u64` | 10,000 × 100 | uint64 | Test top-100 neighbor IDs |
| `queries_top100_distances.f64` | 10,000 × 100 | float64 | Test top-100 geodesic distances |
| `tuning_queries_top100.u64` | 2,000 × 100 | uint64 | Tuning top-100 neighbor IDs |
| `tuning_queries_top100_distances.f64` | 2,000 × 100 | float64 | Tuning top-100 geodesic distances |
| `documents_model_spatial.f32` | 1,000,000 × 512 | float32 | Original Lorentz spatial components |
| `queries_model_spatial.f32` | 10,000 × 512 | float32 | Original test Lorentz spatial components |
| `tuning_queries_model_spatial.f32` | 2,000 × 512 | float32 | Original tuning Lorentz spatial components |

The three `*_manifest.jsonl.gz` files associate vector rows with image IDs, source splits, TAR members, archive offsets, image MD5/SHA256 hashes, and canonical vector SHA256 hashes. Database provenance also includes ImageNet synset IDs.

`mapping.json` records the model checkpoint hash, source commit, curvature, software versions, source archive hashes, preparation parameters, and binary-file hashes. `splits_complete.json` records split statistics and database class counts. `verification.json` and `provenance/data_audit.json` preserve the ground-truth and integrity checks.

`SHA256SUMS` covers every published file other than the checksum list itself.

## Geometry

Let $y\in\mathbb{R}^{512}$ denote the stored model-space Lorentz spatial component and let $c=0.10000000149011612$ be the original positive curvature magnitude. The canonical Poincaré coordinates are

$$
z=\sqrt{c}\,y,\qquad
x=\frac{z}{\sqrt{1+\lVert z\rVert^2}+1}.
$$

The conversion uses FP64 arithmetic followed by an FP32 cast. Every published canonical vector lies strictly inside the unit ball.

Canonical geodesic distance is

$$
d(x,q)=\operatorname{arcosh}\!\left(
1+\frac{2\lVert x-q\rVert^2}
{(1-\lVert x\rVert^2)(1-\lVert q\rVert^2)}
\right).
$$

The corresponding distance at the original model curvature is $d(x,q)/\sqrt{c}$. The shared scale factor preserves nearest-neighbor rankings. Stored top-100 distances use canonical curvature −1 and the published FP32 canonical coordinates.

## Ground truth and evaluation

Every test and tuning query was exhaustively compared against all 1,000,000 database vectors using FP64 arithmetic. Neighbors are ordered by increasing distance, with database row ID breaking exact ties. The top-10 files contain the first ten IDs from the corresponding top-100 files.

An independent CPU full scan using direct coordinate differences reproduced all top-100 IDs for 16 fixed test queries. Its maximum distance discrepancy was approximately $2.57\times10^{-15}$. Additional release checks cover file hashes, finite coordinates, ball membership, split disjointness, neighbor ID ranges, ordering, and stored distances.

For ANN evaluation, compute Recall@10 as the mean fraction of the ten ground-truth IDs returned for each test query. Select search parameters using the tuning queries. Report the distance convention, query concurrency, build parameters, latency, and throughput alongside recall.

The benchmark measures geometric nearest-neighbor retrieval under the MERU-ImageNet embedding distribution. Database Euclidean radii range from approximately 0.11673 to 0.13501. `splits_complete.json` provides the complete recorded quantiles.

## Provenance and reproduction

- Encoder family is MERU ViT-small, with 512 output dimensions.
- MERU source commit is `6d4430055f58354539f68668175135256f99d47f`.
- Checkpoint SHA256 is `4466c04a790d9b5974928e7e9e528cbff2d82348f596e60443a88934b9a61de6`.
- Encoding uses FP32, with TF32 disabled, batch size 128, and eight image-decoding workers.
- ILSVRC2012 training archive MD5 is `1d675b47d978889d74fa0da5fadfb00e`.
- ILSVRC2012 validation archive MD5 is `29b22e2961454d5413ddabcf34fc5622`.

The original preparation scripts and their recorded hashes are included under `reproduction/`. The reproduction guide describes their Linux/CUDA environment and source-directory conventions. Source image archives are obtained through ImageNet's access process. [MERU project](https://github.com/facebookresearch/meru), [official checkpoint](https://dl.fbaipublicfiles.com/meru/meru_vit_s.pth), [ImageNet](https://image-net.org/).

## License and attribution

Astrmira Tech releases its benchmark curation under CC BY-NC 4.0. The release retains MERU's CC BY-NC 4.0 notice and ImageNet's non-commercial research and educational use terms. The upstream materials remain subject to their respective rights and access terms. See `LICENSE.md`, `licenses/MERU-LICENSE.txt`, and the upstream sources. [MERU license](https://github.com/facebookresearch/meru/blob/main/LICENSE), [ImageNet terms](https://huggingface.co/datasets/ILSVRC/imagenet-1k).

## Citation

If you use MERU-ImageNet-1M in your work, please cite the [Pelorus paper](https://arxiv.org/abs/2611.22159).

```bibtex

@misc{xiao2026pelorus,

  title         = {{Pelorus}: Warped-Product Graph Indexing for Hyperbolic Vector Search},

  author        = {Xiao, Wenxuan and Cao, Xu},

  year          = {2026},

  eprint        = {2611.22159},

  archivePrefix = {arXiv},

  primaryClass  = {cs.DB},

  doi           = {10.48550/arXiv.2611.22159},

  url           = {https://arxiv.org/abs/2611.22159}

}

```

For the dataset release, the MERU encoder, and the ImageNet source images, the corresponding references are listed below.

```bibtex

@misc{astrmira2026meruimagenet1m,

  title        = {MERU-ImageNet-1M — A Million-Scale Hyperbolic Vector Search Benchmark},

  author       = {Xiao, Wenxuan and Cao, Xu},

  year         = {2026},

  version      = {1.0},

  publisher    = {Astrmira Tech},

  howpublished = {Hugging Face},

  url          = {https://huggingface.co/datasets/YoKONCy/MERU-ImageNet-1M}

}



@inproceedings{desai2023meru,

  title     = {Hyperbolic Image-Text Representations},

  author    = {Desai, Karan and Nickel, Maximilian and Rajpurohit, Tanmay and Johnson, Justin and Vedantam, Ramakrishna},

  booktitle = {Proceedings of the International Conference on Machine Learning},

  year      = {2023}

}



@article{russakovsky2015imagenet,

  title   = {ImageNet Large Scale Visual Recognition Challenge},

  author  = {Russakovsky, Olga and Deng, Jia and Su, Hao and Krause, Jonathan and Satheesh, Sanjeev and Ma, Sean and Huang, Zhiheng and Karpathy, Andrej and Khosla, Aditya and Bernstein, Michael and Berg, Alexander C. and Fei-Fei, Li},

  journal = {International Journal of Computer Vision},

  year    = {2015},

  volume  = {115},

  pages   = {211--252}

}

```