BERT-based natural language processing analysis of French CT reports: Application to the measurement of the positivity rate for pulmonary embolism
1 Radiology Department, Hospices Civils de Lyon · 2 CREATIS, Univ Lyon, INSA Lyon, Université Claude Bernard Lyon 1 · 3 Philips Research France, Suresnes · 4 DSN, Hospices Civils de Lyon
Abstract
Rationale and objectives: To develop a Natural Language Processing (NLP) method based on Bidirectional Encoder Representations from Transformers (BERT) adapted to French CT reports and to evaluate its performance to calculate the diagnostic yield of CT in patients with clinical suspicion of pulmonary embolism (PE).
Materials and methods: All the CT reports performed in our institution in 2019 (99,510 reports, training and validation dataset) and 2018 (94,559 reports, testing dataset) were included after anonymization. Two BERT-based NLP sentence classifiers were trained on 27.700, manually labeled, sentences from the training dataset. The first one aimed to classify the reports’ sentences into three classes (“Non chest”, “Healthy chest”, and "Pathological chest" related sentences), the second one to classify the last class into eleven sub classes pathologies including "pulmonary embolism". F1-score was reported on the validation dataset. These NLP classifiers were then applied to requested CT reports for pulmonary embolism from the testing dataset. Sensitivity, specificity, and accuracy for detection of the presence of a pulmonary embolism were reported in comparison to human analysis of the reports.
Results: The F1-score for the 3-Classes and 11-SubClasses classifiers was 0.984 and 0.985, respectively. 4,042 examinations from the testing dataset were requested for pulmonary embolism of which 641 (15.8%) were positively evaluated by radiologists. The sensitivity, specificity, and accuracy of the NLP network for identifying pulmonary embolism in these reports were 98.2%, 99.3% and 99.1%, respectively.
Conclusion: BERT-based NLP sentences classifier enables the analysis of large databases of radiological reports to accurately determine the diagnostic yield of CT screening.
Keywords: Natural language processing; CT; Pulmonary embolism
Introduction
Appropriate use of imaging, especially ionizing exams such as CT, is a major concern, and decision-support tools aim to reduce unnecessary requests. Measuring their effect requires the positive yield of exams, which means analysing report content — hard without structured reports, which are rarely used in emergency settings.
NLP methods have long been used to detect findings in free-text CT reports. BERT brings state-of-the-art biomedical text mining and can be adapted to a domain and a language without labels. This work builds a BERT-based pipeline for French chest CT reports and uses it to measure the diagnostic yield of CT requested for suspected pulmonary embolism.
Method
2.1Population and reports
All CT reports from Hospices Civils de Lyon between January 2018 and December 2019 were collected, written by a large and diverse panel of radiologists and structured in four parts: clinical referral, technique, findings and conclusion. Reports were anonymized, with IRB approval and waived consent.
Table 1: Report and sentence datasets.
| Dataset | Size | Use |
|---|---|---|
| CT reports, 2019 | 99,510 reports | Training and validation of the language model and classifiers |
| CT reports, 2018 | 94,559 reports | Test: PE detection and positivity rate |
| “Findings” sentences, 2019 | 1,007,000 sentences | Unsupervised fine-tuning (95% / 5% split) |
| Labelled sentences | 27,731 sentences | Classifier training, labelled by two radiologists (consensus on disagreement) |
2.2Two-stage sentence classification
Instead of classifying each pathology directly, a first classifier separates findings sentences into non-chest, healthy chest and pathological chest; a second one assigns pathological chest sentences to 11 pathology types. Splitting the task this way handles the strong imbalance between categories.

