CoolFace
Datasetpublic

almanach/OntoBook

OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining Dataset Authors Rian Touchent & Eric de la ClergerieInria, 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… See the full description on the dataset page: https://huggingface.co/datasets/almanach/OntoBook.

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
1likes145downloads
Dataset Card

[image]

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.

SplitDomainExamplesEstimated `text` tokens
cim10Diagnoses and related conditions435,870~258M
ccamMedical procedures719,655~279M
atcDrugs and therapeutic classes138,920~49M
Total1,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.

python
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.

FieldTypeDescription
idstringStable content-derived identifier prefixed by the ontology name.
codestringCode or ontology node from which the walk starts.
labelstringPreferred label associated with the starting node.
walk_typestringNormalized walk-generation strategy.
source_walkstringStructured ontology walk supplied to the generator.
textstringLLM 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 typeCIM-10CCAMATC
etiologie219,212
diagnostic_differentiel206,576
codage_double3,097
cross_chapter5,663
syndrome1,322
hierarchie251,83748,622
comparaison251,87648,622
exploration215,94241,676

Generation Process

  1. 1.Medical ontologies are parsed from their RDF/OWL distributions.
  2. 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. 3.Qwen3-235B-A22B-Instruct-2507 reformulates the walks with temperature 0, guided JSON decoding, and thinking disabled.
  4. 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:

bibtex
@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