Dataset Viewer
Auto-converted to Parquet Duplicate
target_id
stringlengths
15
15
disease_id
stringlengths
10
14
target_index
int64
5
19.6k
disease_index
int64
0
45.7k
transition_year
int64
2k
2.02k
outcome
bool
2 classes
ENSG00000060718
EFO_0004229
815
96
1,995
true
ENSG00000080573
EFO_0004229
1,489
96
1,995
true
ENSG00000081052
EFO_0004229
1,511
96
1,995
true
ENSG00000108821
EFO_0004229
3,552
96
1,995
true
ENSG00000130635
EFO_0004229
6,208
96
1,995
true
ENSG00000134871
EFO_0004229
6,863
96
1,995
true
ENSG00000139219
EFO_0004229
7,674
96
1,995
true
ENSG00000142156
EFO_0004229
8,076
96
1,995
true
ENSG00000142173
EFO_0004229
8,079
96
1,995
true
ENSG00000163359
EFO_0004229
10,791
96
1,995
true
ENSG00000164692
EFO_0004229
11,216
96
1,995
true
ENSG00000168542
EFO_0004229
12,152
96
1,995
true
ENSG00000169031
EFO_0004229
12,257
96
1,995
true
ENSG00000171502
EFO_0004229
12,811
96
1,995
true
ENSG00000172752
EFO_0004229
13,085
96
1,995
true
ENSG00000182871
EFO_0004229
14,723
96
1,995
true
ENSG00000187498
EFO_0004229
15,671
96
1,995
true
ENSG00000188153
EFO_0004229
15,818
96
1,995
true
ENSG00000196739
EFO_0004229
16,288
96
1,995
true
ENSG00000197565
EFO_0004229
16,491
96
1,995
true
ENSG00000204248
EFO_0004229
17,059
96
1,995
true
ENSG00000204262
EFO_0004229
17,063
96
1,995
true
ENSG00000204291
EFO_0004229
17,072
96
1,995
true
ENSG00000206384
EFO_0004229
17,428
96
1,995
true
ENSG00000215018
EFO_0004229
17,698
96
1,995
true
ENSG00000113578
EFO_1001332
4,156
9,011
1,995
false
ENSG00000100385
HP_0001945
2,269
10,303
1,995
false
ENSG00000100387
HP_0001945
2,270
10,303
1,995
false
ENSG00000113580
HP_0001945
4,157
10,303
1,995
false
ENSG00000113851
HP_0001945
4,193
10,303
1,995
false
ENSG00000134460
HP_0001945
6,797
10,303
1,995
false
ENSG00000139842
HP_0001945
7,765
10,303
1,995
false
ENSG00000147168
HP_0001945
8,801
10,303
1,995
false
ENSG00000167986
HP_0001945
12,018
10,303
1,995
false
ENSG00000100385
HP_0012378
2,269
11,521
1,995
false
ENSG00000100387
HP_0012378
2,270
11,521
1,995
false
ENSG00000113580
HP_0012378
4,157
11,521
1,995
true
ENSG00000113851
HP_0012378
4,193
11,521
1,995
false
ENSG00000134460
HP_0012378
6,797
11,521
1,995
false
ENSG00000139842
HP_0012378
7,765
11,521
1,995
false
ENSG00000147168
HP_0012378
8,801
11,521
1,995
false
ENSG00000167986
HP_0012378
12,018
11,521
1,995
false
ENSG00000198900
MONDO_0000607
16,899
12,146
1,995
false
ENSG00000119535
MONDO_0000873
4,862
12,235
1,995
false
ENSG00000196262
MONDO_0000873
16,144
12,235
1,995
false
ENSG00000103546
MONDO_0001442
2,811
12,492
1,995
false
ENSG00000140443
MONDO_0002177
7,842
12,792
1,995
false
ENSG00000101162
MONDO_0003175
2,430
13,382
1,995
false
ENSG00000104833
MONDO_0003175
2,947
13,382
1,995
false
ENSG00000123416
MONDO_0003175
5,322
13,382
1,995
false
ENSG00000127824
MONDO_0003175
5,870
13,382
1,995
false
ENSG00000137267
MONDO_0003175
7,326
13,382
1,995
false
ENSG00000137285
MONDO_0003175
7,332
13,382
1,995
false
ENSG00000152086
MONDO_0003175
9,338
13,382
1,995
false
ENSG00000167552
MONDO_0003175
11,896
13,382
1,995
false
ENSG00000167553
MONDO_0003175
11,897
13,382
1,995
false
ENSG00000176014
MONDO_0003175
13,642
13,382
1,995
false
ENSG00000188229
MONDO_0003175
15,836
13,382
1,995
false
ENSG00000196230
MONDO_0003175
16,135
13,382
1,995
false
ENSG00000198033
MONDO_0003175
16,620
13,382
1,995
false
ENSG00000258947
MONDO_0003175
18,772
13,382
1,995
false
ENSG00000261456
MONDO_0003175
18,838
13,382
1,995
false
ENSG00000101162
MONDO_0004669
2,430
14,140
1,995
false
ENSG00000104833
MONDO_0004669
2,947
14,140
1,995
false
ENSG00000123416
MONDO_0004669
5,322
14,140
1,995
false
ENSG00000127824
MONDO_0004669
5,870
14,140
1,995
false
ENSG00000137267
MONDO_0004669
7,326
14,140
1,995
false
ENSG00000137285
MONDO_0004669
7,332
14,140
1,995
false
ENSG00000152086
MONDO_0004669
9,338
14,140
1,995
false
ENSG00000167552
MONDO_0004669
11,896
14,140
1,995
false
ENSG00000167553
MONDO_0004669
11,897
14,140
1,995
false
ENSG00000176014
MONDO_0004669
13,642
14,140
1,995
false
ENSG00000188229
MONDO_0004669
15,836
14,140
1,995
false
ENSG00000196230
MONDO_0004669
16,135
14,140
1,995
false
ENSG00000198033
MONDO_0004669
16,620
14,140
1,995
false
ENSG00000258947
MONDO_0004669
18,772
14,140
1,995
false
ENSG00000261456
MONDO_0004669
18,838
14,140
1,995
false
ENSG00000100385
MONDO_0004952
2,269
14,276
1,995
true
ENSG00000134460
MONDO_0004952
6,797
14,276
1,995
true
ENSG00000147168
MONDO_0004952
8,801
14,276
1,995
true
ENSG00000104687
MONDO_0004967
2,919
14,289
1,995
false
ENSG00000006116
MONDO_0004985
122
14,304
1,995
false
ENSG00000006283
MONDO_0004985
129
14,304
1,995
false
ENSG00000007314
MONDO_0004985
177
14,304
1,995
true
ENSG00000007402
MONDO_0004985
184
14,304
1,995
false
ENSG00000067191
MONDO_0004985
996
14,304
1,995
false
ENSG00000075429
MONDO_0004985
1,302
14,304
1,995
false
ENSG00000075461
MONDO_0004985
1,303
14,304
1,995
false
ENSG00000100346
MONDO_0004985
2,251
14,304
1,995
false
ENSG00000103546
MONDO_0004985
2,811
14,304
1,995
true
ENSG00000105605
MONDO_0004985
3,110
14,304
1,995
false
ENSG00000108576
MONDO_0004985
3,514
14,304
1,995
true
ENSG00000108878
MONDO_0004985
3,567
14,304
1,995
false
ENSG00000130433
MONDO_0004985
6,179
14,304
1,995
false
ENSG00000136531
MONDO_0004985
7,178
14,304
1,995
true
ENSG00000136546
MONDO_0004985
7,183
14,304
1,995
true
ENSG00000141837
MONDO_0004985
8,050
14,304
1,995
false
ENSG00000142319
MONDO_0004985
8,098
14,304
1,995
true
ENSG00000142408
MONDO_0004985
8,104
14,304
1,995
false
ENSG00000144285
MONDO_0004985
8,416
14,304
1,995
true
End of preview. Expand in Data Studio

