TL;DR
This paper explores using T5-based sequence-to-sequence models to automatically annotate Dutch pathology reports with Palga codes, aiming to reduce the manual workload and improve data retrieval for research. They developed a custom pre-trained model (PaTh5.NL) and investigated constrained decoding (CD) to enforce domain-specific rules, finding that while these models improve annotation similarity (BLEU scores), their impact on actual patient retrieval is more nuanced and depends on report complexity.
What Problem Does This Paper Address?
Pathology reports are crucial for patient care and scientific research, but their effective use relies on accurate annotations with standardized codes (Palga codes in the Netherlands). Manually annotating these reports is time-consuming and prone to errors. Existing automated tools struggle with longer or more complex reports and require exact matches for terms, leading to potential misinterpretations. The authors aim to leverage advanced deep learning models, specifically T5, to automate this annotation process, ensuring consistency and potentially improving data retrieval for research purposes. A key challenge is that there isn't a perfect "gold standard" for manual annotations, as pathologists may use different levels of detail or conventions.
Methods
The core of the study involves fine-tuning T5-based sequence-to-sequence models for the task of generating Palga codes from the conclusion text of pathology reports. They compare two main approaches:
- Standard T5 (mT5): A publicly available multilingual T5 model.
- Custom Pre-trained T5 (PaTh5.NL): A T5 model pre-trained specifically on Dutch pathology reports from the Palga dataset. This custom pre-training aims to better align the model with the specific language, terminology, and annotation conventions used in this domain.
They also explore two decoding strategies:
- Default Decoding (DD): Standard generation of output sequences.
- Constrained Decoding (CD): A novel approach that incorporates domain knowledge (Palga's rules for code sequences) during the generation process. This is implemented using a Directed Acyclic Graph (DAG) derived from historical annotation patterns, ensuring that generated codes are valid, follow specific orders, and make clinical sense.
Performance is evaluated using quantitative metrics like BLEU scores (measuring similarity to reference annotations) and qualitative case-based evaluations (assessing patient retrieval from the Palga database).
Datasets
The study utilizes data provided by the Palga Foundation:
- Pre-train (PT) dataset: A large dataset (878,611 histology, 118,082 cytology, 3,307 autopsy reports) used for the initial self-supervised pre-training of the PaTh5.NL model.
- Fine-tune (FT) dataset: A smaller, annotated dataset (145,100 histology, 46,605 cytology, 55,670 autopsy reports) used for supervised fine-tuning of all models. This dataset was split into training, validation, and testing sets with temporal splits to simulate real-world deployment.
- Gold-standard (GT) test dataset: A smaller, manually annotated dataset (996 histology, 500 cytology, 200 autopsy reports) used for more rigorous evaluation, intended to be of higher quality than the FT test set.
- Case-based evaluation dataset: A large dataset (158,846 histology, 57,998 cytology, 808 autopsy reports) used for qualitative assessment of patient retrieval.
Key Insights and Ideas
- Domain-specific pre-training matters: Pre-training a T5 model on Dutch pathology reports (PaTh5.NL) significantly improved its performance compared to a general multilingual model (mT5), especially for shorter reports. This highlights the value of tailoring language models to specific medical domains.
- Custom tokenization is crucial: The custom tokenizer developed for PaTh5.NL dramatically reduced the number of tokens needed to represent text, potentially preserving more meaning and enabling the implementation of CD.
- Constrained decoding enforces rules, but at a cost: CD successfully forced the model to adhere to Palga's annotation rules, leading to more clinically valid sequences. However, this sometimes resulted in slightly lower BLEU scores, as reference annotations don't always perfectly follow these rules.
- BLEU scores don't tell the whole story: While higher BLEU scores indicate closer similarity to reference annotations, they didn't consistently translate to better patient retrieval in the case-based evaluation. This suggests that the "quality" of an annotation might be better measured by its utility (e.g., retrieval) than just its similarity to a potentially imperfect reference.
- Report complexity is a major hurdle: All models struggled with longer and more complex conclusion texts, particularly in autopsy reports. This is likely due to less training data for these cases and the inherent difficulty in capturing nuanced information.
Key Results
- Quantitative: Fine-tuned PaTh5.NL models (both DD and CD) significantly outperformed mT5 in BLEU scores on the FT test dataset, especially for shorter histology and cytology reports. For example, PaTh5.NL-DD achieved a BLEU score of 34.6 ± 0.6 on the FT test set, compared to mT5's 30.5 ± 0.5.
- Qualitative: In the case-based evaluation, mT5 and PRAM generally showed better patient retrieval performance than the PaTh5.NL models. For colorectal carcinomas, all models performed similarly, retrieving nearly all patients. However, for neuroendocrine tumors, mT5 retrieved the most patients.
- Code Frequency: Model performance declined as code frequency decreased, with PRAM showing a surprising improvement in lower-frequency bins, though it generally underperformed on frequent codes.
Limitations and Future Work
- Annotation Sub-optimality: The study acknowledges that the reference annotations themselves are often incomplete or incorrect, which can negatively impact model training and evaluation (e.g., lower BLEU scores for potentially better predictions).
- Lack of Gold Standard: A truly comprehensive and verified gold-standard dataset for Dutch pathology reports is missing, limiting the ability to definitively assess model performance.
- Case-Based Evaluation Nuances: The case-based evaluation had limitations, such as not investigating patients uniquely identified by models (only those missed by original codes) and the potential for false positives not being fully accounted for.
- Future Directions:
- Larger Gold Standard: Creating a more extensive and verified gold-standard dataset is crucial.
- Full Report Analysis: Extending models to process the entire pathology report, not just the conclusion text, could address issues where crucial information is missing from the conclusion.
- Handling Rare Codes and Complex Reports: Developing strategies like data augmentation or specialized models for rare codes and complex reports is needed.
- Mitigating Temporal Drift: Implementing continual learning or other methods to update models as language and annotation practices evolve is essential for long-term deployment.
- Hierarchical Codes: Exploring the use of hierarchical code systems (like SNOMED-CT) might improve retrieval accuracy.
Summary updated