Abstract
Extracting information from Electronic Medical Records (EMR) is a time-consuming and expensive process when done manually. Rule-based and machine learning techniques are two approaches to solving this problem. In this study, we trained a machine learning model on pathology reports to extract pertinent tumor characteristics, which enabled us to create a large database of attribute-searchable pathology reports. This database can be used to identify cohorts of patients with characteristics of interest. We collected a total of 91,505 breast pathology reports from three Partners hospitals: Massachusetts General Hospital (MGH), Brigham and Women’s Hospital (BWH), and Newton-Wellesley Hospital (NWH), covering the period from 1978 to 2016. We trained our system with annotations from two datasets, consisting of 6,295 and 10,841 manually annotated reports. The system extracts 20 separate categories of information, including atypia types and various tumor characteristics such as receptors. The model achieved accuracy of 90% for correctly parsing all carcinoma and atypia categories for a given patient. The average accuracy for individual categories was 97%. Using this classifier, we created a database of 91,505 parsed pathology reports. Our learning curve analysis shows that the model can achieve reasonable results even when trained on a few annotations. This model has the potential to reduce the effort required for analyzing large amounts of data from medical records, and to minimize the cost and time required to glean scientific insight from this data.
Introduction
Pathology reports serve as the "gold standard" for cancer diagnosis and clinical research. However, the vast majority of this critical data is currently locked in unstructured free-text formats. For researchers to identify specific patient cohorts—such as those with invasive ductal carcinoma (IDC) that is Estrogen Receptor (ER) positive—they must traditionally undergo the labor-intensive process of manually reviewing thousands of documents.
Previous attempts to automate this extraction have relied heavily on rule-based Natural Language Processing (NLP). These systems use complex "if-then" logic to identify keywords. However, medical language is highly diverse; for instance, clinicians may describe IDC in over 120 different ways. Consequently, rule-based systems are expensive to develop, difficult to maintain, and often fail to scale across different institutions or languages. This study proposes a supervised machine learning approach to overcome these limitations and create a structured, searchable database from free-text reports.
Methods
To move beyond the rigidity of manual rules, the researchers implemented a supervised machine learning framework focused on scalability and accuracy.
Feature Representation and Algorithm
The system utilizes an n-gram representation, breaking text into overlapping sequences of words (e.g., "invasive ductal"). This allows the model to capture context and nuance without requiring a predefined, rigid medical vocabulary. The core algorithm is based on boosting classification using decision stumps. Boosting works by combining numerous "weak" learners—simple rules that perform slightly better than chance—into a single, highly accurate "strong" learner.
Classification and Logic
The team developed 20 separate classifiers, each dedicated to a specific clinical category, such as DCIS, LCIS, or ER Status. To ensure the data reflects a patient's actual clinical journey, the system employs "episode-based" logic. This consolidates all reports for a single patient within a six-month window, providing a holistic diagnostic view rather than a fragmented look at individual reports.
Datasets
The study leveraged a massive corpus of 91,505 breast pathology reports (resulting in 108,114 records after accounting for bilateral cases) from three major institutions: Massachusetts General Hospital (MGH), Brigham and Women’s Hospital (BWH), and Newton-Wellesley Hospital (NWH).
For training and validation, the researchers used two primary manually annotated datasets:
- The Buckley Dataset: 6,295 reports annotated for carcinoma and atypia.
- The Breast Cancer Database (BCD): 10,841 reports annotated for specific tumor characteristics like ER, PR, and HER2 status.
Results and Key Insights
The machine learning model demonstrated high performance across multiple metrics, significantly outperforming many prior attempts at automated pathology parsing.
- High Accuracy: The model achieved an average accuracy of 97% across individual categories. In 19 out of 20 categories, the F1-score (the harmonic mean of precision and recall) exceeded 0.90.
- Report-Level Reliability: In a rigorous "all-or-nothing" test—where the model was required to correctly identify every carcinoma and atypia category for a patient—it achieved 90% accuracy.
- Annotation Efficiency: A critical finding was the "learning curve analysis." The model reached an average F1-score of 0.90 with as few as 400 annotations per category. This suggests that high-quality results are attainable without the need for tens of thousands of manual labels, making the system accessible for smaller clinical departments.
- ML vs. Rule-Based Systems: In cases where the ML model and traditional rule-based systems disagreed, the ML model was correct 52% of the time, proving it can match or exceed the performance of hand-engineered rules with far less manual labor.
Discussion and Conclusion
While the system is highly accurate, it is not yet 100% perfect and currently serves as a tool to assist researchers rather than a replacement for clinical review. One limitation is institutional generalizability; while the model was tested across three hospitals, reporting formats can vary significantly at other sites.
To address this, the authors envision a "virtuous cycle" or retraining loop. As researchers use the parsed database and correct occasional errors, these corrections can be fed back into the training set, allowing the model to asymptotically approach perfect accuracy over time. By providing a user-friendly interface to this structured data, the system enables physicians to identify target cohorts and export data for research in minutes rather than months, drastically reducing the cost and time required for large-scale clinical insights.
Summary updated