THBKG — Temporal Heterogeneous Biomedical Knowledge Graph

THBKG v2: a dated biomedical knowledge graph built from Open Targets 26.09, with Gene Ontology, Reactome, IntAct, the Human Protein Atlas, ChEMBL and ClinicalTrials.gov. Every evidence edge carries the year it was first observed, so the graph can be read as of any past decision year. Three benchmark tasks follow a target–disease pair from its first published link, to its first clinical trial, to Phase III:

Task A model ranks… Positive
T1 discovery every target with no trial for the disease yet the pair's first clinical trial starts in year Y
T2 hypothesis every target with no direct link of any kind to the disease yet the pair's first direct link is a literature co-mention in year Y
T3 advancement target–disease pairs entering Phase II in year Y the pair reaches Phase III by a fixed horizon

In every task a model scores year Y using only evidence dated strictly before Y. All labels are read off the graph itself, so the year a label becomes true is exactly the year the time rule hides.

v2: what changed since v26.09

v2 (release format 2.0) replaces the v26.09 build of the same Open Targets release (format 1.0). Code written for v26.09 does not run on it unchanged.

  • Edge attributes are [score]. The novelty column is gone. metadata.json gives each edge type a score_max, a constant of the scoring formula, for normalising scores without fitting anything to the data.
  • Molecules cover every drug type (3,717: small molecules, antibodies, proteins, oligonucleotides, …) and their features are stored per modality, never concatenated: x_morgan (1024-bit Morgan fingerprint), x_esm (1280-d ESM-2 650M over the ChEMBL protein chains), has_morgan, has_esm and drug_type.
  • Disease features are 768-d PubMedBERT embeddings of each disease's name and description (256-d before).
  • A snapshot view (snapshots/): each pair's latest state before each decision year 1995–2027, with a recency feature.
  • New tasks T1 and T2, and T3 labels rebuilt from the graph's own trial edges with a 2026 outcome horizon (eval entries 2016–2023; 2016–2021 before).
  • Build fixes. The start-dated trial edge carries the trial's phase weight rather than Open Targets' score, which is halved for trials that later stopped for safety or efficacy (an outcome leaking into the start year). Gene Ontology and IntAct edges are no longer lost to a failed PubMed date lookup. Literature is dated by publication date. Zero-score evidence and trials with no start date are dropped. Trials of unknown status get no outcome edge.

