You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

CohortWorld data

Group-level data built from UK Biobank primary-care and hospital records, for the CohortWorld environment and benchmarks. Code, environment and reproduction scripts: https://github.com/Chrisa142857/cohort-world.

Every released cohort holds at least 10 participants. Cohort sizes are published as bands, not counts, and no individual-level record is included.

Contents

directory dataset size
official/ the cohort collection 29,884 cohorts: 20,180 CohortWorld cohorts and the 9,704 cohorts behind CohortCal
cohortcal/ CohortCal, the calibration benchmark (2-character outcome codes) 32,120 / 6,474 / 31,784 questions (train / validation / test)
items/ the CohortWorld task items see below
sft/cohort_think/ the supervised cold-start demonstrations used before CS-GRPO 1,753 / 92 (train / validation)
paper_outputs/ the model outputs behind Tables 3 and 4, so every number can be re-scored without running a model 13 + 8 files

official/, the cohort collection

CohortWorld cohorts at three coding depths. The depth sets the outcome codes a cohort's rates are reported for: 19 ICD-10 chapters (C1), 183 two-character codes (C2), 1,374 three-character codes (default).

depth cohorts train / val / test
C1 5,619 2,892 / 561 / 2,166
C2 7,113 3,615 / 695 / 2,803
default 7,448 3,645 / 745 / 3,058
file contents
CohortWorld_{depth}_{split}_states.jsonl one cohort per row: state_id, its axes (age band, sex, diagnosis / procedure / prescription history), the rendered description, n_band, and rates, the cumulative incidence of a first diagnosis at horizons 1, 2, 3, 5 and 10 years for each outcome code (also at each outcome depth in rates_g1, rates_g2, rates_g3)
CohortWorld_{depth}_manifest.json horizons, outcome codes, and the rate definition
CohortWorld_{depth}_diseases_g{1,2,3}.json the outcome codes that index rates_g1, rates_g2, rates_g3
CohortWorld_{depth}_vocab.json the codes an agent may add or switch to
CohortWorld_{depth}_transitions.jsonl the edits that lead from each cohort to another
CohortWorld_legal_moves.jsonl the moves each cohort accepts, with their cost and the destination's size band
CohortWorld_{depth}_atrisk_bands.jsonl (+ .idx) for each cohort, the banded number at risk behind each (horizon, outcome) rate; .idx holds byte offsets for seeking
CohortWorld_outcome_split.json the outcome chapters held out as unseen
PhenoCal_C1_axes_sidecar.jsonl, PhenoCal_C2_axes_sidecar.jsonl, PhenoCal_axes_sidecar.jsonl the CohortCal cohorts at each depth (3,640 / 3,198 / 2,866): size band, plus the procedure (OPCS-4) and prescription (BNF) codes carried by at least 10% of members, each with its share
UKB_marginal_incidence_landmark_gplinked_3ver.json the population incidence of each code and horizon at each depth, the b of the CohortThink AUROC; suppressed as described below
reference_rates_2.0.0_f4952eaf.json train-split mean rates per (disease, horizon): PhenoCal_C2 is the b of the CohortCal table, internal is the reference the environment's reward ranks answers against
paper_training/reference_rates_2.0.0_47e66d36.json the reference table the paper's CS-GRPO runs read. Its internal entry was built from an earlier item set, so use it only to reproduce those training rewards exactly (set CW_OFFICIAL to this directory)

cohortcal/

PhenoCal_C2_{train,val,test}.jsonl. Each row is a written history with a disease and horizon (prompt), the recorded incidence (ground_truth.rate), and metadata (disease, horizon, cohort size, event count, 95% interval). Splits are profile-disjoint: no cohort description appears in more than one split.

items/

task train seen unseen
CohortThink, rate (t3_rate_*) 16,770 880 943
locate (t1_locate_*) 16,589 870 919
delta (t2_delta_*) 297 60 108

Each item is a question in words (description, ask) with its answer (answer) and the cohort it was drawn from (source). The paper's Table 4 uses the 943 unseen CohortThink items.

sft/cohort_think/

Chat-format demonstrations (messages: one user question, one assistant <cohort-think> answer) for the cold start in train/ of the code repository. The comparison group in each answer is chosen by code from the cohort collection; meta records the item, the target and reference cohorts, their size bands, and the recorded and declared rate differences.

paper_outputs/

table3/ holds one record per Table 3 row: the single-turn answers of the ten open models and the two vendor APIs, in the shape gen/score_singleturn.py reads (rows of {idx, true_rate, disease, horizon, pred, text}, the model text verbatim), plus the two-turn traces of the CohortWorld agent row. table4/ holds the two-turn trace files and the two no-tool files of the eight Table 4 rows. Each directory's index.json maps the published table row to its file, row count and SHA-256.

In the traces, the fields that named a machine, a run or a user (the served model name, the endpoint URL, the runtime path, and the paths inside harness tracebacks) are replaced by the row label, localhost, and the bare runtime id. Model text, tool results, rewards, metrics and item data are as recorded; scoring is unchanged by the rewrite.

Checkpoints

The trained policies are separate model repositories: Ziquan/cohortworld-qwen3.5-9b-{sft,csgrpo,csgrpo-psi} and Ziquan/cohortworld-qwen3.6-27b-{sft,csgrpo,csgrpo-psi}, Apache-2.0, bf16 as exported.

Using the data with the code

hf download Ziquan/cohort-world --repo-type dataset --local-dir data
export CW_PANEL=$PWD/data/official CW_OFFICIAL=$PWD/data/official CW_SIDECAR=$PWD/data/official
export CW_PHENOCAL=$PWD/data/cohortcal CW_ITEMS=$PWD/data/items

reproduce/README.md in the code repository runs the paper's Tables 3 and 4 from these variables.

Disclosure control

  • Every cohort has at least 10 participants, and its size is published only as a band.
  • CohortCal questions keep cohorts of at least 10 participants with at least 5 events, which is UK Biobank's published minimum cell size.
  • In the marginal incidence table, a cell in which at least one but fewer than 10 distinct participants had an event is null. Every other cell reports only the rate, rounded to 2 significant digits. Event, at-risk and participant counts are not published. Scores that use this table differ slightly from the paper's, which used the unsuppressed table; reproduce/README.md gives the size of the difference.

Not released: the individual-level evaluation items (one participant each), the exact counts behind any band or rate, and the CohortCal questions at the C1 and default depths.

Licence

The data are released under CC BY-NC 4.0, under the UK Biobank data use terms: they were derived under an approved UK Biobank application, and use of them is also subject to UK Biobank's conditions. The code in the GitHub repository is Apache-2.0.

Ethics and scope

This work uses UK Biobank under an approved application. A rate here is the incidence of a group a person matches. It is not a personal prognosis, it carries UK Biobank's selection, and it needs recalibration before use on another population.

Downloads last month
17