sift1m-fanns-normal / README.md
brady0127's picture
Update README.md
ef92881 verified
|
Raw
History Blame Contribute Delete
5.14 kB
metadata
language:
  - en
pretty_name: SIFT1M-variant Dataset for (Filtered) Approximate Nearest Neighbor Search
license: mit
task_categories:
  - text-retrieval
tags:
  - vector-search
  - approximate-nearest-neighbor
  - approximate-nearest-neighbor-search
  - filtered-approximate-nearest-neighbor-search
  - ann-benchmark
dataset_info:
  features:
    - name: id
      dtype: int64
    - name: label
      dtype: int64
    - name: range_value
      dtype: float64
size_categories:
  - 1M<n<10M

SIFT1M Dataset to Evaluate (Filtered) Approximate Nearest Neighbor Search — Normal Variant

This dataset is intended to benchmark Approximate Nearest Neighbor Search (ANNS) and Filtered Approximate Nearest Neighbor Search (FANNS) algorithms. It is based on the classic SIFT1M dataset (1,000,000 base vectors and 10,000 query vectors, each 128-dimensional). Because SIFT1M ships without any structured metadata, we augment it with synthetic attributes drawn from a normal (Gaussian) distribution: every base vector receives one categorical label and one continuous range_value. Query attributes for three different filter types are sampled from the same normal distribution as the base attributes. The ground truth for the up to k=100 nearest neighbors was computed for unfiltered ANNS and for filtered ANNS with the three different filter types. Please note that if fewer than 100 database items match the filter, then the ground truth can contain fewer than k=100 entries. This variant is the Gaussian counterpart of sift1m-fanns-uniform: the design is identical and only the sampling distribution changes, so that the two can be compared directly to study the effect of attribute distribution (homogeneous vs. heterogeneous selectivity).

Filter Types

Filter Predicate Description
label label == required_label Exact match on the categorical attribute.
range range_low <= range_value <= range_high Containment in a fixed-width interval.
both label AND range Conjunction of the two predicates above.

Parameters

Parameter Value Meaning
N 1,000,000 Number of base (database) vectors
nq 10,000 Number of query vectors
vec_dim 128 Embedding dimension (from SIFT1M)
NUM_LABELS 12 label ~ round(Normal(5.5, 2.0)) clipped to [0, 11]
LABEL_MEAN / LABEL_STD 5.5 / 2.0 Mean and std of the label histogram
range_value Normal(0.5, 0.15) clipped to [0, 1] Continuous base attribute
RANGE_MEAN / RANGE_STD 0.5 / 0.15 Mean and std of range_value and of query window centers
RANGE_WIDTH 0.2 Width of every query range window (range_high - range_low)
GT_K 100 Max number of ground-truth neighbors per query
RANDOM_SEED 42 Fixed seed; the dataset is bit-reproducible

Expected Selectivity

Under the normal distribution, the average selectivity is higher than in the uniform variant, but more importantly the per-query selectivity has high variance (heterogeneous): common labels and central range windows are far less selective than rare labels and edge windows. A single benchmark therefore spans a wide range of difficulties, which is closer to real-world skewed attributes.

Filter Avg. selectivity (approx.) Per-query spread Note
label ~14% ~0.6% (label 0/11) → ~19% (label 5/6) Σ pₓ² exceeds the uniform 8.33%
range ~30–40% ~8% (edge window) → ~50% (central window) Windows concentrate near the dense center
both ~5% <0.5% (rare label + edge window) → ~10% Highest variance; a few queries may yield < 100 GT entries

Files and Description

File Description
database_vectors.fvecs 128-dimensional base vectors. One vector per database item.
database_attributes.jsonl JSON objects with {id, label, range_value} for each item. One JSON object per database item.
query_vectors.fvecs 128-dimensional query vectors. One vector per query.
ground_truth.ivecs Ground truth for unfiltered nearest neighbor search. One vector per query.
label_query_attributes.jsonl Query attributes for label (exact match) filtering. One JSON object per query.
ground_truth_label.ivecs Ground truth for label-filtered NN search. One vector per query.
range_query_attributes.jsonl Query attributes for range filtering. One JSON object per query.
ground_truth_range.ivecs Ground truth for range-filtered NN search. One vector per query.
label_and_range_query_attributes.jsonl Query attributes for the joint (label AND range) filter. One JSON object per query.
ground_truth_label_and_range.ivecs Ground truth for joint-filtered NN search. One vector per query.

Formats

  • .fvecs: Binary format for 32-bit floating point numbers (used for embedding vectors).
  • .ivecs: Binary format for 32-bit signed integers (used for ground truth).
  • .jsonl: Each line contains a JSON object (used for attributes).