Constructing a Supervised Clinical Terminology Corpus from SNOMED CT RF2 Files: Five-Version Iterative Design, BFS Bottom-Up Hierarchy Processing, and Empirical Validation through QLoRA Fine-Tuning

We describe the iterative construction of a 2,000,000-example supervised corpus for clinical terminology alignment, derived exclusively from SNOMED CT Release Format 2 (RF2) files. The corpus development proceeded through five successive versions, each motivated by specific failures identified in downstream QLoRA fine-tuning experiments on Mistral-7B-Instruct-v0.2. Version 1 formulated the task as code prediction and was abandoned after systematic gradient norm spikes at epoch position 0.154–0.160 across all training sessions, independent of learning rate. Versions 2 through 5 progressively introduced five semantic example types: canonical FSN definitions with synonym enumeration (Type 1), synonym-to-FSN equivalence mappings (Type 2), clinical text definitions with adaptive length filtering (Type 3), hierarchical is-a chain instances via bottom-up iterative BFS (Type 4), and SNOMED model attribute-value pairs (Type 5). A key technical contribution is the replacement of recursive hierarchy traversal—which caused StackOverflow on the 350,000+ node SNOMED CT graph—with a completely iterative BFS algorithm that processes each concept only after all its ancestors have been resolved. Statistical analysis of the final corpus (v5_final) confirms low length variance: mean 67.8 tokens, 95th percentile 121 tokens, P95/mean ratio 1.78—comparable to standard NLP benchmarks. Empirical validation through six QLoRA training runs produced minimum cross-entropy loss of 0.370 and maximum token accuracy of 91.5% on the final corpus design, versus loss 0.377 and accuracy 91.3% on corpus v2 (44,000 examples), demonstrating measurable improvement attributable to corpus design decisions.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-05-22
DOI
https://doi.org/10.5281/zenodo.20345591
Primary Topic
Biomedical Text Mining and Ontologies
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Constructing a Supervised Clinical Terminology Corpus from SNOMED CT RF2 Files: Five-Version Iterative Design, BFS Bottom-Up Hierarchy Processing, and Empirical Validation through QLoRA Fine-Tuning

Daniel Víctor José Antokoletz Huerta, Fernando Mario La Rosa
Zenodo (CERN European Organization for Nuclear Research)
Biomedical Text Mining and Ontologies
preprint

Constructing a Supervised Clinical Terminology Corpus from SNOMED CT RF2 Files: Five-Version Iterative Design, BFS Bottom-Up Hierarchy Processing, and Empirical Validation through QLoRA Fine-Tuning

Daniel Víctor José Antokoletz Huerta, Fernando Mario La Rosa
preprint en

Abstract

We describe the iterative construction of a 2,000,000-example supervised corpus for clinical terminology alignment, derived exclusively from SNOMED CT Release Format 2 (RF2) files. The corpus development proceeded through five successive versions, each motivated by specific failures identified in downstream QLoRA fine-tuning experiments on Mistral-7B-Instruct-v0.2. Version 1 formulated the task as code prediction and was abandoned after systematic gradient norm spikes at epoch position 0.154–0.160 across all training sessions, independent of learning rate. Versions 2 through 5 progressively introduced five semantic example types: canonical FSN definitions with synonym enumeration (Type 1), synonym-to-FSN equivalence mappings (Type 2), clinical text definitions with adaptive length filtering (Type 3), hierarchical is-a chain instances via bottom-up iterative BFS (Type 4), and SNOMED model attribute-value pairs (Type 5). A key technical contribution is the replacement of recursive hierarchy traversal—which caused StackOverflow on the 350,000+ node SNOMED CT graph—with a completely iterative BFS algorithm that processes each concept only after all its ancestors have been resolved. Statistical analysis of the final corpus (v5_final) confirms low length variance: mean 67.8 tokens, 95th percentile 121 tokens, P95/mean ratio 1.78—comparable to standard NLP benchmarks. Empirical validation through six QLoRA training runs produced minimum cross-entropy loss of 0.370 and maximum token accuracy of 91.5% on the final corpus design, versus loss 0.377 and accuracy 91.3% on corpus v2 (44,000 examples), demonstrating measurable improvement attributable to corpus design decisions.

Zenodo (CERN European Organization for Nuclear Research)
Universidad de Morón (AR)
Biomedical Text Mining and Ontologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.