OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining

Rian Touchent, Éric de la Clergerie


Abstract
We present OntoBook, a method that converts medical ontology structure into pretraining signal for encoder language models. Our approach has three stages: random walks through ontology graphs capture hierarchical and causal relations between medical codes, a large language model reformulates these walks into fluent textbook-style prose, and the resulting text is used to train ModernCamemBERT, a 149M-parameter French encoder, with two objectives on the same data: masked language modeling and relation prediction between code pairs. On three French medical coding benchmarks (FRACCO, Cantemist-FR, Distemist-FR), OntoBook achieves significant improvements over MLM-only pretraining, with +2.5 micro-F1 on FRACCO and +8.0 micro-F1 on Distemist. We find that alignment between objectives is necessary: misaligned training, where each task uses different data, causes a 30-point degradation. We release 1.3 million LLM-reformulated medical textbooks across three French ontologies (CIM-10, CCAM, ATC) and pretrained model checkpoints.
Anthology ID:
2026.kallm-1.2
Volume:
Proceedings of the Knowledge Graphs and Large Language Models Workshop (KG-LLM) @ LREC26
Month:
May
Year:
2026
Address:
Palma, Mallorca (Spain)
Editors:
Gilles Sérasset, Katerina Gkirtzou, Michael Cochez, Jan-Christoph Kalo
Venues:
KaLLM | WS
SIG:
Publisher:
ELRA Language Resources Association (ELRA)
Note:
Pages:
11–19
Language:
External URL:
https://lrec.elra.info/lrec2026-ws-kgllm-02
DOI:
10.63317/37ik5npnrvv6
Bibkey:
Cite (ACL):
Rian Touchent and Éric de la Clergerie. 2026. OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining. In Proceedings of the Knowledge Graphs and Large Language Models Workshop (KG-LLM) @ LREC26, pages 11–19, Palma, Mallorca (Spain). ELRA Language Resources Association (ELRA).
Cite (Informal):
OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining (Touchent & de la Clergerie, KaLLM 2026)
Copy Citation: