Fine-tuned CPU-based classification of scientific datasets into research fields using OpenAlex topics taxonomy.
This classifier assigns a research field to scientific datasets based on their metadata using a fine-tuned embedding model. It maps datasets to the 4,516 topics in the OpenAlex taxonomy, along with their hierarchical subfield, field, and domain classifications. This was developed as part of our NIH S-index Challenge Phase 2 proposal. We refer to the S-index Hub for more information about our S-index and the Challenge.
Key features:
- π ~48,000 records/second on CPU with parallel processing (no GPU required)
- π 4,516 OpenAlex topics with full hierarchy
- π― 92.6% domain accuracy, 62.6% topic accuracy (fine-tuned model)
- π» Single dependency install β works on any machine
# Clone the repository (requires Git LFS for model files)
git lfs install
git clone https://github.com/data-S-index/dataset-to-field.git
cd dataset-to-field
git lfs pull # Download model files (~140 MB)
# Install
pip install -e .# Classify a single record
from openalex_classifier import TopicClassifier
classifier = TopicClassifier()
classifier.initialize()
result = classifier.classify({
"title": "Climate change impact on marine ecosystems",
"subjects": ["Climate", "Marine Biology", "Ecology"]
})
print(result)
# {
# 'topic': {'id': 1234, 'name': 'Marine Ecology and Climate Change', 'score': 0.72},
# 'subfield': {'id': 23, 'name': 'Ecology'},
# 'field': {'id': 5, 'name': 'Environmental Science'},
# 'domain': {'id': 2, 'name': 'Life Sciences'}
# }This repository uses Git LFS to store model files. Make sure Git LFS is installed before cloning.
# 1. Install Git LFS (if not already installed)
git lfs install
# 2. Clone the repository
git clone https://github.com/data-S-index/dataset-to-field.git
cd dataset-to-field
# 3. Pull model files (~140 MB)
git lfs pull
# 4. Install the package
pip install -e .- Python 3.10+
- Git LFS (for model files)
- ~200MB disk space for models
- No GPU required
from openalex_classifier import TopicClassifier
# Initialize (loads model and topic embeddings)
classifier = TopicClassifier()
classifier.initialize()
# Single record
result = classifier.classify(record)
# Batch processing (faster)
results = classifier.classify_batch(records)# Classify NDJSON file
python -m openalex_classifier.cli input.ndjson output.ndjson
# With progress bar
python -m openalex_classifier.cli input.ndjson output.ndjson --progressRecords should have at minimum a title field. Additional fields improve classification:
{
"id": "10.5281/zenodo.123456",
"title": "Dataset of marine temperature measurements",
"subjects": ["Oceanography", "Climate Science"],
"description": "Temperature readings from Pacific Ocean buoys..."
}{
"dataset_id": "10.5281/zenodo.123456",
"topic": {
"id": 1234,
"name": "Ocean Temperature and Climate Variability",
"score": 0.68
},
"subfield": {"id": 23, "name": "Oceanography"},
"field": {"id": 5, "name": "Earth and Planetary Sciences"},
"domain": {"id": 2, "name": "Physical Sciences"}
}| Metric | Value |
|---|---|
| Throughput | 48,304 records/sec (32 workers) |
| Total Records Classified | 48.7 million |
| Processing Time | ~15 minutes |
| Compressed Output | 394 MB |
Tested on 32-core AMD Threadripper with real DataCite metadata. Performance scales linearly with CPU cores.
The complete classified DataCite dataset (46.2M records) is available for download:
- classified_output.zip (394 MB)
The fine-tuned model was validated against a held-out test set of 1,525 records with ground truth OpenAlex classifications:
| Level | Accuracy | Description |
|---|---|---|
| Domain | 92.6% | 4 domains: Physical Sciences, Life Sciences, Social Sciences, Health Sciences |
| Field | 85.8% | ~26 fields: Chemistry, Medicine, Computer Science, etc. |
| Subfield | 73.6% | ~250 subfields: more specific research areas |
| Topic | 62.6% | 4,516 topics: granular research topics |
| Model | Domain | Field | Subfield | Topic |
|---|---|---|---|---|
| Base (potion-32m) | 77.2% | 60.5% | 27.9% | 16.2% |
| Fine-tuned | 92.6% | 85.8% | 73.6% | 62.6% |
The fine-tuned model achieves +15% improvement on domain accuracy and +46% improvement on exact topic matching compared to the base embedding model.
The model was fine-tuned on 10,500 scientific records with ground truth topic classifications aligned with the OpenAlex taxonomy.
- Dataset: jimnoneill/dataset-to-field-training-10k
- Model: jimnoneill/dataset-to-field
- Text Extraction: Concatenate title + subjects/keywords + description from metadata
- Semantic Embedding: Fine-tuned Model2Vec static embeddings
- Topic Matching: Cosine similarity against 4,516 pre-embedded topics
- Hierarchical Output: Return topic β subfield β field β domain
Domain (4)
βββ Field (26)
βββ Subfield (254)
βββ Topic (4,516)
Example:
- Domain: Physical Sciences
- Field: Computer Science
- Subfield: Artificial Intelligence
- Topic: Natural Language Processing
If you use this classifier, please cite:
@software{dataset-to-field,
author = {O'Neill, James, Patel, Bhavesh},
title = {Dataset Research Field Classifier},
year = {2026},
url = {https://github.com/data-S-index/dataset-to-field}
}MIT License - see LICENSE for details.
- OpenAlex for the topic taxonomy
- minishlab/potion-base-32m base embedding model
- Model2Vec for model distillation and training