A Multi-Task Transformer Model for Fine-grained Labelling of Chest X-Ray Reports

Yuanyi Zhu, Maria Liakata, Giovanni MontanaCOLING 2024

Introduction

In medical imaging, free-text radiology reports are a critical data source. However, standard Natural Language Processing (NLP) tools, such as CheXpert, typically treat reports as single units. While they can identify the presence of a condition like "Pneumothorax," they often fail to localize where in the text the finding is described. This lack of localization creates a bottleneck for training computer vision models, which require precise text-to-image region mapping, and for evaluating generative AI, where standard word-overlap metrics like BLEU are insufficient for assessing clinical accuracy.

Researchers have developed a multi-task transformer model that addresses this by "sectioning" text into semantically coherent segments and labeling each individually. By jointly learning to segment and classify, the model provides the fine-grained localization necessary for advanced medical AI applications.

Methodology

The proposed architecture is based on RoBERTa and features two specialized heads that work in tandem:

  • The Segmentation Head: This uses a Long Short-Term Memory (LSTM) network combined with a Conditional Random Field (CRF) decoder. It labels every token using the IOBES scheme (Inside, Outside, Beginning, End, Singleton) to identify the exact boundaries of clinical observations.
  • The Classification Head: Once segments are identified, their token embeddings are pooled using a BiLSTM to create a "segment embedding." This is then passed through a linear layer to predict 45 different labels, including 37 radiological abnormalities and 8 NLP-specific categories.
Architecture of the joint segmentation and classification model.

A key innovation is the use of Teacher Forcing at the report level. Because classification depends on accurate segmentation, the authors used ground-truth segments during early training phases. This prevents the classifier from being distracted by initial segmentation errors, allowing both tasks to converge effectively.

Datasets and Training

The study utilized a massive dataset for development and evaluation:

  • Pre-training: 2.7 million unlabeled chest X-ray reports from six UK hospitals, supplemented by the public MIMIC-CXR and Open-I datasets.
  • Fine-tuning/Evaluation: A "gold standard" set of 28,521 reports manually annotated by radiologists, resulting in over 127,000 unique labeled segments.
  • Benchmarks: The model was compared against established baselines like CheXpert, RadBERT-CL, and ClinicalBERT.

Key Results

The model established new benchmarks for fine-grained radiology report analysis. It achieved a WinDiff of 0.0442 (a standard metric for segmentation where lower is better), significantly outperforming off-the-shelf tools like spaCy’s Sentencizer. For classification, it reached a report-level macro F1 score of 0.84 across 37 radiological labels.

Performance comparison of different model components on segmentation metrics.

The joint model outperformed both single-task models and sequential "pipeline" models, proving the value of multi-task learning in this domain.

Discussion and Insights

  • Segmentation as Supervision: The joint task of segmentation improves classification performance. Forcing the model to identify where a topic starts and ends provides a supervisory signal that helps it understand underlying semantics better than document-level labeling alone.
  • The Context Benefit: The researchers found that "pooled" models (viewing segments within the context of the whole report) performed better than models trained on isolated segments. This suggests that surrounding text provides vital cues for resolving ambiguity in medical findings.
  • Limitations: The model still struggles with extremely rare clinical findings (e.g., "paraspinal mass") due to data scarcity. Future work may explore even more granular auxiliary tasks, such as token-level Named Entity Recognition, to further refine the model’s understanding of anatomical locations.

Summary updated

BibTeX
@inproceedings{zhu2024multi,
  author = {Yuanyi Zhu and Maria Liakata and Giovanni Montana},
  title = {{A Multi-Task Transformer Model for Fine-grained Labelling of Chest X-Ray Reports}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure