Introduction
Gastroscopy Diagnostic Texts (GDTs) are essential clinical records that detail a patient’s gastric health. However, these reports are typically written as unstructured free-text, making large-scale analysis difficult. Physicians often use subjective descriptions, and the same lesion can be described using various customary terms. Standard natural language processing (NLP) models often struggle with the "one input, multiple outputs" requirement of GDTs—where a single report must yield both a disease grade (e.g., early-stage vs. progressive cancer) and specific anatomical lesion sites.
Methodology
To address these challenges, researchers developed a specialized Three-Branch BERT-Based Classification Network. The approach moves beyond simple document-level classification by incorporating anatomical structure into the model's logic.
Keyword-Based Text Slicing
The first step in the pipeline is a unique pre-processing method called keyword-based text slicing. The GDT is segmented into discrete units based on anatomical keywords, such as the esophagus, cardia, fundus, body, antrum, and duodenum. This ensures that the model treats descriptions of different stomach regions as distinct but related data points, reducing noise from long, unstructured reports.
Three-Branch BERT Architecture
The core of the system is a Chinese RoBERTa-base model modified with a BERT-SUM-inspired encoding strategy. By inserting [CLS] tokens at the start of each anatomical segment, the encoder extracts local feature vectors for each site alongside a global feature vector for the entire report. These vectors are then processed by a three-branch decoder:
- Global Stage Branch: Processes the global vector to determine the overall cancer stage.
- Endoscopic Seen Branch: Analyzes text units to identify suspected lesion sites.
- Pathological Diagnosis Branch: Analyzes pathological units to confirm lesion locations.
Experimental Results
The study utilized a dataset of 2,459 cleaned and annotated reports from Qilu Hospital of Shandong University. The three-branch model demonstrated significant improvements over standard baselines, including CNNs, LSTMs, and traditional BERT classifiers.
- Cancer Staging: The model achieved a precision and F1 score of 0.993.
- Early-Stage Detection: For early-stage cancer, the model maintained a precision of 0.993 and a recall of 0.784.
- Lesion Pinpointing: In identifying specific lesion sites, the model achieved a weighted F1 score of 0.849, significantly outperforming standard multi-label BERT models (0.724).
Notably, the specialized BERT model outperformed GPT-3.5 Turbo in comparative tests. The authors attribute this to the difficulty of applying general-purpose large language models (LLMs) to niche medical data where high precision is non-negotiable.
Conclusion and Future Work
By anchoring text analysis in human anatomy, the three-branch network effectively extracts localized clinical findings from complex medical reports. While the precision is high, the recall for early-stage cancer (0.784) indicates that approximately 21% of early cases may still be missed, representing a key area for future improvement. Future research will focus on incorporating temporal features to track disease progression over multiple patient visits and validating the model across diverse institutional writing styles.
Summary updated