The Challenge
Real-world data could transform cancer research. But in oncology, most of the detail that matters, such as stage, histology, treatment and outcome, is written in prose rather than coded.
- Manual curation doesn’t scale. Expert chart review is the gold standard, but it is resource-intensive, error-prone and takes clinicians away from other work.
- Cancer language is tricky. Spelling variations, inconsistent formats and ambiguous terms are common, and a treatment that is discussed is not always the treatment that is given.
- Little proof in NHS real world cancer data. Clinical NLP has seen limited use in oncology, with few published studies in a UK or NHS setting.
At Guy’s Cancer Centre, the team carefully hand-curated a subset of letters about cancers in the oral cavity, larynx and oropharynx cancers, to act as a benchmark.
The Solution
The team used CogStack AI’s pre-trained MedCAT to read head and neck cancer patients’ records and identify 109 SNOMED CT concepts across five areas: patient and comorbidities, disease, histopathology, treatment and outcomes. Every result was checked against the hand-curated datasets, and the model was improved in stages:
- Out of the box: the base model was run with no local training to set a baseline.
- First training round: clinicians reviewed 500 documents in the MedCATTrainer tool, marking the initial performance.
- Second training round: a further 1,500 clinic letters, notes and histopathology reports were annotated as the list of concepts grew. Thresholds were set to reduce false positives.
- Unseen test: the final model was tested on 81 new patients whose records it had never seen.
Results & Impact
Localised fine-tuning paid off quickly. Out of the box, the model couldn’t produce a usable score for almost 1 in 5 concepts. After a single round of 500 annotated documents, every concept could be measured, and median performance (F1 score) with concept-specific thresholds rose from 0.62 to 0.83.
Crucially, performance held up on the 81 unseen patients, with no significant drop, and no significant difference in performance between men and women or between ethnic groups. 50 of the 109 concepts met the team’s pre-set bar for validation. For those, median accuracy on unseen patients was 96%, with precision of 0.96 and recall of 0.94.
The team then ran the model across their entire retrospective cohort, generating almost 150,000 data points for 2,895 head and neck cancer patients treated since 2010, ready to combine with structured and imaging data for clinical and research use.
Why CogStack
This study shows what a lightweight clinical NLP tool can do with modest local effort. A few hundred annotated documents made a substantial difference, compared with the very large volumes typically needed to fine-tune a large language model. Every annotation was also fed back into the MedCAT parent model, so the next oncology team starts from a stronger base. CogStack is already established within NHS infrastructure, and can be paired with AnonCAT de-identification where a project calls for it.
Read the full study: Young T, Au Yeung J, Sambasivan K, Adjogatse D, Kong A, Petkar I, Reis Ferreira M, Lei M, King A, Teo J, Guerrero Urbano T. Natural Language Processing to Extract Head and Neck Cancer Data From Unstructured Electronic Health Records. Clin Oncol (R Coll Radiol). 2025 May;41:103805. doi: 10.1016/j.clon.2025.103805. Epub 2025 Mar 20. PMID: 40188745.