Renal cell carcinoma (RCC) encompasses multiple histologic subtypes with distinct biological behaviors, treatment responses, and prognoses. Accurate subtype classification is essential for guiding therapy, but manual pathological review of whole slide images (WSIs) is time-consuming, labor-intensive, and subject to interobserver variability.
Whole slide images present a unique computational challenge due to their enormous size, often exceeding 100,000 x 100,000 pixels. Standard image classification approaches that require labeled regions of interest are impractical at this scale, as detailed pixel-level annotation across thousands of slides would require prohibitive pathologist effort.
Automated classification systems must contend with substantial variation in staining protocols, scanner hardware, and tissue processing across different hospitals and laboratories. A model trained on data from one institution may fail when applied to slides from another, limiting clinical generalizability.
Existing deep learning approaches for renal pathology classification have typically relied on small datasets from single institutions, making it difficult to assess true generalizability. A large multicenter dataset is needed to develop and validate models suitable for real-world deployment.
Multiple Instance Learning (MIL) was chosen as the classification framework because it operates at the slide level rather than requiring patch-level annotations. In MIL, each slide is treated as a bag of image patches, and only the slide-level label is required for training. The model learns to identify which patches within a bag are most informative for the slide-level prediction.
Each WSI was divided into non-overlapping patches of fixed size, and a pre-trained ResNet-18 backbone was used to extract feature vectors from each patch. ResNet-18 was selected for its balance of accuracy and computational efficiency, enabling processing of thousands of patches per slide.
Patch-level features were aggregated into a slide-level representation using an attention mechanism that learns to weight each patch based on its relevance to the classification task. This attention-based pooling allows the model to focus on diagnostically important regions such as tumor nests, while ignoring uninformative areas such as stroma or artifacts.
The model output is a probability distribution over the target classes: clear cell RCC, papillary RCC, chromophobe RCC, oncocytoma, and normal tissue. This five-class formulation reflects the clinical need to distinguish not only between malignant subtypes but also between malignant and benign entities.
The study assembled a dataset of 12,223 whole slide images from 2,535 patients collected across five hospitals and public databases. This scale substantially exceeds prior renal pathology datasets and enables evaluation of model performance across genuine institutional diversity.
The dataset spans three participating hospitals in China plus publicly available slides from The Cancer Genome Atlas and other sources. Slides were scanned on different scanner platforms and stained using different laboratory protocols, introducing systematic batch effects that test the model's robustness.
Class distribution across the dataset reflected real-world prevalence, with clear cell RCC being the most common category and chromophobe RCC and oncocytoma being rarer. Balancing strategies were applied during training to prevent the model from being dominated by the most frequent class.
Quality control steps were applied to exclude slides with severe staining artifacts, tissue folding, or excessive blurring. Only slides meeting minimum quality criteria were included, ensuring that performance estimates reflect deployable model behavior rather than artificially favorable conditions.
The model achieved a weighted average F1-score of 0.879 and a weighted average AUC of 0.969 across all five classes when evaluated on the full multicenter test set. These results demonstrate that the MIL approach generalizes well beyond the training institution and can handle realistic variation in slide quality and staining.
Performance varied across histologic subtypes. Clear cell RCC, the most common subtype with the most training examples, achieved the highest F1-score. Chromophobe RCC and oncocytoma showed lower but clinically meaningful accuracy, consistent with the known morphological similarity between these entities that challenges even expert pathologists.
Institution-level performance analysis revealed that slides from hospitals not represented in training still showed acceptable classification accuracy, although with some performance drop compared to the training-distribution hospitals. This demonstrates partial domain generalization but highlights the remaining challenge of scanner and protocol variability.
The attention visualization maps generated by the model highlighted regions consistent with pathologist-expected diagnostic areas: regions with prominent clear cytoplasm and delicate vasculature for clear cell RCC, papillary structures for papillary RCC, and cells with perinuclear halos for chromophobe RCC. These maps confirm that the model is attending to biologically relevant features.
The strong multicenter performance validates the hypothesis that attention-based MIL can aggregate patch-level information into robust slide-level predictions without requiring detailed region annotations. This is a critical advantage for clinical adoption, as annotated training data is expensive to generate at scale.
The ability to distinguish oncocytoma from chromophobe RCC, two entities that are frequently confused due to morphological overlap, is clinically important because oncocytoma is benign and chromophobe RCC is malignant. Improved automated distinction could reduce unnecessary surgery in patients with benign lesions.
Domain shift between hospitals remains a practical limitation. When test slides come from scanners or staining protocols not seen during training, performance degrades. Future work incorporating domain adaptation or stain normalization preprocessing could reduce this gap and improve cross-institutional deployment.
Integration of this system into clinical workflows would allow pathologists to receive a preliminary classification suggestion with an attention heatmap highlighting the regions driving the prediction. This human-in-the-loop design preserves pathologist oversight while reducing the manual burden of reviewing thousands of slides per year.
This study demonstrates that a ResNet-18 based MIL model trained on a large multicenter dataset can classify renal tumor histologic types from whole slide images with high accuracy and meaningful cross-institutional generalizability.
The use of attention-based aggregation provides not only a classification prediction but also interpretable evidence in the form of spatial attention maps, which align with established pathological criteria and support trust in the model's reasoning.
The dataset scale of over 12,000 slides and the multicenter design set a new benchmark for evaluating renal pathology AI systems under realistic deployment conditions. Future studies should include additional rare histologic subtypes and expand geographic and demographic diversity of included institutions.
Clinical integration of such systems, even as decision-support tools rather than autonomous classifiers, could meaningfully reduce pathologist workload, improve diagnostic consistency, and accelerate the adoption of precision treatment planning for renal cancer patients worldwide.