Prostate cancer is the second most frequent cancer in men worldwide. Accurate and early identification directly determines treatment options and survival outcomes, but traditional diagnostic methods face challenges of precision and consistency that have motivated the development of machine learning-based alternatives.
This study explores a two-stage machine learning pipeline: first using well-established deep learning architectures to extract meaningful features from prostate MRI images, then applying traditional classification algorithms to distinguish cancerous from healthy tissue based on those features.
The key innovation is combining the feature extraction power of deep convolutional neural networks -- which can automatically learn what patterns in an image indicate cancer -- with the classification strength of ensemble methods like random forest, which excel at handling high-dimensional feature data.
A dataset of 4,252 prostate MRI images from the National Cancer Institute -- including 738 healthy and 3,514 cancer-positive scans -- was used to train and evaluate four deep learning architectures: VGG16, VGG19, ResNet50, and ResNet50V2, combined with seven different classification algorithms.
Transfer learning leverages neural networks originally trained on millions of general images to recognize patterns. For medical imaging, the convolutional layers of networks like VGG16 and ResNet50 -- trained on the ImageNet dataset -- act as universal feature detectors that can be repurposed to identify cancer-related patterns in MRI scans.
In this pipeline, the top classification layers are removed from each pretrained network, leaving only the convolutional base. Each MRI image is passed through this feature extractor, producing a rich numerical representation of the image's visual patterns at multiple levels of abstraction -- from low-level edges and textures to high-level structural features of the prostate gland.
Global average pooling compresses the spatial feature maps into compact vectors, reducing dimensionality while retaining the most discriminative information. Feature vectors are then normalized to zero mean and unit variance to ensure consistent scaling before being passed to the classifier.
This approach is particularly valuable because prostate cancer imaging datasets are relatively small compared to the millions of examples needed to train deep networks from scratch. Transfer learning allows high-quality feature extraction even from limited annotated medical datasets -- a common practical constraint in clinical AI development.
Each deep learning architecture initially extracted approximately 4,253 features per MRI image -- a high-dimensional representation that can overwhelm simple classifiers and reduce generalization. A random forest-based feature selection step then reduced this to 668-714 features by identifying the most diagnostically relevant attributes and discarding redundant or low-information features.
Seven classification algorithms were evaluated on both the full feature set and the reduced feature set: logistic regression, decision tree, Gaussian naive Bayes, K-neighbors, linear discriminant analysis, support vector classifier (SVC), and a stacking ensemble classifier. This comprehensive comparison identifies which algorithms best utilize the features extracted by each deep architecture.
The stacking classifier -- an ensemble approach that combines predictions from multiple base classifiers using a meta-model -- was tested as the most sophisticated approach. By learning which base classifiers are most reliable for different types of cases, the stacking approach can outperform any individual algorithm.
All images were resized to 224 x 224 pixels to match the input requirements of the pretrained networks. The dataset was split into training and test sets with patient-level separation to ensure the model's performance on unseen cases was accurately measured.
The best overall performance was achieved by the stacking classifier using ResNet50 features, which reached an accuracy of 99.77% with a matching F1 score of 99.77% and recall of 99.41%. This represents the highest-performing combination among all architectures and classifiers tested.
Logistic regression paired with VGG19 features achieved an accuracy of 99.64%, demonstrating that even a relatively simple linear classifier performs excellently when given well-extracted features. ResNet50 and ResNet50V2 with logistic regression achieved 99.52% and 99.41% respectively, confirming that the ResNet architecture family extracts particularly discriminative features for prostate cancer detection.
The decision tree classifier showed the most variable performance across architectures (94.24% to 97.89%), while Gaussian Naive Bayes showed the lowest overall results (84.13% to 93.07%), reflecting that these algorithms are less suited to the high-dimensional feature space produced by deep networks.
Feature reduction generally maintained or slightly improved performance while dramatically reducing computational load -- from 4,253 features to fewer than 715. After reduction, the stacking classifier with reduced ResNet50 features achieved 99.64% accuracy, nearly matching the full-feature performance while substantially improving efficiency.
Feature importance analysis using the random forest selection process identified the top 50 most discriminative features from each deep architecture. These high-importance features are believed to correspond to complex textures, tumor shapes, tissue density variations, and spatial organization patterns that differentiate cancerous from healthy prostate tissue.
The VGG16 and ResNet50 models identified partially overlapping but distinct sets of high-importance features, suggesting that different architectures capture complementary aspects of cancer-related image patterns. This supports ensemble approaches that aggregate predictions from multiple architectures.
Across all models and classifiers, SUVmean-equivalent features showed higher reliability than maximum-value features, mirroring findings in other medical imaging AI research where mean metrics are more stable than peak measurements across the spatial variation inherent in MRI data.
The feature reduction from 4,253 to approximately 680-714 features -- a reduction of over 83% -- while maintaining near-identical classification performance demonstrates that the deep networks extract significant redundancy in their feature representations, and that a much smaller subset carries the true diagnostic signal for prostate cancer.
A key strength of this approach is the use of publicly available pretrained networks rather than training from scratch, which makes the method accessible to research groups without large proprietary datasets or extensive computational infrastructure. The transfer learning approach effectively overcomes the fundamental challenge of limited annotated medical imaging data.
The significant class imbalance in the dataset -- 738 healthy versus 3,514 cancer-positive images -- represents a methodological limitation. Imbalanced datasets can cause models to favor the majority class. While the high performance metrics suggest this was managed adequately, future work incorporating oversampling or cost-sensitive learning could provide more balanced evaluation.
The dataset itself is a notable constraint: all images came from a single institution (NCI, Bethesda) with 26 patients, captured using specific imaging parameters. Models trained on this data may not generalize well to images from different scanners, acquisition protocols, or patient populations -- a common challenge in medical AI that requires multi-center validation.
Despite these limitations, the extremely high accuracy figures demonstrate that the combined deep feature extraction and ensemble classification pipeline has strong potential as a computer-aided detection tool to assist radiologists in prostate cancer MRI interpretation, potentially reducing diagnostic workload and improving detection consistency across clinical settings.