OntoBook / README.md
rntc's picture
Trim licensing note
87128ab verified
|
Raw
History Blame Contribute Delete
7.73 kB
metadata
language:
  - fr
license: other
pretty_name: OntoBook
task_categories:
  - text-generation
  - fill-mask
tags:
  - synthetic
  - biomedical
  - medical
  - ontology
  - knowledge-graph
  - pretraining
  - french
size_categories:
  - 1M<n<10M
configs:
  - config_name: default
    data_files:
      - split: cim10
        path: data/cim10/*.parquet
      - split: ccam
        path: data/ccam/*.parquet
      - split: atc
        path: data/atc/*.parquet
dataset_info:
  - config_name: default
    features:
      - name: id
        dtype: string
      - name: code
        dtype: string
      - name: label
        dtype: string
      - name: walk_type
        dtype: string
      - name: source_walk
        dtype: string
      - name: text
        dtype: string
    splits:
      - name: cim10
        num_examples: 435870
        num_bytes: 3080397326
      - name: ccam
        num_examples: 719655
        num_bytes: 3872813566
      - name: atc
        num_examples: 138920
        num_bytes: 474330917
    download_size: 655901016
    dataset_size: 7427541809

OntoBook

OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining

Dataset Authors

Rian Touchent & Eric de la Clergerie
Inria, Sorbonne Université

Overview

OntoBook is a French biomedical pretraining corpus generated from the relational structure of three medical ontologies: CIM-10 FR PMSI for diagnoses, CCAM for medical procedures, and ATC for drugs. Weighted random walks turn ontology graphs into structured sequences of codes and relations. Qwen3-235B-A22B-Instruct-2507 then reformulates each walk into continuous textbook-style medical prose.

Two encoders pretrained on this corpus are available: ModernCamemBERT-bio-v2-base and ModernCamemBERT-bio-v2-large.

The generation prompt requires the model to preserve the source codes, relations, definitions, notes, inclusions, and exclusions while avoiding information absent from the walk. The release retains both representations: the structured source_walk for provenance and the fluent text for language-model pretraining.

Split Domain Examples Estimated text tokens
cim10 Diagnoses and related conditions 435,870 ~258M
ccam Medical procedures 719,655 ~279M
atc Drugs and therapeutic classes 138,920 ~49M
Total 1,294,445 ~586M

Token counts are estimated with almanach/moderncamembert-base from a stratified sample of 15,189 rows and exact character totals for the full release, without per-document special tokens. The structured source_walk field is estimated at approximately 1.36 billion tokens with the same method.

Load the Dataset

Use a current version of datasets (pip install -U datasets) so named splits declared in the dataset card are resolved correctly.

from datasets import load_dataset

# Load one ontology.
dataset = load_dataset("almanach/OntoBook", split="cim10")

# The three available splits are: cim10, ccam, and atc.
print(dataset[0]["text"])

Dataset Structure

Each split uses the same schema.

Field Type Description
id string Stable content-derived identifier prefixed by the ontology name.
code string Code or ontology node from which the walk starts.
label string Preferred label associated with the starting node.
walk_type string Normalized walk-generation strategy.
source_walk string Structured ontology walk supplied to the generator.
text string LLM reformulation in continuous French medical prose.

Walk Types

The CIM-10 configuration contains five targeted walk families: etiologie, diagnostic_differentiel, codage_double, syndrome, and cross_chapter. CCAM and ATC use hierarchie, comparaison, and exploration walks adapted to procedures and therapeutic classes.

Walk type CIM-10 CCAM ATC
etiologie 219,212
diagnostic_differentiel 206,576
codage_double 3,097
cross_chapter 5,663
syndrome 1,322
hierarchie 251,837 48,622
comparaison 251,876 48,622
exploration 215,942 41,676

Generation Process

  1. Medical ontologies are parsed from their RDF/OWL distributions.
  2. Weighted random walks traverse hierarchical and semantic relations. Most walks contain 8–20 steps, with longer cross-chapter walks allowed for CIM-10.
  3. Qwen3-235B-A22B-Instruct-2507 reformulates the walks with temperature 0, guided JSON decoding, and thinking disabled.
  4. The release builder normalizes Unicode and whitespace, standardizes walk-type labels, generates stable identifiers, and writes compressed Parquet shards.

Generation used vLLM with FP8 inference on four NVIDIA H100 GPUs. The complete reformulation stage took approximately 20 hours.

Quality Controls

This release is built from pinned revisions of the three original datasets. All rows were checked for required values, valid token counts, known walk types, and duplicate content. Cleaning removed 356 exact duplicates and 60 ATC rows with an empty label. The final release contains no null fields or duplicate identifiers.

The counts in this card describe the cleaned, reformulated release. They differ from the number of raw ontology walks reported before generation and filtering.

Intended Uses

OntoBook is intended for biomedical language-model pretraining, ontology-aware representation learning, medical coding research, and controlled studies of knowledge-graph verbalization. The source_walk and text pair can also support research on grounded generation and structure-to-text transformation.

Limitations

The corpus is synthetic and may contain generation errors despite constrained prompting. It must not be treated as clinical guidance or used directly for diagnosis, treatment, or billing decisions. Ontology coverage and relational richness differ substantially across splits: CIM-10 contains semantic relations beyond hierarchy, while CCAM and ATC are predominantly hierarchical. The corpus is French and reflects the terminology versions used during generation.

Licensing

This dataset contains transformations of several independently licensed terminologies and therefore does not have a single permissive license. Use and redistribution remain subject to the applicable source terms:

Users are responsible for determining whether their intended use and redistribution comply with these terms.

Citation

If you use this dataset, please cite the OntoBook paper:

@inproceedings{touchent:hal-05697506,
  TITLE = {{OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining}},
  AUTHOR = {Touchent, Rian and de la Clergerie, {\'E}ric},
  URL = {https://hal.science/hal-05697506},
  BOOKTITLE = {{Proceedings of Knowledge Graphs and Large Language Models Workshop}},
  ADDRESS = {Palma de Mallorca, Spain},
  YEAR = {2026},
  MONTH = May,
  PDF = {https://hal.science/hal-05697506v1/file/main.pdf},
  HAL_ID = {hal-05697506},
  HAL_VERSION = {v1},
}

Paper