Skip to main content

ArXiv Embedding Benchmark

Status Python Embeddings arXiv Retrieval

A benchmarking toolkit for comparing embedding models on academic paper similarity tasks using research paper titles, abstracts, and field labels.

The project asks a practical retrieval question: can an embedding model connect a paper title to its real abstract, keep related papers close, separate unrelated fields, and behave consistently across domains?

Why this exists

Embedding models are often chosen by popularity or broad benchmark reputation. Research retrieval is more specific. A useful model for literature search, scientific RAG, or technical discovery needs to represent relationships between papers in a way that supports real downstream decisions.

This repo provides a repeatable evaluation harness for comparing model behavior across scientific fields.

What it evaluates

Dimension What it measures
Title to own abstract Whether a model connects a paper title with its real content
Title to same-field abstracts Whether it distinguishes related but different papers
Title to other-field abstracts Whether it separates unrelated research areas
Abstract to abstract similarity Whether papers cluster meaningfully by topic
Score consistency Whether behavior is stable across fields and comparisons

Benchmark snapshot

The current experiment compares local, scientific, biomedical, general-purpose, and cloud-hosted embedding models.

Rank Model Score Own title / abstract Same-field separation Avg std
1 Bedrock 0.449 0.710 0.103 0.118
2 MPNet 0.443 0.714 0.271 0.134
3 MiniLM-L12 0.439 0.688 0.246 0.130
4 MiniLM-L6 0.433 0.667 0.242 0.129
5 RoBERTa-Large-ST 0.410 0.601 0.165 0.110

The useful signal is not only the winner. Different model families trade off high title / abstract similarity against separation between related papers. For retrieval systems, over-clustering can be just as damaging as weak recall.

Features

  • Collects academic papers across configured research fields
  • Filters abstracts by token length for more consistent comparisons
  • Evaluates Hugging Face models and AWS Bedrock embeddings
  • Supports CPU execution with optional GPU acceleration
  • Caches embeddings to avoid unnecessary recomputation
  • Produces CSV leaderboards, detailed metrics, paper metadata, and experiment snapshots
  • Uses Rich progress output for long-running benchmark visibility

Quick start

git clone https://github.com/codychampion/arxiv-embedding-benchmark.git
cd arxiv-embedding-benchmark
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m src.embedding_benchmarking.cli evaluate

Configuration

Models and fields are configured in YAML. A typical run includes a mix of general-purpose, scientific, biomedical, and cloud-hosted models.

Outputs

Each run creates a timestamped experiment directory under experiments/.

File Purpose
embedding_comparison_results.csv Full per-model metric table
model_leaderboard.csv Ranked aggregate leaderboard
papers_metadata.csv Paper titles, abstracts, fields, and metadata
collection_statistics.yaml Corpus statistics and token distribution

Publishing

The package includes PyPI metadata and a trusted-publishing workflow. Configure PyPI Trusted Publishing for this repository before cutting the first release.

python -m build
twine check dist/*

Project structure

src/embedding_benchmarking/
├── cli.py
├── config.py
├── data.py
├── embedding_evaluator.py
├── evaluation.py
├── models.py
└── utils.py

Notes on interpretation

This benchmark is best used as a decision-support tool, not a universal ranking. The right embedding model depends on the corpus, query style, task, and cost envelope.

Citation

@software{arxiv_embedding_benchmark,
  title = {ArXiv Embedding Benchmark},
  author = {Champion, Cody},
  year = {2024},
  description = {A tool for evaluating embedding models on academic paper similarity tasks}
}

Metadata

Release files for arxiv-embedding-benchmark 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arxiv-embedding-benchmark 0.1.0
File Size Uploaded Provenance Actions
arxiv_embedding_benchmark-0.1.0.tar.gz 2.9 MB With provenance Details for arxiv_embedding_benchmark-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arxiv-embedding-benchmark 0.1.0
File Interpreter ABI Platform Actions
arxiv_embedding_benchmark-0.1.0-py3-none-any.whl Python 3 none any Details for arxiv_embedding_benchmark-0.1.0-py3-none-any.whl

Total release size: 2.9 MB

Release files / arxiv_embedding_benchmark-0.1.0.tar.gz

Download URL arxiv_embedding_benchmark-0.1.0.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
a9f2ac473d1f0ca4232c617c2ed8896f241cd4b8c28ab7fe8665a5770f251512
BLAKE2b-256 checksum
How to use checksums
af592927fe319d56bf7540b2e51ede388e30e330d8b50fe13acc22435fc04a35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / arxiv_embedding_benchmark-0.1.0-py3-none-any.whl

Download URL arxiv_embedding_benchmark-0.1.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f794421254c90e9f32151c5cc700b549e48216943fc7767e0bdc41bff2f28bb
BLAKE2b-256 checksum
How to use checksums
a65af0a14aac1bc78349c7d801b119ac392527749c39588241f76e7e284cddce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Security for arxiv-embedding-benchmark 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for arxiv_embedding_benchmark-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page