Search is not available for this dataset
id int64 0 400k | emb listlengths 768 768 |
|---|---|
0 | [
0.00846440065652132,
0.039484258741140366,
0.008503948338329792,
0.05571165308356285,
-0.04112906754016876,
0.03252653405070305,
0.03274775296449661,
-0.04758375510573387,
0.00011863542022183537,
-0.015096202492713928,
-0.04298381507396698,
-0.011895694769918919,
0.017642054706811905,
0.00... |
1 | [
0.00604797201231122,
0.0294302087277174,
0.006285736802965403,
0.07156071811914444,
-0.01226600632071495,
0.028205638751387596,
0.009208452887833118,
0.03346344828605652,
-0.0005370258004404604,
-0.03532243147492409,
-0.04304048418998718,
-0.002035789890214801,
-0.0028219043742865324,
0.02... |
2 | [
-0.07545813918113708,
0.012430636212229729,
0.0012921704910695553,
0.03870038688182831,
-0.028619129210710526,
0.05991068854928017,
-0.04220900684595108,
0.02807421237230301,
-0.013598239980638027,
-0.06397601962089539,
0.0009548108791932464,
-0.005212354473769665,
0.061298828572034836,
-0... |
3 | [
-0.009015138261020184,
0.05445823073387146,
-0.03005972132086754,
0.05362033471465111,
-0.008477232418954372,
0.04885077849030495,
-0.03924863785505295,
0.028110932558774948,
0.010837283916771412,
-0.020452355965971947,
-0.00643919687718153,
0.023945387452840805,
0.031230494379997253,
0.03... |
4 | [
-0.06662242859601974,
0.018756849691271782,
0.023185277357697487,
0.04183235391974449,
-0.05395379289984703,
0.05051610246300697,
0.006216772366315126,
0.07229508459568024,
0.014747574925422668,
0.037791263312101364,
-0.025904173031449318,
-0.018171638250350952,
0.02492561936378479,
-0.020... |
5 | [
-0.04149091988801956,
0.010837554931640625,
0.02462402731180191,
0.001610197126865387,
-0.007340590935200453,
0.07551922649145126,
-0.013579831458628178,
0.04712691158056259,
-0.03504614904522896,
0.006322147324681282,
0.022992605343461037,
0.001127945608459413,
-0.07642539590597153,
0.041... |
6 | [
-0.03345445543527603,
0.026791522279381752,
-0.028693238273262978,
0.028643062338232994,
-0.05598650500178337,
-0.0061574229039251804,
-0.044173117727041245,
0.009213821962475777,
0.053458601236343384,
-0.057768527418375015,
0.001855108654126525,
0.007724185939878225,
0.028125232085585594,
... |
7 | [
-0.04200740531086922,
0.005353735294193029,
0.08412571251392365,
0.004942205734550953,
-0.03282678499817848,
0.04184911027550697,
-0.0023025793489068747,
0.05937441438436508,
0.04206342250108719,
-0.0015217158943414688,
0.008069919422268867,
-0.004728332161903381,
0.02630646899342537,
-0.0... |
8 | [
-0.011435735039412975,
0.03404336795210838,
-0.0025478333700448275,
0.03270759806036949,
-0.04568197578191757,
0.028198132291436195,
0.023630749434232712,
0.06321867555379868,
0.023864028975367546,
-0.035691652446985245,
-0.0463109016418457,
0.0014221061719581485,
0.005345536395907402,
-0.... |
9 | [
-0.05283759534358978,
0.04724350571632385,
0.03226631134748459,
0.03213602676987648,
-0.06491277366876602,
0.009768206626176834,
0.0019679979886859655,
0.03493599221110344,
0.0017978702671825886,
-0.02596215531229973,
-0.0067338221706449986,
-0.010476703755557537,
-0.02575567737221718,
0.0... |
10 | [
-0.0224812813103199,
-0.06372538208961487,
0.0035016529727727175,
0.007605457678437233,
-0.027218379080295563,
0.02113710157573223,
-0.03997734561562538,
-0.039576608687639236,
-0.0022839237935841084,
0.0034961479250341654,
0.004568549804389477,
-0.012226158753037453,
0.013662129640579224,
... |
11 | [
-0.028807347640395164,
0.0006947966176085174,
-0.01668744906783104,
0.016234369948506355,
-0.015572567470371723,
0.02974102646112442,
-0.04057622328400612,
0.04427853971719742,
0.004728303290903568,
-0.0019395112758502364,
-0.014470958150923252,
0.042025912553071976,
-0.0010378457373008132,
... |
End of preview. Expand in Data Studio
PubMed & arXiv Abstract Embeddings for Vector Database Benchmarking
Dataset Description
This dataset contains pre-computed embeddings of scientific paper abstracts from PubMed and arXiv, designed for evaluating vector database performance. The embeddings are generated using Google's EmbeddingGemma-300M model.
Purpose
Benchmark dataset for evaluating vector database performance, specifically designed for use with VectorDBBench.
Dataset Summary
- Total Training Samples: 400,335
- Test Queries: 1,000
- Ground Truth: Top-1000 nearest neighbors per query
- Embedding Dimension: 768
- Embedding Model: google/embeddinggemma-300m
- Source Data: brainchalov/pubmed_arxiv_abstracts_data
Dataset Structure
Data Splits
| Split | Samples | Description |
|---|---|---|
train |
400,335 | Training embeddings (80% random sample from source) |
test |
1,000 | Test query embeddings (from remaining 20%, non-overlapping) |
neigbors.parquet |
1,000 | Top-1000 nearest neighbors for each test query |
Data Fields
train & test
id(int64): Unique identifier for each paperemb(List[float64]): 768-dimensional L2-normalized embedding vector
neigbors.parquet
id(int64): Query identifier (matches test)neighbors_id(List[int64]): List of 1000 nearest neighbor IDs from train set
Dataset Creation
Source Data
The dataset is derived from approximately 500K scientific abstracts from PubMed and arXiv:
- Train: 80% random sample (400,335 papers)
- Test: 1,000 papers randomly sampled from remaining 20% (non-overlapping with train)
Preprocessing
- Text Preparation: Concatenated title + abstract for each paper
- Chunking: For texts exceeding 2048 tokens:
- Split into chunks with ~50 token overlap
- Embedded each chunk separately
- Averaged chunk embeddings for final representation
- Normalization: All embeddings are L2-normalized
Embedding Generation
- Model: google/embeddinggemma-300m
- Dimension: 768
- Max Token Length: 2048
- Normalization: L2-normalized
Ground Truth Generation
Ground truth nearest neighbors were computed using:
- Method: Flat search (brute-force)
- Metric: Cosine similarity
- K: Top-1000 neighbors per query
Usage
Loading the Dataset
from datasets import load_dataset
import pandas as pd
# Load train and test splits
dataset = load_dataset("redcourage/pubmed-arxiv-abstract-embedding-gemma-300m")
train = dataset['train']
test = dataset['test']
# Load ground truth
neigbors = pd.read_parquet(
"hf://datasets/redcourage/pubmed-arxiv-abstract-embedding-gemma-300m/neigbors.parquet"
)
Evaluation Example
import numpy as np
from datasets import load_dataset
import pandas as pd
# Load data
dataset = load_dataset("redcourage/pubmed-arxiv-abstract-embedding-gemma-300m")
train_data = dataset['train']
test_data = dataset['test']
neigbors = pd.read_parquet(
"hf://datasets/redcourage/pubmed-arxiv-abstract-embedding-gemma-300m/neigbors.parquet"
)
# Convert to numpy arrays
train_embeddings = np.array(train_data['emb'])
test_embeddings = np.array(test_data['emb'])
# Example: Compute recall@10
def compute_recall_at_k(retrieved_ids, neigbors_ids, k=10):
"""
Compute Recall@K
Args:
retrieved_ids: List of retrieved neighbor IDs
neigbors_ids: List of ground truth neighbor IDs
k: Number of top results to consider
"""
retrieved_k = set(retrieved_ids[:k])
neigbors_k = set(neigbors_ids[:k])
if len(neigbors_k) == 0:
return 0.0
return len(retrieved_k & neigbors_k) / len(neigbors_k)
# Use with your vector database
# ... insert your vector DB search code here ...
Use Cases
- Vector database performance benchmarking
- Approximate nearest neighbor (ANN) algorithm evaluation
- Retrieval system testing on scientific literature
Limitations
- Domain-Specific: Optimized for scientific/biomedical text; may not generalize to other domains
- Language: English only
- Temporal Coverage: Limited to papers available in the source dataset
- Chunking Strategy: Long documents are averaged, which may lose fine-grained information
- Ground Truth: Based on cosine similarity with embeddings, not human relevance judgments
License
Apache 2.0 (same as source dataset)
Citation
If you use this dataset, please cite:
@dataset{pubmed_arxiv_embeddings_gemma,
author = {redcourage},
title = {PubMed & arXiv Abstract Embeddings for Vector Database Benchmarking},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/redcourage/pubmed-arxiv-abstract-embedding-gemma-300m}
}
Source Dataset Citation
@dataset{pubmed_arxiv_abstracts,
author = {brainchalov},
title = {PubMed ArXiv Abstracts Data},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/brainchalov/pubmed_arxiv_abstracts_data}
}
Embedding Model Citation
@misc{embeddinggemma,
title={Embedding Gemma},
author={Google},
year={2024},
url={https://huggingface.co/google/embeddinggemma-300m}
}
Acknowledgments
- Original dataset: brainchalov/pubmed_arxiv_abstracts_data
- Embedding model: google/embeddinggemma-300m
- Benchmark framework: VectorDBBench
- Downloads last month
- 57