| --- |
| license: cc-by-4.0 |
| viewer: false |
| task_categories: |
| - text-retrieval |
| - feature-extraction |
| tags: |
| - approximate-nearest-neighbor-search |
| - vector-search |
| - vector-database |
| - graph-index |
| - graph-reordering |
| - ann-benchmark |
| - cagra |
| - nsg |
| - diskann |
| pretty_name: "Plasma: Graph Indices for Layout-Aware ANNS on GPU" |
| --- |
| |
| # Plasma — Prebuilt Graph Indices for Layout-Aware ANNS on GPU |
|
|
| Companion artifacts for **Plasma** (**P**latform for **L**ayout-**A**ware **S**earch and |
| **M**emory **A**rrangement), a unified evaluation framework for graph-based Approximate |
| Nearest Neighbor Search on GPU that isolates the effects of **graph index topology** from |
| those of **memory layout**. |
|
|
| > **TL;DR of the paper** — Decoupling graph topology from memory layout on GPU. Vertex |
| > reordering alone yields up to **80% QPS gain at equal recall**. |
|
|
| | | | |
| |---|---| |
| | 📄 Paper | https://openreview.net/forum?id=tF70hyyM6V | |
| | 📚 arXiv | https://arxiv.org/abs/2508.15436 | |
| | 🌐 Project page | https://omron-sinicx.github.io/plasma | |
| | 💻 Code | https://github.com/omron-sinicx/plasma | |
|
|
| Plasma compares graph-based ANNS indices under differing memory layouts while collecting |
| hardware-level metrics, covering both **classical** (SIFT, GIST, Deep) and **modern |
| embeddings** (Yandex T2I, OpenAI, Wikipedia, BioASQ, C4). Since index construction is |
| computationally expensive, we release the pre-built indices — **adjacency lists and |
| reordering maps** — so that layout and topology can be evaluated on your platforms |
| without rebuilding. |
|
|
| **This project does not release new vectors; the released files contain graph structure |
| only.** The underlying vectors are from their original providers, attributed in full |
| under [Source datasets and credits](#source-datasets-and-credits). |
|
|
| > ### ⚠️ No vectors are included |
| > |
| > Every file in this repository contains **integers only** — graph adjacency lists and |
| > vertex-ID permutations. **No embedding, feature vector, or any other element of the |
| > source corpora is redistributed here.** Index-implementation binaries that embed the |
| > raw vectors (`*.faissindex`, `*.diskann.data`, and similar) are deliberately excluded. |
| > |
| > To use these indices you must obtain the vectors yourself from their original |
| > distributors, under those distributors' own terms. See |
| > [Reproducing a usable index](#reproducing-a-usable-index). |
|
|
| Building these graphs is the expensive part of ANN research — a single 40M-point graph |
| takes hours on a GPU. Publishing the graphs (and the reordering permutations derived from |
| them) lets others reproduce and compare **graph-reordering / memory-layout** results |
| without repeating index construction. |
|
|
| --- |
|
|
| ## Contents |
|
|
| | Index | Description | |
| |---|---| |
| | `cagra` | GPU-built k-NN graph (NVIDIA CAGRA) | |
| | `nsg` | Navigating Spreading-out Graph | |
| | `nndescent` | NN-Descent k-NN graph | |
| | `diskann` | DiskANN / Vamana graph | |
| | `nssg` | Navigating Satellite System Graph — extra, beyond the four evaluated in the paper | |
|
|
| Graph-reordering permutations are provided for seven methods: |
|
|
| | Method | In the paper | |
| |---|---| |
| | `gorder` | GOrder | |
| | `rcm` | RCM (Reverse Cuthill–McKee) | |
| | `hubsort` | Hub Sort | |
| | `indegree`, `outdegree` | Degree Sort | |
| | `hubcluster`, `random` | extra baselines, beyond the paper's headline set | |
|
|
| ### Datasets covered |
|
|
| | Dataset | Dim | Metric | Indices | Files | Size | |
| |---|---:|---|---|---:|---:| |
| | `sift-128-euclidean` | 128 | L2 | cagra, nsg, nssg, nndescent, diskann | 60 | 6.78 GiB | |
| | `gist-960-euclidean` | 960 | L2 | cagra, nsg, nssg, nndescent, diskann | 54 | 4.71 GiB | |
| | `deep1m-96-euclidean` | 96 | L2 | cagra, nsg, nssg, nndescent, diskann | 54 | 5.32 GiB | |
| | `deep10m` | 96 | L2 | cagra, nsg, nndescent, diskann | 18 | 22.10 GiB | |
| | `t2i1m-200` | 200 | L2 / IP | cagra, nsg, nssg, nndescent, diskann | 52 | 5.54 GiB | |
| | `openai1m-1536-euclidean` | 1536 | L2 | cagra, nsg, nndescent, diskann | 53 | 5.21 GiB | |
| | `wikipedia1m-768-ip` | 768 | IP | cagra, nsg, nndescent, diskann | 46 | 4.47 GiB | |
| | `wikipedia10m-768-ip` | 768 | IP | nndescent | 11 | 14.95 GiB | |
| | `bioasq1m-1024-ip` | 1024 | IP | cagra, nsg, nndescent, diskann | 46 | 4.56 GiB | |
| | `bioasq10m-1024-ip` | 1024 | IP | nndescent | 11 | 15.11 GiB | |
| | `c45m-1536-ip` | 1536 | IP | nndescent | 11 | 7.34 GiB | |
| | `deep40m-96-euclidean` | 96 | L2 | cagra, nndescent | 12 | 66.68 GiB | |
| | `deep50m-96-euclidean` † | 96 | L2 | nsg | 1 | 9.81 GiB | |
| | `sift_200nn.knng` | 128 | L2 | 200-NN ground-truth graph | 1 | 0.75 GiB | |
| | **Total** | | | | **430** | **173.33 GiB** | |
|
|
| These cover the 12 datasets benchmarked in the paper. († `deep50m` is an extra scale |
| point not reported in the paper.) Larger configurations are covered by fewer index types |
| simply because not every index could be built at that scale within our compute budget. |
|
|
| --- |
|
|
| ## File naming |
|
|
| ``` |
| <index>_K<degree>_<dataset>_<metric>[_reordered_<method>][_mapping].<ext> |
| ``` |
|
|
| | Part | Values | |
| |---|---| |
| | `<index>` | `cagra`, `nsg`, `nssg`, `nndescent`, `diskann` | |
| | `K<degree>` | `K32` (almost all), `K64` (a few SIFT configurations) | |
| | `<dataset>` | e.g. `sift-128-euclidean`, `bioasq1m-1024-ip` | |
| | `<metric>` | `l2` (Euclidean) or `ip` (inner product) | |
| | `<method>` | `gorder`, `rcm`, `hubsort`, `hubcluster`, `indegree`, `outdegree`, `random` | |
|
|
| Examples: |
|
|
| ``` |
| cagra_K32_deep1m-96-euclidean_l2.adjlist # base graph |
| cagra_K32_deep1m-96-euclidean_l2_reordered_gorder_mapping.txt # Gorder permutation |
| diskann_K32_bioasq1m-1024-ip_ip_reordered_gorder.adjlist # reordered graph |
| diskann_K32_bioasq1m-1024-ip_ip_mapping_gorder.txt # Gorder permutation |
| ``` |
|
|
| Note the two mapping-filename spellings: `..._reordered_<method>_mapping.txt` and |
| `..._mapping_<method>.txt`. They are the same kind of file; the difference is only which |
| build script emitted it. |
|
|
| ### `*.adjlist` — adjacency list (ASCII) |
| |
| ``` |
| <N> <K> # header: number of vertices, out-degree |
| <vertex_id> <neighbor_1> ... <neighbor_K> |
| ... # N lines, vertex_id ascending from 0 |
| ``` |
| |
| ### `*_mapping*.txt` — vertex permutation (ASCII) |
| |
| ``` |
| <N> # header: number of vertices |
| <original_id> <new_id> |
| ... # N lines, original_id ascending from 0 |
| ``` |
| |
| The mapping is `original → new`. Concretely, for a reordering `m`: |
| |
| ``` |
| reordered_graph[m[u]] == { m[w] : w in original_graph[u] } |
| reordered_vectors[m[u]] == original_vectors[u] |
| ``` |
| |
| ### `sift_200nn.knng` — binary k-NN graph |
| |
| The exact-search 200-NN graph for SIFT1M, used as ground truth for recall evaluation. |
| Stored in TEXMEX **`ivecs`** format — little-endian `int32` throughout, one record per |
| query point: |
| |
| ``` |
| [K=200][id_1] ... [id_200] # repeated N = 1,000,000 times |
| ``` |
| |
| The file is exactly `1_000_000 * (4 + 200*4) = 804,000,000` bytes. |
| |
| ```python |
| knn = np.fromfile("sift_200nn.knng", dtype=np.int32).reshape(-1, 201)[:, 1:] |
| ``` |
| |
| --- |
| |
| ## Downloading |
| |
| Full download (~173 GiB) is rarely what you want. Fetch only what you need: |
| |
| ```bash |
| pip install -U huggingface_hub hf_xet |
| ``` |
| |
| ```bash |
| # One index type, one dataset |
| hf download omron-sinicx/plasma --repo-type dataset --local-dir ./plasma \ |
| --include 'cagra_K32_deep1m-96-euclidean_l2*' |
| |
| # Base graphs only, no reordering permutations |
| hf download omron-sinicx/plasma --repo-type dataset --local-dir ./plasma \ |
| --include '*.adjlist' --exclude '*_reordered_*' |
| |
| # Everything for one dataset, across all index types |
| hf download omron-sinicx/plasma --repo-type dataset --local-dir ./plasma \ |
| --include '*_sift-128-euclidean_l2*' |
| |
| # Just the Gorder permutations |
| hf download omron-sinicx/plasma --repo-type dataset --local-dir ./plasma \ |
| --include '*gorder*.txt' |
| ``` |
| |
| Check what a pattern would fetch before committing to it with `--dry-run`. |
| |
| --- |
| |
| ## Reproducing a usable index |
| |
| An adjacency list is only half of an index — you need the vectors it was built over. |
| |
| **1. Get the vectors from the original distributor** (see |
| [Source datasets and credits](#source-datasets-and-credits)). Use the *same* base vectors, in the |
| *same* order, as that section specifies; vertex IDs in the adjacency lists are |
| positions in that original ordering. |
| |
| **2. Load the graph.** |
| |
| ```python |
| import numpy as np |
| |
| def load_adjlist(path): |
| with open(path) as f: |
| n, k = map(int, f.readline().split()) |
| adj = np.empty((n, k), dtype=np.int32) |
| for line in f: |
| parts = line.split() |
| adj[int(parts[0])] = parts[1:] |
| return adj |
| |
| def load_mapping(path): |
| with open(path) as f: |
| n = int(f.readline()) |
| m = np.empty(n, dtype=np.int32) |
| for line in f: |
| u, v = line.split() |
| m[int(u)] = int(v) |
| return m # m[original_id] -> new_id |
| ``` |
| |
| **3. Apply a reordering** to your vectors so they match a reordered graph: |
| |
| ```python |
| vectors = np.load("deep1m_base.npy") # shape (N, D), original order |
| m = load_mapping("cagra_K32_deep1m-96-euclidean_l2_reordered_gorder_mapping.txt") |
| adj = load_adjlist("cagra_K32_deep1m-96-euclidean_l2.adjlist") |
| |
| reordered_vectors = np.empty_like(vectors) |
| reordered_vectors[m] = vectors # reordered_vectors[m[u]] = vectors[u] |
| reordered_adj = m[adj[np.argsort(m)]] # relabel and reorder rows |
| ``` |
| |
| **4. Search.** Feed `reordered_vectors` and `reordered_adj` to your graph-search routine |
| (beam search / greedy best-first). The point of the reordering is locality: neighbouring |
| vertices land on nearby cache lines and pages — the paper measures the resulting DRAM |
| bandwidth utilisation and L1/L2 hit rates alongside recall and QPS. |
| |
| For the full benchmark harness, see the code repository: |
| https://github.com/omron-sinicx/plasma |
| |
| --- |
| |
| ## Source datasets and credits |
| |
| The graphs in this repository were built over vectors produced by other people. **We |
| redistribute none of those vectors.** Each dataset must be obtained from its original |
| provider, under that provider's own terms. Credit belongs to the creators below. |
| |
| ### Classical benchmarks |
| |
| **SIFT1M · GIST1M** — Hervé Jégou, Matthijs Douze, Cordelia Schmid (INRIA / TEXMEX). |
| Local SIFT and global GIST descriptors, introduced with *Product Quantization for Nearest |
| Neighbor Search* (IEEE TPAMI, 2011). |
| Terms: public domain / CC0-equivalent — no usage restrictions stated by the distributor. |
| The 1B-scale sibling (BIGANN) is released as **CC0** by Big ANN Benchmarks. |
| → http://corpus-texmex.irisa.fr/ |
| |
| **DEEP (`deep1m`, `deep10m`, `deep40m`, `deep50m`)** — Artem Babenko and Victor Lempitsky |
| (Yandex Research). Subsets of **DEEP1B**: image embeddings taken from the last |
| fully-connected layer of a GoogLeNet pretrained on ImageNet classification, introduced in |
| *Efficient Indexing of Billion-Scale Datasets of Deep Descriptors* (CVPR, 2016). |
| License: **CC BY 4.0** (Big ANN Benchmarks, "Release terms"). |
| → https://research.yandex.com/blog/benchmarks-for-billion-scale-similarity-search |
| → https://big-ann-benchmarks.com/neurips21.html |
| |
| ### Modern embeddings |
| |
| **Yandex Text-to-Image (`t2i1m`)** — Yandex Research. Database vectors are image |
| embeddings from Se-ResNeXt-101; queries are textual embeddings from a DSSM variant. A |
| deliberately *cross-modal* benchmark, where queries and database points come from |
| different distributions. |
| License: **CC BY 4.0** (Big ANN Benchmarks, "Release terms"). |
| → https://big-ann-benchmarks.com/neurips21.html |
| |
| **OpenAI Embed. (`openai1m`)** — text embeddings of the **WikiText** corpus, generated by |
| an **OpenAI** embedding model (1536-dim). Obtained via the Big ANN Benchmarks collection. |
| Terms: the underlying WikiText corpus is **CC BY-SA 3.0** (derived from Wikipedia); |
| OpenAI's terms for model outputs apply to the embeddings themselves. |
| → https://big-ann-benchmarks.com/ |
| → Simhadri et al., *Results of the Big ANN: NeurIPS'23 competition* (2024) |
| |
| The following three come from **VectorDBBench** (Zilliz, 2023), whose *harness* is |
| MIT-licensed. VectorDBBench states no unified license for the datasets themselves, so the |
| terms of the underlying corpus **and** of the embedding provider both apply. |
| → https://github.com/zilliztech/VectorDBBench |
| |
| **Wikipedia (`wikipedia1m`, `wikipedia10m`)** — text embeddings of the **Wikipedia |
| corpus**, generated by the **Cohere V2** model (768-dim). |
| Terms: Wikipedia text is **CC BY-SA**; Cohere's terms apply to the embeddings. |
| |
| **BioASQ (`bioasq1m`, `bioasq10m`)** — text embeddings of the **BioASQ question-answering |
| corpus**, generated by an **OpenAI** model (1024-dim). |
| Terms: BioASQ distributes its corpus under its own terms and requires registration; |
| OpenAI's terms apply to the embeddings. Verify BioASQ's conditions before use. |
| → http://bioasq.org/ |
| |
| **C4 (`c45m`)** — text embeddings of the **Colossal Clean Crawled Corpus (C4)**, generated |
| by the **Cohere V3** model (1536-dim). C4 was released by AllenAI as a cleaned scrape of |
| Common Crawl, introduced with the T5 paper (Raffel et al., JMLR 2020). |
| Terms: the C4 corpus is **ODC-BY**, and Common Crawl's terms apply to the scraped content; |
| Cohere's terms apply to the embeddings. |
| → https://huggingface.co/datasets/allenai/c4 |
| |
| --- |
| |
| ## License and credit |
| |
| The contents of *this repository* — the adjacency lists and permutations — are released |
| under **CC BY 4.0** by: |
| |
| - **Yutaro Oguri** — The University of Tokyo |
| - **Mai Nishimura** — OMRON SINIC X Corporation |
| - **Yusuke Matsui** — The University of Tokyo |
| |
| This license covers only the graph structures we computed. It does **not** grant any |
| rights to the source corpora, whose underlying vectors are from their original providers |
| and remain under those providers' own terms — attributed in full under |
| [Source datasets and credits](#source-datasets-and-credits). |
| |
| --- |
| |
| ## Citation |
| |
| > Yutaro Oguri, Mai Nishimura, Yusuke Matsui. |
| > **Plasma: A Layout-Aware Benchmark Reveals Memory Layout Matters for Graph-based ANNS on GPU.** |
| > The 2nd Workshop on Vector Databases (VecDB) at Very Large Data Bases (VLDB), 2026. |
| > *The University of Tokyo · OMRON SINIC X Corporation* |
| |
| ```bibtex |
| @inproceedings{oguri2026plasma, |
| author = {Yutaro Oguri and Mai Nishimura and Yusuke Matsui}, |
| title = {Plasma: A Layout-Aware Benchmark Reveals Memory Layout |
| Matters for Graph-based ANNS on GPU}, |
| booktitle = {The 2nd Workshop on Vector Databases (VecDB) at |
| Very Large Data Bases (VLDB)}, |
| year = {2026}, |
| url = {https://openreview.net/forum?id=tF70hyyM6V}, |
| eprint = {2508.15436}, |
| archivePrefix = {arXiv} |
| } |
| ``` |
| |