Table 2: Sentence labels used to train the two classifiers.
| Classifier | Class | Sentences |
|---|---|---|
| 3-Classes | Non chest | 11,277 |
| Healthy chest | 3,808 | |
| Pathological chest | 12,646 | |
| 11-SubClasses (pathological chest) | Pulmonary embolism | 560 |
| Non-embolic pulmonary artery pathology | 656 | |
| Aortic pathology | 545 | |
| Heart abnormality | 1,215 | |
| Mediastinal lymphadenopathy | 1,161 | |
| Lung consolidation | 1,686 | |
| Lung nodule or mass | 2,201 | |
| Bronchial disorders | 621 | |
| Interstitial syndrome | 1,322 | |
| Pleural abnormality | 1,216 | |
| Chest wall abnormality | 1,463 |
2.3Language model and training
The French CamemBERT model is first adapted to radiology language by unsupervised masked language modelling on report sentences, then fine-tuned in a supervised way into the two classifiers.
Table 3: Implementation details.
| Setting | Value |
|---|---|
| Base model | CamemBERT (camembert-large), French pretrained |
| Domain adaptation | Unsupervised masked language modelling on report sentences |
| Classifiers | CamemBERT for sequence classification, cross-entropy loss |
| Optimizer | AdamW, betas (0.9, 0.999), weight decay 10⁻² |
| Batch size | 32 (language model) · 16 (classifiers) |
| Epochs | 40; convergence after 16 (3-Classes) and 21 (11-SubClasses) |
| Framework / hardware | PyTorch 1.7.0 · one NVIDIA Titan RTX (24 GiB), about 5 hours |
2.4Pulmonary embolism detection
In the 2018 test set, chest CT exams are found with stemmed keywords in the technique section (e.g. “thor”, “card”, “pulm”, “TAVI”, “coroscanner”), and exams requested for PE with keywords in the clinical referral (e.g. “embo”, “dimer”, “phlebi”). Two experienced radiologists then rated each selected report as requested for PE or not, and positive for PE or not. A report is NLP-positive when at least one of its findings sentences is classified as pulmonary embolism.
Results
3.1Domain-adapted language model
Fine-tuning CamemBERT on 50,350 validation sentences cut perplexity from 4,539.01 to 1.39.
Table 4: Top predictions for the masked sentence “Absence de <mot masqué> du médiastin” (“No <masked word> of the mediastinum”), before and after fine-tuning (French / English).
| Before fine-tuning | Probability | After fine-tuning | Probability |
|---|---|---|---|
| Traitement / Treatment | 1.49% | Déviation / Deviation | 75.79% |
| Troubles / Trouble | 1.18% | Lésion / Lesion | 7.49% |
| Maladie / Disease | 1.17% | Masse / Mass | 3.33% |
| Cancer / Cancer | 0.87% | Collection / Collection | 4.45% |
3.2Sentence classification
Table 5: Sentence classifiers, trained on 27,731 sentences and validated on about 1,400 sentences.
| Classifier | Accuracy | Precision | Recall | F1-score |
|---|---|---|---|---|
| 3-Classes | 0.988 | 0.979 | 0.989 | 0.984 |
| 11-SubClasses | 0.984 | 0.986 | 0.985 | 0.985 |
3.3Pulmonary embolism and positivity rate
Table 6: Pulmonary embolism detection in the 4,042 reports of exams requested for suspected PE (2018 test set), against radiologists’ reading.
| Metric | Value |
|---|---|
| Exams requested for PE | 4,042 of 94,559 (4.27%) |
| PE-positive per radiologists | 641 (15.8%) |
| PE-positive per NLP | 654 |
| Accuracy | 99.13% |
| Sensitivity | 98.28% |
| Specificity | 99.29% |
| PPV | 96.33% |
| NPV | 99.68% |
Table 7: Causes of the 35 discrepancies between manual and NLP ratings.
| Cause | Reports |
|---|---|
| Uncertainty about a PE | 14 |
| Unclear distinction between acute and chronic PE | 7 |
| Unaccountable errors | 5 |
| Other pulmonary-artery diagnosis (e.g. tumour) | 4 |
| Partial regression of a previously diagnosed PE | 3 |
| Absence of PE stated only in the conclusion | 2 |
Key findings
- Near-perfect PE detection: 99.13% accuracy, 98.28% sensitivity and 99.29% specificity against radiologists’ reading.
- Positivity rate: 15.8% of the 4,042 exams requested for suspected PE were positive, consistent with a recent large French cohort.
- Errors reflect uncertainty: most discrepancies come from uncertain or ambiguous wording, such as doubtful distal defects or acute versus chronic PE.
Discussion & limitations
Contextual embeddings such as BERT outperform non-contextual methods for capturing syntax and for downstream tasks, and the approach transfers to other languages through open-source pretrained models; the French model can serve other tasks in French-speaking countries. Earlier European studies reported comparable PE detection from French and German reports with maximum-entropy and CNN-based models.
The classifiers are mono-label, although a sentence can describe several findings; focusing on the findings section, where findings are usually described separately, limits the impact. Medical uncertainty in reports remains hard to model, and the study did not compare against simpler NLP methods such as NegEx or FastContext.
Related links
- BERT-based natural language processing analysis of French CT reports: Application to the measurement of the positivity rate for pulmonary embolism, Research in Diagnostic and Interventional Imaging 6 (2023) 100027. Open access under CC BY-NC-ND 4.0.
- L. Martin et al., CamemBERT: a Tasty French Language Model, ACL 2020.
- J. Devlin et al., BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, NAACL 2019.
BibTeX
@article{djahnine2023bertctreports,
title = {BERT-based natural language processing analysis of French CT reports: Application to the measurement of the positivity rate for pulmonary embolism},
author = {E. Jupin-Delevaux and A. Djahnine and F. Talbot and A. Richard and S. Gouttard and A. Mansuy and P. Douek and S. A. Si-Mohamed and L. Boussel},
journal = {Research in Diagnostic and Interventional Imaging (ReDII)},
year = {2023},
doi = {10.1016/j.redii.2023.100027}
}

