When a mass is found in the pancreas, doctors urgently need to know whether it is pancreatic ductal adenocarcinoma (PDAC), a neuroendocrine tumour (PNET), or a benign inflammatory condition called chronic pseudotumoral pancreatitis (CPP). Each requires very different treatment.
Endoscopic ultrasound (EUS) is the gold standard for imaging pancreatic masses, placing the ultrasound probe close to the pancreas via the stomach for high-quality images. However, interpreting these images remains highly operator-dependent.
This study developed an AI system that analyses real-time EUS video frames and automatically classifies pancreatic masses with accuracy rivalling expert clinicians — reducing diagnostic errors and supporting less experienced endoscopists.
The study enrolled 65 patients with focal pancreatic masses confirmed by cytopathology. From each patient, 20 EUS images were selected across five imaging modalities: grayscale, colour Doppler, arterial contrast, venous contrast, and elastography.
The AI uses a hybrid architecture: a convolutional neural network (CNN) analyses each image frame to extract visual features, while a long short-term memory (LSTM) network learns temporal dependencies between consecutive frames — mimicking how clinicians watch live ultrasound video rather than static snapshots.
2,688 images were used for training and 672 for testing. The CNN extracts features from each frame and the LSTM learns how those features relate across a sequence, enabling richer diagnosis than any single frame could provide.
The hybrid model achieved an area under the curve of 0.98 and an overall accuracy of 98.26% across all three mass types — rivalling the performance of experienced endoscopic ultrasound specialists.
For pancreatic ductal adenocarcinoma, the model achieved a positive predictive value of 98.1% and negative predictive value of 96.7%. For chronic pseudotumoral pancreatitis, PPV was 99.7% and NPV was 96.5%.
For neuroendocrine tumours, PPV was 98.3% and NPV was 98.9%. These consistent results across all subtypes demonstrate that the AI reliably distinguishes all three clinically important categories of pancreatic mass.
One of the most significant advantages is that the system works in real time during the EUS procedure itself, providing immediate diagnostic support to clinicians at smaller hospitals without specialist expertise.
By providing near-instant classification with high confidence, the tool could reduce reliance on invasive fine-needle aspiration biopsy in cases where the AI gives a clear diagnosis, sparing patients an additional procedure.
The multi-modality approach using five different ultrasound imaging techniques mirrors the complex assessment an expert would perform, making the AI robust to unusual imaging appearances.
The study shows that combining CNN and LSTM neural networks produces a highly accurate real-time diagnostic aid for distinguishing between pancreatic cancer and other masses on ultrasound.
The authors note validation on a larger independent cohort is needed before clinical deployment, but results are sufficiently strong to justify a prospective clinical trial.
If validated, this tool could meaningfully accelerate pancreatic cancer diagnosis by ensuring high-quality diagnostic interpretation is available in every hospital that performs endoscopic ultrasound.