Files

Path What it is
graph.safetensors The continuous graph: node features, edge_index, edge_attr, edge_time (585 MB, pickle-free).
metadata.json Schema to reassemble it: node and edge types, tensor keys, shapes, dtypes, score_max per edge type.
mappings/<type>.parquet index ↔ node_id per node type.
snapshots/<Y>.safetensors, snapshots/index.json The snapshot view: one file per decision year, keyed by metadata.json edge-type order (about 2 GB in all).
labels/discovery.parquet T1: one row per target–disease pair with a trial.
labels/hypothesis.parquet T2: one row per directly linked target–disease pair.
labels/train.parquet, labels/eval.parquet T3: pairs entering Phase II, with their outcome.
labels/therapeutic_areas.parquet, labels/primary_therapeutic_areas.json Disease → Open Targets therapeutic areas, and the areas T3 is reported on.
scores/target_disease_by_source.parquet Per-source target–disease scores by year, for baselines that need the sources apart.
features/ Raw 1280-d ESM-2 embeddings of the biologics, target-feature imputation flags, how disease embeddings were made.
benchmark_tasks.json Splits, slate filters, label and slate counts per task and split, closed-form random floors.
check_release.json, check_inputs.json The release checks this build passed (see Checks).
verify_vs_26.09.json Comparison of this build with the format-1.0 v26.09 graph.
molecule_features.yaml, source_versions.json Molecule feature recipe; pinned upstream versions.
load_thbkg.py Standalone loader: PyG HeteroData for either view, label tables.
croissant.json MLCommons Croissant metadata, with the sha256 of every file.

