---
title: 'PanSubNet: Interpretable PDAC Subtyping'
url: https://www.emergentmind.com/topics/pansubnet
type: topic
---

# PanSubNet: Interpretable PDAC Subtyping

PanSubNet (“PANcreatic SUBtyping NETwork”) is an interpretable deep learning framework designed for inferring therapy-relevant molecular subtypes of pancreatic ductal adenocarcinoma (PDAC)—specifically basal-like and classical subtypes—directly from routine hematoxylin and eosin (H&E)-stained whole-slide images (WSIs). By fusing cellular- and tissue-level histomorphological features through dual-scale attention-based architectures, PanSubNet delivers robust, clinically actionable subtype classification without the need for bulk RNA sequencing, enabling cost- and time-efficient integration into digital pathology workflows [2601.03410].

## 1. Data Sources and Label Generation

PanSubNet was developed and validated using multi-institutional datasets comprising 1,055 patient samples from the PANCAN (n = 846) and TCGA-PAAD (n = 209) cohorts, each with paired histology and RNA-seq data. Ground-truth molecular subtypes were derived by a structured process:

1. **Score Computation:** Single-sample gene set enrichment (ssGSEA) was performed using the validated Moffitt 50-gene signature to obtain classical and basal-like enrichment scores for each sample.
2. **Raw Subtype Assignment:** A continuous score was calculated as the difference: $\text{score} = \text{ssGSEA}(\text{classical}) - \text{ssGSEA}(\text{basal})$.
3. **Z-score Normalization and Thresholding:** After z-normalization across all samples, subtypes were assigned as "classical" for $z > +1$, "basal-like" for $z < -1$, and samples with $|z| \leq 1$ were considered intermediates and excluded from training.
4. **Intermediate Resolution:** Intermediate cases were reassigned using GATA6 expression tertiles, with the lowest third labeled as basal-like and the highest as classical.

The breakdown of high-confidence label availability is detailed below:

| Cohort      | Total Samples | With RNA-seq | High-Confidence Labels (Classical/Basal-like) |
|-------------|--------------|--------------|-----------------------------------------------|
| PANCAN      | 846          | 614          | 77/99                                        |
| TCGA-PAAD   | 209          | 183          | 47/15                                        |

All analyses and training utilized these rigorously defined high-confidence cases.

## 2. Dual-Scale Model Architecture

PanSubNet operationalizes a “cellular word + tissue sentence” paradigm, extracting discriminative information at both nuclear and architectural levels:

