Improving Information Extraction from Pathology Reports using Named Entity Recognition

Ken G. Zeng, Tarun Dutt, Jan Witowski, Kranthi Kiran Gv, Frank Yeung, Michelle Kim, Jesi Kim, Mitchell Pleasure, Christopher Moczulski, L. Julián Lechuga López, Hao Zhang, Mariam Al Harbi, Farah E. Shamout, Vincent J. Major, Laura Heacock, Linda Moy, Freya Schnabel, Linda M. Pak, Yiqiu Shen, Krzysztof J. GerasResearch 2023

Abstract

Pathology reports are considered the gold standard in medical research due to their comprehensive and accurate diagnostic information. Natural language processing (NLP) techniques have been developed to automate information extraction from pathology reports. However, existing studies suffer from two significant limitations. First, they typically frame their tasks as report classification, which restricts the granularity of extracted information. Second, they often fail to generalize to unseen reports due to variations in language, negation, and human error. To overcome these challenges, we propose a BERT (bidirectional encoder representations from transformers) named entity recognition (NER) system to extract key diagnostic elements from pathology reports. We also introduce four data augmentation methods to improve the robustness of our model. Trained and evaluated on 1438 annotated breast pathology reports, acquired from a large medical center in the United States, our BERT model trained with data augmentation achieves an entity F1-score of 0.916 on an internal test set, surpassing the BERT baseline (0.843). We further assessed the model's generalizability using an external validation dataset from the United Arab Emirates, where our model maintained satisfactory performance (F1-score 0.860). Our findings demonstrate that our NER systems can effectively extract fine-grained information from widely diverse medical reports, offering the potential for large-scale information extraction in a wide range of medical and AI research.

Introduction

Pathology reports contain vital diagnostic data, yet their unstructured nature makes them a bottleneck for large-scale clinical research. Traditional NLP approaches often rely on simple report classification (e.g., "cancer present" vs. "absent"), which fails to capture granular details like specific lesion positions or the relationship between multiple findings. Furthermore, these models frequently struggle to generalize across different healthcare systems where writing styles and formatting vary significantly.

This research addresses these challenges by moving beyond classification to a granular Named Entity Recognition (NER) framework. By leveraging Clinical BERT and a novel data augmentation strategy, we demonstrate a system that is both highly accurate and robust enough to handle international variations in medical reporting.

Methodology

The core of our system is a Clinical BERT model, which utilizes a self-attention mechanism to understand the context of medical terms—a critical feature for correctly interpreting medical negation (e.g., "no evidence of ductal carcinoma").

To improve robustness, we introduced a Data Augmentation Module consisting of four specific transformations:

  • Mention Replacement (MR): Swapping an entity with another of the same type from the dataset.
  • Synonym Replacement (SR): Replacing words with synonyms using WordNet.
  • Label-wise Token Replacement (LwTR): Replacing individual tokens with others sharing the same label.
  • Shuffle within Segments (SiS): Randomly reordering tokens within an entity segment to help the model ignore rigid formatting.
Overview of the NER pipeline, including label assignment, model development, and the four-part data augmentation strategy.

Results

The model was trained on 1,438 breast pathology reports from NYU Langone Health. On the internal NYU test set, the augmented BERT model achieved an overall F1-score of 0.916, a substantial improvement over the baseline BERT score of 0.843.

Performance comparison and ablation study showing the incremental gains from each data augmentation method on the internal NYU test set.

As shown in the performance metrics, the model was nearly perfect at identifying cancer grade (0.983 F1) and very strong at cancer subtype (0.928 F1). While "lesion position" (0.827 F1) proved more difficult due to the high variability in how clinicians describe locations (e.g., "10 o'clock" vs. "uoq"), the augmentation strategies significantly buffered against this noise.

To test generalizability, we evaluated the model on an external dataset from SEHA hospitals in the United Arab Emirates. The augmented model maintained a high F1-score of 0.860, whereas the non-augmented baseline dropped to 0.739, proving that the augmentation strategies effectively prepare the model for diverse linguistic and formatting conventions.

Discussion and Conclusion

Our findings demonstrate that NER systems, when paired with robust data augmentation, can effectively extract fine-grained information from diverse medical reports. While the initial annotation cost remains high, the resulting model offers a scalable solution for clinical research. Future work will focus on expanding the scope of extracted entities (such as tumor size and biomarkers) and exploring the integration of Large Language Models (LLMs) to further refine extraction accuracy and reduce the need for manual labeling.

Code Availability: The authors have published their code at https://github.com/nyukat/pathology_extraction.

Summary updated

BibTeX
@inproceedings{zeng2023improving,
  author = {Ken G. Zeng and Tarun Dutt and Jan Witowski and Kranthi Kiran GV and Frank Yeung and Michelle Kim and Jesi Kim and Mitchell Pleasure and Christopher Moczulski and L. Julián Lechuga López and Hao Zhang and Mariam Al Harbi and Farah E. Shamout and Vincent J. Major and Laura Heacock and Linda Moy and Freya Schnabel and Linda M. Pak and Yiqiu Shen and Krzysztof J. Geras},
  title = {{Improving Information Extraction from Pathology Reports using Named Entity Recognition}},
  booktitle = {Research},
  year = {2023},
  doi = {10.21203/rs.3.rs-3035772/v1},
}
Figure