The graph

Node type Nodes Features
target 19,632 56-d: Open Targets target-prioritisation features (tissue distribution, genetic constraint, mouse orthologue identity) and Human Protein Atlas single-cell-type RNA expression
disease 45,896 768-d PubMedBERT embedding of name and description
molecule 3,717 per modality, see above
go 38,092 64-d graph-autoencoder embedding of the GO hierarchy
reactome 2,883 64-d graph-autoencoder embedding of the Reactome hierarchy

Edges: 14,104,155 rows over 19 relations. Sixteen are dated evidence: literature, genetic association, somatic mutation, animal model, RNA expression, affected pathway, disease–pathway association, protein interaction, GO annotation, pathway membership, drug target (modulated_by) and five clinical-trial relations. Three are static ontology edges (disease, GO and Reactome hierarchies). Protein–protein interaction (interacts_with) is symmetric.

Two views of the same evidence.

  • Continuous (load_graph): one row per pair, relation and year in which the pair's score changed. The score is Open Targets' own aggregate of the evidence dated up to that year (a weighted harmonic sum; trials take their highest phase weight). Evidence dated 1985 or earlier is collapsed onto 1985.
  • Snapshot (load_snapshot(Y)): each pair's latest row dated before Y, with edge_attr = [score, recency]. Recency is a decaying trace of the pair's recent score increases, 0 for static edges.

Trial edges are dated by event. A registered trial adds a clinical_trial_ongoing edge at its start date. When it finishes it adds an outcome edge (positive, unmet_efficacy, adverse_effects or Unknown/Operational) at its completion date from ClinicalTrials.gov.

Benchmark tasks

Decision years are split the same way for every task: train 1996–2015, val 2016–2019, test 2020–2025. T3 splits its pairs by Phase II entry year instead, and its test entries end at 2023 so every pair has at least three years to advance. Training on a split means using its labels and the graph before each decision year. Never train on a year you evaluate.

T1 discovery: which targets will enter the clinic for this disease?

One slate per (disease, year Y) with at least one positive. It ranks every target with no trial for that disease before Y (about 19,600 candidates). Positives are the targets whose first trial for the disease, at any phase, starts in Y. Test positives need a first trial at Phase 1 or later; pairs whose first trials are early Phase 1 or of unknown phase are left out of the test slates. Test slates are kept for the 728 diseases that gain more than three new targets over the test period.

Split Slates Diseases Positives
train 8,953 2,260 61,782
val 2,564 1,457 15,593
test 1,908 728 13,534

For NDCG, positives are graded by the highest phase their finished trials reached by the end of the graph (grade). The grade looks past Y, so use it only to score rankings.

T2 hypothesis: which targets will be linked to this disease next?

One slate per (disease, year Y). It ranks every target with no direct edge of any relation to the disease before Y, trials included. Positives are the targets whose first direct link to the disease is a Europe PMC literature co-mention in Y. Pairs first linked by other evidence are left out of that year's slate, and a linked pair leaves the pool, so a repeat co-mention never counts. There is no quality filter on the co-mention.

Split Slates Diseases Positives
train 72,643 8,240 785,601
val 20,571 7,379 392,361
test 35,628 9,108 924,845

Results are also reported per stratum of the positives:

  • co-mentioned again in a later year;
  • later linked by non-literature evidence;
  • later trialled;
  • by how many diseases the target was linked to before Y (0–9, 10–99, 100–999, 1000+).

The first three look past Y and have less time to happen in later test years. Compare them within a split.

T3 advancement: which Phase II programmes will reach Phase III?

