Prostate cancer is the second most common solid organ cancer in men worldwide. Its genome is characterized by frequent gene rearrangements, the most common of which is the TMPRSS2:ERG fusion -- a structural alteration in which the androgen-regulated gene TMPRSS2 merges with the ERG transcription factor. This fusion is present in approximately 40% to 50% of all prostate cancer cases and plays a role in cancer progression and metastasis.
ERG fusion status is clinically relevant. It cannot be seen on standard hematoxylin and eosin (H&E)-stained tissue slides -- the routine staining used in pathology for cancer diagnosis. Instead, detecting it currently requires specialized molecular tests: fluorescence in situ hybridization (FISH), reverse transcription PCR (RT-PCR), or immunohistochemistry (IHC) staining for the ERG protein. While these tests work well in well-equipped laboratories, they are time-consuming, expensive, and inaccessible in resource-limited clinical settings.
An alternative approach is to train a deep learning model to infer ERG fusion status directly from the H&E slides that are already routinely collected. This exploits the hypothesis that ERG fusion produces subtle but consistent changes in tissue morphology -- the spatial arrangement of cells, the ratio of tumor to stromal tissue, the immune cell infiltration -- that a sufficiently powerful AI can detect, even though these patterns are invisible to the human eye.
This study develops and validates exactly such a model, using whole slide images (WSIs) from two independent prostate cancer cohorts totaling 750 slides. The approach uses a semi-supervised learning framework -- meaning it requires only slide-level cancer/non-cancer labels rather than labor-intensive pixel-level annotation of specific tissue regions -- making it practical to train on large clinical datasets.
The deep learning framework used in this study is CLAM (Clustering-constrained Attention Multiple Instance Learning). CLAM belongs to a family of techniques called multiple instance learning (MIL), which is specifically designed for the problem of learning from whole slide images without pixel-level annotations. In MIL, each WSI is treated as a "bag" containing thousands of individual tissue patches ("instances"). The model learns to predict a slide-level label -- ERG fusion positive or negative -- without needing to know which specific patches are responsible for that prediction.
The key innovation in CLAM is its attention mechanism. Rather than treating all patches equally, the model assigns each patch an attention score that reflects how much that patch contributed to the final prediction. High attention scores identify the tissue regions the model found most informative for distinguishing ERG-positive from ERG-negative slides. This makes the model interpretable: researchers can visually inspect the highest-scoring patches to understand what tissue patterns the model has learned to associate with ERG fusion.
The pipeline begins with tissue segmentation using Otsu's thresholding method to separate tissue from background. Each WSI is then tiled into 2048x2048 pixel patches at 40x magnification, which are downsampled to 512x512 patches at 10x magnification. Features are extracted from these patches using a pre-trained ResNet50 model, producing a 1024-dimensional feature vector per patch. The CLAM attention network then aggregates these patch features into a single slide-level representation used for classification.
An important design choice was to include all tissue patches -- including non-cancerous stromal regions -- rather than restricting analysis to tumor tissue. The authors reasoned that ERG fusion may alter not just the tumor cells themselves but also the surrounding microenvironment, including immune infiltration and stromal composition. Including the broader tissue context may allow the model to detect ERG-associated changes that extend beyond the immediate tumor mass.
The primary training and validation dataset was the TCGA prostate adenocarcinoma (PRAD) cohort, comprising 436 H&E-stained whole slide images from 393 patients. ERG fusion status in this cohort was determined by FusionSeq, an RNA sequencing analysis tool that identifies gene fusions. Slides were split into training (70%, n = 318), validation (15%, n = 59), and testing (15%, n = 59) sets. Importantly, when a patient had multiple slides, all slides from that patient were assigned to the same set -- preventing data leakage that would artificially inflate performance estimates.
Ten independent models were trained on ten different data splits to assess performance stability. This approach, called 10-fold cross-validation, provides a robust estimate of model performance by ensuring results are not dependent on a lucky or unlucky single data partition. The best-performing model across the ten splits was then selected for independent validation.
The external validation cohort was the Johns Hopkins natural history cohort, consisting of 314 unique patients and WSIs scanned with a different scanner (Hamamatsu rather than Aperio). ERG status in this cohort was determined by IHC staining rather than RNA sequencing, adding an additional layer of methodological diversity. This cohort served as a completely independent test of whether the model's performance would hold across different institutions, scanner technologies, and molecular assay methods.
After predicting ERG status, the study used the HoVer-Net model (a specialized nucleus segmentation and classification network trained on the PanNuke dataset) to analyze the cellular composition of the top 15 highest-attention patches from each slide. This secondary analysis characterized the proportions of five cell types -- neoplastic, immune, stromal, benign epithelial, and necrotic -- in the regions the ERG prediction model found most informative.
The best-performing model achieved an AUC of 0.84 during training on the TCGA dataset and maintained an AUC of 0.72 on the TCGA held-out test set (59 slides), with accuracy of 70% and Matthews Correlation Coefficient (MCC) of 0.38. On the completely independent Johns Hopkins natural history cohort (314 slides), the model achieved an AUC of 0.73 and accuracy of 69%. The close match between performance on the internal test set and the external cohort is notable -- it indicates that the model generalizes well rather than overfitting to TCGA-specific imaging characteristics.
This cross-institutional robustness is particularly encouraging because the two datasets differed substantially in scanner hardware (Aperio vs. Hamamatsu), staining batch characteristics, and the molecular method used to establish ERG ground truth (RNA-seq vs. IHC). Models trained on one imaging platform often degrade significantly when applied to another. The fact that AUC remained stable at 0.72-0.73 across these sources suggests the model is detecting genuine morphological differences associated with ERG fusion rather than technical imaging artifacts.
Average performance across all ten training splits was AUC 0.79 (standard deviation 0.03) and accuracy 0.71 (SD 0.03), indicating stable and consistent model training with low variance between different data partitions. The narrow standard deviation confirms that the observed performance is reproducible rather than a result of one fortunate split of the data.
While an AUC of 0.72-0.73 on test data is meaningful and statistically significant, the authors acknowledge that it falls below the threshold typically required for direct clinical deployment as a standalone diagnostic tool. The study is framed as proof-of-concept evidence that ERG fusion information is encoded in tissue morphology in ways that AI can detect, with the expectation that larger training datasets and model refinements could push performance higher.
Analysis of the highest-attention patches -- the tissue regions the model weighted most heavily in its ERG predictions -- revealed a consistent and biologically meaningful pattern. Slides predicted as ERG-positive had top patches characterized by a higher proportion of neoplastic (cancer) cells and a lower stromal-to-neoplastic cell ratio. Slides predicted as ERG-negative had top patches with higher stromal and immune cell content relative to cancer cells. This pattern was consistent across both the TCGA and natural history cohorts, providing biological validation that the model is detecting genuine tissue-level differences.
The immune cell infiltration difference was particularly notable. ERG-positive cases showed lower immune cell content in their most informative tissue regions compared to ERG-negative cases. This aligns with growing evidence that TMPRSS2:ERG fusion may suppress anti-tumor immune responses, potentially contributing to a more immunosuppressive tumor microenvironment that allows cancer to evade immune surveillance. The lower immune infiltration in ERG-positive cases detected by the AI model is consistent with this hypothesized biological mechanism.
The cellular composition of the highly-attended tissue regions was significantly associated with patient survival outcomes. High neoplastic cell content in these regions correlated with shorter progression-free survival (p = 0.01) in the TCGA cohort and shorter overall survival (p = 0.02) in the natural history cohort. Conversely, high stromal and immune cell content were associated with longer survival. These associations remained statistically significant in multivariate Cox regression models after adjusting for Gleason grade, tumor stage, PSA, and other clinical variables -- demonstrating that the morphological features identified by the AI capture prognostic information independent of established clinical predictors.
The study found that the cellular composition features extracted from only the 15 highest-attention patches provided equivalent or better prognostic information than features computed from the entire slide. This demonstrates that the attention mechanism is effectively selecting the most biologically informative tissue regions -- concentrating prognostic signal into a small fraction of the available image data rather than requiring analysis of the entire gigapixel slide.
The practical clinical value of this approach lies in its potential to provide ERG fusion status from standard H&E slides that are already routinely collected as part of pathological examination of prostate biopsies and surgical specimens. In high-income settings, this would not replace molecular assays but could serve as a fast screening tool to prioritize which cases need further molecular testing. In lower-income or remote settings where FISH, PCR, and IHC may not be accessible, an H&E-based AI predictor could provide this clinically useful information at no additional diagnostic cost.
ERG fusion status is increasingly relevant as a potential therapeutic target. Several research programs are exploring ERG-targeted therapies specifically for ERG-positive prostate cancer. An inexpensive, scalable method to identify ERG-positive patients from routine slides could facilitate patient stratification for these emerging therapeutic strategies, similar to how HER2 testing in breast cancer directs use of trastuzumab. The more readily ERG status can be determined, the more patients can be appropriately included in relevant clinical trials.
The finding that the model's attention regions carry independent prognostic information beyond Gleason grade and stage suggests that H&E-based AI tools are not simply replicating existing pathology but extracting new clinically meaningful information. The cellular composition of the tissue regions the model attends to -- particularly the ratio of neoplastic to stromal cells -- represents a quantitative tissue phenotype that is not routinely captured in standard pathological grading and that correlates with patient outcomes.
The study also addresses an important methodological consideration for clinical translation: the model requires only slide-level labels (ERG positive/negative) for training, not pixel-level annotation of specific tissue regions. This dramatically reduces the expert annotation effort needed to train such models at scale, making it feasible to build large training datasets from existing clinical records with binary molecular test results attached to archive slides.
The primary limitation is the moderate predictive accuracy (AUC 0.72-0.73 on test data) relative to the near-perfect specificity of molecular assays like IHC and PCR. The authors candidly acknowledge that this performance level is not yet sufficient for the model to replace molecular testing as a standalone clinical tool. However, as a screening or triage tool -- or as a component of a multi-model ensemble that combines H&E features with clinical variables -- this level of accuracy can add meaningful value.
A technical complication is that the training cohort used RNA sequencing (FusionSeq) to determine ERG status, while the validation cohort used IHC. While these methods generally agree, they are not perfectly concordant, introducing a degree of label noise that could suppress measured performance. The fact that the model performs similarly in both cohorts despite this label method discrepancy is itself a sign of robustness.
The model was trained exclusively on radical prostatectomy specimens -- large surgical tissue sections from the entire removed prostate gland. Clinical ERG testing is most needed at the biopsy stage, earlier in the diagnostic process when smaller needle biopsy cores rather than complete resection specimens are available. Extension and revalidation of the model on biopsy tissue is necessary before it can be deployed in the clinical workflows where it would be most impactful.
The authors project that with larger multi-institutional training datasets and continued model refinement, H&E-based ERG fusion detection could become a practical and affordable diagnostic tool. The code for this study is publicly available on GitHub, allowing other researchers to build directly on this foundation and extend the approach to biopsy specimens, other gene fusions, and other cancer types where morphology-based molecular inference could reduce the cost and increase the accessibility of precision oncology.