- **Cellular Scale (40×):** Nuclei are segmented and classified into five cell types using CellVIT++, a SAM-based Vision Transformer. Each detected cell yields a feature embedding $c_j \in \mathbb{R}^{D_1}$ and spatial location $x_j$.
- **Tissue Scale (20×):** The WSI is tiled into non-overlapping $256 \times 256$ px patches. Each patch $i$ is encoded by a pre-trained UNI2-h network, generating a vector $p_i \in \mathbb{R}^{D_2}$.
- **Local Fusion:** For each patch, cell embeddings within its bounds are aggregated by spatially biased self-attention, where Euclidean distance between cell centroids modulates attention strength:
  $$
  \alpha_{mn} =
  \frac{\exp \left( \frac{q_m \cdot k_n - \lambda \|x_m - x_n\|_2}{\sqrt{d_k}} \right) }
  { \sum_{n'} \exp \left( \frac{q_m \cdot k_{n'} - \lambda \|x_m - x_{n'}\|_2}{\sqrt{d_k}} \right) }
  $$
  The updated CLS token $h_i$ summarizes patch-level cellular morphology.
- **Patch-Cell Fusion:** The patch context $p_i$ and cell aggregation $h_i$ are combined by outer product and linear projection:
  $$
  F_i = \mathrm{Flatten}(p_i \otimes h_i) W_f \in \mathbb{R}^{D_3}
  $$
- **Slide-Level Prediction:** The set $\{F_i\}$ forms a bag of instances for a 2D Multi-instance Learning (2D AttMIL) aggregator using multi-head self-attention, yielding a slide-level feature vector $S$ which is fed to an MLP classifier for subtype prediction.

This architecture integrates hierarchical morphological signals, enabling transparent feature attribution and robust generalization.

## 3. Attention Mechanisms and Interpretability

Multi-head self-attention mechanisms are deployed at both patch and slide levels to facilitate representation learning and interpretability:

- For each attention head $\ell$, mappings are defined by $W^Q_\ell, W^K_\ell, W^V_\ell$, producing:
  $$
  \mathrm{head}_\ell = \mathrm{softmax}\left(\frac{Q W^Q_\ell (K W^K_\ell)^{T}}{\sqrt{d_k}}\right) V W^V_\ell
  $$
  and overall aggregation:
  $$
  \mathrm{MultiHead}(Q, K, V) = \mathrm{Concat}(\mathrm{head}_1, \dots, \mathrm{head}_H) W^O
  $$

- **Feature Attribution:** Patch-level attention scores from AttMIL are reshaped into spatial heatmaps and overlaid on the WSI. These maps localize histological regions contributing most strongly to subtype decisions, such as well-differentiated glands for classical cases and squamous/keratinizing foci for basal-like cases.

This interpretability supports both model validation and clinical integration.

## 4. Training Protocol and Validation Strategy

Model training utilized five-fold cross-validation on 176 high-confidence PANCAN slides, with the following regimen:

- **Loss Function:** Binary cross-entropy:
  $$
  \mathcal{L} = -[y\log \hat{y} + (1 - y) \log (1 - \hat{y})]
  $$
- **Optimization:** AdamW optimizer with learning rate $5 \times 10^{-5}$ and weight decay $1 \times 10^{-5}$.
- **Early Stopping:** Monitoring validation AUC, with at most 100 epochs per fold.
- **External Validation:** The independent TCGA high-confidence set (n = 62) served as a zero-shot test set; no fine-tuning was performed.

## 5. Performance Benchmarking

PanSubNet demonstrated robust performance, both internally (cross-validation) and externally (generalization):

| Dataset   | AUC         | Accuracy    | Balanced Accuracy | Sensitivity | Specificity |
|-----------|-------------|-------------|------------------|-------------|-------------|
| PANCAN    | 88.5% ±5.3% | 84.9% ±10.1% | 85.2% ±10.2%     | 84.6% ±13.2% | 85.8% ±9.0% |
| TCGA      | 84.0%       | 76.0%       | 76.4%            | 75.5%       | 77.3%       |

- **AUC Definition:** $\mathrm{AUC} = \int_0^1 \mathrm{TPR}(\mathrm{FPR})\, d(\mathrm{FPR})$, with $\mathrm{TPR} = \frac{\mathrm{TP}}{ \mathrm{TP} + \mathrm{FN}}$, $\mathrm{FPR} = \frac{ \mathrm{FP} }{ \mathrm{FP} + \mathrm{TN} }$.
- **Balanced Accuracy:** $\frac{\text{Sensitivity} + \text{Specificity}}{2}$.

These metrics reflect balanced sensitivity and specificity. External validation without fine-tuning indicates strong generalizability across institutions.

## 6. Biological and Clinical Insights

PanSubNet’s predictions align closely with established molecular biology and transcriptomics:

- **Transcriptomic Concordance:** Predicted subtypes show strong correlation with Moffitt ssGSEA scores (classical/basal) and GATA6 expression.
- **Differentiation Markers:** Classical predictions are enriched in trefoil factors (TFF1/2/3), REG4, SPINK1, with attention focused on glandular/mucinous regions; basal-like predictions co-occur with squamous markers (KRT6A, S100A2, SCEL), highlighting keratinizing areas.
- **DNA Damage Repair (DDR):** Composite DDR scoring ($z$-scored BRCA1/2, PALB2, RAD51, ATM, CHEK1) is lower in basal-like tumors and varies linearly along the subtype continuum. Higher DDR is associated with increased overall survival (log-rank $p = 0.003$).
- **Prognostic Stratification:** In metastatic disease (PANCAN subset), median overall survival based on PanSubNet (classical: ≈24.7 months; basal-like: ≈10.3 months, $p < 0.05$) matches or exceeds stratification by RNA-seq labels (classical: ≈22.0 months; basal-like: ≈10.3 months, $p = 0.08$).

A plausible implication is that PanSubNet subtypes do not merely recapitulate transcriptomics but enhance downstream prognostic utility, especially in metastatic settings.

## 7. Deployment and Clinical Workflow Considerations

- **Throughput and Cost:** WSI-based inference is completed within hours on conventional GPUs, representing orders-of-magnitude improvements in speed and cost over bulk RNA sequencing.
- **Compatibility:** The framework integrates with standard digital pathology systems; attention heatmaps afford pathologist-oriented interpretability.
- **Interpretability:** Dual-scale design and attention overlays establish explicit links between histomorphology and molecular phenotype, supporting transparency in high-stakes clinical decision-making.
- **Validation and Future Directions:** Ongoing multi-institutional studies aim to validate PanSubNet’s real-world utility, supporting its prospective integration into precision oncology workflows [2601.03410].

PanSubNet constitutes a robust, interpretable platform for PDAC molecular subtyping from routine H&E slides, delivering biologically and clinically validated outputs, and serving as a deployable instrument to advance stratified therapy for pancreatic cancer.

Source: https://www.emergentmind.com/topics/pansubnet