A pair enters Phase II in the first year a Phase II trial starts while it has no Phase III+ trial. It is positive if a Phase III+ trial starts by the horizon of its label file: 2018 for train, 2026 for eval. Each pair is scored at its entry year.

Split Phase II entry Pairs Positive
train 1995–2015 34,720 17.7%
val 2016–2019 8,748 9.8%
test 2020–2023 7,786 4.8%

Metrics and baselines

T1 and T2. The primary metric is precision@R: the precision at top K of TargetBench, with K set to the number of positives, i.e. the share of the top R candidates that are positives. A disease's slates are pooled across the split's years, with one vote per disease (precision@R_per_disease). Precision, recall and NDCG at K = 100, 200 and 500, macro-averaged over slates, are secondary. Ties are broken against the positives, so a constant score cannot beat random.

T3. Relative Success @ N (precision of the top N over the base rate) per primary therapeutic area and their mean, plus AUROC and AP.

Baselines that need no training, on test:

Task Method Primary metric
T1 random 0.0006
T1 Open Targets direct association score 0.0083
T1 genetics-only association score 0.0030
T2 random 0.0011
T2 target popularity (diseases linked before Y) 0.0112
T3 random RS@10 = 1.00
T3 Open Targets direct association score RS@10 = 2.28, AUROC 0.61
T3 genetics-only association score RS@10 = 1.58, AUROC 0.50

T1 and T2 use precision@R_per_disease; T3 uses the therapeutic-area mean of RS@10. Open Targets scores are 0 for every T2 candidate (none has a direct edge yet), so T2's reference is target popularity. Nearly all of its hits are targets already linked to 1,000 or more diseases.

The slate builder, the metrics and these baselines are in the GitHub repository (src/benchmark/, scripts/benchmark/run_cpu_baselines.py).

Quick start

from huggingface_hub import snapshot_download
from load_thbkg import load_graph, load_snapshot, load_labels, node_index

path = snapshot_download("jspc00012567/THBKG", repo_type="dataset")
data = load_graph(path)                  # continuous view, PyG HeteroData, reverse edges added
snap = load_snapshot(path, 2020, normalise="max")   # evidence dated before 2020, scores in [0, 1]

t1 = load_labels(path, "discovery")      # T1 pairs: first_trial_year, grade, ...
t2 = load_labels(path, "hypothesis")     # T2 pairs: first_direct_year, novel, strata columns
train, eval_ = load_labels(path, "train"), load_labels(path, "eval")   # T3
t2i = node_index(path, "target")         # node_id -> index

Scoring a T1 or T2 split with the repository's harness, one decision year at a time (a model can embed each year's snapshot once):

from src.benchmark.tasks import evaluate_task

def score_fn_for_year(year, slates):
    z = my_model(load_snapshot(path, year))            # evidence before `year` only
    return lambda s: my_scores(z, s.disease_index, s.candidates)

summary, per_slate = evaluate_task("hypothesis", "test", t2, num_targets=19_632,
                                   score_fn_for_year=score_fn_for_year)
print(summary["precision@R_per_disease"])

The label tables also load as 🤗 datasets configs: discovery, hypothesis and advancement (splits train, eval).

Checks

Every build runs two checks on the assembled release, and a failure stops the build. The results ship with it.

  • check_release.json: the release is well formed:
    • files, tensors and dtypes match metadata.json;
    • every edge type's times and scores lie in range;
    • the shipped loader and the snapshots agree with the graph;
    • every label file equals the table rebuilt from this graph;
    • croissant.json lists every file with its current sha256.
  • check_inputs.json: the graph holds exactly its own Open Targets input under the build's rules. Every target–disease pair the input supports is present, no pair the input lacks is present, and each pair's first year matches the input.

