Research in Diagnostic and Interventional Imaging · 2023 · Open access

BERT-based natural language processing analysis of French CT reports: Application to the measurement of the positivity rate for pulmonary embolism

E. Jupin-Delevaux1 · A. Djahnine2,3 · F. Talbot4 · A. Richard4 · S. Gouttard1 · A. Mansuy1 · P. Douek1,2 · S. Si-Mohamed1,2 · L. Boussel1,2

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

98.28%
sensitivity for PE in reports
99.29%
specificity for PE in reports
0.985
F1, 11-class sentence classifier
194k
CT reports analysed
Overview of the BERT-based report analysis pipeline and its results
Research overview. Select the figure to view it at full resolution.

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.

DatasetSizeUse
CT reports, 201999,510 reportsTraining and validation of the language model and classifiers
CT reports, 201894,559 reportsTest: PE detection and positivity rate
“Findings” sentences, 20191,007,000 sentencesUnsupervised fine-tuning (95% / 5% split)
Labelled sentences27,731 sentencesClassifier 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.

Sankey diagram splitting 27,731 sentences into non-thoracic, pathological thoracic and healthy thoracic, then pathological sentences into 11 pathology types
Figure 1: Sankey diagram of the 27,731 labels used to train and validate the classifiers. Figure from Jupin-Delevaux et al., Research in Diagnostic and Interventional Imaging (2023), reproduced unmodified under CC BY-NC-ND 4.0.

Table 2: Sentence labels used to train the two classifiers.

ClassifierClassSentences
3-ClassesNon chest11,277
Healthy chest3,808
Pathological chest12,646
11-SubClasses
(pathological chest)
Pulmonary embolism560
Non-embolic pulmonary artery pathology656
Aortic pathology545
Heart abnormality1,215
Mediastinal lymphadenopathy1,161
Lung consolidation1,686
Lung nodule or mass2,201
Bronchial disorders621
Interstitial syndrome1,322
Pleural abnormality1,216
Chest wall abnormality1,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.

SettingValue
Base modelCamemBERT (camembert-large), French pretrained
Domain adaptationUnsupervised masked language modelling on report sentences
ClassifiersCamemBERT for sequence classification, cross-entropy loss
OptimizerAdamW, betas (0.9, 0.999), weight decay 10⁻²
Batch size32 (language model) · 16 (classifiers)
Epochs40; convergence after 16 (3-Classes) and 21 (11-SubClasses)
Framework / hardwarePyTorch 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-tuningProbabilityAfter fine-tuningProbability
Traitement / Treatment1.49%Déviation / Deviation75.79%
Troubles / Trouble1.18%Lésion / Lesion7.49%
Maladie / Disease1.17%Masse / Mass3.33%
Cancer / Cancer0.87%Collection / Collection4.45%

3.2Sentence classification

Table 5: Sentence classifiers, trained on 27,731 sentences and validated on about 1,400 sentences.

ClassifierAccuracyPrecisionRecallF1-score
3-Classes0.9880.9790.9890.984
11-SubClasses0.9840.9860.9850.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.

MetricValue
Exams requested for PE4,042 of 94,559 (4.27%)
PE-positive per radiologists641 (15.8%)
PE-positive per NLP654
Accuracy99.13%
Sensitivity98.28%
Specificity99.29%
PPV96.33%
NPV99.68%

Table 7: Causes of the 35 discrepancies between manual and NLP ratings.

CauseReports
Uncertainty about a PE14
Unclear distinction between acute and chronic PE7
Unaccountable errors5
Other pulmonary-artery diagnosis (e.g. tumour)4
Partial regression of a previously diagnosed PE3
Absence of PE stated only in the conclusion2

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

  1. 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.
  2. L. Martin et al., CamemBERT: a Tasty French Language Model, ACL 2020.
  3. 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}
}

More research