Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
csv
Languages:
English
Size:
10M - 100M
License:
File size: 6,376 Bytes
44c2141 6cb8fd7 44c2141 6f4857f 44c2141 6cb8fd7 44c2141 6f4857f 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 6f4857f 44c2141 6cb8fd7 44c2141 6cb8fd7 44c2141 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | ---
pretty_name: PubMed Research Classifier Labels
license: other
license_name: embo-internal
license_link: LICENSE.md
task_categories:
- text-classification
language:
- en
tags:
- pubmed
- openalex
- research-classification
- bibliometrics
- embo
size_categories:
- 10M<n<100M
configs:
- config_name: v1.0.0
data_files: data/v1.0.0/labels.csv
default: true
dataset_info:
config_name: v1.0.0
features:
- name: PMID
dtype: string
- name: class
dtype: string
- name: probability
dtype: float64
splits:
- name: train
num_examples: 30426295
---
# PubMed Research Classifier Labels
Private lookup table of **research / non-research** labels for PubMed IDs.
| | |
|--|--|
| **PyPI package** | [`pubmed-research-classifier`](https://pypi.org/project/pubmed-research-classifier/) (**≥ 0.3.0** for Hub lookup) |
| **This dataset** | Hub release **v1.0.0** (labels scored with package **0.2.0** weights) |
| **Docs** | [Package README on PyPI](https://pypi.org/project/pubmed-research-classifier/) |
**Coverage (v1.0.0):** labels for **all OpenAlex works that have a PubMed ID (PMID)**,
drawn from the OpenAlex corpus snapshot used in this project, with PubMed-linked
works **up to April 2026**. Every distinct PMID in that slice is included
(**30,426,295** unique IDs). Works without a PMID are out of scope for this table.
This Hub dataset is versioned independently (`v1.0.0`, `v1.1.0`, …) so future
classifier / corpus refreshes can ship updated label tables without breaking
consumers pinned to an older revision.
| Field | Version |
|-------|---------|
| **Dataset release** | **v1.0.0** (this revision) |
| **Corpus coverage** | All OpenAlex works with PMID, up to **April 2026** |
| Label model (weights) | `pubmed-research-classifier==0.2.0` |
| Recommended client | `pubmed-research-classifier>=0.3.0` (`[cache]` extra) |
| Decision rule | `research` if P(non-research) < **0.75**, else `non-research` (τ = 0.75) |
| Unique PMIDs | **30,426,295** |
---
## Dataset structure
| Column | Type | Description |
|--------|------|-------------|
| `PMID` | string | Numeric PubMed ID (no `pmid:` / URL prefix) |
| `class` | string | `research` or `non-research` |
| `probability` | float | Model estimate of **P(non-research)** |
Class counts in **v1.0.0**:
| `class` | Count |
|---------|------:|
| `research` | 24,113,963 |
| `non-research` | 6,312,332 |
Files:
```
data/v1.0.0/labels.csv
```
Later releases add `data/v1.1.0/`, `data/v2.0.0/`, etc., each exposed as a
dataset config with the same three columns.
---
## How to use with `pubmed-research-classifier` (≥ 0.3.0) — recommended
Install the optional cache extra and set a Hub token with **read** access to
this private dataset:
```bash
pip install "pubmed-research-classifier[cache]>=0.3.0"
export HF_TOKEN=hf_xxxxxxxx # or: huggingface-cli login
```
```python
from pubmed_research_classifier import (
load_label_cache,
lookup_pmid,
classify_pmid,
)
# First call downloads v1.0.0 (~1.2 GB) and builds a local DuckDB index
# under ~/.cache/pubmed_research_classifier/ (override with PUBMED_RC_CACHE_DIR).
cache = load_label_cache(revision="v1.0.0")
print(len(cache)) # 30426295
lookup_pmid("10006576")
# {"PMID": "10006576", "class": "research",
# "probability": 0.009..., "source": "cache"}
# Cache hit → Hub row; miss → run the bundled MLP (needs classify() fields)
classify_pmid("10006576")
classify_pmid(
"99999999",
record={
"title": "...",
"abstract": "...",
"pub_types": ["Journal Article"],
"n_authors": 3,
"n_refs": 12,
},
)
```
Batch lookup (order-preserving):
```python
rows = cache.lookup_many(["10006576", "10047518", "99999999"])
# [dict, dict, None]
```
`classify(...)` without the cache still works for raw text / embeddings
(see the [PyPI README](https://pypi.org/project/pubmed-research-classifier/)).
### Monthly Hub refresh (maintainers)
Needs a token with **write** access. Merge a CSV of new PMIDs
(`PMID,class,probability`) into the previous table and upload a new revision:
```bash
pubmed-rc-publish-labels \
--new-csv new_pmids.csv \
--base-revision v1.0.0 \
--new-revision v1.1.0 \
--upload
```
Or from Python: `publish_label_revision(..., upload=True)`.
---
## How to load with 🤗 Datasets (without the package)
Requires a Hugging Face token with access to this **private** dataset.
```python
from datasets import load_dataset
# Default config = latest published table (currently v1.0.0)
ds = load_dataset(
"EMBO/pubmed-research-classifier",
token=True, # or pass a token string / use HF_TOKEN
)
# Pin a release
ds = load_dataset(
"EMBO/pubmed-research-classifier",
name="v1.0.0",
token=True,
)
print(ds["train"][0])
# {'PMID': '10006576', 'class': 'research', 'probability': 0.009...}
```
For large joins, prefer DuckDB / Polars on the CSV (or the package’s local
DuckDB file) rather than building a giant Python dict.
---
## Provenance
**v1.0.0** covers **all OpenAlex works sourced from PubMed (i.e. with a PMID) up to
April 2026** — one row per distinct PMID in that OpenAlex/PubMed-linked slice.
Labels were computed from OpenAlex-derived work tables (people works, life-science
author works, and a large ModernBERT-embedded OpenAlex shard) by:
1. Building per-PMID features (ModernBERT title/abstract embeddings + PubMed metadata).
2. Running `pubmed-research-classifier==0.2.0` in **embedding mode** on GPU.
3. Exporting the unique-PMID result table uploaded here.
Local mirror of this file (EMBO DGX):
`/raid/shared/apply-classify-article/data/pubmed-research-classifier_cached-results_0.2.0.csv`
---
## Versioning policy
| Hub dataset tag / config | Meaning |
|--------------------------|---------|
| `v1.0.0` | First EMBO release of the PMID label table (scored with classifier **0.2.0**) |
| `v1.x.0` | Additive / corrective corpus updates (same schema); use package **≥ 0.3.0** to load |
| `v2.0.0` | Breaking schema or new primary classifier generation |
Always pin `revision=` / `name=` (Hub) or `load_label_cache(revision=...)` (package)
in production code.
---
## License / access
**Private** EMBO dataset. Do not redistribute outside authorised Hugging Face
accounts/organisations. Contact EMBO data owners for access requests.
|