Limitations

  • Dates are evidence dates, not curation dates. A snapshot for year Y shows evidence published before Y as Open Targets 26.09 curates it today. Evidence that was only added to the databases later is still visible at Y.
  • Precision is a lower bound. A pair first trialled or co-mentioned after Y counts as a negative at Y.
  • Literature co-mentions are text-mined. They cannot tell a passing mention from a reported association. About half of T2's val positives are never co-mentioned again.
  • Popularity is a strong prior. New links favour well-studied targets; report results by target-degree stratum.
  • Builds are not comparable. Open Targets replaced many EFO disease IDs with MONDO IDs in 26.06, merged duplicate terms in 26.09, and its clinical records change between releases.

Versions

This is v2 (revision v2, release format 2.0), built on Open Targets 26.09. Tags now version THBKG itself; the Open Targets release it is built on is in source_versions.json. Earlier builds stay available by revision:

snapshot_download("jspc00012567/THBKG", repo_type="dataset", revision="v2")      # this build
snapshot_download("jspc00012567/THBKG", repo_type="dataset", revision="v26.09")  # format 1.0
snapshot_download("jspc00012567/THBKG", repo_type="dataset", revision="v26.03")

An earlier 23.06 build had a same-year clinical-trial-edge leak and is deprecated.

License & citation

Dataset artifacts: CC-BY-4.0. Source code (construction pipeline, benchmark harness): MIT, at https://github.com/jackysiupuichung/THBKG. Archival DOI on Zenodo: concept 10.5281/zenodo.20795231.

Sources

THBKG is derived from the resources below. If you use the parts that come from them, please cite them as well.

Source Licence In THBKG
Open Targets Platform 26.09 CC0 1.0 evidence edges and per-source scores, disease index, molecules and SMILES, drug–target and clinical-trial edges, target-prioritisation features (Buniello et al., Nucleic Acids Res. 2025)
Gene Ontology, release 2026-07-26 CC BY 4.0 GO terms, hierarchy and annotations
Reactome CC0 pathways, hierarchy and membership
IntAct, release 2026-01-09 CC BY 4.0 protein–protein interactions
Human Protein Atlas v25 CC BY 4.0 single-cell-type RNA expression in the target features (v25.proteinatlas.org; Karlsson et al., Sci. Adv. 2021)
ChEMBL 37 CC BY-SA 3.0 protein sequences of biologics, embedded with ESM-2
ClinicalTrials.gov U.S. National Library of Medicine terms trial start and completion dates, fetched 2026-10-13
MONDO, EFO (via Open Targets) CC BY 4.0, Apache 2.0 disease identifiers and hierarchy
Orphanet (via Open Targets) CC BY 4.0 genetic-association evidence: Orphadata Science © INSERM 1999, as in Open Targets 26.09, aggregated into scores
UniProt (via Open Targets) CC BY 4.0 genetic-association evidence
ESM-2 650M, PubMedBERT MIT models used to compute molecule and disease features (Lin et al., Science 2023; Gu et al., ACM Trans. Comput. Healthc. 2021)
  • ESM-2 molecule features. x_esm and features/molecule_esm2_full.* are embeddings computed from ChEMBL 37 protein sequences. We treat them as computed features of factual sequences, not an adaptation of the ChEMBL database, and distribute them under CC BY 4.0 with this attribution to ChEMBL.
  • Sources Open Targets redistributes under its own terms. Evidence from the COSMIC Cancer Gene Census, Genomics England PanelApp and Project Score is included as Open Targets 26.09 distributes it. Open Targets' licence statement says these sources agreed for their data to be used without restriction by Open Targets users. Using those resources directly is governed by their own terms, which restrict redistribution and commercial use. Their contribution is listed per source (datasource) in scores/target_disease_by_source.parquet. The graph's edge scores combine it with other sources.
  • No endorsement by any source is implied.
Siu, Cabrera, Mudaliar, and Zubiaga.
THBKG: A Temporal Biomedical Knowledge Graph for Leak-Free Clinical Advancement Prediction.
Downloads last month
271