Pancreatic ductal adenocarcinoma (PDAC) is an aggressive form of pancreatic cancer that is typically diagnosed at a late stage, when treatment options are limited. Pancreatic intraepithelial neoplasias (PanINs) are precancerous lesions that can precede PDAC. While PanINs are common and not all progress to cancer, certain subtypes carry a significantly higher risk of malignant transformation.
Pathologists classify PanINs into severity grades. Low-grade (LG) and high-grade (HG) PanINs are usually distinguishable, but intermediate lesions (referred to as PanIN-2.5 here) are difficult to classify despite their clinical importance. Because higher-grade PanINs are more likely to progress to PDAC, accurately modeling lesion progression is critical.
To address this, we moved beyond discrete class labels and modeled PanIN severity as a continuous gradient. Using a DeepLab-ResNet50 segmentation model, each pixel in a whole-slide image was assigned probabilities of belonging to LG, PanIN-2.5, or HG classes, with probabilities across the three classes summing to one. These probabilities were then converted into a continuous severity score using a weighted SoftMax formulation (LG = 0, PanIN-2.5 = 50, HG = 100), yielding a per-pixel score ranging from 0 to 100.
This formulation enabled flexible thresholding strategies (e.g., 0–33 = LG, 33–66 = PanIN-2.5, 66–100 = HG) and facilitated quantitative evaluation of trade-offs between classification accuracy and class bias.
Because severity scores are assigned at every pixel—including non-PanIN tissue—we trained a complementary multi-class tissue segmentation model to identify and mask non-PanIN regions. This ensured that severity heatmaps reflected only true PanIN tissue, improving interpretability and downstream analysis.