Kidney cancer accounts for about 2 to 3% of all adult cancers worldwide and is among the top ten most common cancers globally. Early and accurate detection is critical because it directly influences treatment choices and patient outcomes. Traditional diagnosis using CT scans, MRI, or biopsy requires significant radiologist expertise and introduces subjective variability. Deep learning models, particularly Convolutional Neural Networks (CNNs), have emerged as powerful tools for automating feature extraction and classification in medical images, offering greater consistency.
Among the most widely used CNN architectures, ResNet-50 stands out because its deep residual framework with skip connections prevents the vanishing gradient problem that limits how deep a network can effectively be trained. Other architectures used in medical imaging include AlexNet (8 layers), GoogLeNet (22 layers, using inception modules), and Inception V3 (factorized convolutions with label smoothing). Each has architectural strengths, but all share a common limitation: their performance depends critically on hyperparameter settings such as learning rate, batch size, and weight initialization.
Finding the best hyperparameter combination by hand, through trial and error, is time-consuming and often produces suboptimal results because traditional search methods can get stuck in local optima. This study proposed using the Walrus Optimization Algorithm (WaOA), a nature-inspired metaheuristic algorithm, to automatically search for the best hyperparameter settings for ResNet-50, and then used Occlusion Sensitivity Analysis to make the optimized model's decision-making process transparent and interpretable for clinicians.
The Walrus Optimization Algorithm (WaOA) is inspired by how walruses forage as a group. It operates in three phases. In the Exploration Phase, the algorithm searches broadly across many possible hyperparameter combinations, mimicking walruses fanning out to find food. In the Exploitation Phase, once promising configurations are identified, the algorithm focuses the search around those candidates to fine-tune the settings. A Dynamic Adaptive Strategy controls the balance between these two phases using a fitness function that evaluates model accuracy, precision, recall, and log loss at each step.
This approach directly addresses a key weakness of earlier optimization methods like Particle Swarm Optimization and Genetic Algorithms, which can converge too quickly on a suboptimal solution. WaOA's combination of broad exploration and targeted refinement prevents this premature convergence and helps find globally better hyperparameter settings. The specific hyperparameters optimized for ResNet-50 were the weight and bias learning rates, which control how much the model updates its internal parameters during each training step.
All models, including AlexNet, GoogLeNet, Inception V3, standard ResNet-50, and WaOA-optimized ResNet-50, were trained on 12,446 abdominal CT images from multiple hospitals in Dhaka, Bangladesh. The dataset covered four categories: cyst (3,709 images), normal kidney (5,077 images), kidney stone (1,377 images), and tumor (2,283 images). Images were resized to 224 by 224 pixels, normalized to pixel values between 0 and 1, and augmented with horizontal flipping, rotation, and brightness adjustment. The dataset was split 80% for training, 10% for validation, and 10% for testing. Training used the Adam optimizer with cross-entropy loss, a batch size of 32, and 100 epochs.
Head-to-head comparison of all five models showed a clear progression in performance as architectural sophistication increased. AlexNet achieved 90.47% accuracy, GoogLeNet 92.16%, Inception V3 93.77%, and standard ResNet-50 90.51%. The WaOA-optimized ResNet-50 outperformed all of them with 94.53% accuracy, 93.28% precision, 91.32% recall, 92.16% F1-score, 98.06% specificity, and 99.33% AUC-ROC. Notably, the unoptimized ResNet-50 performed worse than Inception V3 before optimization, demonstrating that architecture alone does not determine performance and that hyperparameter tuning is essential.
The Matthews Correlation Coefficient (MCC), which measures overall prediction reliability by accounting for all four categories of outcomes (true positives, true negatives, false positives, and false negatives), reached 0.9038 for WaOA-ResNet-50, the highest among all tested models. The Log Loss of 0.1597 was the lowest, indicating that the model's probability estimates were more confident and accurate. The only cost was a slight increase in inference time to 0.1133 seconds per image, compared to 0.0499 seconds for standard ResNet-50, a trade-off that the study judged acceptable given the substantial gains in diagnostic performance.
Confusion matrix analysis confirmed that WaOA-optimized ResNet-50 was particularly effective at distinguishing tumors from normal tissue, which is the most clinically critical classification. Misclassifications were most common for visually similar categories like normal tissue and cysts, which is consistent with clinical experience that these can appear similar on CT before contrast enhancement reaches its peak effect.
Occlusion Sensitivity Analysis works by systematically covering small patches of an input CT image and measuring how much each covered region changes the model's prediction confidence. Regions where covering the patch greatly reduces confidence are the regions the model is using most heavily to make its decision. Warm colors (red and yellow) on the resulting map indicate high importance; cool colors (blue and green) indicate lower importance.
For cyst detection, the model's high-sensitivity regions concentrated in the upper abdominal area around fluid-filled structures. For normal kidney images, activation was minimal and broadly distributed, confirming the model was not falsely focusing on artifacts when classifying scans as normal. For kidney stones, the sensitivity map highlighted the kidney region specifically, aligning with the clinical reality that stones appear as focal dense opacities within the kidney. For tumors, the model emphasized mass-like structures and tissue boundaries, exactly where clinicians would expect to look.
This interpretability analysis is particularly valuable for clinical adoption. One of the main barriers to using AI in clinical practice is that models behave as black boxes, making decisions that doctors cannot verify or explain to patients. By showing which image regions influenced each decision, Occlusion Sensitivity Analysis allows radiologists to confirm that the AI is reasoning from the same anatomical features they would examine themselves, building the trust necessary for real-world deployment.
This study demonstrated that the choice of hyperparameters is not a minor technical detail but a major determinant of diagnostic performance. By using the Walrus Optimization Algorithm to automatically find better learning rates and weight initialization values for ResNet-50, the researchers achieved a 4-percentage-point improvement in accuracy and a 1.2-point improvement in AUC-ROC compared to the next-best model. The approach confirms that metaheuristic optimization can squeeze substantially more performance out of existing neural network architectures without redesigning them.
The integration of Occlusion Sensitivity Analysis addresses a fundamental challenge in medical AI: the need for models that are not only accurate but also explainable. Clinicians need to understand why an AI system flagged a scan as malignant before they can responsibly act on that recommendation. A model that focuses on medically meaningful anatomy provides a verification pathway that supports clinical judgment rather than replacing it.
Future directions include combining CT-based predictions with histopathological imaging, genomic profiles, and patient clinical records to build more comprehensive diagnostic systems. Real-time deployment in a clinical decision support system and validation on larger, multi-institutional datasets would be the next steps toward bringing this technology into routine use. Hybrid optimization techniques combining WaOA with other algorithms could further improve performance as the approach matures.