When a kidney tumor is biopsied or removed, pathologists examine the tissue under a microscope and assign it a grade from 0 (normal) to 4 (most abnormal). This grade reflects how different the cancer cells look from healthy cells and strongly predicts how aggressively the cancer is likely to behave. Higher-grade tumors tend to grow faster and spread more readily.
Grading has traditionally relied on the expert judgment of trained pathologists reviewing glass slides. This process is time-consuming, subject to variation between different pathologists, and requires specialized expertise that may not be available equally in all healthcare settings. An automated system that can grade kidney cancer tissue images consistently and quickly could help address these limitations.
This study developed a new automated pipeline called KCDC-SODLPI (Kidney Cancer Disease Classification with Snake Optimizer Deep Learning Pipeline for Image analysis). The goal was to build a system that grades kidney cancer histopathology images into five categories with high accuracy and without requiring manual expert review at each step.
The pipeline consists of three main stages working in sequence. First, each histopathology image is enhanced to improve its quality and make microscopic tissue features more visible. Second, a deep learning model called SE-DenseNet extracts hundreds of informative features from the enhanced image. SE-DenseNet combines dense connections between layers, which encourages feature reuse, with squeeze-and-excitation attention blocks that help the network focus on the most diagnostically important regions of each image.
Third, the extracted features are passed to a BiLSTM (Bidirectional Long Short-Term Memory) classifier. Although BiLSTM was originally developed for analyzing sequential data such as text or time-series signals, it has been adapted here to process the sequence of feature values extracted from pathology images. Reading features in both forward and backward directions allows the model to capture relationships between distant image regions that simpler classifiers might miss.
A critical innovation was using the Snake Optimizer (SO) to tune the hyperparameters of both the feature extractor and classifier automatically. Hyperparameters are settings that control how a model learns, such as learning rate, number of layers, and batch size. Rather than setting these by hand through trial and error, the Snake Optimizer searches for the best combination systematically, inspired by the foraging behavior of snakes. This automated tuning contributed to the final model's strong performance.
The entire pipeline was trained and tested on the RCCGNet dataset, which contains 3000 histopathological kidney images, with 500 images for each of five grades: Grade 0 (normal tissue) through Grade 4 (severe sarcomatoid or rhabdoid differentiation). This balanced dataset allowed fair assessment of performance across all severity levels.
The KCDC-SODLPI pipeline achieved an overall classification accuracy of 88.90% across all five kidney cancer grades. The model also demonstrated strong precision, recall, and F1 scores, suggesting that its performance was consistent rather than driven by particularly easy-to-classify grades boosting the overall number.
A key practical strength is speed. The full pipeline processed a set of images in 5.93 seconds, well within the range required for integration into a fast clinical workflow. In time-sensitive situations, such as intraoperative frozen sections, having results in under 10 seconds can directly influence surgical decisions made while the patient is still on the operating table.
Comparative evaluation against other machine learning methods showed that KCDC-SODLPI outperformed several established approaches including standard CNNs and other recurrent neural network classifiers. The ablation analysis confirmed that each component of the pipeline, including the Snake Optimizer tuning, contributed meaningfully to overall accuracy, with performance declining when any single stage was removed.
For patients, a faster and more consistent grading system means less time waiting for results that determine what treatment they need. Delays in grading can delay surgery, the start of systemic therapy, or enrollment in clinical trials. An automated system that can deliver preliminary grading within seconds could meaningfully shorten this waiting period.
For pathologists, automated grading is intended to serve as a decision-support tool rather than a replacement. The system can flag cases that fall near the boundary between grades for priority expert review, while processing clear-cut cases more efficiently. This could allow pathologists to focus their limited time on the ambiguous and complex cases where their expertise adds the most value.
The authors note that while performance on the RCCGNet dataset is impressive, this is a curated research dataset. Real-world tissue samples often have more variability in staining quality, tissue processing, and scanner types. Clinical validation across multiple pathology laboratories using their own imaging hardware is the essential next step before this system could be adopted in practice.
The KCDC-SODLPI system demonstrates that combining advanced feature extraction, bidirectional sequential learning, and intelligent hyperparameter optimization can produce a high-performing automated grading tool for kidney cancer histopathology. The approach is modular, meaning individual components can be updated or replaced as better techniques emerge.
The Snake Optimizer approach to automated tuning is particularly notable because it reduces the expert knowledge required to configure and deploy a machine learning pipeline. This democratization of AI development could make it easier for researchers in lower-resource settings to build effective diagnostic models without needing machine learning specialists.
Future directions include extending the pipeline to grade other cancer types, integrating molecular subtype information alongside grade, and testing whether the system can predict not just histological grade but also patient survival outcomes directly from the pathology image. The foundation built in this study positions KCDC-SODLPI as a starting point for a broader computational pathology toolkit.